More control over CSV import

So I want more control over a CSV import…what if I don’t want to import all records? What if I want to “rollup” records. Like hypothetically, if I had a say a bunch of transactions on Wednesday but in the CSV each transaction was individual, with a date (Wednesday), amount and location…is there a way to program in javascript to essentially “rollup” all those transactions so I write to airtable a single record, with the date of that record, a total amount from all the records with that date and a field with the locations. Is that possible or should I just build a whole other table to do the rollup? Seems like a time consuming extra step that I could just program in and skip an extra table and time rolling it up.

At very least is there a way to “limit” what gets imported?

I haven’t imported from a CSV in ages, but if you haven’t found a way to limit what’s imported, chances are it’s not possible. My best recommendation at the moment is to have a separate “import” table where the raw data is imported, then run a script to process that data and add records to your primary table using the aggregation method you described.

1 Like

Yes, I do this all the time. CSV data is often among the least ingest-ready data out there. By its very nature, a CSV file lacks any degree of normalization or consistency because – text – after all, has no rules. :wink:

There are plenty of places in the community where stuff like this has been discussed and there are code examples like here, here, and here.

This is precisely one of the many roles an integrated scripting model provides for extending Airtable’s ability to deal with the outer world of crappy data; arguably, CSVs are tip of that spear.