duckdb / dbt-duckdb

dbt (http://getdbt.com) adapter for DuckDB (http://duckdb.org)
Apache License 2.0
882 stars 78 forks source link

dbt-duckdb issue with Buena Vista remote and using postgres_scan in model #238

Open grahamwetzler opened 1 year ago

grahamwetzler commented 1 year ago

I'm getting this error when trying to build a model that uses postgres_scan in dbt-duckdb and using Buena Vista as a remote:

15:33:27  Runtime Error in model stg_ltss (models/staging/stg_ltss.sql)
15:33:27    Catalog Error: Function with name "postgres_scan" is not in the catalog, but it exists in the postgres_scanner extension.
15:33:27    
15:33:27    To install and load the extension, run:
15:33:27    INSTALL postgres_scanner;
15:33:27    LOAD postgres_scanner;

Steps to reproduce:

grahamwetzler commented 1 year ago

A workaround I found is to add LOAD postgres_scanner to the model's pre-hook or the project's on-run-start

jwills commented 1 year ago

Hey @grahamwetzler! I'm on vacation (I go on vacation a lot these days) but the intent is to run a BV server that is dbt-aware via the duckdbt server (which essentially configures a BV server by using the config info from the profiles.yml file, including e.g. loading extensions and what not.)

I still need to update it for dbt-duckdb 1.6.0 and do some other things (see above re: vacation), but it's on my TODO list for when I get back!

grahamwetzler commented 1 year ago

Ah, ok. So user error? If so I will close and wait patiently for your update 😀

jwills commented 1 year ago

Nah, more like laziness and poor documentation on my part. ;-)