Area: Ingestion
Sub-Area: Profiling
Applies to: OSS + Cloud
Issue
Dataset profiles (row counts, column statistics, data distributions) don't appear in DataHub after ingestion for some or all tables.
You Might Be Asking
- How do I enable dataset profiling?
- Why does one table have no profile when others do?
- Can I profile without scanning all data?
Cause
Profiling is off by default (profiling.enabled: false). When it is on, a table can lose its profile, or its column statistics, because of one of these settings:
-
profile_pattern(source level) ortable_patterndoes not allow the table. The table is not profiled. -
profile_table_row_limit(default 5000000): tables with more rows than the limit are skipped, not sampled. On Snowflake and BigQuery, a skipped table still gets a table-level profile (row count, column count, size). Only column-level profiling is skipped. Set the key tonullfor no limit. -
profile_table_size_limit(default 5): a size in GB, not a row count. Tables larger than the limit are skipped, not sampled. Set it tonullfor no limit. It is supported on Snowflake, BigQuery, Databricks, Oracle and Teradata. -
profile_if_updated_since_days: on Snowflake and BigQuery, skips tables not updated in that many days. On Dremio, it compares against DataHub's last-profiled timestamp, so it controls how often a table is profiled. -
operation_configwithlower_freq_profile_enabled: true: profiling is skipped on runs that don't match the configured day.
Solution
1. Enable profiling
Example for Snowflake. Other SQL sources use the same profiling keys.
source:
type: snowflake
config:
profiling:
enabled: true
2. Find out why a table was skipped
Run the recipe with datahub ingest -c recipe.yml. The run report counts skipped tables by reason:
profiling_skipped_table_profile_patternprofiling_skipped_not_updatedprofiling_skipped_size_limitprofiling_skipped_row_limit
To list the tables and columns that were not profiled, set report_dropped_profiles: true under profiling.
Raise the limit that matches the counter, or set it to null. For example, to profile tables of any row count:
source:
type: snowflake
config:
profiling:
enabled: true
profile_table_row_limit: null
3. Profile without scanning all rows
On BigQuery and Snowflake, sampling is on by default. use_sampling defaults to true and sample_size defaults to 10000 rows. Column-level statistics are computed on the sampled rows. Sampling does not apply to other sources.
4. Choose which statistics to collect
These default to true: include_field_null_count, include_field_distinct_count and include_field_sample_values. The min, max, mean, median and standard deviation options also default to true. These default to false: include_field_quantiles, include_field_distinct_value_frequencies, include_field_histogram.
source:
type: snowflake
config:
profiling:
enabled: true
include_field_quantiles: true
include_field_histogram: true
max_number_of_fields_to_profile: 50
To make profiling cheaper, set turn_off_expensive_profiling_metrics: true. It turns off quantiles, distinct value frequencies, histograms and sample values. It also limits profiling to 10 columns unless you set max_number_of_fields_to_profile. To skip only sample values, set include_field_sample_values: false.
For table-level stats only, set profile_table_level_only: true. Don't combine it with max_number_of_fields_to_profile or with any include_field_* key set to true. Either combination fails recipe validation.
5. Profile specific tables only
Use profile_pattern under source.config, not under profiling. There is no profiling.allow_deny_patterns key, and recipes with unknown source keys fail validation. Only tables that table_pattern also allows are considered. Use single quotes around regexes in YAML so backslashes parse.
source:
type: snowflake
config:
profile_pattern:
allow:
- 'ANALYTICS_DB\.PUBLIC\..*'
deny:
- '.*_TEMP$'
profiling:
enabled: true
profile_table_size_limit: 5
On Databricks, you can also use profiling.pattern, matched against catalog.schema.table. Databricks profiling needs a SQL warehouse id (profiling.warehouse_id or top-level warehouse_id). Without it, validation fails with warehouse_id must be set when profiling is enabled. Databricks profiling.method must be analyze (Delta tables only) or sqlalchemy. Any other value, including ge, fails validation. On Snowflake and BigQuery, profiling.method has no effect and you can remove it.
6. Run profiling less often
To profile on a weekly or monthly cadence inside a daily schedule, use operation_config:
source:
type: snowflake
config:
profiling:
enabled: true
operation_config:
lower_freq_profile_enabled: true
profile_day_of_week: 0
profile_day_of_week runs from 0 (Monday) to 6 (Sunday). You can use profile_date_of_month (1 to 31) instead.
7. Query timeouts
profiling.query_timeout_seconds is a per-statement limit. It works only on MySQL and Postgres. Other platforms, including Snowflake, ignore it.
8. Check the profile through GraphQL
Pass your dataset URN as the urn variable.
query getDatasetProfile($urn: String!) {
dataset(urn: $urn) {
datasetProfiles(limit: 1) {
rowCount
columnCount
timestampMillis
sizeInBytes
fieldProfiles {
fieldPath
uniqueCount
uniqueProportion
nullCount
nullProportion
}
}
}
}
datasetProfiles returns profiles in descending time order, so limit: 1 returns the latest.
9. Emit your own profile
To send a profile you build yourself, call DatahubRestEmitter.emit_mcp with one MetadataChangeProposal or MetadataChangeProposalWrapper. It has no entity_urn, aspect_name or aspect arguments, and a call that passes them raises a TypeError.
Notes
The default datahub-rest sink mode is ASYNC_BATCH. A successful run does not prove that every write landed, because later processing failures are not reported to the CLI. If profiles still don't appear after the report shows the tables were profiled, Cloud customers should contact DataHub Support. Self-hosted users can search the GMS pod logs for MCP Processor Error. If you run standalone consumers, search the datahub-mce-consumer pod logs instead.