Load Braze data to BigQuery

Build a Braze to BigQuery pipeline with your coding agent. One prompt scaffolds it with the dltHub AI harness, plus the Braze API base URL, auth, endpoints, and incremental loading.

Source
Braze
Destination
BigQuery
Google BigQuery is a serverless, fully managed data warehouse on Google Cloud. Storage and compute are separated, so it scales to petabytes without cluster management, and it is queried in standard SQL. dlt loads into BigQuery natively, handling schema evolution, incremental loading and type coercion.

Braze provides a REST API for tracking users, sending messages, exporting data, and managing campaigns, Canvases, catalogs, and related resources. Everything needed to build a working Braze → BigQuery 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 Braze to BigQuery pipeline

Paste this prompt into Claude, Codex, or Cursor. The agent does the rest.

Prompt
Run uvx dlthub-init@latest to build a pipeline from Braze to BigQuery and run it on dltHub

That 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 Braze 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.


Braze API at a glance

Base URLhttps://rest.iad-01.braze.com
Example endpointGET campaigns/list
Records found atcampaigns
Authenticationall requests require a Braze REST API key as a Bearer token — sent in the Authorization header, prefixed Bearer
PaginationPage-number via page, up to 100 rows per page. For the campaigns list endpoint, pagination is page-number based, not cursor/token based. The page parameter defaults to 0 and returns the first set of up to 100 campaigns. Increment page (page=0, page=1, ...) to retrieve subsequent pages. The incremental filter is last_edit.time[gt], which returns campaigns edited after the supplied timestamp; it is a filter, not a pagination cursor. Braze's documented request uses a regional base URL such as https://rest.iad-01.braze.com and bearer authentication in the Authorization header. Other Braze list endpoints vary: custom events, custom attributes, and catalog items use cursor pagination via a cursor query parameter and Link response header, generally 50 records per request; product IDs use page pagination but the cited documentation does not state a page size.
Incremental fieldlast_edited
Record idid
API referencehttps://www.braze.com/docs/api/home

These values come from the Braze API reference — the authoritative source if anything here looks out of date.


How do I authenticate with the Braze API?

Send the Braze REST API key in the HTTP Authorization header as Authorization: Bearer YOUR_REST_API_KEY. JSON request bodies, where applicable, use Content-Type: application/json; the X-Braze-Bulk header is endpoint/use-case-specific and should not be treated as a universal required header.

1. Get your credentials

  1. Sign in to the Braze dashboard for your workspace. 2. Open Settings > APIs and Identifiers > API Keys. 3. Select Create API Key. 4. Name the key, optionally specify allowlisted IP addresses/subnets, and grant only the REST API permissions required by the integration. 5. Create the key and copy its value securely; Braze uses this REST API key as a bearer token. 6. On the same API Keys tab, copy the REST endpoint shown for your workspace and configure that single cluster-specific base URL (for example, https://rest.iad-01.braze.com). Do not assume every workspace uses the example URL: Braze assigns accounts to clusters, and the dashboard/API-key page identifies the correct endpoint. Treat the key as a secret; it cannot be edited after creation, so create a replacement key if rotation is needed.

2. Add them to .dlt/secrets.toml

[sources.braze_source] api_key = "your_braze_rest_api_key" base_url = "https://rest.iad-01.braze.com"

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 Braze data can I load into BigQuery?

These are the Braze endpoints dlt can load into BigQuery:

ResourceEndpointMethodData selectorDescription
campaignscampaigns/listGETcampaignsExport campaigns; paginated with page (0-based), up to 100 per page; supports include_archived, sort_direction, and incremental last_edit.time[gt].
campaign_detailscampaigns/detailsGETRetrieve one campaign by campaign_id; response is an object containing updated_at.
segment_detailssegments/detailsGETRetrieve one segment by segment_id; response is an object containing updated_at.
segment_analyticssegments/data_seriesGETdataDaily estimated segment-size series; requires segment_id and length, with optional ending_at.
export_catalogcatalogs/listGETNot verified in retrieved source; omit from production configuration until the response selector is confirmed.
canvas_listcanvas/listGETListed by Braze as an available GET export endpoint, but path and response selector were not verified in retrieved source.
segment_listsegments/listGETsegmentsListed by Braze as an available GET export endpoint; response selector/path should be confirmed against the live reference before use.

How do I load only new Braze records?

Braze exposes last_edited on campaigns/list, 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": "campaigns", "endpoint": { "path": "campaigns/list", "data_selector": "campaigns", "incremental": {"cursor_path": "last_edited", "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 Braze pipeline look like?

A standard dlt REST API pipeline — the same code you would write by hand, loading campaigns and canvases from the Braze API into BigQuery:

import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def braze_source(api_key=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://rest.iad-01.braze.com", "auth": {"type": "bearer", "token": api_key}, }, "resources": [ {"name": "campaigns", "endpoint": {"path": "campaigns/list", "data_selector": "campaigns"}}, {"name": "segment_analytics", "endpoint": {"path": "segments/data_series", "data_selector": "data"}} ], } yield from rest_api_resources(config) def load_braze_to_bigquery() -> None: pipeline = dlt.pipeline( pipeline_name="braze_pipeline", destination="bigquery", dataset_name="braze_data", ) load_info = pipeline.run(braze_source()) print(load_info) if __name__ == "__main__": load_braze_to_bigquery()

Run it with uv run python braze_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 Braze data in BigQuery?

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("braze_pipeline").dataset() df = data.campaigns.df() print(df.head())

SQL:

SELECT * FROM braze_data.campaigns LIMIT 10;

See querying your data with dataset and exploring it in marimo notebooks.


How do I deploy the Braze to BigQuery 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 Braze loads into governed, documented models.
  • Visualize & share — explore data in notebooks and publish live dashboards instead of static screenshots.

Book a demo →


What other destinations can I load Braze data to?

dlt loads into any of these — only the destination argument changes:

DestinationExample 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 Braze to BigQuery?

Request dlt skills, commands, AGENT.md files, and AI-native context.