Section 08

Same Shape, Different Scale

The system shape stays the same even when the infrastructure changes.

The core idea of this playbook is that the data system shape stays the same even when infrastructure changes.

The layers remain:

text
Source → Bronze → Silver → Gold → Output

Only the execution environment changes.

Layer mapping across deployments

LayerDuckDBRailway + PostgresAWS + PostgresSnowflake
SourceLocal CSV / ExcelApp / API / filesS3 / API / databaseCloud stage / external source
BronzeLocal DuckDB tablesRaw schemaRaw schema or S3 landingExternal stage / raw tables
SilverSQL in DuckDBSQL jobsECS / Lambda / dbt jobsdbt models
GoldDuckDB reporting tablesPostgres reporting tablesCurated reporting schemaData marts
OutputExcel / CSVAPI / dashboardBI / API / ExcelBI / governed analytics

Migration pattern

text
DuckDB version:
CSV → Python → DuckDB → Excel

Railway version:
CSV/API → Worker → Postgres → App/API

AWS version:
Source → S3 → ECS/Lambda → Postgres → BI/API

Snowflake version:
Source → Stage → Snowpipe/dbt → Data Mart → BI

Driver Compliance Across Systems

The same Driver Compliance pipeline runs on three engines. Only the ingestion command changes — the Bronze → Silver → Gold logic is identical.

DuckDB version

sql
SELECT * FROM read_csv_auto('claims.csv');

Postgres version

sql
COPY bronze.raw_claims FROM 'claims.csv' CSV HEADER;

Snowflake version

sql
COPY INTO bronze.raw_claims FROM @stage/claims.csv;
  • Logic remains the same
  • Only ingestion method changes
  • Bronze → Silver → Gold remains identical