Goldsky Mirror Pipelines
Mirror is Goldsky's original streaming pipeline product. It reads onchain data from a source (a subgraph entity or a direct-indexing dataset), optionally applies transforms, and writes the result to a sink (your database or message queue).
Mirror vs Turbo — which should you use?
Use Turbo unless you need a subgraph source. Turbo is faster, more reliable, and actively gaining feature parity with Mirror — especially sink support. If you don't have a subgraph requirement, say "help me build a Turbo pipeline" and the /turbo-builder skill will guide you through a faster setup.
How Mirror Pipelines Work
A pipeline is defined in a YAML file (apiVersion: 3) and deployed with goldsky pipeline apply.
Pipeline YAML Structure
Top-level fields:
Sources
Subgraph entity source
Fields: type (required: subgraph_entity), name (required: entity name), subgraphs (required: list of {name, version}), start_at (optional), filter (optional), description (optional).
Dataset source
Fields: type (required: dataset), dataset_name (required), version (required), start_at (optional), filter (optional), description (optional).
Fast Scan: When filter is defined on a dataset source with start_at: earliest, the filter is pre-applied at the source level, making historical backfill much faster. Use attributes that exist in the dataset schema (goldsky dataset get <dataset_name> to check).
See docs.goldsky.com/mirror/sources/supported-sources.
Sinks
Common Mirror destinations are listed below; this is not an exhaustive count of supported sink types. Compare the specific destination the user needs, rather than inferring product-wide counts from these examples.
All sinks writing to user-managed destinations require a Goldsky Secret (secret_name). Create one with goldsky secret create.
Sinks support schema_override for casting column types at the sink level (e.g., string to jsonb).
Sink examples
See docs.goldsky.com/mirror/sinks/supported-sinks.
Transforms
SQL transform
SQL transforms reference source or transform names as table names. Supports chaining (one transform reads from another).
Built-in decode functions:
_gs_log_decode(abi, topics, data)— decode raw log events_gs_tx_decode(abi, input, output)— decode raw trace/transaction data_gs_fetch_abi(url, type)— fetch ABI from URL (etherscan-compatible or raw JSON); fetched once at pipeline start
External handler transform
- At-least-once delivery with exponential backoff on failure
- Max response time: 5 minutes; max connection time: 1 minute
- Supports
schema_overridefor return type casting
See docs.goldsky.com/mirror/transforms/sql-transforms.
Full YAML Examples
Subgraph entity to PostgreSQL
Dataset (direct indexing) to PostgreSQL with SQL transform
No subgraph source? You should almost certainly use Turbo instead — it's faster, more reliable, and has a richer dataset catalog with simpler syntax. Use
/turbo-builderto get started.
CLI Reference — All Pipeline Commands
Global options available on every command: --token <string> (CLI auth token), --color (colorize output, default true), -h, --help.
goldsky pipeline apply <config-path>
Create or update a pipeline from a YAML config file. Idempotent.
goldsky pipeline start <nameOrConfigPath>
Start a pipeline (equivalent to apply with --status ACTIVE).
goldsky pipeline stop <nameOrConfigPath>
Stop a pipeline without taking a snapshot. Sets status to INACTIVE, runtime to TERMINATED.
No additional flags beyond global options.
goldsky pipeline pause <nameOrConfigPath>
Pause a pipeline with a snapshot so it can resume from where it left off. Sets status to PAUSED, runtime to TERMINATED.
No additional flags beyond global options.
goldsky pipeline restart <nameOrConfigPath>
Restart a pipeline without configuration changes. Useful when the sink database was restarted, connection is stuck, etc.
goldsky pipeline get <nameOrConfigPath>
Get pipeline configuration and status.
goldsky pipeline list
List all pipelines in the project.
goldsky pipeline info <nameOrConfigPath>
Display pipeline information (status, config, runtime details).
goldsky pipeline monitor <nameOrConfigPath>
Monitor pipeline runtime — status, metrics (records received/written), errors. Refreshes every 10 seconds.
goldsky pipeline delete <nameOrConfigPath>
Delete a pipeline permanently.
goldsky pipeline resize <nameOrConfigPath> <resourceSize>
Change the compute resources for a pipeline.
goldsky pipeline validate [config-path]
Validate a pipeline YAML config without deploying.
goldsky pipeline export [name]
Export pipeline configuration.
goldsky pipeline cancel-update <nameOrConfigPath>
Cancel an in-flight update or snapshot request. Useful when a long-running snapshot blocks a needed update.
No additional flags beyond global options.
goldsky pipeline create <name> (interactive/guided)
Guided CLI experience for creating a pipeline interactively.
goldsky pipeline get-definition <name> (deprecated)
Get a shareable pipeline definition. Use goldsky pipeline get <name> --definition instead.
Snapshot Commands
snapshots list supports -v, --version to filter by pipeline version (default: all versions).
Lifecycle Quick Reference
Pause vs. Stop:
pause— takes a snapshot and suspends the pipeline (status: PAUSED + TERMINATED). Can resume from where it left off.stop— stops without taking a snapshot (status: INACTIVE + TERMINATED). Resuming may reprocess data.
Desired statuses: ACTIVE, INACTIVE, PAUSED Runtime statuses: STARTING, RUNNING, FAILING, TERMINATED
Snapshots
Snapshots capture a point-in-time state of a RUNNING pipeline for resumption. They contain progress on reading sources and SQL transform state — not sink state.
- Automatic snapshots are taken every 4 hours for healthy RUNNING pipelines.
- Before updates: a snapshot is created automatically before applying config changes to a RUNNING pipeline.
- On pause: a snapshot is created when pausing.
- Manual:
goldsky pipeline snapshots create <name>. - Resume: only the latest snapshot can be used. For older snapshots, contact support.
The --from-snapshot flag (on apply, start, restart) controls snapshot behavior:
new— create a fresh snapshot, then start from it (default)last— use the latest existing snapshot (no new snapshot)none— start from scratch, no snapshot<snapshot-id>— use a specific snapshot
Resource Sizing
Set via resource_size in YAML or goldsky pipeline resize <name> <size>.
Start small and scale up if needed. Resource size affects pricing.
Networking
- Mirror pipelines write data from AWS us-west-2. Ensure your sink allows inbound connections from this region.
- IP addresses are dynamic by default.
- Dedicated egress IPs available on request — use
--use-dedicated-iponpipeline create, or contact [email protected]. - VPC peering available on request.
- For external handler transforms, deploy close to us-west-2 for best performance (aim for p95 < 100ms).
Dataset Discovery
Common Questions
Can Mirror pipelines use subgraphs as a source?
Yes — this is Mirror's primary advantage over Turbo. Set type: subgraph_entity in your source and reference your deployed subgraph.
Can Mirror handle multiple sources or cross-chain data?
Yes — define multiple sources in the YAML and use SQL transforms to join or merge them. For subgraphs, you can list multiple subgraphs (different chains) in a single source's subgraphs array.
My pipeline needs more resources / is too slow?
Run goldsky pipeline resize <name> l (or xl, xxl). Start small and scale up.
My pipeline is ACTIVE but TERMINATED — what happened?
The desired status is ACTIVE but the runtime failed (e.g., bad secret, sink unavailable, resource issues). Check errors with goldsky pipeline monitor <name> --include-runtime-details or view the dashboard. Fix the issue and restart.
How do I update a pipeline without losing progress?
Edit your YAML and run goldsky pipeline apply <file.yaml>. By default, a snapshot is taken before the update is applied. Use --from-snapshot last to skip creating a new snapshot and use the latest existing one.
A long snapshot is blocking my update — what do I do?
Run goldsky pipeline cancel-update <name> to cancel the in-flight operation, then reapply with --from-snapshot last or --from-snapshot none.
Related
/turbo-builder— Build a new Turbo pipeline (recommended for new projects not using subgraph sources)/subgraph-builder— Build and deploy the subgraph you want to sync via Mirror/secrets— Create secrets for sink credentials/datasets— Browse available dataset names and chain prefixes- Goldsky docs: docs.goldsky.com/mirror/introduction
- Pipeline config reference: docs.goldsky.com/mirror/reference/config-file/pipeline


