Repository navigation
[AIA-223] Reject column_type aliases with actionable errors - #259
Open
sophiascaglioni-whoop wants to merge 1 commit into
Open
sophiascaglioni-whoop wants to merge 1 commit into
sophiascaglioni-whoop wants to merge 1 commit into
Conversation
sophiascaglioni-whoop
force-pushed
the
fix/measure-column-type-alias
branch
2 times, most recently
from
October 9, 2026 14:40
63f59c3 to
437cfb9
Compare
Remove all column_type aliases from get_column_type() so invalid values are no longer silently normalized. Affected aliases: - measure, metric (previously normalized to fact) - timestamp, time, date (previously normalized to time_dimension) Add COLUMN_TYPE_ALIASES map to shared/constants.py to power "Did you mean?" suggestions in validation errors. Pass columns with invalid column_type through to the validator via a new sm_skipped_columns bucket so they are not silently dropped during parsing. The validator now checks skipped columns and emits errors with alias suggestions. Closes #257
sophiascaglioni-whoop
force-pushed
the
fix/measure-column-type-alias
branch
from
October 9, 2026 14:56
437cfb9 to
fdff8a2
Compare
This branch has not been deployed
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
column_typealiases fromget_column_type()so invalid values are no longer silently normalized:measure,metric(previously normalized tofact)timestamp,time,date(previously normalized totime_dimension)COLUMN_TYPE_ALIASESmap toshared/constants.pyfor powering "Did you mean?" suggestionssm_skipped_columnsbucket to the parser so columns with invalidcolumn_typeare passed through to the validator instead of being silently droppedget_column_type()rejecting all aliases, and for validation error suggestionsCloses #257
Why these are invalid
Snowflake semantic views only support three column kinds: DIMENSION, FACT, and METRIC (SHOW COLUMNS docs, DESCRIBE SEMANTIC VIEW docs).
SST maps these to three valid
column_typevalues:dimension,fact,time_dimension. Thetime_dimensiontype is a YAML-only concept that maps to a regular DIMENSION in the deployed semantic view (YAML vs DDL docs):Values like
measure,metric,timestamp,time, anddateare not valid Snowflake semantic view column types. They are common in other BI tools (Looker, dbt metrics) which is why users write them, but SST should reject them with a clear suggestion rather than silently dropping the column.Test plan
get_column_type()returns""formeasure,metric,timestamp,time,date(new tests)measure/metric(new test)timestamp/time/date(new test)dimenson,fac,tim_dimension)sst validatenow surfaces errors for columns withcolumn_type: measureandcolumn_type: timestamp