Created
May 4, 2015 13:32
-
-
Save marcocitus/752b4f05fb267714836b to your computer and use it in GitHub Desktop.
Create different types of customer_reviews tables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE customer_reviews_regular | |
( | |
customer_id TEXT not null, | |
review_date DATE not null, | |
review_rating INTEGER not null, | |
review_votes INTEGER, | |
review_helpful_votes INTEGER, | |
product_id CHAR(10) not null, | |
product_title TEXT not null, | |
product_sales_rank BIGINT, | |
product_group TEXT, | |
product_category TEXT, | |
product_subcategory TEXT, | |
similar_product_ids CHAR(10)[] | |
); | |
CREATE FOREIGN TABLE customer_reviews_cstore ( | |
customer_id TEXT not null, | |
review_date DATE not null, | |
review_rating INTEGER not null, | |
review_votes INTEGER, | |
review_helpful_votes INTEGER, | |
product_id CHAR(10) not null, | |
product_title TEXT not null, | |
product_sales_rank BIGINT, | |
product_group TEXT, | |
product_category TEXT, | |
product_subcategory TEXT, | |
similar_product_ids CHAR(10)[] | |
) | |
SERVER cstore_server | |
OPTIONS(compression 'pglz'); | |
CREATE TABLE customer_reviews_jsonb | |
( | |
data jsonb | |
); | |
CREATE FOREIGN TABLE customer_reviews_jcomp | |
( | |
data jsonb | |
) | |
SERVER cstore_server | |
OPTIONS(compression 'pglz'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment