Area: Product Issues
Sub-Area: AI Documentation Generation
Applies to: Cloud
Issue
You click "Generate with AI" on a Snowflake semantic view in DataHub Cloud. The request fails and you see an error that starts with "Failed to generate summary." The semantic view page shows no columns.
Error Messages
The error toast starts with Failed to generate summary. and contains this text:
The AI service encountered an error. Please try again in a few moments. If the issue persists, contact your DataHub administrator.
The text is often wrapped as java.lang.RuntimeException: ... and followed by a Root cause: part that repeats it.
You Might Be Asking
- Why does AI description generation fail on my Snowflake semantic views?
- Why are my semantic views visible in DataHub but have no columns?
- Why does the ingestion report show
semantic_views_scanned: 0? - Can AI descriptions be generated from the view definition alone?
- Where is the "Generate with AI" button on a semantic model?
Cause
The AI documentation service reads the dataset's schema (its columns) before it generates anything. If the dataset has no schema in DataHub, the service rejects the request. DataHub then shows the generic "AI service encountered an error" message. The message does not name the real cause.
The Snowflake source writes the columns of a semantic view only when semantic view ingestion runs for it. Semantic view ingestion is off by default (semantic_views.enabled: false). It also skips semantic views that the ingestion role can't read. A view definition alone does not give the AI service a schema.
Solution
-
Confirm the asset has no columns. Open the semantic view in DataHub and check the Columns tab. If it is empty, the AI service has no schema to work with.
-
Check the report of the last Snowflake ingestion run.
-
semantic_views_scannedcounts the semantic views the run found. A value of 0 means the run picked up none. -
databases_scannedis a count, not a list of names. If it is lower than you expect, check that the role can use the database and thatdatabase_patternallows it. - Look for the warning titled
Could not fetch semantic views for schema. It means the run could not read semantic views in that schema because of the Snowflake edition or missing privileges.
-
-
Check Snowflake edition and role privileges. Semantic views need Snowflake Enterprise Edition or above. The ingestion role needs
USAGEon the database and schemas, andREFERENCESorSELECTon the semantic views. The DataHub prerequisites cover semantic views with the view grants:grant usage on DATABASE "<your-database>" to role datahub_role; grant usage on all schemas in database "<your-database>" to role datahub_role; grant usage on future schemas in database "<your-database>" to role datahub_role; grant references on all views in database "<your-database>" to role datahub_role; grant references on future views in database "<your-database>" to role datahub_role;See the full list in the Snowflake prerequisites.
-
Check the recipe filters. Make sure
database_pattern,schema_patternandsemantic_view_patternallow the semantic views. Keepinclude_technical_schemaat its default oftrue; withfalse, the source skips semantic view processing. -
Turn on semantic view ingestion in the Snowflake recipe:
source: type: snowflake config: # ... existing connection and pattern settings ... semantic_views: enabled: true column_lineage: true # optional: column-level lineage for semantic viewsIf your recipe sets
known_snowflake_edition: STANDARD, the source turns semantic view ingestion off. See the Snowflake source reference. -
Re-run the ingestion. Confirm that
semantic_views_scannedis greater than 0. -
Find the right entity and retry "Generate with AI". How the semantic view shows up depends on
semantic_views.emit_semantic_model_entities:- Unset (the default): on DataHub Cloud 2.1.0 and later, the source emits each semantic view as a Semantic Model entity, unless the Metrics feature is off. Each logical table becomes a dataset with subtype
Semantic Model Datasetthat carries the columns. "Generate with AI" appears only on datasets and queries, so it is not on the Semantic Model page. Use it on theSemantic Model Datasetentities. -
false: the source emits each semantic view as one dataset with subtypeSemantic Viewand its columns. Use "Generate with AI" on that dataset.
- Unset (the default): on DataHub Cloud 2.1.0 and later, the source emits each semantic view as a Semantic Model entity, unless the Metrics feature is off. Each logical table becomes a dataset with subtype
Additional Notes
- DataHub shows the same generic message for any request the AI service rejects. Another case is an asset with more than 3000 columns, which AI documentation does not support.
- If the AI model call itself fails, the message is different:
Failed to generate summary. Could not generate a description for this asset. - To test whether the problem is limited to semantic views, try "Generate with AI" on a regular Snowflake table that has columns.
- If the semantic view has columns and generation still fails, contact DataHub Support with the asset URN and the time of the failure.