GitHub
11/06/2024, 10:28 PMsqlfluff uses a plugin architecture for templaters, e.g. an additional package sqlfluff-templater-dbt (changed from the old pip extra sqlfluff[dbt]).
The plugin package sqlfluff-templater-dbt naturally depends on dbt and so it installs dbt-core (but not any adapter packages).
The problem is that having something like:
plugins:
transformers:
- name: dbt
pip_url: dbt==0.20.1
utilities:
- name: sqlfluff
namespace: sqlfluff
pip_url: sqlfluff sqlfluff-templater-dbt dbt-core dbt-postgres
executable: sqlfluff
is a bit wasteful in time and resources by having to
1. create two separate virtualenvs
2. install the same packages more than once
It can also lead to inconsistent versions being used (e.g. different versions of dbt).
Ideally, all of dbt, sqlfluff and sqlfluff-templater-dbt should be installed in the same environment.
meltano/meltanoGitHub
11/06/2024, 10:28 PM