metadata-ingestion/docs/dev_guides/sql_profiles.md
SQL Profiling collects table level and column level statistics. The SQL-based profiler does not run alone, but rather can be enabled for other SQL-based sources. Enabling profiling will slow down ingestion runs.
:::caution
Running profiling against many tables or over many rows can run up significant costs. While we've done our best to limit the expensiveness of the queries the profiler runs, you should be prudent about the set of tables profiling is enabled on or the frequency of the profiling runs.
:::
Extracts:
{{ inline /docs/generated/ingestion/sql_profiling_support_table.md.snippet }}
DataHub uses a SQLAlchemy-based profiler by default for all SQL sources.
The default profiler runs profiling queries directly against your SQL source's existing SQLAlchemy connection and emits the table- and column-level statistics listed under Capabilities. No additional dependencies are required beyond the SQL connector itself.
No configuration is required to use it — any SQL source with profiling enabled will use the SQLAlchemy profiler automatically:
source:
config:
profiling:
enabled: true
:::warning
The Great Expectations profiler is deprecated and is planned for removal in a future release. The SQLAlchemy profiler above is the recommended replacement and has feature parity for all dataset- and column-level metrics. Existing users still relying on method: ge should plan to migrate.
:::
To use the legacy GE profiler, install the optional profiling-ge extra and set profiling.method explicitly:
pip install 'acryl-datahub[profiling-ge]'
source:
config:
profiling:
enabled: true
method: ge
If you set profiling.method: ge without installing the extra, the ingestion will fail with a ConfigurationError pointing at the fix.
The two profilers produce equivalent dataset- and column-level statistics. The only known difference is histogram bucket layout (controlled by include_field_histogram, off by default): the SQLAlchemy profiler uses 10 equal-width buckets, while the GE profiler uses Great Expectations' adaptive partitioning.