Skip to main content
Solved

How to load CSV files with DB-Extractor


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 

 

 

Best answer by Rogerio Júnior

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

View original
Did this topic help you find an answer to your question?

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


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings