Skip to main content
GET
https://sandbox.getcollate.io/api
/
v1
/
tables
/
{id}
/
profilerConfig
GET /v1/tables/{id}/profilerConfig
from metadata.sdk import configure
from metadata.sdk.entities import Tables

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

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

# Get profiler config
config = Tables.get_profiler_config(table_id)
print(f"Sample: {config.get('profileSample')}%")

# Set profiler config - profile 50% of rows
Tables.set_profiler_config(table_id, {
    "profileSample": 50,
    "profileSampleType": "PERCENTAGE",
    "sampleDataCount": 200,
    "excludeColumns": ["created_at"]
})

# Set profiler config with specific column metrics
Tables.set_profiler_config(table_id, {
    "profileSample": 100,
    "profileSampleType": "PERCENTAGE",
    "includeColumns": [
        {"columnName": "email", "metrics": ["distinctCount", "nullCount"]},
        {"columnName": "name", "metrics": ["distinctCount", "maxLength", "minLength"]}
    ]
})

# Delete profiler config
Tables.delete_profiler_config(table_id)
{
  "profileSample": 50,
  "profileSampleType": "PERCENTAGE",
  "sampleDataCount": 200,
  "excludeColumns": ["created_at"]
}

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}/profilerConfig
id
string
required
UUID of the table.

Set Profiler Config

PUT /v1/tables/{id}/profilerConfig
id
string
required
UUID of the table.
profileSample
number
Sample size for profiling (percentage or row count depending on profileSampleType).
profileSampleType
string
Type of sample: PERCENTAGE or ROWS.
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.

Delete Profiler Config

DELETE /v1/tables/{id}/profilerConfig
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.
GET /v1/tables/{id}/profilerConfig
from metadata.sdk import configure
from metadata.sdk.entities import Tables

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

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

# Get profiler config
config = Tables.get_profiler_config(table_id)
print(f"Sample: {config.get('profileSample')}%")

# Set profiler config - profile 50% of rows
Tables.set_profiler_config(table_id, {
    "profileSample": 50,
    "profileSampleType": "PERCENTAGE",
    "sampleDataCount": 200,
    "excludeColumns": ["created_at"]
})

# Set profiler config with specific column metrics
Tables.set_profiler_config(table_id, {
    "profileSample": 100,
    "profileSampleType": "PERCENTAGE",
    "includeColumns": [
        {"columnName": "email", "metrics": ["distinctCount", "nullCount"]},
        {"columnName": "name", "metrics": ["distinctCount", "maxLength", "minLength"]}
    ]
})

# Delete profiler config
Tables.delete_profiler_config(table_id)
{
  "profileSample": 50,
  "profileSampleType": "PERCENTAGE",
  "sampleDataCount": 200,
  "excludeColumns": ["created_at"]
}

Returns

Get profiler config returns the profiler configuration object. Set profiler config returns the updated profiler configuration. Delete profiler config returns no content (204). 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)

profileSample
number
Sample size for profiling.
profileSampleType
string
Type of sample: PERCENTAGE or ROWS.
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

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission
404NOT_FOUNDTable does not exist or has no profiler config