Dremio error with dbt

I am running locallyndremio with dbt based on this documentation

all connection are done but when I run the dbt run cmd i’m gettting this error
Completed with 1 error and 0 warnings:
06:41:23
06:41:23 Runtime Error in model my_first_dbt_model (models/example/my_first_dbt_model.sql)
06:41:23 ERROR: Validation of view sql failed. No match found for function signature my_first_dbt_model(type => )


basen on the log I able to find that the table is created but it’s not able to create the view inside dremio
Any help will be appreciated.
Thanks

1 Like

do you have a git repo to look at your code, also can you screenshot dremio is see that all your sources are connected with consistent names.

I’m experiencing the same issue. Materializing as “view” instead of “table” works. When materializing as table, the tables get created just fine in MinIO, Nessie and Dremio, so I don’t think it’s an issue with paths or the profiles.yml. Could Nessie be the problem here? I tried running the same example models without Nessie, by creating a dremio Source pointing to MinIO only, and things work as well.

Appreciate the help!

This is the specific query that fails (from running dbt run --debug):

create or replace view “@userspace”.“my_first_dbt_model” as select *
from table(
“nessie”.“my_first_dbt_model”( type=>‘iceberg’ ))

So the table gets created correctly, but the view on top of it doesn’t.

I found two possible solutions here, depending on the dbt model.

  1. If you just want to materialize as table, avoiding the creation of the view on top of it, you can use the following in your model:

{{ config(
twin_strategy=“allow”,
materialized=“table”
) }}

  1. If you’re referencing an already created table in the nessie catalog, then you can add the branch using a variable in your profiles.yml, for example:

{% set nessie_branch = var(‘nessie_branch’, ‘main’) %}

select *

from {{ ref(‘my_first_dbt_model’) }} AT branch {{ nessie_branch }}

where id = 1

I’m not sure these are the best solutions, but it worked for my use case. Hope it helps!


In summary, the problem seems to be with the clone twin_strategy in dbt-dremio, where the syntax "create or replace view “x” as select * from table(“y”( type=>‘iceberg’ )) doesn’t work for the nessie catalog, and fails with “No match found for function signature model(type => )”