CSV Import

Options
Hi, how do we go around Xano on reading the data from imported CSV file and store it on the database? I've checked the documentation below and I was confused on the part where we import it directly into a variable and store it on the database. I've also checked the Youtube channel to search for a guide or a sample on how but was unsuccessful in finding one. 

https://docs.xano.com/importing-data#how-can-i-import-data-into-xano

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    We have csv_decode and csv_encode filters in Xano. However, the documentation does not appear to be correct as you cannot import a CSV into a variable. I may suggest as a path of least resistance to upload your CSV to airtable first then use the native Airtable import to bring the data and schema into Xano. 
  • Vince Tating
    Vince Tating Member
    Options
    Hello Michael, your response helps me a lot thank you very much. I tried the Airtable Import it creates a new table when I import CSV file but what I need is to be able to import the data from the CSV file into an existing database table in Xano. Because I want to create an API endpoint that will take a CSV file as input then upload it into existing database table.
  • Daniel Rjeili
    Options
    Hi Vince, try to convert CSV to Json, there are some tools online for example: https://www.convertcsv.com, create a function “ImportData” name it as make sense to you, create a variable importing this data recently converted to json, loop through each, you can include any manipulation you need( if need) add new record to table and more customize response for your own checks as you wish.
    Take a look if you need some more help tell me, for me worked because I have my imported cristal, clear and “well commented” for future needs. 
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    Hey this tutorial might be helpful to this post. We definitely plan to add a native CSV import. And the cleanest method is probably uploading it to Airtable and then using the native Airtable import. But I recently helped a user send a CSV to the Xano API from Parabola so thought I'd drop it here:

    
  • Abrar
    Options
    I'm trying to achieve the same thing, and have setup the Parabola import however the data import is too slow. My database has 400k records that need to migrated. How can I import this quickly?
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     perhaps check out similar tools to Parabola like an Integromat, etc. to see if they can accomplish the same thing at a better rate. 

    I know we are looking into a native csv import but don't have an eta on when that will be available or its capacity. 
  • Deep Singh
    Options
    Hi  . In a similar situation - looking to import 100k records. Wondering if you had success using integromat or any other platform here? 
  • AgIQ
    AgIQ Member
    Options

    Hi, I see there is an online video explaining how to import a csv file into an existing table. I followed the instructions, but I ran into some difficulty.

    I copied the snippet and created a csv file with headers value1, value2 etc and values. I then Run & debug and it seems the first key and values (value1) are not created. value2 and value3 etc are created 100%. I renamed the keys, but not luck. Why is that? Can you please maybe confirm your side if you get the same problem? Thx!

    Michael, any suggestions? (I tried contacting Chris via Youtube, but it has been more than 2 weeks without feedback)

    The link to the video is here: