◐ Shell
reader mode source ↗
Skip to content

dbt integration: Improve error handling for missing dbt-artifacts-parser #5870

New issue
New issue
@YassinNouh21

Description

@YassinNouh21

Context

PR #5827 added dbt integration that requires dbt-artifacts-parser dependency.

Problem

The CLI commands (feast dbt import, feast dbt list) don't explicitly catch ImportError from the parser, leading to potentially confusing error messages.

Current Behavior

# In parser.py:112
raise ImportError(
    "dbt-artifacts-parser is required for dbt integration.\n"
    "Install with: pip install 'feast[dbt]' or pip install dbt-artifacts-parser"
)

But CLI commands catch only FileNotFoundError and ValueError:

# In dbt_import.py:131-136
except FileNotFoundError as e:
    click.echo(f"{Fore.RED}Error: {e}{Style.RESET_ALL}", err=True)
    raise SystemExit(1)
except ValueError as e:
    click.echo(f"{Fore.RED}Error: {e}{Style.RESET_ALL}", err=True)
    raise SystemExit(1)

Proposed Solution

Add ImportError to exception handling in CLI commands with helpful message.

Files to Update

  • sdk/python/feast/cli/dbt_import.py (lines 131-136, 343-348)

Related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions