CSV decode

Options
Hi Xano team

I need you assistance please.

I am calling an external api to retrieve a file that is in csv format and I have used the csv decode filter for this which works fine. I know need to persist this data into a table that has the same columns and the header in the csv file. The problem that I am facing is that I dont have the name of the value/pair to be able to persist the data into the correct columns in the DB. Which filter would you recommend to get the data into the correct format

[filter.PNG]
[results.PNG]

Comments

  • Riaan Backer
    Options
     - can you please assist? 
  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options
     - we have a filter create_object that is used for this - it allows you to provide an array of keys and an array of values and it will turn it into an object for you.

    Give that a try and let us know if it works for you.
  • Riaan Backer
    Options
    Thanks Sean, do you have any documentation that you can refer me to. Cant seem to find anything on your docs on this
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    Hey  here's an example to hopefully bring more clarity:

    
  • Riaan Backer
    Options
     - thanks for this, its working.

    I am uploading and processing 1000 records in a csv file and is taking around 45sec which is quite long. I would like you to have a look at the logic to see if there are any options to increase the processing speed. There will be instances where I will upload way more than a 1000 records. Please let me know what you need in order to have a look at the existing logic