Skip to content

Instantly share code, notes, and snippets.

@siakon89

siakon89/create_table.sql

Last active Mar 12, 2020
Embed
What would you like to do?
CREATE table "datalake-raw"."test_data_parquet" WITH (
format='PARQUET',
parquet_compression='SNAPPY',
partitioned_by=array['marketplace', 'product_category'],
external_location = 's3://<my-bucket>/optimized-data/'
)
AS
SELECT
"customer_id"
, "review_id"
, "product_id"
, "product_parent"
, "product_title"
, "star_rating"
, "helpful_votes"
, "total_votes"
, "vine"
, "verified_purchase"
, "review_headline"
, "review_body"
, "review_date"
, "marketplace"
, "product_category"
FROM "datalake-raw"."test_data_archive"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.