How-to guides
Each guide solves one task and shows how to verify the result. If you are new to pz, read the Quickstart first; the guides assume a project already exists.
Ingest
Section titled “Ingest”- Extract from an HTTP API: paginated reads, OAuth2 sign-in, POST queries, proxies, and writing back to an endpoint.
- Download files and exports from an API: zip archives, dated URLs, and asynchronous export jobs.
- Call an API once per record:
for_eachreads for per-parent endpoints, in parallel and safe to resume. - Capture changes with CDC: read change feeds from SQL Server and PostgreSQL.
- Backfill in slices: load history in bounded windows without losing your place.
Reliability
Section titled “Reliability”- Run checks and retry:
pz test,pz retry, and what a retry reuses. - Tune retries: attempts, backoff, and jitter per connection or per call.
- Throttle a source: rate limits, concurrency caps, and the circuit breaker.
- Guard against schema changes: validate-time contracts and sink schema policy.
- Detect source drift at run time:
on_source_driftandpz schema accept. - Debug a failed run: read the event stream, run results, and staged tables.
Production
Section titled “Production”- Secure connection config: secrets through environment variables and managed identity.
- Move state off the local disk: SQL Server or HTTP state backends for containers.
- Run in CI: a GitHub Actions job that validates and runs a project.
- Run on a schedule on Windows: Task Scheduler and the wrapper script.
- Observe runs with Azure Monitor: OpenTelemetry metrics and traces.
- Inspect and validate:
pz ls,pz plan, andpz validate --connect. - Preview data: a redacted sample of a source or pipeline, from a run or fresh.
AI agents
Section titled “AI agents”- Use pz with an AI agent: the MCP server and what an agent can do with it.
Extend
Section titled “Extend”- Use a DuckDB extension: call an extension’s functions from pipeline SQL, online or offline.
- Author a connector: build, test, and package a connector.
Related
Section titled “Related”- Connectors: per-connector options when a guide points at one.
- CLI reference: the flags the guides use.