Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SL-1873] Remove MetricFlow's direct dependency on dbt-core #1087

Closed
3 tasks done
tlento opened this issue Mar 20, 2024 · 2 comments
Closed
3 tasks done

[SL-1873] Remove MetricFlow's direct dependency on dbt-core #1087

tlento opened this issue Mar 20, 2024 · 2 comments

Comments

@tlento
Copy link
Contributor

tlento commented Mar 20, 2024

tl;dr - for historical reasons MetricFlow has a direct dependency on dbt-core. This is causing problems with package management and deployment, particularly for dbt-core updates (such as 1.8) which are not fully backwards compatible with older adapter package versions.

MetricFlow was originally kind of a semantic layer in a box, with three different SqlClient implementations targeting three major SQL warehouse engines (and all of their associated dependencies). This was not sustainable, so when we built the integration with dbt-core last year we moved in the direction of having MetricFlow become a query building library. The first step was to eliminate the custom SqlClient implementations in favor of using dbt adapters to power the CLI and test suites. Alongside this we also forked the semantic model and metric spec into a separate package (dbt-semantic-interfaces) in order to allow dbt-core and MetricFlow to share the same model for expressing metric definitions.

For historical reasons having to do with the way dbt parses project configuration and how, prior to dbt-core 1.8, the adapter interfaces were bundled in dbt core, MetricFlow needed to depend on dbt-core to preserve testability and CLI query access for local development.

This situation has caused a number of problems with package updates, which we've worked around with some degree of effort. Those issues are back with the update to 1.8, and worse than before since we are also having some difficulties with third party adapters (e.g., DuckDB) that are burdensome to us.

It is, therefore, time to finish the job and move all dbt-core dependencies out of the main MetricFlow package. This involves the following steps:

SL-1873

@tlento tlento changed the title Remove MetricFlow's direct dependency on dbt-core [SL-1873] Remove MetricFlow's direct dependency on dbt-core Mar 20, 2024
@markfickett
Copy link

+1 It would be great to ease the update to dbt-core 1.8.0 which we'd like to do to pick up unit tests.

@tlento
Copy link
Contributor Author

tlento commented May 10, 2024

This is done. The next MetricFlow release will not depend on dbt-core. Due to some separate package configuration concerns the simplest path for installation will, as a practical matter, require dbt-core 1.8.0 or later but this sort of version locking will also be relaxed in the future.

@tlento tlento closed this as completed May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants