Load Airtable data to Databricks
Build a Airtable to Databricks pipeline with your coding agent. One prompt scaffolds it with the dltHub AI harness, plus the Airtable API base URL, auth, endpoints, and incremental loading.
Airtable is a collaborative database service with REST endpoints for reading and managing records, bases, tables, and related metadata. Everything needed to build a working Airtable → Databricks pipeline is on this page: the API's base URL, authentication, endpoints, pagination and incremental field — plus a prompt that hands the whole job to your coding agent.
Build your Airtable to Databricks pipeline
Paste this prompt into Claude, Codex, or Cursor. The agent does the rest.
uvx dlthub-init@latest to build a pipeline from Airtable to Databricks and run it on dltHubThat scaffolds a dltHub workspace and installs the dltHub AI harness — the project rules, the secrets-management skill, and the dlt MCP server your agent needs to work safely. From there it reads the Airtable API, proposes the endpoints to load, then writes, runs and validates the pipeline while you review rather than type. Credentials are inspected through MCP tools, so your agent never reads secrets.toml itself. How the LLM-native workflow works →
Prefer to write it yourself? Every fact the agent uses is below.
Airtable API at a glance
| Base URL | https://api.airtable.com/v0 |
| Example endpoint | GET {baseId}/{tableIdOrName} |
| Records found at | records |
| Authentication | all requests require a Bearer personal access token — sent in the Authorization header, prefixed Bearer |
| Pagination | Cursor-based via offset, next cursor at offset, page size via pageSize (default 100, max 100). Airtable's List records endpoint returns one page at a time. The response includes an offset token when more records remain; send that exact value as the offset query parameter on the next request. Stop when offset is absent. pageSize controls records per request and defaults to 100; maxRecords is an optional total-record cap, not a page-size limit. Bearer authentication does not change pagination. Filtering or sorting by createdTime is separate from pagination and does not replace the offset cursor. |
| Incremental field | createdTime |
| Record id | id |
| API reference | https://airtable.com/developers/web/api/authentication |
These values come from the Airtable API reference — the authoritative source if anything here looks out of date.
How do I authenticate with the Airtable API?
Send the personal access token on every HTTPS request in the HTTP header Authorization: Bearer YOUR_TOKEN. Airtable does not support passing personal access tokens in the legacy api_key URL parameter; record-list requests require the data.records
scope and access to the target base.1. Get your credentials
- Sign in to Airtable and open the Developer Hub at https://airtable.com/create/tokens (or open Developer Hub and choose Personal access tokens).
- Click Create token / Create new token and give it a unique name.
- Click Add a scope and grant at least data.records for reading records.
- Click Add a base, select the base(s) the pipeline must read, or grant the appropriate workspace/resource access. The token can only access resources selected here and resources the creating user is permitted to access.
- Create the token and immediately copy the complete token value. Airtable displays the secret only once; if it is lost, generate a replacement token. Use the entire PAT value, not merely the visible token ID.
- Send it on every HTTPS request as Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN. Legacy API-key URL authentication is not supported for personal access tokens.
2. Add them to .dlt/secrets.toml
[sources.airtable_source] api_key = "patXXXXXXXXXXXXXX.xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
dlt reads this file automatically at runtime. With the harness, the setup-secrets skill prompts you for the values and never handles the raw credential in chat. For production, see setting up credentials with dlt.
What Airtable data can I load into Databricks?
These are the Airtable endpoints dlt can load into Databricks:
| Resource | Endpoint | Method | Data selector | Description |
|---|---|---|---|---|
| list_records | {baseId}/{tableIdOrName} | GET | records | List table records; pageSize max 100, continuation uses response offset. Supports filterByFormula, sorting, field selection, and views. |
| get_record | {baseId}/{tableIdOrName}/{recordId} | GET | Retrieve one record. | |
| list_bases | meta/bases | GET | bases | List accessible bases, up to 1,000 per page; continuation uses response offset. |
| get_base_schema | meta/bases/{baseId}/tables | GET | tables | Retrieve the table/field schema for a base. |
| get_base_collaborators | meta/bases/{baseId} | GET | Retrieve base information; optional include can add collaborators and related objects. | |
| list_comments | {baseId}/{tableIdOrName}/{recordId}/comments | GET | comments | List record comments, newest first; pageSize max 100 and continuation uses offset. |
| create_records | {baseId}/{tableIdOrName} | POST | records | Create one or multiple records; write scope required. |
| update_record | {baseId}/{tableIdOrName}/{recordId} | PATCH or PUT | PATCH updates supplied fields; PUT clears unspecified fields. | |
| create_base | meta/bases | POST | tables | Create a base and return its schema. |
| create_field | meta/bases/{baseId}/tables/{tableId}/fields | POST | Create a field and return its schema. |
How do I load only new Airtable records?
Airtable exposes createdTime on {baseId}/{tableIdOrName}, so dlt can request only the records that changed since the last run. Set it as the cursor_path and dlt tracks the high-water mark for you between runs.
{"name": "records", "endpoint": { "path": "{baseId}/{tableIdOrName}", "data_selector": "records", "incremental": {"cursor_path": "createdTime", "initial_value": "2024-01-01T00:00:00Z"}, }}
On the first run dlt loads everything from initial_value; on every run after that it requests only what changed and appends with write_disposition="merge" if you set a primary key. See incremental loading.
What does the generated Airtable pipeline look like?
A standard dlt REST API pipeline — the same code you would write by hand, loading GET /v0/{baseId}/{tableIdOrName} (list records) and GET /v0/meta/bases (list bases / metadata discovery) from the Airtable API into Databricks:
import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def airtable_source(api_token=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://api.airtable.com/v0", "auth": {"type": "bearer", "token": api_token}, }, "resources": [ {"name": "records", "endpoint": {"path": "{baseId}/{tableIdOrName}", "data_selector": "records"}}, {"name": "bases", "endpoint": {"path": "meta/bases", "data_selector": "bases"}} ], } yield from rest_api_resources(config) def load_airtable_to_databricks() -> None: pipeline = dlt.pipeline( pipeline_name="airtable_pipeline", destination="databricks", dataset_name="airtable_data", ) load_info = pipeline.run(airtable_source()) print(load_info) if __name__ == "__main__": load_airtable_to_databricks()
Run it with uv run python airtable_pipeline.py. The agent iterates on this until it loads cleanly — you review and approve, rather than write it from scratch.
How do I query Airtable data in Databricks?
dlt creates one table per resource. Query the loaded data with Python or SQL — or ask your agent to, through the MCP server's execute_sql_query tool.
Python (pandas DataFrame):
import dlt data = dlt.pipeline("airtable_pipeline").dataset() df = data.records.df() print(df.head())
SQL:
SELECT * FROM airtable_data.records LIMIT 10;
See querying your data with dataset and exploring it in marimo notebooks.
How do I deploy the Airtable to Databricks pipeline in production?
The pipeline runs locally, which is ideal for prototyping and one-off analysis. When you need it on a schedule, monitored on every load, and shared with your team, deploy the same dlt code on the dltHub platform — no infrastructure to maintain. The prompt above already ends with "run it on dltHub", so your agent can take it there directly.
- Deploy & schedule — run the pipeline as a managed job with automatic retries.
- Monitor — observable job queues, alerting, and load metrics for every run.
- Transform — promote raw Airtable loads into governed, documented models.
- Visualize & share — explore data in notebooks and publish live dashboards instead of static screenshots.
What other destinations can I load Airtable data to?
dlt loads into any of these — only the destination argument changes:
| Destination | Example value |
|---|---|
| PostgreSQL | "postgres" |
| BigQuery | "bigquery" |
| Snowflake | "snowflake" |
| Redshift | "redshift" |
| Databricks | "databricks" |
| Filesystem (S3, GCS, Azure) | "filesystem" |
Set dlt.pipeline(destination="snowflake") and add credentials in .dlt/secrets.toml. On the dltHub platform the same pipeline runs against a managed Iceberg lakehouse. See the full destinations list.
Next steps
Was this page helpful?
Community Hub
Need more dlt context for Airtable to Databricks?
Request dlt skills, commands, AGENT.md files, and AI-native context.