Importing CSV

Options
Sorry if this is basic, but please bear with me.  

I am trying to automate importing a CSV into the database.  If I manually import CSV, it gives me an error saying it is invalid.  I discovered that it was because the CSV contains characters such as "(" or "&" and it was giving me errors.  Once I manually replace these characters then the CSV is accepted and records were imported.

The question is, how can I use this to automate CSV upload if I need to first clean the data?  Use another process somewhere to first clean the data and then upload?  Is there something in Xano that I can do this in 1 step?
Thanks

Comments

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    Assuming you want to do this all in Xano, one possibility is to just ship the raw text to a xano endpoint and use the logic there to clean it up and ship the resulting records into your database. It's more work than the one-click built-in CSV import, but I think you're looking for more logic to happen here. 

    There are other solutions to transform your data before you ship it to Xano. WHich is right depends on how much data you are working with and how often you want to ship this CSV.
  • Nicholas Fok
    Nicholas Fok Member
    Options
    Thanks - however the data that I'm trying to import is originally a csv file.  I have no control over its generation.  I was hoping that Xano could handle it without first going to another app to clean it so that Xano can read it.  
  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options
    Please contact support and attach the csv file you are using. You can reference this community post as well for context. It sounds like it may not be escaped properly. We can take a look and see what is going on.