ingest_data_source
Make a data source queryable in Bridge Town. Handles file uploads and connected Google Sheet snapshots through one discriminated schema. Uses a discriminated spec.kind schema. kind=‘file_upload’: encode a CSV or Excel file as base64 in spec.file_content. kind=‘google_sheet_snapshot’: reference a connected sheet by spec.source_name or spec.data_source_id — the sheet must be connected via the Bridge Town web app.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
project_name | Annotated[str, Field(description='Name of the Bridge Town project to ingest data into.')] | Yes | — | |
spec | IngestSpec | Yes | — | |
ctx | `Context | None` | No | None |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
project_name(string)source_name(string)source_type(string)data_source_id(string)tables(array<string>)schema(object)row_count(integer)snapshot_taken_at(null)spreadsheet_id(null)sheet_url(null)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "ingest_data_source", "arguments": { "project_name": "forecasts", "spec": { "kind": "file_upload", "source_name": "actuals", "filename": "actuals_2026q1.csv", "file_content": "PEJBU0U2NCBPRiAuY3N2IEZJTEUgQ09OVEVOVD4=" } }}Response
Section titled “Response”{ "project_name": "forecasts", "source_name": "actuals", "source_type": "parquet", "data_source_id": "88888888-8888-8888-8888-888888888888", "tables": [ "actuals" ], "schema": { "actuals": [ { "name": "month", "dtype": "DATE" }, { "name": "revenue", "dtype": "DOUBLE" } ] }, "row_count": 24, "snapshot_taken_at": null, "spreadsheet_id": null, "sheet_url": null}- Module:
Data - Requires authentication via API token or Auth0 JWT.