{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Products","product_name":"Data Workbench","type":"markdown"},"seo":{"title":"Creating or Viewing Tables","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"creating-or-viewing-tables","__idx":0},"children":["Creating or Viewing Tables"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can create or view a table by:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Databases"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select the database for which you want to add or view tables."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Table"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Type a name for the table and optionally type a description.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"The name must consist only of lower case letters, numbers, and _."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Under Schema, select Add Column."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Type or select values for the fields."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optionally, add more columns."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optionally, to delete a column from your table, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Edit Schema"]}," and select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["x"]}," to the far right of the page."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optionally, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["… > Table Settings"]},"."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200827-011034.eb96d55c9fc2ebdd96a8285fed23a404223bfd458b1dc5b24316a10002ca8be5.4c190181.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":11},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Optionally, make selections on ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Edit Settings"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200827-012423.1583446c8e8c2a719857558dabf8398b4db49079a41a54290f821b2861319e94.4c190181.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":12},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optionally, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Confirm"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]}," when your schema modification is complete."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select Save when you are done defining columns."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"td-toolbelt-example","__idx":1},"children":["TD Toolbelt Example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The table:create command creates a table named test_table within the database test_db."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td table:create test_db test_table  \n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The tables command lists the tables and the number of records in each table for a given database."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td tables test_db  \n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the tables command without specifying a database name to list all the databases and tables that you have created. For example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td tables  \n","lang":"bash"},"children":[]}]},"headings":[{"value":"Creating or Viewing Tables","id":"creating-or-viewing-tables","depth":1},{"value":"TD Toolbelt Example","id":"td-toolbelt-example","depth":3}],"frontmatter":{"seo":{"title":"Creating or Viewing Tables"}},"lastModified":"2025-11-22T02:43:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/data-workbench/databases/creating-or-viewing-tables","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}