Skip to content

Make dbt-core an optional dependency so edr can run against dbt v2 without a second dbt #2354

Description

@dobsontom

Is your feature request related to a problem? Please describe.

elementary-data declares dbt-core<3.0.0,>=1.8 as a hard dependency, and every adapter extra pulls a 1.x adapter that depends on it too. Installed alongside dbt==2.0.1 (the Fusion engine), dbt-core wins the install: both ship a dbt console script and a dbt Python package, and dbt --version afterwards reports 1.12.4. Every dbt run in that environment silently drops to dbt 1.x.

The CLI imports dbt-core in one place, from dbt.cli.main import dbtRunner, dbtRunnerResult in clients/dbt/api_dbt_runner.py, which is the dbt 1.x runner. Dbt2Runner from #2333 drives Fusion over a subprocess and doesn't need it, and edr never opens a warehouse connection of its own, so under dbt v2 neither dbt-core nor a Python adapter is doing anything.

Describe the solution you'd like

Move dbt-core out of the base dependencies into an extra, the way the adapters already are, so pip install elementary-data on its own works against a Fusion binary found through DBT_FUSION_PATH. #2333 already detects "no dbt-core, Fusion binary present", so the runtime side exists and this is packaging.

Describe alternatives you've considered

Keeping edr in its own virtualenv, separate from the dbt project's. That's what we've done, though it means a second lockfile and a second dependabot entry for one CLI.

Additional context

elementary-data 0.26.0, dbt 2.0.1 on Snowflake, Python 3.14.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions