Area: Ingestion Issues
Sub-Area: Snowflake Connector, Permissions and Semantic Views
Applies to: OSS + Cloud
Issue
You list a database in the database_pattern allow list of your Snowflake recipe. The run succeeds, but nothing from that database shows up in DataHub: no schemas, no tables, no semantic views. The run shows no error or warning for that database.
On DataHub Cloud, this can also show up later as a failure when you click Generate with AI on a dataset that has no columns in DataHub.
Error Messages
On DataHub Cloud, Generate with AI shows Failed to generate summary. followed by:
The AI service encountered an error. Please try again in a few moments. If the issue persists, contact your DataHub administrator.
This message is generic. The AI service returns it for any failure. One cause is a dataset with no columns (no schemaMetadata aspect) in DataHub.
If the role can't see any database at all, the run reports a failure with this message:
No databases found. Please check permissions.
You Might Be Asking
- Why are some databases in my Snowflake allow list not ingested, even though the names are right?
- How do I use
databases_scannedto check whether DataHub can see my database? - How can I tell which databases were actually ingested?
- What permissions does the DataHub Snowflake role need for semantic views?
- Do I need
include_column_lineage: trueto get columns on semantic views? - Why does Generate with AI fail on my Snowflake semantic view?
Cause
The connector builds its database list from information_schema.databases. That view lists only the databases your role can use. A database where the role has no USAGE privilege is not in the list, so the connector never sees it.
The connector applies database_pattern to that list. A database the role can't see never reaches the allow list check. The connector does not warn about allow list entries that match nothing. It reports a failure only when the list is empty.
The databases_scanned counter in the run report is the check for this problem. It counts the databases the role can see, which are the databases where it has USAGE. A database without USAGE is never counted. By default the count is taken before database_pattern filters the list, so it can also include visible databases that are not in your allow list. Compare it with the number of databases the role should see, not with the size of your allow list. If the count is lower than you expect, a grant is missing.
AI description generation on DataHub Cloud reads the dataset's columns from its schemaMetadata aspect. If the dataset has no columns, generation fails with the generic error above. A semantic view in a database the role can't see is never ingested, so it has no columns to use.
Solution
-
Check which databases the run actually processed.
Check
databases_scannedin the run report. It counts the databases the role can see. A database withoutUSAGEis not counted.Then use the stage lines as a second check. They show by name which allow-listed databases the connector processed. The connector processes each database in its own stage. Search the ingestion run log for lines like this, one per database:
Stage started: <DATABASE_NAME>: Metadata Extraction at <timestamp>An allow-listed database with no such line was not processed. If the run reports
No databases found. Please check permissions., the role can't see any database. -
Grant the DataHub role access to each missing database.
Run these in Snowflake for each database. Replace
<your_database>and<datahub_role>with your values.GRANT USAGE ON DATABASE <your_database> TO ROLE <datahub_role>; GRANT USAGE ON ALL SCHEMAS IN DATABASE <your_database> TO ROLE <datahub_role>; GRANT REFERENCES ON ALL TABLES IN DATABASE <your_database> TO ROLE <datahub_role>; GRANT REFERENCES ON ALL VIEWS IN DATABASE <your_database> TO ROLE <datahub_role>;Semantic views need
REFERENCESorSELECT. TheREFERENCES ON ALL VIEWSgrant covers them. The full list, including future grants and the warehouse grant, is in the Snowflake source prerequisites. -
Turn on semantic view ingestion if you need semantic views.
Semantic view ingestion is off by default. It needs Snowflake Enterprise Edition or higher. Add this under
configin your recipe. In the DataHub UI, use the YAML editor for the recipe.source: type: snowflake config: # ... your existing configuration ... semantic_views: enabled: true column_lineage: true # optional: column lineage from semantic views to base tablesSemantic view columns come from
include_technical_schema. It defaults totrue. Make sure your recipe does not set it tofalse. Withinclude_technical_schema: false, the connector emits no semantic view columns.You don't need
include_column_lineagefor columns. It already defaults totrue, and it only controls column lineage for tables and views. -
Run the ingestion again.
Check
databases_scannedagain together with the stage lines. Check the log for aMetadata Extractionstage line for each database you expect. Thesemantic_views_scannedcounter counts the semantic views the connector found. It stays0whensemantic_views.enabledisfalseor the role can't see any semantic views. -
Check the columns, then try Generate with AI again.
How a semantic view shows up depends on the
semantic_views.emit_semantic_model_entitiessetting:- Semantic View dataset: each semantic view is one dataset with the subtype
Semantic View. This is what you get on DataHub Core (OSS), on DataHub Cloud before 2.1.0, when the Metrics feature is off, or when you setemit_semantic_model_entities: false. Open the dataset and check its Columns tab. - Semantic Model: on DataHub Cloud 2.1.0 or later with Metrics on, the setting turns on by default when you leave it unset. Each semantic view becomes a Semantic Model entity, with a Metric entity for each metric. Each logical table in the view becomes a dataset with the subtype
Semantic Model Dataset, and those datasets hold the columns. These entities don't appear on database or schema pages. Find them with search or lineage.
Generate with AI is available on datasets and queries. Once the dataset has columns, retry it from the dataset page.
- Semantic View dataset: each semantic view is one dataset with the subtype
Additional Notes
- A missing database does not fail the run. Only an empty database list reports
No databases found. Please check permissions. - You need both the grant and a matching
database_pattern. The allow list can't add a database the role can't see. - Metrics & Semantic Models need DataHub Cloud 2.1.0 or later and are on by default from 2.3.0. See the Metrics and Semantic Models prerequisites.
- The behavior described here is for the latest CLI release. If your Snowflake ingestion runs an older CLI, upgrade to the latest release.
Related Documentation
Tags: snowflake, ingestion, permissions, usage-privilege, semantic-views, schema-metadata, ai-descriptions, databases-scanned, include-technical-schema