Skip to content

feat: Configure file paths for dbt imports - #7016

Open
luc-pimentel wants to merge 2 commits into
feast-dev:masterfrom
luc-pimentel:fix/5874-dbt-file-path-template
Open

luc-pimentel wants to merge 2 commits into
feast-dev:masterfrom
luc-pimentel:fix/5874-dbt-file-path-template

Conversation

@luc-pimentel

Copy link
Copy Markdown

What this PR does / why we need it:

Adds optional --file-path-template support to feast dbt import, using {model} for the dbt model name. Direct registry imports and generated Python definitions share the same path resolution. Omitting the option keeps /data/{model}.parquet.

Invalid templates and use with non-file sources produce clear errors. Generated definitions preserve quotes, backslashes and other characters in paths. The Python APIs and documentation are updated too.

Which issue(s) this PR fixes:

Fixes #5874

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

All 117 scoped dbt tests pass. New cases cover real local Parquet retrieval through both CLI modes, relative paths, template validation, generated-string roundtrips and existing defaults. The before/after reproduction passes its controls. Scoped Ruff, formatting and mypy checks pass.

Misc

AI-assisted implementation and tests.

@luc-pimentel
luc-pimentel requested a review from a team as a code owner October 14, 2026 21:38

@haoxu0 haoxu0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@luc-pimentel

Copy link
Copy Markdown
Author

Could someone please approve the pending workflows on this PR when you have a chance? Thanks!

Share path-template validation and expansion between direct imports and
generated definitions, preserving the default path and Python literals.

Signed-off-by: Lucas Pimentel <[email protected]>
@luc-pimentel

Copy link
Copy Markdown
Author

Rebased onto master to resolve the conflict with #7067 in dbt_import.py; no other changes.

@luc-pimentel
luc-pimentel force-pushed the fix/5874-dbt-file-path-template branch from 573a437 to dd01419 Compare November 10, 2026 11:28

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dbt integration: FileSource generates invalid hardcoded paths

2 participants