Examples
Runnable example sources live in the repo under
examples/sources.
Readers
| Example | What it shows |
|---|---|
readers/files_demo | Runs offline on local JSONL/CSV/Parquet — the full fetch → shape → write flow with no credentials |
readers/s3_demo | Reading objects from Amazon S3 |
readers/gcs_demo | Reading objects from Google Cloud Storage |
readers/azure_blob_demo | Reading objects from Azure Blob Storage |
readers/postgres_demo | Read-only SELECT queries on PostgreSQL |
readers/mysql_demo | Read-only SELECT queries on MySQL |
readers/mongodb_demo | Reading collections and aggregations from MongoDB |
readers/deltalake_demo | Querying Delta Lake tables via DuckDB |
Ads APIs
Every advertising source maps to the shared vocabulary so one cross-network pipeline spans all platforms:
| Example | Transport | What it shows |
|---|---|---|
ads/google_ads | SDK | Google Ads GAQL queries, search_stream batches, and performance reporting |
ads/microsoft_ads | SDK | Microsoft Advertising SOAP services and CampaignPerformance reports |
ads/meta_ads | SDK | Meta Marketing API campaigns, ad sets, and daily campaign insights |
ads/linkedin_ads | HTTP | LinkedIn Marketing Rest.li endpoints, dotted query parameter encoding, and offset pagination |
ads/amazon_ads | HTTP | Amazon Sponsored Products and profiles via OAuth2 refresh token grant and regional endpoints |
ads/apple_ads | HTTP | Apple Ads campaigns and reporting using POST body-based pagination and account header scoping |
ads/openai_ads | HTTP | OpenAI Ads bearer auth, cursor pagination (last_id → after), and delivery insights |
Running examples
Offline files (no credentials needed)
streamwright run examples/sources/readers/files_demo \
--output jsonl:out
Reads sample files in the example's data/ folder and writes JSONL exports to out/ with zero credentials or network access.
Running with credentials
To run API connectors or database sources, supply credentials via a secrets file:
streamwright run examples/sources/ads/<network> \
--secrets secrets.yaml \
--set account_ids=123456,789012 \
--output jsonl:out
- Secrets: Provide credentials through
--secrets FILE(orSTREAMWRIGHT_SECRET_<NAME>environment variables). StreamWright redacts all secrets automatically in logs. - Config: Pass configuration parameters via
--set KEY=VALUE(or--config FILE). List parameters accept clean comma-separated values (e.g.--set account_ids=123456,789012). - Output: Choose an output format and destination with
--output(e.g.jsonl:out,parquet:out, orduckdb:analytics.duckdb).