Skip to content

[AIA-223] Add per-view target database/schema override - #260

Open
sophiascaglioni-whoop wants to merge 1 commit into
mainfrom
feature/per-view-target-override
Open

sophiascaglioni-whoop wants to merge 1 commit into
mainfrom
feature/per-view-target-override

Conversation

@sophiascaglioni-whoop

Copy link
Copy Markdown
Contributor

Summary

Add optional database and schema keys to semantic view YAML definitions. When present, these override the global --db/--schema for that specific view's CREATE SEMANTIC VIEW statement.

semantic_views:
  - name: security_incidents_view
    database: SECURITY_DB
    schema: SEMANTIC_VIEWS
    tables:
      - {{ table('security_incidents') }}
  • Parse database and schema from semantic view YAML in semantic_parser.py
  • Apply per-view overrides in both sequential and parallel generation paths in generate_semantic_views.py
  • Views without these fields use the global default (fully backward compatible)
  • Add parser tests for new fields (present, partial, absent)

Prune limitation: sst drop --prune currently only checks the default database.schema location. Multi-location prune support is a follow-up.

Closes #258

Test plan

  • parse_semantic_views includes database and schema when specified
  • parse_semantic_views returns None for database/schema when not specified (backward compatible)
  • Partial override (database only, no schema) works correctly
  • All 1903 unit tests pass
  • black clean on changed files

Parse optional database and schema fields from semantic view YAML
definitions. When present, these override the global --db/--schema
for that specific view's CREATE SEMANTIC VIEW statement.

The override flows through all three code paths that build view
config dicts: the YAML parser, the manifest-based generation path,
and the Snowflake-based generation path. Both sequential and parallel
generation apply the per-view override.

Views without these fields use the global default (backward
compatible). Note: sst drop --prune only checks the default location;
multi-location prune support is tracked as a follow-up.

Closes #258
@sophiascaglioni-whoop
sophiascaglioni-whoop force-pushed the feature/per-view-target-override branch from 2d1561a to fdc74e8 Compare October 9, 2026 16:59
@sophiascaglioni-whoop sophiascaglioni-whoop changed the title [SST-258] Add per-view target database/schema override [[AIA-223]] Add per-view target database/schema override Oct 9, 2026
@sophiascaglioni-whoop sophiascaglioni-whoop changed the title [[AIA-223]] Add per-view target database/schema override [AIA-223] Add per-view target database/schema override Oct 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Per-view target database/schema override in semantic view YAML

1 participant