Skip to content

Google Cloud Storage

BUILDING Destination · built and tested, not yet verified against production accounts. Contact us before relying on it.

PortPilot writes each synced table to your Cloud Storage bucket as gzipped JSON Lines files, one file per table per sync, in Hive-style date partitions. Use it as a data lake landing zone, or query the files with BigQuery external tables, Snowflake or Databricks.

  1. Create or pick a bucket.

  2. Grant write access on the bucket with a role that includes storage.objects.create, storage.objects.list and storage.objects.delete, such as Storage Object Admin (roles/storage.objectAdmin) scoped to the bucket. Grant it to one of:

    • Your PortPilot job’s service account (hosted or GCP BYOC). Leave credentials_json empty. Contact us for the hosted service account’s email.
    • A service account of your own, with a JSON key pasted into credentials_json.

    storage.objects.delete is only used by full-refresh tables (see below).

In the app, go to Destinations → New destination → Google Cloud Storage and click Test connection after filling in:

Field Required Default Description
bucket Yes — Bucket name.
prefix No — Object prefix inside the bucket, e.g. portpilot/.
credentials_json No — Service account JSON key. Leave empty to use the job’s own service account. Stored write-only.
  • Each source table or stream gets its own folder, named after it.
  • Gzipped JSON Lines, one file per table per sync: <prefix><table>/dt=YYYY-MM-DD/<run_id>.jsonl.gz.
  • <prefix><table>/_schema.json holds the latest columns, types, primary key and cursor.
  • Values keep their JSON types: nested objects and arrays stay nested, timestamps are ISO 8601 strings.
  • dt= is the date the sync ran (UTC), not a date from the data.

Each record also carries these PortPilot fields:

FieldMeaning
_pipestream_extracted_atWhen the sync read the record (ISO 8601). Use it to pick the latest version of a row.
_pipestream_run_idThe sync run that wrote it.
_pipestream_tableSource table or stream name.
_pipestream_seqPosition of the record in the run's file.
  • Incremental tables (upsert or append): each sync adds a new file. Files are never rewritten, so a record updated in the source appears again in a later file. For the current state, keep the row with the latest _pipestream_extracted_at per primary key (listed in _schema.json).
  • Full-refresh tables (replace): the new file is written first, then the table’s older files are deleted, so the table is never empty.
  • Re-running a sync overwrites that run’s own file, so retries never duplicate data.
  • Deduplicate when you read. Incremental tables hold every version of a changed record. In BigQuery, over an external table: QUALIFY ROW_NUMBER() OVER (PARTITION BY id ORDER BY _pipestream_extracted_at DESC) = 1.
  • JSON Lines only. Parquet and CSV aren’t available yet.
  • Deletes aren’t represented. Records deleted at the source stay in earlier files.
  • Hive partitioning in BigQuery. When creating an external table, enable Hive partitioning with source URI prefix gs://<bucket>/<prefix><table>/ to get a dt column you can filter on.