Hello, Trying to use new `PrefectDbtRunner` dbt c...
# ask-community
v
Hello, Trying to use new
PrefectDbtRunner
dbt class with
dbt-trino
and received package incompatibility issue. A conflict is between prefect-dbt and dbt-trino packages. Tried to use dbt-trino from 1.8.0 to 1.9.0 but the results are the same. Prefect version is 3.2.7. What would be a solution to resolve it?
Copy code
+uv pip install prefect[dbt]==0.7.0 prefect[github] dbt-trino==1.9.0 dbt-sqlserver==1.8.2 dbt-postgres==1.8.2 chardet==5.2.0 minio==7.2.15
Using Python 3.11.11 environment at: /usr/local
  × No solution found when resolving dependencies:
  ╰─▶ Because dbt-common>=1.14.0 depends on typing-extensions>=4.4 and only
      the following versions of dbt-common are available:
          dbt-common<=1.14.0
          dbt-common==1.15.0
      we can conclude that dbt-common>=1.14.0 depends on
      typing-extensions>=4.4.
      And because dbt-trino==1.9.0 depends on dbt-common>=1.14.0 and
      prefect==0.7.0 depends on typing-extensions<4.0, we can conclude that
      dbt-trino==1.9.0 and prefect[dbt]==0.7.0 are incompatible.
      And because you require prefect[dbt]==0.7.0 and dbt-trino==1.9.0, we can
      conclude that your requirements are unsatisfiable.
n
hi @Vitaly Saversky
Copy code
prefect[dbt]==0.7.0
this is saying "give me
prefect 0.7.0
with the dbt extra"
which is probably not what you want, I assume you want 3.x
Copy code
+uv pip install prefect[dbt]>=3.2.7 prefect[github] dbt-trino==1.9.0 dbt-sqlserver==1.8.2 dbt-postgres==1.8.2 chardet==5.2.0
this looks like it might be coming from EXTRA_PIP_PACKAGES, so id guess you have the wrong version specified in that env var somewhere
oh! maybe you're trying to check out the new prefect-dbt, which i see is 0.7.0rc1
in that case, itd be
prefect-dbt==0.7.0
where you'd have to allow pre-releases
v
Hi @Nate Yes, correct. Thanks.
n
when you use the "extra" syntax (ie square brackets) and specify a version, that's specifying the version of the parent package, not the extra
v
Do I need to use prefect_dbt==0.7.0?
I tried
Copy code
+uv pip install prefect_dbt==0.7.0 prefect[github] dbt-trino==1.8.2 dbt-sqlserver==1.8.2 dbt-postgres==1.8.2 chardet==5.2.0 minio==7.2.15
Using Python 3.11.11 environment at: /usr/local
  × No solution found when resolving dependencies:
  ╰─▶ Because there is no version of prefect-dbt==0.7.0 and you require
      prefect-dbt==0.7.0, we can conclude that your requirements are
      unsatisfiable.
n
where are you specifying EXTRA_PIP_PACKAGES?
v
Yes, in the worker.
In the section Environment Variables (Optional) Environment variables to set when starting a flow run.
n
try adding
--prerelease allow
at the end of your string value for that
in general I'd recommend building an image so you can be more sure about your deps
v
Thank you!
n
did that work?
I've never tried that, but it should work bc the value of EXTRA_PIP_PACKAGES is just passed wholesale to
uv pip install
v
I can't try it now. It seems it should work. I wanted to use profiles.yml templating functionality from PrefectDbtRunner. I might need to go another way to store credentials.
👍 1
c
Any update on this?