porterzip

Your markets in your warehouse

On Scale, after every refresh we write your markets to your own bucket. Your data team loads them from there into the tools they already report from.


Connect your bucket

An admin opens Settings, then Your warehouse, and enters the bucket and a key that can write to it. Amazon S3, Google Cloud Storage and Cloudflare R2 all work. We write a test file first and start delivering once it lands. We only ever write files. We never read, list or delete what is in your bucket.

What lands

After each refresh, at most once a day, every workspace gets a dated folder and a latest folder. Each file is a compressed CSV with a header row. Every file is complete, so you replace your table on each load and never append. Places and counts, never a customer.

your-folder/porterzip/
  1234/                     one folder per workspace
    2026-11-28/             one folder per delivery day
      master_latest.csv.gz
      markets_by_refresh.csv.gz
      campaigns.csv.gz
      audiences.csv.gz
      files_taken.csv.gz
      manifest.json         written last
    latest/                 the newest delivery, same files
  • master_latest.csv.gz
    Your latest master targeting file. One row per market with its rank, label and every number behind it.
  • markets_by_refresh.csv.gz
    Every market on every refresh, with its label, score, rank and new customers. Your market history.
  • campaigns.csv.gz
    Your lift campaigns, their channels, targeted and held back markets and the lift we measured.
  • audiences.csv.gz
    Your saved audiences and the rules behind each one.
  • files_taken.csv.gz
    One row per ZIP per file your team took out, with the date and the audience.

The manifest

Each folder ends with manifest.json. It names the workspace, the delivery day and every file with its columns and their types, so a short script can write the table definitions for you. Wait for it before you load, since we write it after the files.

{
  "schema_version": 1,
  "brand": "Hill Coffee",
  "delivered_on": "2026-11-28",
  "format": "csv.gz",
  "header_row": true,
  "files": [
    { "file": "markets_by_refresh.csv.gz",
      "columns": [
        { "name": "refresh_date", "type": "date" },
        { "name": "zip", "type": "string" },
        { "name": "area_id", "type": "string" },
        { "name": "status", "type": "string" },
        { "name": "score", "type": "number" },
        ...

We only ever add columns at the end of a file. We never rename or remove one, so a load you set up once keeps working. Load ZIP codes as text, or 02139 turns into 2139.

ManifestSnowflakeBigQueryRedshift
stringSTRINGSTRINGVARCHAR
numberFLOATFLOAT64DOUBLE PRECISION
dateDATEDATEDATE

Snowflake

An external stage on your bucket, then COPY INTO. Swap in your own storage integration.

CREATE STAGE porterzip_stage
  URL = 's3://your-bucket/your-folder/porterzip/1234/latest/'
  STORAGE_INTEGRATION = your_integration;

CREATE FILE FORMAT porterzip_csv
  TYPE = CSV SKIP_HEADER = 1 COMPRESSION = GZIP
  FIELD_OPTIONALLY_ENCLOSED_BY = '"' EMPTY_FIELD_AS_NULL = TRUE;

CREATE OR REPLACE TABLE porterzip_markets_by_refresh (
  refresh_date DATE, zip STRING, area_id STRING, status STRING,
  score FLOAT, rank FLOAT, new_customers_year_before FLOAT, expected FLOAT
);

COPY INTO porterzip_markets_by_refresh
  FROM @porterzip_stage/markets_by_refresh.csv.gz
  FILE_FORMAT = (FORMAT_NAME = porterzip_csv);

The same steps load every other file. Take its columns and types from the manifest.

BigQuery

A load job from Google Cloud Storage with an explicit schema, replacing the table each time.

bq load --replace --source_format=CSV --skip_leading_rows=1 \
  porterzip.markets_by_refresh \
  gs://your-bucket/your-folder/porterzip/1234/latest/markets_by_refresh.csv.gz \
  refresh_date:DATE,zip:STRING,area_id:STRING,status:STRING,score:FLOAT64,rank:FLOAT64,new_customers_year_before:FLOAT64,expected:FLOAT64

The same steps load every other file. Take its columns and types from the manifest.

Redshift

COPY from Amazon S3 with your Redshift role. Empty the table first, since each delivery is complete.

CREATE TABLE IF NOT EXISTS porterzip_markets_by_refresh (
  refresh_date DATE, zip VARCHAR(10), area_id VARCHAR(32), status VARCHAR(64),
  score DOUBLE PRECISION, rank DOUBLE PRECISION,
  new_customers_year_before DOUBLE PRECISION, expected DOUBLE PRECISION
);

TRUNCATE porterzip_markets_by_refresh;

COPY porterzip_markets_by_refresh
FROM 's3://your-bucket/your-folder/porterzip/1234/latest/markets_by_refresh.csv.gz'
IAM_ROLE 'arn:aws:iam::123456789012:role/your-redshift-role'
CSV GZIP IGNOREHEADER 1 DATEFORMAT 'YYYY-MM-DD';

The same steps load every other file. Take its columns and types from the manifest.


Want your markets in your warehouse?

Delivery to your own bucket comes with Scale. Tell us where your data team works and we will help you set it up.

Get your growth map