> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a Table

> Delete a table by ID or name, with soft/hard delete options

# Delete a Table

Delete a table by ID or fully qualified name. Supports soft delete (default), hard delete, and restore operations.

## Delete by ID

**id** `string` *required*

UUID of the table to delete.

**recursive** `boolean` (default: false)

Recursively delete child entities.

**hardDelete** `boolean` (default: false)

Permanently delete the table. If `false`, the table is soft-deleted and can be restored.

## Delete by Name

Use `DELETE /v1/tables/name/{fqn}` to delete by fully qualified name.

**fqn** `string` *required*

Fully qualified name of the table, for example `snowflake_prod.analytics.public.customers`.

**recursive** `boolean` (default: false)

Recursively delete child entities.

**hardDelete** `boolean` (default: false)

Permanently delete the table.

## Restore a Soft-Deleted Table

Use `PUT /v1/tables/restore` to restore a soft-deleted table.

**id** `string` *required*

UUID of the soft-deleted table to restore.

```python DELETE /v1/tables/{id} theme={null}
from metadata.sdk import configure
from metadata.sdk.entities import Tables

configure(
    host="https://your-company.open-metadata.org/api",
    jwt_token="your-jwt-token"
)

# Soft delete by ID
Tables.delete("a1b2c3d4-e5f6-7890-abcd-ef1234567890")

# Hard delete
Tables.delete(
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    recursive=True,
    hard_delete=True
)

# Delete by name (look up the ID first)
entity = Tables.retrieve_by_name("snowflake_prod.analytics.public.customers")
Tables.delete(entity.id)

# Restore a soft-deleted table
Tables.restore("a1b2c3d4-e5f6-7890-abcd-ef1234567890")
```

```java DELETE /v1/tables/{id} theme={null}
import java.util.Map;

// client is an initialized OpenMetadataClient.

// Soft delete
client.tables().delete("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

// Hard delete with recursive
client.tables().delete("a1b2c3d4-e5f6-7890-abcd-ef1234567890", Map.of("recursive", "true", "hardDelete", "true"));
```

```bash DELETE /v1/tables/{id} theme={null}
# Soft delete by ID
curl -X DELETE "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3" \
  -H "Authorization: Bearer {access_token}"

# Hard delete with recursive
curl -X DELETE "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3?recursive=true&hardDelete=true" \
  -H "Authorization: Bearer {access_token}"

# Delete by name
curl -X DELETE "{base_url}/api/v1/tables/name/sample_data.ecommerce_db.shopify.agent_performance_summary?recursive=true" \
  -H "Authorization: Bearer {access_token}"

# Restore soft-deleted table
curl -X PUT "{base_url}/api/v1/tables/restore" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{"id": "455e3d9d-dbbf-455e-b3be-7191daa825f3"}'
```

```json Response (Soft Delete) theme={null}
{
  "id": "455e3d9d-dbbf-455e-b3be-7191daa825f3",
  "name": "agent_performance_summary",
  "fullyQualifiedName": "sample_data.ecommerce_db.shopify.agent_performance_summary",
  "version": 0.2,
  "updatedAt": 1769982700000,
  "updatedBy": "admin",
  "tableType": "Regular",
  "serviceType": "BigQuery",
  "deleted": true
}
```

***

## Returns

Soft delete returns the table object with `deleted: true`. Hard delete returns no content (204). Restore returns the restored table object.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to delete this table |
| `404` | `NOT_FOUND` | Table with given ID or FQN does not exist |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.