BankOrg Docs

In progress

BankOrg Data Platform / Environment Setup

Connect Snowflake to GCS

Let Snowflake read the raw CSV feeds in Google Cloud Storage with a storage integration, file format and external stage.

Snowflake reads the raw CSV feeds from the bucket bankorg-prd-raw-landing in the GCP project bankorg, through a storage integration. Access is granted to a Snowflake-managed service account, so no keys or passwords are stored.

Create the bucket

Create the bucket bankorg-prd-raw-landing.

Terminal
gcloud storage buckets create gs://bankorg-prd-raw-landing \
  --project=bankorg \
  --location=US \
  --uniform-bucket-level-access \
  --public-access-prevention

Check the bucket settings with gcloud storage buckets describe.

Output of gcloud storage buckets describe.

The feeds are laid out by source system, table and snapshot date:

Bucket layout
gs://bankorg-prd-raw-landing/
  core_banking/
    branches/snapshot_date=YYYY-MM-DD/branches_YYYYMMDD.csv
    customers/snapshot_date=YYYY-MM-DD/...
    accounts/snapshot_date=YYYY-MM-DD/...
    transactions/snapshot_date=YYYY-MM-DD/...

Create the storage integration

Create the storage integration GCS_RAW_INT for the bucket as ACCOUNTADMIN, and grant its usage to SYSADMIN.

Snowflake
USE ROLE ACCOUNTADMIN;

CREATE STORAGE INTEGRATION IF NOT EXISTS GCS_RAW_INT
    TYPE = EXTERNAL_STAGE
    STORAGE_PROVIDER = 'GCS'
    ENABLED = TRUE
    STORAGE_ALLOWED_LOCATIONS = ('gcs://bankorg-prd-raw-landing/');

GRANT USAGE ON INTEGRATION GCS_RAW_INT TO ROLE SYSADMIN;

Get the Snowflake service account

Snowflake
DESC STORAGE INTEGRATION GCS_RAW_INT;

Copy STORAGE_GCP_SERVICE_ACCOUNT from the output.

Grant the account read access in GCP

Create the custom role snowflake_gcs_reader with read-only permissions on the bucket:

Terminal
gcloud iam roles create snowflake_gcs_reader \
  --project=bankorg \
  --title="Snowflake GCS Reader" \
  --permissions=storage.buckets.get,storage.objects.get,storage.objects.list

Bind the role to the Snowflake service account on the bucket:

Terminal
gcloud storage buckets add-iam-policy-binding gs://bankorg-prd-raw-landing \
  --member="serviceAccount:<STORAGE_GCP_SERVICE_ACCOUNT>" \
  --role="projects/bankorg/roles/snowflake_gcs_reader"

Create the file format and stage

Create the CSV file format CSV_FF and the external stage GCS_CORE_BANKING_STG in PRD_RAW.CORE_BANKING as SYSADMIN. The stage points at the core_banking/ folder of the bucket.

Snowflake
USE ROLE SYSADMIN;
USE DATABASE PRD_RAW;
USE SCHEMA CORE_BANKING;

CREATE FILE FORMAT IF NOT EXISTS CSV_FF
    TYPE = CSV
    FIELD_DELIMITER = ','
    SKIP_HEADER = 1
    FIELD_OPTIONALLY_ENCLOSED_BY = '"'
    NULL_IF = ('', 'NULL')
    EMPTY_FIELD_AS_NULL = TRUE
    TRIM_SPACE = TRUE
    ENCODING = 'UTF8';

CREATE STAGE IF NOT EXISTS GCS_CORE_BANKING_STG
    URL = 'gcs://bankorg-prd-raw-landing/core_banking/'
    STORAGE_INTEGRATION = GCS_RAW_INT
    FILE_FORMAT = CSV_FF
    COMMENT = 'External stage on the GCS bucket with daily core banking CSV feeds';

Verify

Upload the branches sample file to the bucket:

Terminal
gcloud storage cp branches_original_50.csv \
  gs://bankorg-prd-raw-landing/core_banking/branches/snapshot_date=2026-10-18/branches_20261018.csv

List the stage, then read the file in place:

Snowflake
LIST @GCS_CORE_BANKING_STG;
Output of LIST on the stage.
Snowflake
SELECT $1, $2, $3, $4, $5, $6, $7, $8, $9, $10
FROM @GCS_CORE_BANKING_STG/branches/snapshot_date=2026-10-18/
     (FILE_FORMAT => 'CSV_FF')
LIMIT 10;
Output of the stage query.