Closed nehiljain closed 9 months ago
So Python path stuff can be a little tricky to figure out-- did you install dbt-duckdb into the same venv?
In terms of examples, I use the module_paths stuff in this repo for loading custom UDFs and what not, but those are from custom modules-- i.e., things that aren't pip installed in a venv or whatever.
Like the macro thing that I suspect is going on is that your dbt install is using a Python path that is not/does not match the one that your virtual environment is using to install e.g. pendulum
, i.e., your issue is this one: https://stackoverflow.com/questions/76021034/facing-problem-with-dbt-duckdb-adapter-due-incompatible-issue-with-dbt-core
Yep, I was doing something stupid. Found the problem. It was related to the paths being different. Thanks @jwills
Anytime— good luck with your project!
I am trying to build my first python model. I want to use a bunch of python modules. I have them installed in the virtualenv where I am running
dbt run
.My code for the dbt model is:
But at runtime, the pendulum is missing.
Is there an example on how to use module_path or documentation of how to import libraries for running these models?