Solved

How to load CSV files with DB-Extractor

  • 28 March 2024
  • 2 replies
  • 56 views

Hi, everyone

I'm trying to load a CSV file using db-extractor. This is the configuration I'm placing in the .yaml file :

 

but I'm encountering the following error:

 

It seems that the error might be that the query section doesn't recognize the sheet name. I checked that the sheet name matches by opening the file in Excel format, but the error persists. I also loaded the same file in .xlsx format and it loaded without any problem. 

 

How should I specify in the query so that it takes the correct name in CSV format?

 

Regards,

Karina Saylema

@Aditya Kotiyal  @HanishSharma  @Jason Dressel  @Jairo Salaya @Liliana Sierra 

 

 

icon

Best answer by Rogerio Júnior 2 April 2024, 08:25

View original

2 replies

Hi Karina,

Here is the example query to use with .csv files:

 

  - name: query_csv_test_local
database: csv_test_local
sheet: file

query: >
SELECT
*
FROM
file

“sheet” must be set to “file”, and your query must point to “file” as the table as well. 

Best Regards,

Rogerio Junior
Cognite Engineering

It worked great, thank you very much @Rogerio Júnior 

Reply