Import Snowflake semantic views
Import a Snowflake semantic view into a Vulcan project: configure the Snowflake gateway, run import_semantic_view and create_external_models, fix inputs.yaml, then plan and query the result over REST.
If you have a semantic view defined natively in Snowflake, you can import it into a Vulcan project instead of writing kind: semantic YAML by hand. Vulcan reads the view definition directly from Snowflake, translates it to the Vulcan semantic format, and writes one YAML file per table under models/snowflake_semantic/. The result is a standard Vulcan semantic layer with dimensions, measures, segments, joins, and REST/GraphQL/MySQL-wire endpoints.
This guide covers the full workflow from a blank directory to a running REST API against an imported semantic view.
Prerequisites
Vulcan installed with the Snowflake engine extra (
vulcan-0.228.1.32-py3-none-any.whl[snowflake])A Snowflake connection configured in your
config.yamlA Snowflake Semantic View created in Snowflake (requires Snowflake Enterprise edition or higher)
Initialize your project
If you are starting from scratch:
mkdir my-project && cd my-project
vulcan initThis creates the standard project layout:
my-project/
├── config.yaml
└── models/If you already have a Vulcan project, skip this step.
Edit config.yaml to add your Snowflake gateway. Use the key-pair JWT method recommended for production:
For password-based authentication or key-pair setup instructions, see Set up authentication in your Snowflake account.
Import the semantic view
Run import_semantic_view and pass the name of the semantic view:
To target a specific database and schema, use a fully qualified name:
Vulcan calls SYSTEM$READ_YAML_FROM_SEMANTIC_VIEW() on Snowflake and translates the result into Vulcan's kind: semantic format. The generated files land under:
Each file is a standard Vulcan semantic model file. You can add measures, adjust joins, or add ai_context, just like any hand-authored semantic model.
Generate external model stubs
Vulcan needs the column schema of the underlying Snowflake tables that the semantic view references. Run:
This writes inputs.yaml to the project root. Each entry lists a source table with its columns and types, which Vulcan uses for join inference and query transpilation.
Fix inputs.yaml
The generated inputs.yaml has 2 issues that must be corrected before vulcan plan will succeed.
Before:
After:
Apply these fixes to every entry in the file:
Remove the quotes around the table name
Quoted identifiers break table resolution during planning
Add dialect: snowflake
Ensures the correct SQL transpilation dialect for each external table
Add grain: [<primary_key>]
Required for join inference; use the primary key column of each table
Plan
Review the output and confirm. Vulcan registers all imported semantic models and makes them queryable.
Re-import after a view change
If the Snowflake Semantic View definition changes, remove the old translated files and start the import from scratch:
Then reapply the inputs.yaml fixes (dialect, grain, and unquote) and run vulcan plan.
Related links
import_semantic_view: full CLI reference and optionscreate_external_models: generatesinputs.yamlfrom the connected warehouseSnowflake Engine Manual: identifier casing rules, permissions, and troubleshooting
Semantic Models: editing and extending the generated YAML files
Vulcan API Guide: REST, GraphQL, and MySQL wire protocol query reference
Last updated
Was this helpful?