Area: Ingestion Issues
Sub-Area: Profiling Configuration
Applies to: OSS + Cloud
Issue
You turned on profiling in your Snowflake ingestion recipe, but the Stats tab for some or all datasets shows no row count, column count, storage size, or top users.
You Might Be Asking
- Why are my dataset statistics empty when profiling is enabled?
- What's the difference between profiling stats and usage stats?
- Do I need to remove the size and row limits to get row counts for big tables?
- Why do some tables show stats while others don't after ingestion?
Cause
The Stats tab gets its data from two different parts of ingestion:
- Profiling writes row count, column count, storage size and column statistics.
- Usage ingestion (
include_usage_stats) writes query counts and top users.
A dataset shows no profile data when the Snowflake source never builds a profile for it. That happens when:
- The dataset is a view. The Snowflake connector profiles tables only. No setting turns on view profiling.
- The table is an external table and
profiling.profile_external_tablesisfalse(the default). - The table doesn't match
profile_pattern, or doesn't matchtable_pattern. - You set
profiling.profile_if_updated_since_days, and the table hasn't changed in that many days.
The size and row limits don't cause empty stats. profiling.profile_table_size_limit (default 5 GB) and profiling.profile_table_row_limit (default 5,000,000) only stop column-level profiling. A table over either limit still gets a table-level profile with row count, column count and storage size, taken from Snowflake's table metadata.
Top users come from usage ingestion, not profiling. A dataset has no top users if usage ingestion is off, if your user_email_pattern filters out every user, or if nobody queried the dataset in the usage time window. By default the window is the last full day.
Solution
- Put
profile_patternat the top level of the source config, not underprofiling. Theprofilingblock rejects keys it doesn't know, so a nestedprofile_patternfails recipe validation. Check that your allow and deny rules don't exclude the tables you expect:
source:
type: snowflake
config:
# ...connection settings...
profiling:
enabled: true
profile_pattern:
deny:
- "my_db.schema_to_exclude.*"
-
Read the run report. Profiling skips are counted per schema:
-
profiling_skipped_table_profile_pattern: the table didn't matchprofile_pattern. -
profiling_skipped_not_updated: the table hasn't changed since its last profile, or sinceprofile_if_updated_since_days. -
profiling_skipped_size_limitandprofiling_skipped_row_limit: the table was over a limit. It still got a table-level profile, but no column statistics. -
profiling_skipped_other: for Snowflake, external tables skipped becauseprofile_external_tablesis off.
To list each dataset that didn't get a profile, set
profiling.report_dropped_profiles: true. -
-
Raise or remove the limits only if you need column statistics on large tables. Set them to
nullto remove them:
profiling:
enabled: true
profile_table_size_limit: null
profile_table_row_limit: null
Column-level profiling runs queries against each table in your Snowflake warehouse. Removing the limits means more warehouse compute. If you only need row count, column count and size, set profiling.profile_table_level_only: true. DataHub then builds the profile from table metadata and skips the column queries.
- Check usage settings for top users.
include_usage_statsdefaults totrue. Make sure youruser_email_patternlets through the users you expect:
include_usage_stats: true
user_email_pattern:
allow:
- ".*"
The role DataHub uses needs access to Snowflake's usage history. See the prerequisites on the Snowflake source page.
- Understand stateful profiling. When
stateful_ingestionis enabled,enable_stateful_profiling(defaulttrue) records when each table got a column-level profile. On later runs it skips a table that hasn't changed since then and counts it inprofiling_skipped_not_updated. The earlier profile stays on the Stats tab. A table that never got a profile isn't skipped this way, so stateful profiling doesn't explain a table with no stats at all. To force a full re-profile, setenable_stateful_profiling: falseat the top level of the source config for one run. Don't turn offstateful_ingestionfor this; that also turns off stale entity removal for the run.
stateful_ingestion:
enabled: true
enable_stateful_profiling: false