How work with branch using DBT + Dremio + Nessie

@balaji.ramaswamy I have a project where I use DBT + Dremio and Nessie. All my tables are created in branch “main” on Nessie. How I do to use other branch using Dbt?

if you want select table with branch use select * from <source>.<table or view > AT BRANCH <branchname>, Currently ,dbt-dremio not support with branch directly, but you can defination one
custom macro with branch like this

{%- macro refv2(schema,table,branch ) -%}
    {%- set relation = api.Relation.create(schema=schema,identifier=table)  -%}
    {{return (relation ~ ' AT ' ~  'branch ' ~ branch)  }}
{%- endmacro %}

when using with dbt model , you can write like this

select * from  {{refv2("dbtv4","dalongdemoapp","prod")}};

dbt will compile like this

select * from  "dbtv4"."dalongdemoapp" AT branch prod;

maybe need more custom macros for better support nessie branch feature