Skip to content

Instantly share code, notes, and snippets.

@siakon89
Last active March 12, 2020 22:36
Show Gist options
  • Save siakon89/c0c505f111cc833b6cf0afe1ea19817e to your computer and use it in GitHub Desktop.
Save siakon89/c0c505f111cc833b6cf0afe1ea19817e to your computer and use it in GitHub Desktop.
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