{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Products","product_name":"Treasure Insights","type":"markdown"},"seo":{"title":"Delete a Table","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":"delete-a-table","__idx":0},"children":["Delete a Table"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All column configurations defined in the table are removed when you delete the table."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Call #DELETE /reporting/datamodels/{datamodel_id}/datasets/{datasets_id}/tables/{tables_id}."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For the API endpoint, select the appropriate ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/endpoints"},"children":["endpoint for your region"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X DELETE https://<api endpoint>/reporting/datamodels/xxxxxx/datasets/yyyyyy/tables/zzzzzz \\\n  -H 'authorization: TD1 xxxx/xxxxxxxxxxxxxx' \\\n  -H 'cache-control: no-cache' \\\n  -H 'accept: application/json'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Consider any relations defined in the table that you want to delete. After the table has been deleted, the relation definition remains. This might result in a failure to build an Insights model. To avoid this, review ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/treasure-insights/update-an-insights-model-relation"},"children":["Update a Data Model Relation"]}," before you delete the table."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"get-datasets_id-and-tables_id","__idx":1},"children":["Get datasets_id and tables_id"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Run a GET request to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/reporting/datamodels/{datamodel_id}"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check the returned payload for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["datasets"]}," section to get the datasets_id and the tables_id for the table you need to delete."]}]}]},"headings":[{"value":"Delete a Table","id":"delete-a-table","depth":1},{"value":"Get datasets_id and tables_id","id":"get-datasets_id-and-tables_id","depth":2}],"frontmatter":{"seo":{"title":"Delete a Table"}},"lastModified":"2026-03-10T06:17:28.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/treasure-insights/delete-a-table","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}