The problem I’m having
I am new to dbt and currently I using dbt power user.
I am trying to upload a csv file to my DB (in SnowFlake), via “dbt seed” command
The CSV is prepared via python:
name = r’\report_’ + current_date.strftime(‘%Y%m%d’) + csv
file_name = path + name
df.to_csv(file_name, index=False)
The error :
1 of 1 START seed file product_finance.finance_report_20240616 … [RUN]
09:29:09 1 of 1 ERROR loading seed file product_finance.finance_report_20240616 … [ERROR in 3.46s]
09:29:09
09:29:09 Finished running 1 seed in 0 hours 0 minutes and 7.30 seconds (7.30s).
09:29:09
09:29:09 Completed with 1 error and 0 warnings:
09:29:09
09:29:09 Database Error in seed finance_report_20240616 (seeds\finance_report_20240616.csv)
001003 (42000): SQL compilation error:
syntax error line 1 at position 362 unexpected ‘Name’.
syntax error line 1 at position 402 unexpected ‘Type’.
syntax error line 1 at position 426 unexpected ‘text’.
syntax error line 1 at position 430 unexpected ‘,’.
syntax error line 1 at position 438 unexpected ‘Type’.
syntax error line 1 at position 447 unexpected ‘,’.
syntax error line 1 at position 454 unexpected ‘text’.
syntax error line 1 at position 465 unexpected ‘text’.
syntax error line 1 at position 485 unexpected ‘text’.
syntax error line 1 at position 503 unexpected ‘date’.
syntax error line 1 at position 528 unexpected ‘text’.
syntax error line 1 at position 532 unexpected ‘)’.
09:29:09
09:29:09 Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1
What I’ve already tried
I removed any spaces from the file_name
Thanks