https://github.com/Snowflake-Labs/pg_lake
- Open sourced pg_lake on Nov 4, 2025
- this code is the basis of Crunchy Data Warehouse
- enables read-write to cloud object storage with files in Iceberg, Parquet, CSV, JSON
- All interactions are via SQL commands
https://github.com/Snowflake-Labs/pg_lake
| #!/usr/bin/env python3 | |
| import random | |
| import numpy as np | |
| import time | |
| from tabulate import tabulate | |
| import csv | |
| from itertools import chain | |
| class Card: | |
| def __init__(self, name, cost_value, space_value, available): |
| -- | |
| -- PostgreSQL database dump | |
| -- | |
| -- | |
| -- Name: accounts; Type: TABLE; Schema: public; Owner: - | |
| -- | |
| CREATE TABLE public.accounts ( | |
| id BIGSERIAL PRIMARY KEY, |
| Path: / |
| -- Create accounts table with ID, account_name, and a JSONB column for storing addresses | |
| CREATE TABLE accounts ( | |
| id SERIAL PRIMARY KEY, | |
| name VARCHAR(255), | |
| addresses JSONB | |
| ); | |
| -- Create purchases table with account_id, created_at, and product_name columns | |
| CREATE TABLE purchases ( | |
| purchase_id SERIAL PRIMARY KEY, |
| CREATE TABLE public.accounts ( | |
| id SERIAL PRIMARY KEY, | |
| name character varying, | |
| created_at timestamp(6) without time zone NOT NULL, | |
| updated_at timestamp(6) without time zone NOT NULL | |
| ); | |
| CREATE TABLE public.carbon_removal_projects ( | |
| id SERIAL PRIMARY KEY, |
| CREATE TABLE public.accounts ( | |
| id bigint NOT NULL, | |
| name character varying, | |
| created_at timestamp(6) without time zone NOT NULL, | |
| updated_at timestamp(6) without time zone NOT NULL | |
| ); | |
| CREATE SEQUENCE public.accounts_id_seq | |
| START WITH 1 |
| -- | |
| CREATE TABLE public.employees ( | |
| id bigint NOT NULL, | |
| first_name character varying, | |
| last_name character varying, | |
| start_date timestamp(6) without time zone, | |
| job_title character varying, | |
| salary integer, | |
| manager_id character varying, | |
| departments jsonb, |