Import data from CSV

I conducted quick testing for New Action of “Import CSV file” as it seems to be functional right now.

I save the CSV file (made out of Excel) and saved to local. This CSV have first row with exactly same names of column against the target table

This is observation so far.

  1. Add new row

    It works. Make sure to add “unique value explicitly” on the csv file otherwise this action wont add new rows (for rows missing the key value)

    Even we have initial value set and leaving the value in cells for key field in CSV as null/blank, action will not upload rows. Suggest to Appsheet dev team to review their code to let the action add new row even missing the cell key value while we have initial value set on the column definition on appsheet editor.

  2. Update existing row

If the value in key field in CSV matches the one in existing data key value, then the uploaded rows from CSV will update the existing row. Lovely

  1. Key value missing

See comment in 1). If we miss the value for key, either existing or new, this new action will not add new rows.

  1. Data type mis-match

For instance, we have number type on Appsheet editor, but we have text value for that field in CSV, upload csv seems to be failing. Meaning nothing is going to happen is data type mismatch is detected.

  1. CSV file type sensitive?

Save in the format of CSV UTF-8, and upload to Appsheet, it works. Other CSV file MS DOC does not work.

Those were the results of quick test withe super simple use cases . Hope other community member will add something new findings.

11 Likes

It seems that a detective is working :smiley:

3 Likes

3 Likes

Do any Workflows linked to row additions or updates via this action get activated?

2 Likes

Yes apparently.

3 Likes

Well then.
This is exciting!

I just found this new feature and came straight here looking for more info. Thank you for posting your test results! Very helpful info! :+1:

3 Likes

@tsuji_koichi ditto.

This… is epic. New levels of functionality are possible now. partyparrot (Appsheet)

3 Likes

Where exactly do you save the CSV File to?

I’m curious if this would mean that we could use CSV files as Data Sources? :thinking:

Hi Fabian. No, this is a different feature. I was referring to csv files “staying where they are on s3, azure blob, or google file storage, and then connecting to them as a kind of data source.”

1 Like

@TyAlevizos What we need: We can do a CSV export from our ERP with all our Item Numbers. This can be saved to Google Drive. I would like to use this CSV as a Data Source for my App.

You can import your CSV… and if the records already exist in the system it updates them instead of just making new duplicates.

It’s close… but not a true data source integration.

1 Like

Will the updates and adds from CSV import trigger workflow?

that’s a good question… my guess is not at this time.

My guess is they’re leveraging the internal API for record adds, and it would…

For anyone that cares…
CSV import happens VERY fast. Seemingly faster than a paste values run into google sheets.
At small file sizes you import, and it syncs and bang, you’re up…
At medium file sizes, it waits and then does a sync
At large files ~15,000 records 5.4MB it hangs forever, then says “Action Failed” but in reality all the records are in.

Also, it does trigger add and update workflows…
Strange behavior… AFTER the workflows run, which can take some serious time depending, then it does a flash sync… Which means you could have already navigated to another portion of the app, tried to do another import, etc. left the app, etc…

6 Likes

AppSheet never ceases to amaze me. partyparrot (Appsheet)


Okay @Grant_Stead I have another question for you:

Have you been able to build a way to download a csv for parents and their children? Like… push a button and get all the data for the relevant record you’re looking at?

I think I have… I just did a csv template, and created the selects…

3 Likes

Hi Koichi-san,

Thanks for doing the CSV Import tests.

I am in the process of fixing the following problems. I hope to release theses changes later this week.

  1. You will be able to omit the value for a key field having an initial value. The system will assign an InitialValue to the newly added record.
  2. Some invalid input data values were not being detected. For example, if you entered a text value in a numeric field, we did not report an error. Such errors are now detected.
  3. In found some cases where InitialValues were not being applied properly. They will now be applied.
  4. The Open File dialog that appears when you click the CSV Import button was displaying many file types. It will now only display .CSV file.

As Koichi-san and Grant said, workflow rules are triggered when you do a CSV Import. It is exactly as if you had entered the records from a client application.

5 Likes