Add provider-normalized context views#12
Open
fivetran-davefowler wants to merge 3 commits into
Open
Conversation
acde11b to
d93a66e
Compare
- scope to the surfaces information_schema already has (TABLES, COLUMNS); drop
RELATIONSHIPS/METRICS/ENTITIES and their provider views (deferred; relationships
should later extend REFERENTIAL_CONSTRAINTS/KEY_COLUMN_USAGE, not a custom view)
- AGENTS.TABLES/COLUMNS use SELECT t.* over information_schema as the spine
(no hardcoded native column list; inherits whatever the account exposes)
- generic identity merge: left join every discovered {provider}_tables/_columns
view, enrichment columns appended under a <provider>_ prefix, aggregated to one
row per identity to prevent fanout; no hardcoded providers
- remove hardcoded memories_count/warnings_count; memory participates later by
publishing its own *_TABLES/*_COLUMNS view and is picked up automatically
- view creation is fail-soft (warn, never break ingestion)
- align osi_columns identity parsing with osi_tables; rename helper to _relation_identity_sql
- update SPEC, proposal (v1 scope + resolved decisions), root entries, and tests
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- comment that <provider>_ prefixing keeps t.* from colliding with enrichment - is_time_dimension only true for dimension_group with type time (not duration) - document name-based, case-folded identity matching in _merge_on - README: note AGENTS.TABLES/COLUMNS are enriched information_schema and are per-database (point workflows at the data's database) - proposal: reconcile Duplicate And Merge Policy with the v1 prefixed-merge model Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds information-schema-like context views. v1 deliberately extends only the surfaces
INFORMATION_SCHEMAalready has —AGENTS.TABLESandAGENTS.COLUMNS— rather than inventing new cross-provider object types.AGENTS.<PROVIDER>_TABLES/AGENTS.<PROVIDER>_COLUMNSview (dbt, LookML, OSI).AGENTS.TABLES/AGENTS.COLUMNStake the nativeINFORMATION_SCHEMAview as the row spine viaSELECT t.*and left join every provider view that exists by object identity, appending each provider's columns under a<provider>_prefix.Design
SELECT t.*spine — inherits whatever native columns the account exposes; no hardcodedINFORMATION_SCHEMAcolumn list (removes the earlieris_hybrid/last_ddl/etc. fragility).*_TABLES/*_COLUMNSview, its columns appear automatically with no change here. (Tracked separately; not in this PR.)RELATIONSHIPS/METRICS/ENTITIES. Those are object types semantic providers (OSI) already model; the information-schema-faithful home for relationships is theREFERENTIAL_CONSTRAINTS/KEY_COLUMN_USAGEfamily (future), not a custom view.Known limitation
INFORMATION_SCHEMAis per-database, soAGENTS.TABLES/COLUMNScover the database that holds theAGENTSschema. Multi-database coverage (viaACCOUNT_USAGE) is noted as an open question in the proposal.Verification
Note: tests assert generated-SQL structure; they do not execute against Snowflake.
🤖 Generated with Claude Code