· 9 years ago · Jan 28, 2017, 03:14 PM
1/**
2 * @author("Sergio Sola")
3 * @description("This table creates a fact table with active customers")
4 * @version("1.0.0")
5 */
6CREATE EXTERNAL TABLE IF NOT EXISTS fact_tables.active_customers (
7 customer_id BIGINT COMMENT "@reference(dimensions.customers.customer_sk) Reference to customer in time",
8 product STRING COMMENT "@reference(other_tables.product.sku) Stores the product SKU"
9 )
10 PARTITIONED BY (country string)
11STORED AS PARQUET
12LOCATION '/YourCompany/fact_tables/active_customers';