You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dbt integration: Add validation for timestamp field data type #5871
PR #5827 added dbt integration that requires a timestamp field for point-in-time correctness.
Problem
The code validates that the timestamp field exists in the model columns but doesn't validate that it's actually a timestamp type. This could lead to runtime errors or incorrect behavior.
Current Behavior
# In dbt_import.py:183-189iftimestamp_fieldnotincolumn_names:
click.echo(
f"{Fore.YELLOW}Warning: Model '{model.name}' missing timestamp "f"field '{timestamp_field}'. Skipping.{Style.RESET_ALL}"
)
continue
No type checking is performed.
Proposed Solution
Add validation that the timestamp field is one of the timestamp types:
TIMESTAMP
TIMESTAMP_NTZ / TIMESTAMP_LTZ / TIMESTAMP_TZ
DATETIME
DATE
Warn users if the field exists but has an incompatible type.
Example
timestamp_col=next((cforcinmodel.columnsifc.name==timestamp_field), None)
iftimestamp_col:
normalized_type=timestamp_col.data_type.upper()
valid_ts_types= ['TIMESTAMP', 'TIMESTAMP_NTZ', 'TIMESTAMP_LTZ', 'TIMESTAMP_TZ', 'DATETIME', 'DATE']
ifnotany(tinnormalized_typefortinvalid_ts_types):
click.echo(f"{Fore.YELLOW}Warning: Timestamp field '{timestamp_field}' has type '{timestamp_col.data_type}' which may not be suitable{Style.RESET_ALL}")
Reproduced on Feast 0.67.0 and current master. A dbt model whose event_timestamp column is declared STRING or INT64 imports with no warning; only a missing column is caught. A FeatureView built that way fails at get_historical_features with AttributeError: 'str' object has no attribute 'tzinfo'.
In sdk/python/feast/cli/dbt_import.py, import_command checks only that the timestamp column exists. Fix in #7038: the column's dbt type is checked through the existing type mapping and a warning is printed when it is not a timestamp type; the model is still imported. Columns with no declared data_type reach the CLI as STRING and trigger the same warning.
Activity
darshil929 commentedon Oct 17, 2026
I’d like to work on this. I’ll check the existing timestamp type mapping and put together a focused validation change with tests.
Could a maintainer assign this to me?
luc-pimentel commentedon Oct 19, 2026
Reproduced on Feast 0.67.0 and current master. A dbt model whose
event_timestampcolumn is declaredSTRINGorINT64imports with no warning; only a missing column is caught. A FeatureView built that way fails atget_historical_featureswithAttributeError: 'str' object has no attribute 'tzinfo'.In sdk/python/feast/cli/dbt_import.py, import_command checks only that the timestamp column exists. Fix in #7038: the column's dbt type is checked through the existing type mapping and a warning is printed when it is not a timestamp type; the model is still imported. Columns with no declared
data_typereach the CLI asSTRINGand trigger the same warning.AI-assisted implementation and tests.