GCS
Writes files to a bucket prefix. It does not create a BigQuery table — use BigQuery when you want SQL there.
Before you begin
- A bucket and prefix.
- A service-account JSON with
storage.objects.create(and list if you verify).
bash
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/sa.json"Configure
python
from skippr import Config, DataSinkGcs, Pipeline
cfg = Config.discover()
raw = cfg.data_sink(
"raw",
DataSinkGcs(
bucket="acme-landing",
prefix="skipprd/events",
service_account_key_path="${GOOGLE_APPLICATION_CREDENTIALS}",
),
)
cfg.pipeline("events", Pipeline(data_source=cfg.get_data_source("sample"), data_sink=raw))
cfg.save()bash
skipprd connect data-sink gcs \
--pipeline events \
--name raw \
--bucket acme-landing \
--prefix skipprd/events \
--service-account-key-path '${GOOGLE_APPLICATION_CREDENTIALS}'yaml
data_sinks:
raw:
Gcs:
bucket: acme-landing
prefix: skipprd/events
service_account_key_path: ${GOOGLE_APPLICATION_CREDENTIALS}Options
| Key | Type | Required/Default | Description |
|---|---|---|---|
bucket | string | Required | Bucket name |
prefix | string | Required | Object prefix |
service_account_key_path | path | Not set | Service-account JSON. ADC is used when unset. |
format | string | Not set | For pipeline type ingest, set format on this data sink to parquet or jsonl. For pipeline type copy, set format on this data sink to jsonl, csv, or xml. If you omit format on a copy pipeline, the data sink follows the source: json → jsonl, csv → csv, xml → xml. In pipeline type copy, nested objects and arrays in CSV are written as compact JSON strings. When pipeline type is copy, the deadletter sink still writes parquet or jsonl; it does not follow a csv or xml data sink. |
A retry overwrites the same object.
How data lands
Objects land at gs://<bucket>/<prefix>/<namespace>/….
<prefix>isprefix.<namespace>is the source namespace (table or stream name).- Optional partition folders follow the namespace:
p_country=GB/frombatch_partition_fields, andyear=2026/month=10/day=9/frombatch_time_fields(orp_year=…whentime_partition_prefixisp_). - The file name is the batch identity plus the
formatextension, for exampleapply-0001.jsonl. Copy Identity JSONL is gzip (apply-0001.jsonl.gz). CSV and XML copy objects stay.csvand.xml.
Troubleshooting
| Symptom | Fix |
|---|---|
| 403 | Grant object-create on the prefix |
| Credentials missing | Export GOOGLE_APPLICATION_CREDENTIALS |
