Skip to content

Instantly share code, notes, and snippets.

@siakon89
Last active March 12, 2020 22:36
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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