feast-dev / feast-dev/feast

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

Open
#5,870 1 comment 0 reactions 1 assignee Claimed by @kchawlani19 View on GitHub
Dominant language
Python
Stars
7.3k
Forks
1.4k
Avg merge
1d 21h
Merged PRs (30d)
15

Description

## 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
```python
# 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`:
```python
# 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
- PR #5827

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.