Reading excel in dbt-core using duckdb

Hi,
I am having trouble in reading from a .xlsx file in my dbt pipeline.

I use

  with raw as (
    select * from read_excel_auto('data/test.xlsx')
  )
  
  select *
  from raw
  limit 20

Compilation Error - ‘None’ has no attribute ‘table’

Any help would be appreciated :slight_smile:

An update..
If i try
select * from read_xlsx(‘data/test.xlsx’)
from the duckdb cli I am able to load the test.xlsx file.
however if i run the same thing via a dbt model – dbt run
I get this error:
Runtime Error in model “some model info” –
_Map_base::at

Found the working solution

What worked:

  1. Upgrading:
pip install --upgrade duckdb dbt-duckdb 
  1. running:dbt compile before run

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.