> ## 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.

# Tables

> Create and manage table entities within a database schema

# Tables

A **Table** is the most feature-rich entity in OpenMetadata. It belongs to a DatabaseSchema and represents a structured dataset with columns, profiles, sample data, lineage, and more.

> [!NOTE]
>
> Entity schema follows the [OpenMetadata Standard](https://openmetadatastandards.org/data-assets/databases/table/).

## Entity Hierarchy

Tables sit at the bottom of the database hierarchy:

```txt Table theme={null}
DatabaseService
└── Database
    └── DatabaseSchema
        └── Table (this page)
```

## FQN Format

A table's fully qualified name follows the pattern:

```
service.database.schema.table
```

For example: `snowflake_prod.analytics.public.customers`

## SDK References

* **Python**: `from metadata.sdk.entities import Table`
* **Java**: `org.openmetadata.sdk.entities.Tables` / `org.openmetadata.sdk.fluent.Tables`

***

## API Endpoints

### CRUD Operations

| Method | Endpoint | Description |
| - | - | - |
| `PUT` | `/v1/tables` | [Create or update a table](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/create.md) |
| `POST` | `/v1/tables` | [Create a table (POST variant)](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/create.md) |
| `GET` | `/v1/tables` | [List tables](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/list.md) |
| `GET` | `/v1/tables/{id}` | [Get by ID](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/retrieve.md) |
| `GET` | `/v1/tables/name/{fqn}` | [Get by FQN](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/retrieve.md) |
| `PATCH` | `/v1/tables/{id}` | [Update by ID](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/update.md) |
| `PATCH` | `/v1/tables/name/{fqn}` | [Update by name](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/update.md) |
| `DELETE` | `/v1/tables/{id}` | [Delete by ID](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/delete.md) |
| `DELETE` | `/v1/tables/name/{fqn}` | [Delete by name](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/delete.md) |
| `PUT` | `/v1/tables/restore` | [Restore soft-deleted table](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/delete.md) |

### Versions

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v1/tables/{id}/versions` | [List versions](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/versions.md) |
| `GET` | `/v1/tables/{id}/versions/{version}` | [Get specific version](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/versions.md) |

### Import / Export

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v1/tables/name/{fqn}/export` | [Export to CSV](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/import-export.md) |
| `GET` | `/v1/tables/name/{fqn}/exportAsync` | [Export to CSV (async)](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/import-export.md) |
| `PUT` | `/v1/tables/name/{fqn}/import` | [Import from CSV](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/import-export.md) |
| `PUT` | `/v1/tables/name/{fqn}/importAsync` | [Import from CSV (async)](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/import-export.md) |

### Sample Data

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v1/tables/{id}/sampleData` | [Get sample data](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/sample-data.md) |
| `PUT` | `/v1/tables/{id}/sampleData` | [Add sample data](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/sample-data.md) |
| `DELETE` | `/v1/tables/{id}/sampleData` | [Delete sample data](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/sample-data.md) |

### Profiler & Profile Data

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v1/tables/{id}/profilerConfig` | [Get profiler config](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/profiler.md) |
| `PUT` | `/v1/tables/{id}/profilerConfig` | [Set profiler config](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/profiler.md) |
| `DELETE` | `/v1/tables/{id}/profilerConfig` | [Delete profiler config](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/profiler.md) |
| `GET` | `/v1/tables/{id}/tableProfile` | [Get table profile](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/profiler.md) |
| `GET` | `/v1/tables/{id}/columnProfile` | [Get column profile](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/profiler.md) |
| `GET` | `/v1/tables/{id}/systemProfile` | [Get system profile](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/profiler.md) |

### Pipeline Observability

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v1/tables/{id}/pipelineObservability` | [Get observability data](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/observability.md) |
| `PUT` | `/v1/tables/{id}/pipelineObservability` | [Add observability data](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/observability.md) |

### Relationships & Data Model

| Method | Endpoint | Description |
| - | - | - |
| `PUT` | `/v1/tables/{id}/joins` | [Add join info](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/relationships.md) |
| `PUT` | `/v1/tables/{id}/dataModel` | [Set data model](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/relationships.md) |
| `GET` | `/v1/tables/{id}/columns` | [Get columns](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/relationships.md) |

### Custom Metrics

| Method | Endpoint | Description |
| - | - | - |
| `PUT` | `/v1/tables/{id}/customMetric` | [Add custom metric](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/custom-metrics.md) |
| `DELETE` | `/v1/tables/{id}/customMetric/{metricName}` | [Delete custom metric](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/custom-metrics.md) |

### Followers & Votes

| Method | Endpoint | Description |
| - | - | - |
| `PUT` | `/v1/tables/{id}/followers` | [Add follower](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/followers-votes.md) |
| `DELETE` | `/v1/tables/{id}/followers/{userId}` | [Remove follower](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/followers-votes.md) |
| `PUT` | `/v1/tables/{id}/vote` | [Add/update vote](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/api-reference/data-assets/tables/followers-votes.md) |

### Query & Usage

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v1/tables/{id}/tableQuery` | Get table queries |
| `PUT` | `/v1/tables/{id}/tableQuery` | Add table query |
| `GET` | `/v1/tables/{id}/usageSummary` | Get usage summary |

### Tests

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v1/tables/{id}/testSuite` | Get test suite |
| `PUT` | `/v1/tables/{id}/testSuite` | Add test suite |
| `DELETE` | `/v1/tables/{id}/testSuite` | Delete test suite |

### Lineage

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v1/tables/{id}/lineage` | Get lineage |
| `PUT` | `/v1/tables/{id}/lineage` | Add lineage edge |
| `DELETE` | `/v1/tables/{id}/lineage` | Delete lineage edge |

### Entity Relationships

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v1/tables/{id}/relationships` | Get entity relationships |
| `PUT` | `/v1/tables/{id}/relationships` | Add entity relationship |
| `DELETE` | `/v1/tables/{id}/relationships/{relId}` | Delete entity relationship |


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