Repository navigation
feat: Warn when the dbt import timestamp field is not a timestamp type - #7038
Open
luc-pimentel wants to merge 2 commits into
Open
luc-pimentel wants to merge 2 commits into
luc-pimentel wants to merge 2 commits into
Conversation
Author
|
Could someone please take a look at this PR when you have a chance? Thanks! |
Signed-off-by: luc-pimentel <[email protected]>
The import command only checked that the timestamp column exists, so a column declared STRING or INT64 produced a FeatureView whose timestamp_field cannot anchor point-in-time retrieval. Check the column's dbt type with the existing dbt-to-Feast mapping and print a warning when it does not map to a timestamp type. The model is still imported. Signed-off-by: luc-pimentel <[email protected]>
luc-pimentel
force-pushed
the
fix/5871-dbt-timestamp-type-warning
branch
from
November 10, 2026 13:22
47b02a4 to
46b60e0
Compare
Author
|
Rebased onto master to resolve the conflict with #7067. The conflicts were in the import block and the troubleshooting section; the check itself is unchanged. All 56 dbt unit tests pass. |
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.
What this PR does / why we need it:
feast dbt importchecked only that the timestamp column exists. A column declaredSTRINGorINT64imported silently, and the resulting FeatureView fails at the firstget_historical_featurescall withAttributeError: 'str' object has no attribute 'tzinfo'.The import now checks the column's dbt type through the existing dbt-to-Feast type mapping and prints one warning per model when it does not map to a timestamp type. The model is still imported. Columns with no
data_typein schema.yml reach the CLI asSTRINGand get the same warning. Spellings the mapping does not know yet, such as Postgrestimestamp with time zoneorDATETIME2, also warn; extending the mapping is a separate change. The troubleshooting section of the dbt how-to documents the new message.Which issue(s) this PR fixes:
Fixes #5871
Checks
git commit -s)Testing Strategy
New CLI tests build a manifest and run
feast dbt import --dry-run: the warning appears forSTRING,INT64and an undeclared type, and does not appear forTIMESTAMPorTIMESTAMP_NTZ(9); warned models still produce their DataSource and FeatureView. All 43 dbt unit tests pass. Scoped Ruff, formatting and mypy checks pass. The before/after reproduction on Feast 0.67.0 and master passes its controls.Misc
AI-assisted implementation and tests.