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

# Table Profiler

> Manage profiler configuration and retrieve profile data for tables

# Table Profiler

Manage the profiler configuration for a table and retrieve profiling results including table-level, column-level, and system-level profiles.

## Get Profiler Config

`GET /v1/tables/{id}/tableProfilerConfig`

**id** `string` *required*

UUID of the table.

## Set Profiler Config

`PUT /v1/tables/{id}/tableProfilerConfig`

**id** `string` *required*

UUID of the table.

**profileSampleConfig** `object`

How much data to profile. Contains `sampleConfigType` (`STATIC` or `DYNAMIC`, defaults to `DYNAMIC`) and a `config` object holding the settings for that type.

For `STATIC`, `config` takes `profileSample` (number), `profileSampleType` (`PERCENTAGE` or `ROWS`) and optionally `samplingMethodType` (`BERNOULLI` or `SYSTEM`).

For `DYNAMIC`, `config` takes `smartSampling` (boolean, defaults to `true`) and optionally `thresholds`, a list of `{rowCountThreshold, profileSample}` tiers.

**sampleDataCount** `integer`

Number of sample data rows to collect during profiling.

**profileQuery** `string`

Custom SQL query to use for profiling instead of the full table.

**excludeColumns** `array`

List of column names to exclude from profiling.

**includeColumns** `array`

List of column-level profiler configurations.

**properties**

**columnName** `string`

Name of the column.

**metrics** `array`

List of metrics to compute for this column.

## Delete Profiler Config

`DELETE /v1/tables/{id}/tableProfilerConfig`

**id** `string` *required*

UUID of the table.

## Get Table Profile

`GET /v1/tables/{id}/tableProfile`

Returns table-level profiling results (row count, size, creation date).

**id** `string` *required*

UUID of the table.

## Get Column Profile

`GET /v1/tables/{id}/columnProfile`

Returns column-level profiling results (min, max, mean, null count, distinct count).

**id** `string` *required*

UUID of the table.

## Get System Profile

`GET /v1/tables/{id}/systemProfile`

Returns system-level profiling results (DML operations, rows affected).

**id** `string` *required*

UUID of the table.

```python GET /v1/tables/{id}/tableProfilerConfig theme={null}
from metadata.sdk import configure, client
from metadata.sdk.entities import Tables

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

rest = client().ometa.client

table_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

# Get profiler config
table = Tables.retrieve(table_id, fields=["tableProfilerConfig"])
config = table.tableProfilerConfig
if config and config.profileSampleConfig:
    print(f"Sample: {config.profileSampleConfig.config.profileSample}%")

# Set profiler config - profile 50% of rows
rest.put(f"/tables/{table_id}/tableProfilerConfig", json={
    "profileSampleConfig": {
        "sampleConfigType": "STATIC",
        "config": {"profileSample": 50, "profileSampleType": "PERCENTAGE"}
    },
    "sampleDataCount": 200,
    "excludeColumns": ["created_at"]
})

# Set profiler config with specific column metrics
rest.put(f"/tables/{table_id}/tableProfilerConfig", json={
    "profileSampleConfig": {
        "sampleConfigType": "STATIC",
        "config": {"profileSample": 100, "profileSampleType": "PERCENTAGE"}
    },
    "includeColumns": [
        {"columnName": "email", "metrics": ["distinctCount", "nullCount"]},
        {"columnName": "name", "metrics": ["distinctCount", "maxLength", "minLength"]}
    ]
})

# Delete profiler config
rest.delete(f"/tables/{table_id}/tableProfilerConfig")
```

```java GET /v1/tables/{id}/tableProfilerConfig theme={null}
import java.util.List;
import java.util.Map;
import org.openmetadata.schema.type.ProfileSampleConfig;
import org.openmetadata.schema.type.TableProfilerConfig;
import org.openmetadata.sdk.network.HttpMethod;

// client is an initialized OpenMetadataClient.

String tableId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";

// Get profiler config
TableProfilerConfig profilerConfig = client.tables()
    .get(tableId, "tableProfilerConfig")
    .getTableProfilerConfig();

// Set profiler config
TableProfilerConfig newConfig = new TableProfilerConfig()
    .withProfileSampleConfig(new ProfileSampleConfig()
        .withSampleConfigType(ProfileSampleConfig.SampleConfigType.STATIC)
        .withConfig(Map.of("profileSample", 50, "profileSampleType", "PERCENTAGE")))
    .withSampleDataCount(200)
    .withExcludeColumns(List.of("created_at"));
client.tables().updateProfilerConfig(tableId, newConfig);

// Delete profiler config
client.getHttpClient().execute(
    HttpMethod.DELETE,
    "/v1/tables/" + tableId + "/tableProfilerConfig",
    null,
    Void.class
);
```

```bash GET /v1/tables/{id}/tableProfilerConfig theme={null}
# Get profiler config
curl "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/tableProfilerConfig" \
  -H "Authorization: Bearer {access_token}"

# Set profiler config
curl -X PUT "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/tableProfilerConfig" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "profileSampleConfig": {
      "sampleConfigType": "STATIC",
      "config": {"profileSample": 50, "profileSampleType": "PERCENTAGE"}
    },
    "sampleDataCount": 200,
    "excludeColumns": ["performance_score"]
  }'

# Delete profiler config
curl -X DELETE "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/tableProfilerConfig" \
  -H "Authorization: Bearer {access_token}"

# Get table profile
curl "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/tableProfile" \
  -H "Authorization: Bearer {access_token}"

# Get column profile
curl "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/columnProfile" \
  -H "Authorization: Bearer {access_token}"

# Get system profile
curl "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/systemProfile" \
  -H "Authorization: Bearer {access_token}"
```

```json Response (Profiler Config) theme={null}
{
  "id": "455e3d9d-dbbf-455e-b3be-7191daa825f3",
  "name": "agent_performance",
  "tableProfilerConfig": {
    "profileSampleConfig": {
      "sampleConfigType": "STATIC",
      "config": {"profileSample": 50, "profileSampleType": "PERCENTAGE"}
    },
    "sampleDataCount": 200,
    "excludeColumns": ["created_at"]
  }
}
```

***

## Returns

**Get profiler config** returns the table. The configuration is in its `tableProfilerConfig` field.

**Set profiler config** returns the updated table.

**Delete profiler config** returns the updated table, without a profiler configuration.

**Get table profile** returns table-level metrics (row count, size, etc.).

**Get column profile** returns column-level metrics (min, max, mean, null count, distinct count, etc.).

**Get system profile** returns system-level metrics (DML operations, rows affected, etc.).

## Response (Profiler Config)

These fields are inside the table's `tableProfilerConfig` field.

**profileSampleConfig** `object`

How much data is profiled. Contains `sampleConfigType` (`STATIC` or `DYNAMIC`) and a `config` object holding the settings for that type.

**sampleDataCount** `integer`

Number of sample data rows to collect.

**profileQuery** `string`

Custom SQL query used for profiling.

**excludeColumns** `array`

Columns excluded from profiling.

**includeColumns** `array`

Column-level profiler configurations.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission |
| `404` | `NOT_FOUND` | Table does not exist or has no profiler config |


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