◐ Shell
clean mode source ↗

feat: Add dbt integration for importing models as FeatureViews by YassinNouh21 · Pull Request #5827 · feast-dev/feast

…-dev#3335)

This PR implements the dbt-Feast integration feature requested in feast-dev#3335,
enabling users to import dbt models as Feast FeatureViews.

## New CLI Commands

- `feast dbt list` - List dbt models available for import
- `feast dbt import` - Import dbt models as Feast objects

## Features

- Parse dbt manifest.json files to extract model metadata
- Map dbt types to Feast types (38 types supported)
- Generate Entity, DataSource, and FeatureView objects
- Support for BigQuery, Snowflake, and File data sources
- Tag-based filtering (--tag) to select specific models
- Code generation (--output) to create Python files
- Dry-run mode to preview changes before applying

## Usage Examples

```bash
# List models with 'feast' tag
feast dbt list -m target/manifest.json --tag feast

# Import models to registry
feast dbt import -m target/manifest.json -e driver_id --tag feast

# Generate Python file instead
feast dbt import -m target/manifest.json -e driver_id --output features.py
```

Closes feast-dev#3335

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
- Add dbt-artifacts-parser as optional dependency (feast[dbt])
- Update parser to use typed parsing with fallback to raw dict
- Provides better support for manifest versions v1-v12

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
When parsing minimal/incomplete manifests (e.g., in unit tests),
dbt-artifacts-parser may fail validation. This change adds a graceful
fallback to use raw dict parsing when typed parsing fails.

Also updated test fixture with dbt_schema_version field.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Since dbt-artifacts-parser is an optional dependency, unit tests
should be skipped in CI when it's not installed.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Removed manual/fallback dict parsing code. The parser now exclusively
uses dbt-artifacts-parser typed objects. Updated test fixtures to
create complete manifests that dbt-artifacts-parser can parse.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Install dbt-artifacts-parser in CI so dbt unit tests run instead
of being skipped.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
- mapper.py: Fix Array element type check to use set membership instead
  of incorrect isinstance() comparison
- codegen.py: Add safe getattr() with fallback for Array.base_type access

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

ntkathole

ntkathole

- Add dbt-artifacts-parser to pyproject.toml under feast[dbt] and feast[ci] extras
- Remove separate install step from unit_tests.yml workflow
- Update all requirements lock files

Addresses review feedback from @ntkathole.

Signed-off-by: YassinNouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Add comprehensive documentation for the new dbt integration feature:
- Quick start guide with step-by-step instructions
- CLI reference for `feast dbt list` and `feast dbt import`
- Type mapping table for dbt to Feast types
- Data source configuration examples (BigQuery, Snowflake, File)
- Best practices for tagging, documentation, and CI/CD
- Troubleshooting section

Addresses review feedback from @franciscojavierarceo.

Signed-off-by: YassinNouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Add logging and defensive attribute access for Array.base_type in code
generation to prevent potential AttributeError. While Array.__init__
always sets base_type, defensive programming with warnings provides:
- Protection against edge cases or future Array implementation changes
- Clear visibility when fallback occurs via logger.warning
- Consistent error handling across both usage sites

Changes:
- Add logging module and logger instance
- Update _get_feast_type_name() to use getattr with warning
- Update import tracking logic to use getattr with warning
- Add concise comments with examples (e.g., Array(String) -> base_type = String)

Addresses code review feedback from PR feast-dev#5827.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Add clarifying comment in type_map explaining why ImageBytes and
PdfBytes are not included in the dbt type mapping. While these types
exist in Feast, dbt manifests only expose generic BYTES type without
semantic information to distinguish between regular bytes, images, or
PDFs.

Example: A dbt model with image and PDF columns both appear as
'BYTES' in the manifest, making ImageBytes/PdfBytes types unmappable
from dbt artifacts.

Addresses feedback from PR feast-dev#5827 review (franciscojavierarceo).

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
- Fix E402 linter error in feast/dbt/codegen.py by moving imports before logger initialization
- Update requirements files to include dbt-artifacts-parser in pydantic dependency comments

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

franciscojavierarceo

@franciscojavierarceo

This was referenced

Jan 16, 2026

kyledepasquale pushed a commit to kyledepasquale/feast that referenced this pull request

Jan 21, 2026
…-dev#5827)

* feat: Add dbt integration for importing models as FeatureViews (feast-dev#3335)

This PR implements the dbt-Feast integration feature requested in feast-dev#3335,
enabling users to import dbt models as Feast FeatureViews.

## New CLI Commands

- `feast dbt list` - List dbt models available for import
- `feast dbt import` - Import dbt models as Feast objects

## Features

- Parse dbt manifest.json files to extract model metadata
- Map dbt types to Feast types (38 types supported)
- Generate Entity, DataSource, and FeatureView objects
- Support for BigQuery, Snowflake, and File data sources
- Tag-based filtering (--tag) to select specific models
- Code generation (--output) to create Python files
- Dry-run mode to preview changes before applying

## Usage Examples

```bash
# List models with 'feast' tag
feast dbt list -m target/manifest.json --tag feast

# Import models to registry
feast dbt import -m target/manifest.json -e driver_id --tag feast

# Generate Python file instead
feast dbt import -m target/manifest.json -e driver_id --output features.py
```

Closes feast-dev#3335

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Address mypy and ruff lint errors in dbt integration

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Address ruff lint errors in dbt unit tests

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* style: Format dbt files with ruff

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Remove unused dbt-artifacts-parser import and fix enum import

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* feat: Use dbt-artifacts-parser for typed manifest parsing

- Add dbt-artifacts-parser as optional dependency (feast[dbt])
- Update parser to use typed parsing with fallback to raw dict
- Provides better support for manifest versions v1-v12

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add graceful fallback for dbt-artifacts-parser validation errors

When parsing minimal/incomplete manifests (e.g., in unit tests),
dbt-artifacts-parser may fail validation. This change adds a graceful
fallback to use raw dict parsing when typed parsing fails.

Also updated test fixture with dbt_schema_version field.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Skip dbt tests when dbt-artifacts-parser is not installed

Since dbt-artifacts-parser is an optional dependency, unit tests
should be skipped in CI when it's not installed.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* refactor: Simplify parser to rely solely on dbt-artifacts-parser

Removed manual/fallback dict parsing code. The parser now exclusively
uses dbt-artifacts-parser typed objects. Updated test fixtures to
create complete manifests that dbt-artifacts-parser can parse.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* ci: Add dbt-artifacts-parser to unit test dependencies

Install dbt-artifacts-parser in CI so dbt unit tests run instead
of being skipped.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Address Copilot code review comments for dbt integration

- mapper.py: Fix Array element type check to use set membership instead
  of incorrect isinstance() comparison
- codegen.py: Add safe getattr() with fallback for Array.base_type access

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Only add ellipsis to truncated descriptions

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* style: Format dbt files with ruff

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Convert doctest examples to code blocks to avoid CI failures

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add dbt-artifacts-parser to feast[ci] and update requirements

- Add dbt-artifacts-parser to pyproject.toml under feast[dbt] and feast[ci] extras
- Remove separate install step from unit_tests.yml workflow
- Update all requirements lock files

Addresses review feedback from @ntkathole.

Signed-off-by: YassinNouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* docs: Add dbt integration documentation

Add comprehensive documentation for the new dbt integration feature:
- Quick start guide with step-by-step instructions
- CLI reference for `feast dbt list` and `feast dbt import`
- Type mapping table for dbt to Feast types
- Data source configuration examples (BigQuery, Snowflake, File)
- Best practices for tagging, documentation, and CI/CD
- Troubleshooting section

Addresses review feedback from @franciscojavierarceo.

Signed-off-by: YassinNouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* docs: Add alpha warning to dbt integration documentation

Add prominent warning callout highlighting that the dbt integration is
an alpha feature with current limitations. This sets proper expectations
for users regarding:
- Supported data sources (BigQuery, Snowflake, File only)
- Single entity per model constraint
- Potential for breaking changes in future releases

Addresses feedback from PR feast-dev#5827 review comments.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add dbt-artifacts-parser to CI_REQUIRED dependencies

Ensure dbt-artifacts-parser is installed in CI environments by adding
it to the CI_REQUIRED list in setup.py. This matches the dependency
already present in pyproject.toml and ensures CI tests for dbt
integration have access to the required parser library.

Addresses feedback from PR feast-dev#5827 review comments.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add defensive Array.base_type handling with logging

Add logging and defensive attribute access for Array.base_type in code
generation to prevent potential AttributeError. While Array.__init__
always sets base_type, defensive programming with warnings provides:
- Protection against edge cases or future Array implementation changes
- Clear visibility when fallback occurs via logger.warning
- Consistent error handling across both usage sites

Changes:
- Add logging module and logger instance
- Update _get_feast_type_name() to use getattr with warning
- Update import tracking logic to use getattr with warning
- Add concise comments with examples (e.g., Array(String) -> base_type = String)

Addresses code review feedback from PR feast-dev#5827.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* docs: Add comment explaining ImageBytes/PdfBytes exclusion

Add clarifying comment in type_map explaining why ImageBytes and
PdfBytes are not included in the dbt type mapping. While these types
exist in Feast, dbt manifests only expose generic BYTES type without
semantic information to distinguish between regular bytes, images, or
PDFs.

Example: A dbt model with image and PDF columns both appear as
'BYTES' in the manifest, making ImageBytes/PdfBytes types unmappable
from dbt artifacts.

Addresses feedback from PR feast-dev#5827 review (franciscojavierarceo).

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Move imports to top of file to resolve linter errors

- Fix E402 linter error in feast/dbt/codegen.py by moving imports before logger initialization
- Update requirements files to include dbt-artifacts-parser in pydantic dependency comments

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

---------

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: YassinNouh21 <yassinnouh21@gmail.com>
Co-authored-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
Signed-off-by: Kyle DePasquale <kyle@kiddom.co>

kyledepasquale pushed a commit to kyledepasquale/feast that referenced this pull request

Jan 21, 2026

YassinNouh21 added a commit to YassinNouh21/feast that referenced this pull request

Feb 7, 2026
…-dev#5827)

* feat: Add dbt integration for importing models as FeatureViews (feast-dev#3335)

This PR implements the dbt-Feast integration feature requested in feast-dev#3335,
enabling users to import dbt models as Feast FeatureViews.

## New CLI Commands

- `feast dbt list` - List dbt models available for import
- `feast dbt import` - Import dbt models as Feast objects

## Features

- Parse dbt manifest.json files to extract model metadata
- Map dbt types to Feast types (38 types supported)
- Generate Entity, DataSource, and FeatureView objects
- Support for BigQuery, Snowflake, and File data sources
- Tag-based filtering (--tag) to select specific models
- Code generation (--output) to create Python files
- Dry-run mode to preview changes before applying

## Usage Examples

```bash
# List models with 'feast' tag
feast dbt list -m target/manifest.json --tag feast

# Import models to registry
feast dbt import -m target/manifest.json -e driver_id --tag feast

# Generate Python file instead
feast dbt import -m target/manifest.json -e driver_id --output features.py
```

Closes feast-dev#3335

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Address mypy and ruff lint errors in dbt integration

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Address ruff lint errors in dbt unit tests

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* style: Format dbt files with ruff

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Remove unused dbt-artifacts-parser import and fix enum import

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* feat: Use dbt-artifacts-parser for typed manifest parsing

- Add dbt-artifacts-parser as optional dependency (feast[dbt])
- Update parser to use typed parsing with fallback to raw dict
- Provides better support for manifest versions v1-v12

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add graceful fallback for dbt-artifacts-parser validation errors

When parsing minimal/incomplete manifests (e.g., in unit tests),
dbt-artifacts-parser may fail validation. This change adds a graceful
fallback to use raw dict parsing when typed parsing fails.

Also updated test fixture with dbt_schema_version field.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Skip dbt tests when dbt-artifacts-parser is not installed

Since dbt-artifacts-parser is an optional dependency, unit tests
should be skipped in CI when it's not installed.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* refactor: Simplify parser to rely solely on dbt-artifacts-parser

Removed manual/fallback dict parsing code. The parser now exclusively
uses dbt-artifacts-parser typed objects. Updated test fixtures to
create complete manifests that dbt-artifacts-parser can parse.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* ci: Add dbt-artifacts-parser to unit test dependencies

Install dbt-artifacts-parser in CI so dbt unit tests run instead
of being skipped.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Address Copilot code review comments for dbt integration

- mapper.py: Fix Array element type check to use set membership instead
  of incorrect isinstance() comparison
- codegen.py: Add safe getattr() with fallback for Array.base_type access

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Only add ellipsis to truncated descriptions

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* style: Format dbt files with ruff

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Convert doctest examples to code blocks to avoid CI failures

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add dbt-artifacts-parser to feast[ci] and update requirements

- Add dbt-artifacts-parser to pyproject.toml under feast[dbt] and feast[ci] extras
- Remove separate install step from unit_tests.yml workflow
- Update all requirements lock files

Addresses review feedback from @ntkathole.

Signed-off-by: YassinNouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* docs: Add dbt integration documentation

Add comprehensive documentation for the new dbt integration feature:
- Quick start guide with step-by-step instructions
- CLI reference for `feast dbt list` and `feast dbt import`
- Type mapping table for dbt to Feast types
- Data source configuration examples (BigQuery, Snowflake, File)
- Best practices for tagging, documentation, and CI/CD
- Troubleshooting section

Addresses review feedback from @franciscojavierarceo.

Signed-off-by: YassinNouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* docs: Add alpha warning to dbt integration documentation

Add prominent warning callout highlighting that the dbt integration is
an alpha feature with current limitations. This sets proper expectations
for users regarding:
- Supported data sources (BigQuery, Snowflake, File only)
- Single entity per model constraint
- Potential for breaking changes in future releases

Addresses feedback from PR feast-dev#5827 review comments.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add dbt-artifacts-parser to CI_REQUIRED dependencies

Ensure dbt-artifacts-parser is installed in CI environments by adding
it to the CI_REQUIRED list in setup.py. This matches the dependency
already present in pyproject.toml and ensures CI tests for dbt
integration have access to the required parser library.

Addresses feedback from PR feast-dev#5827 review comments.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add defensive Array.base_type handling with logging

Add logging and defensive attribute access for Array.base_type in code
generation to prevent potential AttributeError. While Array.__init__
always sets base_type, defensive programming with warnings provides:
- Protection against edge cases or future Array implementation changes
- Clear visibility when fallback occurs via logger.warning
- Consistent error handling across both usage sites

Changes:
- Add logging module and logger instance
- Update _get_feast_type_name() to use getattr with warning
- Update import tracking logic to use getattr with warning
- Add concise comments with examples (e.g., Array(String) -> base_type = String)

Addresses code review feedback from PR feast-dev#5827.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* docs: Add comment explaining ImageBytes/PdfBytes exclusion

Add clarifying comment in type_map explaining why ImageBytes and
PdfBytes are not included in the dbt type mapping. While these types
exist in Feast, dbt manifests only expose generic BYTES type without
semantic information to distinguish between regular bytes, images, or
PDFs.

Example: A dbt model with image and PDF columns both appear as
'BYTES' in the manifest, making ImageBytes/PdfBytes types unmappable
from dbt artifacts.

Addresses feedback from PR feast-dev#5827 review (franciscojavierarceo).

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Move imports to top of file to resolve linter errors

- Fix E402 linter error in feast/dbt/codegen.py by moving imports before logger initialization
- Update requirements files to include dbt-artifacts-parser in pydantic dependency comments

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

---------

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: YassinNouh21 <yassinnouh21@gmail.com>
Co-authored-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

YassinNouh21 pushed a commit to YassinNouh21/feast that referenced this pull request

Feb 7, 2026

YassinNouh21 pushed a commit to YassinNouh21/feast that referenced this pull request

Feb 7, 2026

jyejare pushed a commit to opendatahub-io/feast that referenced this pull request

Mar 9, 2026
…-dev#5827)

* feat: Add dbt integration for importing models as FeatureViews (feast-dev#3335)

This PR implements the dbt-Feast integration feature requested in feast-dev#3335,
enabling users to import dbt models as Feast FeatureViews.

## New CLI Commands

- `feast dbt list` - List dbt models available for import
- `feast dbt import` - Import dbt models as Feast objects

## Features

- Parse dbt manifest.json files to extract model metadata
- Map dbt types to Feast types (38 types supported)
- Generate Entity, DataSource, and FeatureView objects
- Support for BigQuery, Snowflake, and File data sources
- Tag-based filtering (--tag) to select specific models
- Code generation (--output) to create Python files
- Dry-run mode to preview changes before applying

## Usage Examples

```bash
# List models with 'feast' tag
feast dbt list -m target/manifest.json --tag feast

# Import models to registry
feast dbt import -m target/manifest.json -e driver_id --tag feast

# Generate Python file instead
feast dbt import -m target/manifest.json -e driver_id --output features.py
```

Closes feast-dev#3335

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Address mypy and ruff lint errors in dbt integration

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Address ruff lint errors in dbt unit tests

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* style: Format dbt files with ruff

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Remove unused dbt-artifacts-parser import and fix enum import

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* feat: Use dbt-artifacts-parser for typed manifest parsing

- Add dbt-artifacts-parser as optional dependency (feast[dbt])
- Update parser to use typed parsing with fallback to raw dict
- Provides better support for manifest versions v1-v12

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add graceful fallback for dbt-artifacts-parser validation errors

When parsing minimal/incomplete manifests (e.g., in unit tests),
dbt-artifacts-parser may fail validation. This change adds a graceful
fallback to use raw dict parsing when typed parsing fails.

Also updated test fixture with dbt_schema_version field.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Skip dbt tests when dbt-artifacts-parser is not installed

Since dbt-artifacts-parser is an optional dependency, unit tests
should be skipped in CI when it's not installed.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* refactor: Simplify parser to rely solely on dbt-artifacts-parser

Removed manual/fallback dict parsing code. The parser now exclusively
uses dbt-artifacts-parser typed objects. Updated test fixtures to
create complete manifests that dbt-artifacts-parser can parse.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* ci: Add dbt-artifacts-parser to unit test dependencies

Install dbt-artifacts-parser in CI so dbt unit tests run instead
of being skipped.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Address Copilot code review comments for dbt integration

- mapper.py: Fix Array element type check to use set membership instead
  of incorrect isinstance() comparison
- codegen.py: Add safe getattr() with fallback for Array.base_type access

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Only add ellipsis to truncated descriptions

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* style: Format dbt files with ruff

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Convert doctest examples to code blocks to avoid CI failures

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add dbt-artifacts-parser to feast[ci] and update requirements

- Add dbt-artifacts-parser to pyproject.toml under feast[dbt] and feast[ci] extras
- Remove separate install step from unit_tests.yml workflow
- Update all requirements lock files

Addresses review feedback from @ntkathole.

Signed-off-by: YassinNouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* docs: Add dbt integration documentation

Add comprehensive documentation for the new dbt integration feature:
- Quick start guide with step-by-step instructions
- CLI reference for `feast dbt list` and `feast dbt import`
- Type mapping table for dbt to Feast types
- Data source configuration examples (BigQuery, Snowflake, File)
- Best practices for tagging, documentation, and CI/CD
- Troubleshooting section

Addresses review feedback from @franciscojavierarceo.

Signed-off-by: YassinNouh21 <yassinnouh21@gmail.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* docs: Add alpha warning to dbt integration documentation

Add prominent warning callout highlighting that the dbt integration is
an alpha feature with current limitations. This sets proper expectations
for users regarding:
- Supported data sources (BigQuery, Snowflake, File only)
- Single entity per model constraint
- Potential for breaking changes in future releases

Addresses feedback from PR feast-dev#5827 review comments.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add dbt-artifacts-parser to CI_REQUIRED dependencies

Ensure dbt-artifacts-parser is installed in CI environments by adding
it to the CI_REQUIRED list in setup.py. This matches the dependency
already present in pyproject.toml and ensures CI tests for dbt
integration have access to the required parser library.

Addresses feedback from PR feast-dev#5827 review comments.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Add defensive Array.base_type handling with logging

Add logging and defensive attribute access for Array.base_type in code
generation to prevent potential AttributeError. While Array.__init__
always sets base_type, defensive programming with warnings provides:
- Protection against edge cases or future Array implementation changes
- Clear visibility when fallback occurs via logger.warning
- Consistent error handling across both usage sites

Changes:
- Add logging module and logger instance
- Update _get_feast_type_name() to use getattr with warning
- Update import tracking logic to use getattr with warning
- Add concise comments with examples (e.g., Array(String) -> base_type = String)

Addresses code review feedback from PR feast-dev#5827.

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* docs: Add comment explaining ImageBytes/PdfBytes exclusion

Add clarifying comment in type_map explaining why ImageBytes and
PdfBytes are not included in the dbt type mapping. While these types
exist in Feast, dbt manifests only expose generic BYTES type without
semantic information to distinguish between regular bytes, images, or
PDFs.

Example: A dbt model with image and PDF columns both appear as
'BYTES' in the manifest, making ImageBytes/PdfBytes types unmappable
from dbt artifacts.

Addresses feedback from PR feast-dev#5827 review (franciscojavierarceo).

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

* fix: Move imports to top of file to resolve linter errors

- Fix E402 linter error in feast/dbt/codegen.py by moving imports before logger initialization
- Update requirements files to include dbt-artifacts-parser in pydantic dependency comments

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

---------

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
Signed-off-by: YassinNouh21 <yassinnouh21@gmail.com>
Co-authored-by: Francisco Javier Arceo <arceofrancisco@gmail.com>

jyejare pushed a commit to opendatahub-io/feast that referenced this pull request

Mar 9, 2026