Forum Discussion

Efixman's avatar
Efixman
Qrew Trainee
21 days ago

CSV Import - Check Records

I am looking for help in importing a CSV file to a Company table that will check if the Company Name if it exists (text only as complete match) before importing.

This pipeline imports company data from a CSV file into a Quickbase table. It checks if a company already exists before creating a new record to prevent duplicates.

It fetches the CSV file (all+1300 rows) -  This is  test file and only has 3 rows

I receive the following error 

Validation error: Incorrect template "{{c.company}}". ValueError: invalid literal for int() with base 10: 'company'

Attched are the pipeline steps

Thank you, 

Eric

6 Replies

  • Mez's avatar
    Mez
    Qrew Assistant Captain

    Usually this is a type mismatch. Is the "company" field a string, and is the value in the file a string? Or, is the field a number and the value on the file is being treated as a string? Can you share some more screenshots of the field and the data on this test file just to confirm? 

    If the value in the file should be converted to a number, you can do: {{ c.company | int }}

    • Efixman's avatar
      Efixman
      Qrew Trainee

      The compnay field is text- (attached)

      Company in the CSV is also text 

  • Mez's avatar
    Mez
    Qrew Assistant Captain

    Noticed a few things, in the iterate step you have your column headers as 'First,Last,Company,...' yet this screenshot of the company names looks like this is column D. 

    Also, in your search step, C, do you have any filters applied in that step versus the next conditional?

    • Efixman's avatar
      Efixman
      Qrew Trainee

      I corrected the headers and matched them on the file import.  The issue came back wit a new set of errors. 

      In looking at this further the solution to correct this was the url that is added opens the file online. For QuickBase to work the CSV file it has to be downloaded and then it can process the data.  She suggested adding &download=1 to the file URL and it worked.  

      • Mez's avatar
        Mez
        Qrew Assistant Captain

        Good to hear we solved your initial issue, but adding this query parameter to the url to "download" the file is a first for me while using pipelines. Which platform was hosting this file?