Closed simonw closed 3 years ago
This may not work because the first positional argument, output_path
is currently required and must be a directory.
Rather than wait until all records have been retrieved, I'm going to have the --sqlite
option write batches of 100 records to the database as they arrive. This will allow you to run Datasette against the database and hit refresh to see the records coming in.
Will need to deal with weird column names - just hit an error against this generated SQL:
[airtable_id] TEXT PRIMARY KEY,
[ID] INTEGER,
[Location] TEXT,
[soft-dropped-column: Vaccines available?] TEXT,
An annoyance of the Airtable API is that it's not possible to distinguish many-to-one fields from many-to-many fields - a many-to-many shows up as values that are JSON lists with a single string in them.
I'm going to ignore that issue for the moment and just tolerate it.
Looks like that SQL error wasn't a problem after all - SQLite is apparently fine with columns called [soft-dropped-column: Vaccines available?]
Unlike the other options this one will take an argument - the path to the SQLite database file to export to.