Runs through canonical airtable2 operations against a BollardsForArt demo
base, pausing at each step so you can watch changes appear in the browser.
If no base_id is provided and none is set as the session default, calls
air_demo_setup() first.
Usage
air_demo(
base_id = NULL,
workspace_id = Sys.getenv("AIRTABLE_WORKSPACE_ID"),
.token = NULL
)Arguments
- base_id
Base ID to use. If
NULL, checks the session default (air_set_base()) andAIRTABLE_BASE_IDenv var; callsair_demo_setup()if nothing is found.- workspace_id
Passed to
air_demo_setup()if base creation is needed.- .token
API token (see
air_set_token()).
Details
Open the Airtable base in a browser alongside the console. The walkthrough
pauses with <Enter> prompts whenever you need to switch to a different
table, and sleeps two seconds between steps so changes can appear.
Steps covered:
Read all Artists with a progress bar
Write one new artist; read back showing
airtable_created_timeWrite 120 community supporters in 12 batches – progress bar is clearly visible; read back over 2 pages to demonstrate read pagination
Bulk-upsert 30 artists with a progress bar
Sync back to the original 15 with a progress bar (watch deletions)
Upsert a new
Engagement Scorecolumn into Artists from RUpload an image attachment to a Project record
Link artists to projects via
multipleRecordLinksLeft-join Airtable columns into a local R tibble
View the base schema
Seed a
_metadatatable withair_meta_init(), edit table/column names as rows in Airtable, then apply withair_meta_sync()Connect via the DBI interface:
DBI::dbConnect(),DBI::dbListTables(),DBI::dbReadTable(),DBI::dbWriteTable()View API usage
All operations keyed on Name are idempotent; re-running will not
accumulate duplicate records.
Examples
if (FALSE) { # \dontrun{
# Run with an existing demo base (set via air_set_base() or env var)
air_set_base("appXXXXXXXXXXXXXX")
air_demo()
# Or create a new demo base first (needs AIRTABLE_WORKSPACE_ID)
air_demo(workspace_id = Sys.getenv("AIRTABLE_WORKSPACE_ID"))
} # }