The data for this project is stored in CSV format within a publicly accessible S3 bucket. Follow these steps to add it to your Snowflake account for data ingestion.
To run these scripts create a worksheet and add these commands in that worksheet and click run
Copy create warehouse transforming;
create database raw ;
create database analytics ;
create schema raw .jaffle_shop;
create schema raw .stripe;
Copy create table raw .jaffle_shop.customers
( id integer ,
first_name varchar ,
last_name varchar
);
Copy copy into raw.jaffle_shop.customers (id, first_name, last_name)
from 's3://dbt-tutorial-public/jaffle_shop_customers.csv'
file_format = (
type = 'CSV'
field_delimiter = ','
skip_header = 1
);
Copy create table raw .jaffle_shop.orders
( id integer ,
user_id integer ,
order_date date ,
status varchar ,
_etl_loaded_at timestamp default current_timestamp
);
Copy copy into raw.jaffle_shop.orders (id, user_id, order_date, status )
from 's3://dbt-tutorial-public/jaffle_shop_orders.csv'
file_format = (
type = 'CSV'
field_delimiter = ','
skip_header = 1
);
Copy create table raw .stripe.payment
( id integer ,
orderid integer ,
paymentmethod varchar ,
status varchar ,
amount integer ,
created date ,
_batched_at timestamp default current_timestamp
); // Some code
Copy copy into raw.stripe.payment (id, orderid, paymentmethod, status , amount, created)
from 's3://dbt-tutorial-public/stripe_payments.csv'
file_format = (
type = 'CSV'
field_delimiter = ','
skip_header = 1
);
Copy select * from raw.jaffle_shop.customers;
select * from raw.jaffle_shop.orders;
select * from raw.stripe.payment;