Stores Airtable credentials and connection state for DBI methods. Use
airtable2() with DBI::dbConnect() to create connections.
Usage
# S4 method for class 'AirtableConnection'
dbDisconnect(conn, ...)
# S4 method for class 'AirtableConnection'
dbIsValid(dbObj, ...)
# S4 method for class 'AirtableConnection'
dbListTables(conn, ...)
# S4 method for class 'AirtableConnection,character'
dbExistsTable(conn, name, ...)
# S4 method for class 'AirtableConnection,character'
dbListFields(conn, name, ...)
# S4 method for class 'AirtableConnection,character'
dbReadTable(conn, name, ...)
# S4 method for class 'AirtableConnection,character'
dbWriteTable(conn, name, value, overwrite = FALSE, append = FALSE, ...)
# S4 method for class 'AirtableConnection,character'
dbRemoveTable(conn, name, ...)
# S4 method for class 'AirtableConnection'
dbGetInfo(dbObj, ...)Capabilities and limitations
- Reading tables
dbReadTable()works on any accessible table. You can also pass"TableName WHERE <formula>"as the name to filter records using Airtable's formula syntax.- Writing tables
dbWriteTable()works on existing tables only. Withappend = TRUEit creates new records; withoverwrite = TRUEit syncs (upsert + delete-missing) using the first column as the key.- No table creation via DBI
Use
at_create_table()to create tables.dbWriteTable()errors if the table does not already exist.- No table removal
Airtable's API cannot delete tables. Use the Airtable web UI instead.
dbRemoveTable()will error with a clear message.- No SQL queries
Arbitrary SQL is not supported. Use the high-level helpers (
air_read(),air_write(),air_upsert(),air_sync()) for more ergonomic access.- No transactions
Airtable does not support database transactions.
- Single-base or all-bases
When a
base_idis given, the connection shows that base's tables directly. Without abase_id, all accessible bases appear as schemas in the connection pane.
For most use cases, the high-level functions like air_read(), air_write(),
air_upsert(), and air_sync() provide more ergonomic interfaces for
Airtable operations.