aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorОлег <150132506+iddqdex@users.noreply.github.com>2024-07-09 12:49:33 +0300
committerGitHub <noreply@github.com>2024-07-09 12:49:33 +0300
commit601cb7ac936e495be391257585286b9d1e3ee24d (patch)
tree2af2cdde563fd0d2edbf4b0d6943483ca367b5a2
parent3e87d00cd647028bc8b4064ff33ecf6000f8bb19 (diff)
downloadydb-601cb7ac936e495be391257585286b9d1e3ee24d.tar.gz
use nullable columns for tpcds (#6453)
-rw-r--r--ydb/library/workload/tpcds/tpcds_schema.sql786
1 files changed, 393 insertions, 393 deletions
diff --git a/ydb/library/workload/tpcds/tpcds_schema.sql b/ydb/library/workload/tpcds/tpcds_schema.sql
index 2a59eae81a8..4a184820cbd 100644
--- a/ydb/library/workload/tpcds/tpcds_schema.sql
+++ b/ydb/library/workload/tpcds/tpcds_schema.sql
@@ -3,18 +3,18 @@
CREATE {external} TABLE `{path}/customer_address`
(
ca_address_sk Int64 {notnull},
- ca_address_id {string_type} {notnull},
- ca_street_number {string_type} {notnull},
- ca_street_name {string_type} {notnull},
- ca_street_type {string_type} {notnull},
- ca_suite_number {string_type} {notnull},
- ca_city {string_type} {notnull},
- ca_county {string_type} {notnull},
- ca_state {string_type} {notnull},
- ca_zip {string_type} {notnull},
- ca_country {string_type} {notnull},
- ca_gmt_offset {decimal_5_2_type} {notnull},
- ca_location_type {string_type} {notnull}
+ ca_address_id {string_type},
+ ca_street_number {string_type},
+ ca_street_name {string_type},
+ ca_street_type {string_type},
+ ca_suite_number {string_type},
+ ca_city {string_type},
+ ca_county {string_type},
+ ca_state {string_type},
+ ca_zip {string_type},
+ ca_country {string_type},
+ ca_gmt_offset {decimal_5_2_type} ,
+ ca_location_type {string_type}
{primary_key} (ca_address_sk)
)
{partition_by}(ca_address_sk)
@@ -26,14 +26,14 @@ WITH (
CREATE {external} TABLE `{path}/customer_demographics`
(
cd_demo_sk Int64 {notnull},
- cd_gender {string_type} {notnull},
- cd_marital_status {string_type} {notnull},
- cd_education_status {string_type} {notnull},
- cd_purchase_estimate Int64 {notnull},
- cd_credit_rating {string_type} {notnull},
- cd_dep_count Int64 {notnull},
- cd_dep_employed_count Int64 {notnull},
- cd_dep_college_count Int64 {notnull}
+ cd_gender {string_type},
+ cd_marital_status {string_type},
+ cd_education_status {string_type},
+ cd_purchase_estimate Int64 ,
+ cd_credit_rating {string_type},
+ cd_dep_count Int64 ,
+ cd_dep_employed_count Int64 ,
+ cd_dep_college_count Int64
{primary_key} (cd_demo_sk)
)
{partition_by}(cd_demo_sk)
@@ -45,33 +45,33 @@ WITH (
CREATE {external} TABLE `{path}/date_dim`
(
d_date_sk Int64 {notnull},
- d_date_id {string_type} {notnull},
- d_date {string_type} {notnull},
- d_month_seq Int64 {notnull},
- d_week_seq Int64 {notnull},
- d_quarter_seq Int64 {notnull},
- d_year Int64 {notnull},
- d_dow Int64 {notnull},
- d_moy Int64 {notnull},
- d_dom Int64 {notnull},
- d_qoy Int64 {notnull},
- d_fy_year Int64 {notnull},
- d_fy_quarter_seq Int64 {notnull},
- d_fy_week_seq Int64 {notnull},
- d_day_name {string_type} {notnull},
- d_quarter_name {string_type} {notnull},
- d_holiday {string_type} {notnull},
- d_weekend {string_type} {notnull},
- d_following_holiday {string_type} {notnull},
- d_first_dom Int64 {notnull},
- d_last_dom Int64 {notnull},
- d_same_day_ly Int64 {notnull},
- d_same_day_lq Int64 {notnull},
- d_current_day {string_type} {notnull},
- d_current_week {string_type} {notnull},
- d_current_month {string_type} {notnull},
- d_current_quarter {string_type} {notnull},
- d_current_year {string_type} {notnull}
+ d_date_id {string_type},
+ d_date {string_type},
+ d_month_seq Int64 ,
+ d_week_seq Int64 ,
+ d_quarter_seq Int64 ,
+ d_year Int64 ,
+ d_dow Int64 ,
+ d_moy Int64 ,
+ d_dom Int64 ,
+ d_qoy Int64 ,
+ d_fy_year Int64 ,
+ d_fy_quarter_seq Int64 ,
+ d_fy_week_seq Int64 ,
+ d_day_name {string_type},
+ d_quarter_name {string_type},
+ d_holiday {string_type},
+ d_weekend {string_type},
+ d_following_holiday {string_type},
+ d_first_dom Int64 ,
+ d_last_dom Int64 ,
+ d_same_day_ly Int64 ,
+ d_same_day_lq Int64 ,
+ d_current_day {string_type},
+ d_current_week {string_type},
+ d_current_month {string_type},
+ d_current_quarter {string_type},
+ d_current_year {string_type}
{primary_key} (d_date_sk)
)
{partition_by}(d_date_sk)
@@ -83,19 +83,19 @@ WITH (
CREATE {external} TABLE `{path}/warehouse`
(
w_warehouse_sk Int64 {notnull},
- w_warehouse_id {string_type} {notnull},
- w_warehouse_name {string_type} {notnull},
- w_warehouse_sq_ft Int64 {notnull},
- w_street_number {string_type} {notnull},
- w_street_name {string_type} {notnull},
- w_street_type {string_type} {notnull},
- w_suite_number {string_type} {notnull},
- w_city {string_type} {notnull},
- w_county {string_type} {notnull},
- w_state {string_type} {notnull},
- w_zip {string_type} {notnull},
- w_country {string_type} {notnull},
- w_gmt_offset {decimal_5_2_type} {notnull}
+ w_warehouse_id {string_type},
+ w_warehouse_name {string_type},
+ w_warehouse_sq_ft Int64 ,
+ w_street_number {string_type},
+ w_street_name {string_type},
+ w_street_type {string_type},
+ w_suite_number {string_type},
+ w_city {string_type},
+ w_county {string_type},
+ w_state {string_type},
+ w_zip {string_type},
+ w_country {string_type},
+ w_gmt_offset {decimal_5_2_type}
{primary_key} (w_warehouse_sk)
)
{partition_by}(w_warehouse_sk)
@@ -107,11 +107,11 @@ WITH (
CREATE {external} TABLE `{path}/ship_mode`
(
sm_ship_mode_sk Int64 {notnull},
- sm_ship_mode_id {string_type} {notnull},
- sm_type {string_type} {notnull},
- sm_code {string_type} {notnull},
- sm_carrier {string_type} {notnull},
- sm_contract {string_type} {notnull}
+ sm_ship_mode_id {string_type},
+ sm_type {string_type},
+ sm_code {string_type},
+ sm_carrier {string_type},
+ sm_contract {string_type}
{primary_key} (sm_ship_mode_sk)
)
{partition_by}(sm_ship_mode_sk)
@@ -123,15 +123,15 @@ WITH (
CREATE {external} TABLE `{path}/time_dim`
(
t_time_sk Int64 {notnull},
- t_time_id {string_type} {notnull},
- t_time Int64 {notnull},
- t_hour Int64 {notnull},
- t_minute Int64 {notnull},
- t_second Int64 {notnull},
- t_am_pm {string_type} {notnull},
- t_shift {string_type} {notnull},
- t_sub_shift {string_type} {notnull},
- t_meal_time {string_type} {notnull}
+ t_time_id {string_type},
+ t_time Int64 ,
+ t_hour Int64 ,
+ t_minute Int64 ,
+ t_second Int64 ,
+ t_am_pm {string_type},
+ t_shift {string_type},
+ t_sub_shift {string_type},
+ t_meal_time {string_type}
{primary_key} (t_time_sk)
)
{partition_by}(t_time_sk)
@@ -143,8 +143,8 @@ WITH (
CREATE {external} TABLE `{path}/reason`
(
r_reason_sk Int64 {notnull},
- r_reason_id {string_type} {notnull},
- r_reason_desc {string_type} {notnull}
+ r_reason_id {string_type},
+ r_reason_desc {string_type}
{primary_key} (r_reason_sk)
)
{partition_by}(r_reason_sk)
@@ -156,8 +156,8 @@ WITH (
CREATE {external} TABLE `{path}/income_band`
(
ib_income_band_sk Int64 {notnull},
- ib_lower_bound Int64 {notnull},
- ib_upper_bound Int64 {notnull}
+ ib_lower_bound Int64 ,
+ ib_upper_bound Int64
{primary_key} (ib_income_band_sk)
)
{partition_by}(ib_income_band_sk)
@@ -169,27 +169,27 @@ WITH (
CREATE {external} TABLE `{path}/item`
(
i_item_sk Int64 {notnull},
- i_item_id {string_type} {notnull},
- i_rec_start_date {date_type} {notnull},
- i_rec_end_date {date_type} {notnull},
- i_item_desc {string_type} {notnull},
- i_current_price {decimal_7_2_type} {notnull},
- i_wholesale_cost {decimal_7_2_type} {notnull},
- i_brand_id Int64 {notnull},
- i_brand {string_type} {notnull},
- i_class_id Int64 {notnull},
- i_class {string_type} {notnull},
- i_category_id Int64 {notnull},
- i_category {string_type} {notnull},
- i_manufact_id Int64 {notnull},
- i_manufact {string_type} {notnull},
- i_size {string_type} {notnull},
- i_formulation {string_type} {notnull},
- i_color {string_type} {notnull},
- i_units {string_type} {notnull},
- i_container {string_type} {notnull},
- i_manager_id Int64 {notnull},
- i_product_name {string_type} {notnull}
+ i_item_id {string_type},
+ i_rec_start_date {date_type} ,
+ i_rec_end_date {date_type} ,
+ i_item_desc {string_type},
+ i_current_price {decimal_7_2_type},
+ i_wholesale_cost {decimal_7_2_type},
+ i_brand_id Int64 ,
+ i_brand {string_type},
+ i_class_id Int64 ,
+ i_class {string_type},
+ i_category_id Int64 ,
+ i_category {string_type},
+ i_manufact_id Int64 ,
+ i_manufact {string_type},
+ i_size {string_type},
+ i_formulation {string_type},
+ i_color {string_type},
+ i_units {string_type},
+ i_container {string_type},
+ i_manager_id Int64 ,
+ i_product_name {string_type}
{primary_key} (i_item_sk)
)
{partition_by}(i_item_sk)
@@ -201,34 +201,34 @@ WITH (
CREATE {external} TABLE `{path}/store`
(
s_store_sk Int64 {notnull},
- s_store_id {string_type} {notnull},
- s_rec_start_date {date_type} {notnull},
- s_rec_end_date {date_type} {notnull},
- s_closed_date_sk Int64 {notnull},
- s_store_name {string_type} {notnull},
- s_number_employees Int64 {notnull},
- s_floor_space Int64 {notnull},
- s_hours {string_type} {notnull},
- s_manager {string_type} {notnull},
- s_market_id Int64 {notnull},
- s_geography_class {string_type} {notnull},
- s_market_desc {string_type} {notnull},
- s_market_manager {string_type} {notnull},
- s_division_id Int64 {notnull},
- s_division_name {string_type} {notnull},
- s_company_id Int64 {notnull},
- s_company_name {string_type} {notnull},
- s_street_number {string_type} {notnull},
- s_street_name {string_type} {notnull},
- s_street_type {string_type} {notnull},
- s_suite_number {string_type} {notnull},
- s_city {string_type} {notnull},
- s_county {string_type} {notnull},
- s_state {string_type} {notnull},
- s_zip {string_type} {notnull},
- s_country {string_type} {notnull},
- s_gmt_offset {decimal_5_2_type} {notnull},
- s_tax_precentage {decimal_5_2_type} {notnull}
+ s_store_id {string_type},
+ s_rec_start_date {date_type} ,
+ s_rec_end_date {date_type} ,
+ s_closed_date_sk Int64 ,
+ s_store_name {string_type},
+ s_number_employees Int64 ,
+ s_floor_space Int64 ,
+ s_hours {string_type},
+ s_manager {string_type},
+ s_market_id Int64 ,
+ s_geography_class {string_type},
+ s_market_desc {string_type},
+ s_market_manager {string_type},
+ s_division_id Int64 ,
+ s_division_name {string_type},
+ s_company_id Int64 ,
+ s_company_name {string_type},
+ s_street_number {string_type},
+ s_street_name {string_type},
+ s_street_type {string_type},
+ s_suite_number {string_type},
+ s_city {string_type},
+ s_county {string_type},
+ s_state {string_type},
+ s_zip {string_type},
+ s_country {string_type},
+ s_gmt_offset {decimal_5_2_type},
+ s_tax_precentage {decimal_5_2_type}
{primary_key} (s_store_sk)
)
{partition_by}(s_store_sk)
@@ -240,36 +240,36 @@ WITH (
CREATE {external} TABLE `{path}/call_center`
(
cc_call_center_sk Int64 {notnull},
- cc_call_center_id {string_type} {notnull},
- cc_rec_start_date {date_type} {notnull},
- cc_rec_end_date {date_type} {notnull},
- cc_closed_date_sk Int64 {notnull},
- cc_open_date_sk Int64 {notnull},
- cc_name {string_type} {notnull},
- cc_class {string_type} {notnull},
- cc_employees Int64 {notnull},
- cc_sq_ft Int64 {notnull},
- cc_hours {string_type} {notnull},
- cc_manager {string_type} {notnull},
- cc_mkt_id Int64 {notnull},
- cc_mkt_class {string_type} {notnull},
- cc_mkt_desc {string_type} {notnull},
- cc_market_manager {string_type} {notnull},
- cc_division Int64 {notnull},
- cc_division_name {string_type} {notnull},
- cc_company Int64 {notnull},
- cc_company_name {string_type} {notnull},
- cc_street_number {string_type} {notnull},
- cc_street_name {string_type} {notnull},
- cc_street_type {string_type} {notnull},
- cc_suite_number {string_type} {notnull},
- cc_city {string_type} {notnull},
- cc_county {string_type} {notnull},
- cc_state {string_type} {notnull},
- cc_zip {string_type} {notnull},
- cc_country {string_type} {notnull},
- cc_gmt_offset {decimal_5_2_type} {notnull},
- cc_tax_percentage {decimal_5_2_type} {notnull}
+ cc_call_center_id {string_type},
+ cc_rec_start_date {date_type} ,
+ cc_rec_end_date {date_type} ,
+ cc_closed_date_sk Int64 ,
+ cc_open_date_sk Int64 ,
+ cc_name {string_type},
+ cc_class {string_type},
+ cc_employees Int64 ,
+ cc_sq_ft Int64 ,
+ cc_hours {string_type},
+ cc_manager {string_type},
+ cc_mkt_id Int64 ,
+ cc_mkt_class {string_type},
+ cc_mkt_desc {string_type},
+ cc_market_manager {string_type},
+ cc_division Int64 ,
+ cc_division_name {string_type},
+ cc_company Int64 ,
+ cc_company_name {string_type},
+ cc_street_number {string_type},
+ cc_street_name {string_type},
+ cc_street_type {string_type},
+ cc_suite_number {string_type},
+ cc_city {string_type},
+ cc_county {string_type},
+ cc_state {string_type},
+ cc_zip {string_type},
+ cc_country {string_type},
+ cc_gmt_offset {decimal_5_2_type},
+ cc_tax_percentage {decimal_5_2_type}
{primary_key} (cc_call_center_sk)
)
{partition_by}(cc_call_center_sk)
@@ -281,23 +281,23 @@ WITH (
CREATE {external} TABLE `{path}/customer`
(
c_customer_sk Int64 {notnull},
- c_customer_id {string_type} {notnull},
- c_current_cdemo_sk Int64 {notnull},
- c_current_hdemo_sk Int64 {notnull},
- c_current_addr_sk Int64 {notnull},
- c_first_shipto_date_sk Int64 {notnull},
- c_first_sales_date_sk Int64 {notnull},
- c_salutation {string_type} {notnull},
- c_first_name {string_type} {notnull},
- c_last_name {string_type} {notnull},
- c_preferred_cust_flag {string_type} {notnull},
- c_birth_day Int64 {notnull},
- c_birth_month Int64 {notnull},
- c_birth_year Int64 {notnull},
- c_birth_country {string_type} {notnull},
- c_login {string_type} {notnull},
- c_email_address {string_type} {notnull},
- c_last_review_date {string_type} {notnull}
+ c_customer_id {string_type},
+ c_current_cdemo_sk Int64 ,
+ c_current_hdemo_sk Int64 ,
+ c_current_addr_sk Int64 ,
+ c_first_shipto_date_sk Int64 ,
+ c_first_sales_date_sk Int64 ,
+ c_salutation {string_type},
+ c_first_name {string_type},
+ c_last_name {string_type},
+ c_preferred_cust_flag {string_type},
+ c_birth_day Int64 ,
+ c_birth_month Int64 ,
+ c_birth_year Int64 ,
+ c_birth_country {string_type},
+ c_login {string_type},
+ c_email_address {string_type},
+ c_last_review_date {string_type}
{primary_key} (c_customer_sk)
)
{partition_by}(c_customer_sk)
@@ -309,31 +309,31 @@ WITH (
CREATE {external} TABLE `{path}/web_site`
(
web_site_sk Int64 {notnull},
- web_site_id {string_type} {notnull},
- web_rec_start_date {date_type} {notnull},
- web_rec_end_date {date_type} {notnull},
- web_name {string_type} {notnull},
- web_open_date_sk Int64 {notnull},
- web_close_date_sk Int64 {notnull},
- web_class {string_type} {notnull},
- web_manager {string_type} {notnull},
- web_mkt_id Int64 {notnull},
- web_mkt_class {string_type} {notnull},
- web_mkt_desc {string_type} {notnull},
- web_market_manager {string_type} {notnull},
- web_company_id Int64 {notnull},
- web_company_name {string_type} {notnull},
- web_street_number {string_type} {notnull},
- web_street_name {string_type} {notnull},
- web_street_type {string_type} {notnull},
- web_suite_number {string_type} {notnull},
- web_city {string_type} {notnull},
- web_county {string_type} {notnull},
- web_state {string_type} {notnull},
- web_zip {string_type} {notnull},
- web_country {string_type} {notnull},
- web_gmt_offset {decimal_5_2_type} {notnull},
- web_tax_percentage {decimal_5_2_type} {notnull}
+ web_site_id {string_type},
+ web_rec_start_date {date_type} ,
+ web_rec_end_date {date_type} ,
+ web_name {string_type},
+ web_open_date_sk Int64 ,
+ web_close_date_sk Int64 ,
+ web_class {string_type},
+ web_manager {string_type},
+ web_mkt_id Int64 ,
+ web_mkt_class {string_type},
+ web_mkt_desc {string_type},
+ web_market_manager {string_type},
+ web_company_id Int64 ,
+ web_company_name {string_type},
+ web_street_number {string_type},
+ web_street_name {string_type},
+ web_street_type {string_type},
+ web_suite_number {string_type},
+ web_city {string_type},
+ web_county {string_type},
+ web_state {string_type},
+ web_zip {string_type},
+ web_country {string_type},
+ web_gmt_offset {decimal_5_2_type},
+ web_tax_percentage {decimal_5_2_type}
{primary_key} (web_site_sk)
)
{partition_by}(web_site_sk)
@@ -344,26 +344,26 @@ WITH (
CREATE {external} TABLE `{path}/store_returns`
(
- sr_returned_date_sk Int64 {notnull},
- sr_return_time_sk Int64 {notnull},
+ sr_returned_date_sk Int64 ,
+ sr_return_time_sk Int64 ,
sr_item_sk Int64 {notnull},
- sr_customer_sk Int64 {notnull},
- sr_cdemo_sk Int64 {notnull},
- sr_hdemo_sk Int64 {notnull},
- sr_addr_sk Int64 {notnull},
- sr_store_sk Int64 {notnull},
- sr_reason_sk Int64 {notnull},
+ sr_customer_sk Int64 ,
+ sr_cdemo_sk Int64 ,
+ sr_hdemo_sk Int64 ,
+ sr_addr_sk Int64 ,
+ sr_store_sk Int64 ,
+ sr_reason_sk Int64 ,
sr_ticket_number Int64 {notnull},
- sr_return_quantity Int64 {notnull},
- sr_return_amt {decimal_7_2_type} {notnull},
- sr_return_tax {decimal_7_2_type} {notnull},
- sr_return_amt_inc_tax {decimal_7_2_type} {notnull},
- sr_fee {decimal_7_2_type} {notnull},
- sr_return_ship_cost {decimal_15_2_type} {notnull},
- sr_refunded_cash {decimal_7_2_type} {notnull},
- sr_reversed_charge {decimal_7_2_type} {notnull},
- sr_store_credit {decimal_7_2_type} {notnull},
- sr_net_loss {decimal_7_2_type} {notnull}
+ sr_return_quantity Int64 ,
+ sr_return_amt {decimal_7_2_type},
+ sr_return_tax {decimal_7_2_type},
+ sr_return_amt_inc_tax {decimal_7_2_type},
+ sr_fee {decimal_7_2_type},
+ sr_return_ship_cost {decimal_15_2_type},
+ sr_refunded_cash {decimal_7_2_type},
+ sr_reversed_charge {decimal_7_2_type},
+ sr_store_credit {decimal_7_2_type},
+ sr_net_loss {decimal_7_2_type}
{primary_key} (sr_item_sk, sr_ticket_number)
)
{partition_by}(sr_item_sk, sr_ticket_number)
@@ -375,10 +375,10 @@ WITH (
CREATE {external} TABLE `{path}/household_demographics`
(
hd_demo_sk Int64 {notnull},
- hd_income_band_sk Int64 {notnull},
- hd_buy_potential {string_type} {notnull},
- hd_dep_count Int64 {notnull},
- hd_vehicle_count Int64 {notnull}
+ hd_income_band_sk Int64 ,
+ hd_buy_potential {string_type},
+ hd_dep_count Int64 ,
+ hd_vehicle_count Int64
{primary_key} (hd_demo_sk)
)
{partition_by}(hd_demo_sk)
@@ -390,19 +390,19 @@ WITH (
CREATE {external} TABLE `{path}/web_page`
(
wp_web_page_sk Int64 {notnull},
- wp_web_page_id {string_type} {notnull},
- wp_rec_start_date {date_type} {notnull},
- wp_rec_end_date {date_type} {notnull},
- wp_creation_date_sk Int64 {notnull},
- wp_access_date_sk Int64 {notnull},
- wp_autogen_flag {string_type} {notnull},
- wp_customer_sk Int64 {notnull},
- wp_url {string_type} {notnull},
- wp_type {string_type} {notnull},
- wp_char_count Int64 {notnull},
- wp_link_count Int64 {notnull},
- wp_image_count Int64 {notnull},
- wp_max_ad_count Int64 {notnull}
+ wp_web_page_id {string_type},
+ wp_rec_start_date {date_type} ,
+ wp_rec_end_date {date_type} ,
+ wp_creation_date_sk Int64 ,
+ wp_access_date_sk Int64 ,
+ wp_autogen_flag {string_type},
+ wp_customer_sk Int64 ,
+ wp_url {string_type},
+ wp_type {string_type},
+ wp_char_count Int64 ,
+ wp_link_count Int64 ,
+ wp_image_count Int64 ,
+ wp_max_ad_count Int64
{primary_key} (wp_web_page_sk)
)
{partition_by}(wp_web_page_sk)
@@ -414,24 +414,24 @@ WITH (
CREATE {external} TABLE `{path}/promotion`
(
p_promo_sk Int64 {notnull},
- p_promo_id {string_type} {notnull},
- p_start_date_sk Int64 {notnull},
- p_end_date_sk Int64 {notnull},
- p_item_sk Int64 {notnull},
- p_cost {decimal_7_2_type} {notnull},
- p_response_target Int64 {notnull},
- p_promo_name {string_type} {notnull},
- p_channel_dmail {string_type} {notnull},
- p_channel_email {string_type} {notnull},
- p_channel_catalog {string_type} {notnull},
- p_channel_tv {string_type} {notnull},
- p_channel_radio {string_type} {notnull},
- p_channel_press {string_type} {notnull},
- p_channel_event {string_type} {notnull},
- p_channel_demo {string_type} {notnull},
- p_channel_details {string_type} {notnull},
- p_purpose {string_type} {notnull},
- p_discount_active {string_type} {notnull}
+ p_promo_id {string_type},
+ p_start_date_sk Int64 ,
+ p_end_date_sk Int64 ,
+ p_item_sk Int64 ,
+ p_cost {decimal_7_2_type},
+ p_response_target Int64 ,
+ p_promo_name {string_type},
+ p_channel_dmail {string_type},
+ p_channel_email {string_type},
+ p_channel_catalog {string_type},
+ p_channel_tv {string_type},
+ p_channel_radio {string_type},
+ p_channel_press {string_type},
+ p_channel_event {string_type},
+ p_channel_demo {string_type},
+ p_channel_details {string_type},
+ p_purpose {string_type},
+ p_discount_active {string_type}
{primary_key} (p_promo_sk)
)
{partition_by}(p_promo_sk)
@@ -443,14 +443,14 @@ WITH (
CREATE {external} TABLE `{path}/catalog_page`
(
cp_catalog_page_sk Int64 {notnull},
- cp_catalog_page_id {string_type} {notnull},
- cp_start_date_sk Int64 {notnull},
- cp_end_date_sk Int64 {notnull},
- cp_department {string_type} {notnull},
- cp_catalog_number Int64 {notnull},
- cp_catalog_page_number Int64 {notnull},
- cp_description {string_type} {notnull},
- cp_type {string_type} {notnull}
+ cp_catalog_page_id {string_type},
+ cp_start_date_sk Int64 ,
+ cp_end_date_sk Int64 ,
+ cp_department {string_type},
+ cp_catalog_number Int64 ,
+ cp_catalog_page_number Int64 ,
+ cp_description {string_type},
+ cp_type {string_type}
{primary_key} (cp_catalog_page_sk)
)
{partition_by}(cp_catalog_page_sk)
@@ -464,7 +464,7 @@ CREATE {external} TABLE `{path}/inventory`
inv_date_sk Int64 {notnull},
inv_item_sk Int64 {notnull},
inv_warehouse_sk Int64 {notnull},
- inv_quantity_on_hand Int64 {notnull}
+ inv_quantity_on_hand Int64
{primary_key} (inv_date_sk, inv_item_sk, inv_warehouse_sk)
)
{partition_by}(inv_date_sk, inv_item_sk, inv_warehouse_sk)
@@ -475,33 +475,33 @@ WITH (
CREATE {external} TABLE `{path}/catalog_returns`
(
- cr_returned_date_sk Int64 {notnull},
- cr_returned_time_sk Int64 {notnull},
+ cr_returned_date_sk Int64 ,
+ cr_returned_time_sk Int64 ,
cr_item_sk Int64 {notnull},
- cr_refunded_customer_sk Int64 {notnull},
- cr_refunded_cdemo_sk Int64 {notnull},
- cr_refunded_hdemo_sk Int64 {notnull},
- cr_refunded_addr_sk Int64 {notnull},
- cr_returning_customer_sk Int64 {notnull},
- cr_returning_cdemo_sk Int64 {notnull},
- cr_returning_hdemo_sk Int64 {notnull},
- cr_returning_addr_sk Int64 {notnull},
- cr_call_center_sk Int64 {notnull},
- cr_catalog_page_sk Int64 {notnull},
- cr_ship_mode_sk Int64 {notnull},
- cr_warehouse_sk Int64 {notnull},
- cr_reason_sk Int64 {notnull},
+ cr_refunded_customer_sk Int64 ,
+ cr_refunded_cdemo_sk Int64 ,
+ cr_refunded_hdemo_sk Int64 ,
+ cr_refunded_addr_sk Int64 ,
+ cr_returning_customer_sk Int64 ,
+ cr_returning_cdemo_sk Int64 ,
+ cr_returning_hdemo_sk Int64 ,
+ cr_returning_addr_sk Int64 ,
+ cr_call_center_sk Int64 ,
+ cr_catalog_page_sk Int64 ,
+ cr_ship_mode_sk Int64 ,
+ cr_warehouse_sk Int64 ,
+ cr_reason_sk Int64 ,
cr_order_number Int64 {notnull},
- cr_return_quantity Int64 {notnull},
- cr_return_amount {decimal_7_2_type} {notnull},
- cr_return_tax {decimal_7_2_type} {notnull},
- cr_return_amt_inc_tax {decimal_7_2_type} {notnull},
- cr_fee {decimal_7_2_type} {notnull},
- cr_return_ship_cost {decimal_7_2_type} {notnull},
- cr_refunded_cash {decimal_7_2_type} {notnull},
- cr_reversed_charge {decimal_7_2_type} {notnull},
- cr_store_credit {decimal_7_2_type} {notnull},
- cr_net_loss {decimal_7_2_type} {notnull}
+ cr_return_quantity Int64 ,
+ cr_return_amount {decimal_7_2_type},
+ cr_return_tax {decimal_7_2_type},
+ cr_return_amt_inc_tax {decimal_7_2_type},
+ cr_fee {decimal_7_2_type},
+ cr_return_ship_cost {decimal_7_2_type},
+ cr_refunded_cash {decimal_7_2_type},
+ cr_reversed_charge {decimal_7_2_type},
+ cr_store_credit {decimal_7_2_type},
+ cr_net_loss {decimal_7_2_type}
{primary_key} (cr_item_sk, cr_order_number)
)
{partition_by}(cr_item_sk, cr_order_number)
@@ -512,30 +512,30 @@ WITH (
CREATE {external} TABLE `{path}/web_returns`
(
- wr_returned_date_sk Int64 {notnull},
- wr_returned_time_sk Int64 {notnull},
+ wr_returned_date_sk Int64 ,
+ wr_returned_time_sk Int64 ,
wr_item_sk Int64 {notnull},
- wr_refunded_customer_sk Int64 {notnull},
- wr_refunded_cdemo_sk Int64 {notnull},
- wr_refunded_hdemo_sk Int64 {notnull},
- wr_refunded_addr_sk Int64 {notnull},
- wr_returning_customer_sk Int64 {notnull},
- wr_returning_cdemo_sk Int64 {notnull},
- wr_returning_hdemo_sk Int64 {notnull},
- wr_returning_addr_sk Int64 {notnull},
- wr_web_page_sk Int64 {notnull},
- wr_reason_sk Int64 {notnull},
+ wr_refunded_customer_sk Int64 ,
+ wr_refunded_cdemo_sk Int64 ,
+ wr_refunded_hdemo_sk Int64 ,
+ wr_refunded_addr_sk Int64 ,
+ wr_returning_customer_sk Int64 ,
+ wr_returning_cdemo_sk Int64 ,
+ wr_returning_hdemo_sk Int64 ,
+ wr_returning_addr_sk Int64 ,
+ wr_web_page_sk Int64 ,
+ wr_reason_sk Int64 ,
wr_order_number Int64 {notnull},
- wr_return_quantity Int64 {notnull},
- wr_return_amt {decimal_7_2_type} {notnull},
- wr_return_tax {decimal_7_2_type} {notnull},
- wr_return_amt_inc_tax {decimal_7_2_type} {notnull},
- wr_fee {decimal_7_2_type} {notnull},
- wr_return_ship_cost {decimal_7_2_type} {notnull},
- wr_refunded_cash {decimal_7_2_type} {notnull},
- wr_reversed_charge {decimal_7_2_type} {notnull},
- wr_account_credit {decimal_7_2_type} {notnull},
- wr_net_loss {decimal_7_2_type} {notnull}
+ wr_return_quantity Int64 ,
+ wr_return_amt {decimal_7_2_type},
+ wr_return_tax {decimal_7_2_type},
+ wr_return_amt_inc_tax {decimal_7_2_type},
+ wr_fee {decimal_7_2_type},
+ wr_return_ship_cost {decimal_7_2_type},
+ wr_refunded_cash {decimal_7_2_type},
+ wr_reversed_charge {decimal_7_2_type},
+ wr_account_credit {decimal_7_2_type},
+ wr_net_loss {decimal_7_2_type}
{primary_key} (wr_item_sk, wr_order_number)
)
{partition_by}(wr_item_sk, wr_order_number)
@@ -546,40 +546,40 @@ WITH (
CREATE {external} TABLE `{path}/web_sales`
(
- ws_sold_date_sk Int64 {notnull},
- ws_sold_time_sk Int64 {notnull},
- ws_ship_date_sk Int64 {notnull},
+ ws_sold_date_sk Int64 ,
+ ws_sold_time_sk Int64 ,
+ ws_ship_date_sk Int64 ,
ws_item_sk Int64 {notnull},
- ws_bill_customer_sk Int64 {notnull},
- ws_bill_cdemo_sk Int64 {notnull},
- ws_bill_hdemo_sk Int64 {notnull},
- ws_bill_addr_sk Int64 {notnull},
- ws_ship_customer_sk Int64 {notnull},
- ws_ship_cdemo_sk Int64 {notnull},
- ws_ship_hdemo_sk Int64 {notnull},
- ws_ship_addr_sk Int64 {notnull},
- ws_web_page_sk Int64 {notnull},
- ws_web_site_sk Int64 {notnull},
- ws_ship_mode_sk Int64 {notnull},
- ws_warehouse_sk Int64 {notnull},
- ws_promo_sk Int64 {notnull},
+ ws_bill_customer_sk Int64 ,
+ ws_bill_cdemo_sk Int64 ,
+ ws_bill_hdemo_sk Int64 ,
+ ws_bill_addr_sk Int64 ,
+ ws_ship_customer_sk Int64 ,
+ ws_ship_cdemo_sk Int64 ,
+ ws_ship_hdemo_sk Int64 ,
+ ws_ship_addr_sk Int64 ,
+ ws_web_page_sk Int64 ,
+ ws_web_site_sk Int64 ,
+ ws_ship_mode_sk Int64 ,
+ ws_warehouse_sk Int64 ,
+ ws_promo_sk Int64 ,
ws_order_number Int64 {notnull},
- ws_quantity Int64 {notnull},
- ws_wholesale_cost {decimal_7_2_type} {notnull},
- ws_list_price {decimal_7_2_type} {notnull},
- ws_sales_price {decimal_7_2_type} {notnull},
- ws_ext_discount_amt {decimal_7_2_type} {notnull},
- ws_ext_sales_price {decimal_7_2_type} {notnull},
- ws_ext_wholesale_cost {decimal_7_2_type} {notnull},
- ws_ext_list_price {decimal_7_2_type} {notnull},
- ws_ext_tax {decimal_7_2_type} {notnull},
- ws_coupon_amt {decimal_7_2_type} {notnull},
- ws_ext_ship_cost {decimal_7_2_type} {notnull},
- ws_net_paid {decimal_7_2_type} {notnull},
- ws_net_paid_inc_tax {decimal_7_2_type} {notnull},
- ws_net_paid_inc_ship {decimal_7_2_type} {notnull},
- ws_net_paid_inc_ship_tax {decimal_7_2_type} {notnull},
- ws_net_profit {decimal_7_2_type} {notnull}
+ ws_quantity Int64 ,
+ ws_wholesale_cost {decimal_7_2_type},
+ ws_list_price {decimal_7_2_type},
+ ws_sales_price {decimal_7_2_type},
+ ws_ext_discount_amt {decimal_7_2_type},
+ ws_ext_sales_price {decimal_7_2_type},
+ ws_ext_wholesale_cost {decimal_7_2_type},
+ ws_ext_list_price {decimal_7_2_type},
+ ws_ext_tax {decimal_7_2_type},
+ ws_coupon_amt {decimal_7_2_type},
+ ws_ext_ship_cost {decimal_7_2_type},
+ ws_net_paid {decimal_7_2_type},
+ ws_net_paid_inc_tax {decimal_7_2_type},
+ ws_net_paid_inc_ship {decimal_7_2_type},
+ ws_net_paid_inc_ship_tax {decimal_7_2_type},
+ ws_net_profit {decimal_7_2_type}
{primary_key} (ws_item_sk, ws_order_number)
)
{partition_by}(ws_item_sk, ws_order_number)
@@ -590,40 +590,40 @@ WITH (
CREATE {external} TABLE `{path}/catalog_sales`
(
- cs_sold_date_sk Int64 {notnull},
- cs_sold_time_sk Int64 {notnull},
- cs_ship_date_sk Int64 {notnull},
- cs_bill_customer_sk Int64 {notnull},
- cs_bill_cdemo_sk Int64 {notnull},
- cs_bill_hdemo_sk Int64 {notnull},
- cs_bill_addr_sk Int64 {notnull},
- cs_ship_customer_sk Int64 {notnull},
- cs_ship_cdemo_sk Int64 {notnull},
- cs_ship_hdemo_sk Int64 {notnull},
- cs_ship_addr_sk Int64 {notnull},
- cs_call_center_sk Int64 {notnull},
- cs_catalog_page_sk Int64 {notnull},
- cs_ship_mode_sk Int64 {notnull},
- cs_warehouse_sk Int64 {notnull},
+ cs_sold_date_sk Int64 ,
+ cs_sold_time_sk Int64 ,
+ cs_ship_date_sk Int64 ,
+ cs_bill_customer_sk Int64 ,
+ cs_bill_cdemo_sk Int64 ,
+ cs_bill_hdemo_sk Int64 ,
+ cs_bill_addr_sk Int64 ,
+ cs_ship_customer_sk Int64 ,
+ cs_ship_cdemo_sk Int64 ,
+ cs_ship_hdemo_sk Int64 ,
+ cs_ship_addr_sk Int64 ,
+ cs_call_center_sk Int64 ,
+ cs_catalog_page_sk Int64 ,
+ cs_ship_mode_sk Int64 ,
+ cs_warehouse_sk Int64 ,
cs_item_sk Int64 {notnull},
- cs_promo_sk Int64 {notnull},
+ cs_promo_sk Int64 ,
cs_order_number Int64 {notnull},
- cs_quantity Int64 {notnull},
- cs_wholesale_cost {decimal_7_2_type} {notnull},
- cs_list_price {decimal_7_2_type} {notnull},
- cs_sales_price {decimal_7_2_type} {notnull},
- cs_ext_discount_amt {decimal_7_2_type} {notnull},
- cs_ext_sales_price {decimal_7_2_type} {notnull},
- cs_ext_wholesale_cost {decimal_7_2_type} {notnull},
- cs_ext_list_price {decimal_7_2_type} {notnull},
- cs_ext_tax {decimal_7_2_type} {notnull},
- cs_coupon_amt {decimal_7_2_type} {notnull},
- cs_ext_ship_cost {decimal_7_2_type} {notnull},
- cs_net_paid {decimal_7_2_type} {notnull},
- cs_net_paid_inc_tax {decimal_7_2_type} {notnull},
- cs_net_paid_inc_ship {decimal_7_2_type} {notnull},
- cs_net_paid_inc_ship_tax {decimal_7_2_type} {notnull},
- cs_net_profit {decimal_7_2_type} {notnull}
+ cs_quantity Int64 ,
+ cs_wholesale_cost {decimal_7_2_type},
+ cs_list_price {decimal_7_2_type},
+ cs_sales_price {decimal_7_2_type},
+ cs_ext_discount_amt {decimal_7_2_type},
+ cs_ext_sales_price {decimal_7_2_type},
+ cs_ext_wholesale_cost {decimal_7_2_type},
+ cs_ext_list_price {decimal_7_2_type},
+ cs_ext_tax {decimal_7_2_type},
+ cs_coupon_amt {decimal_7_2_type},
+ cs_ext_ship_cost {decimal_7_2_type},
+ cs_net_paid {decimal_7_2_type},
+ cs_net_paid_inc_tax {decimal_7_2_type},
+ cs_net_paid_inc_ship {decimal_7_2_type},
+ cs_net_paid_inc_ship_tax {decimal_7_2_type},
+ cs_net_profit {decimal_7_2_type}
{primary_key} (cs_item_sk, cs_order_number)
)
{partition_by}(cs_item_sk, cs_order_number)
@@ -634,29 +634,29 @@ WITH (
CREATE {external} TABLE `{path}/store_sales`
(
- ss_sold_date_sk Int64 {notnull},
- ss_sold_time_sk Int64 {notnull},
+ ss_sold_date_sk Int64 ,
+ ss_sold_time_sk Int64 ,
ss_item_sk Int64 {notnull},
- ss_customer_sk Int64 {notnull},
- ss_cdemo_sk Int64 {notnull},
- ss_hdemo_sk Int64 {notnull},
- ss_addr_sk Int64 {notnull},
- ss_store_sk Int64 {notnull},
- ss_promo_sk Int64 {notnull},
+ ss_customer_sk Int64 ,
+ ss_cdemo_sk Int64 ,
+ ss_hdemo_sk Int64 ,
+ ss_addr_sk Int64 ,
+ ss_store_sk Int64 ,
+ ss_promo_sk Int64 ,
ss_ticket_number Int64 {notnull},
- ss_quantity Int64 {notnull},
- ss_wholesale_cost {decimal_7_2_type} {notnull},
- ss_list_price {decimal_7_2_type} {notnull},
- ss_sales_price {decimal_7_2_type} {notnull},
- ss_ext_discount_amt {decimal_7_2_type} {notnull},
- ss_ext_sales_price {decimal_7_2_type} {notnull},
- ss_ext_wholesale_cost {decimal_7_2_type} {notnull},
- ss_ext_list_price {decimal_7_2_type} {notnull},
- ss_ext_tax {decimal_7_2_type} {notnull},
- ss_coupon_amt {decimal_7_2_type} {notnull},
- ss_net_paid {decimal_7_2_type} {notnull},
- ss_net_paid_inc_tax {decimal_7_2_type} {notnull},
- ss_net_profit {decimal_7_2_type} {notnull}
+ ss_quantity Int64 ,
+ ss_wholesale_cost {decimal_7_2_type},
+ ss_list_price {decimal_7_2_type},
+ ss_sales_price {decimal_7_2_type},
+ ss_ext_discount_amt {decimal_7_2_type},
+ ss_ext_sales_price {decimal_7_2_type},
+ ss_ext_wholesale_cost {decimal_7_2_type},
+ ss_ext_list_price {decimal_7_2_type},
+ ss_ext_tax {decimal_7_2_type},
+ ss_coupon_amt {decimal_7_2_type},
+ ss_net_paid {decimal_7_2_type},
+ ss_net_paid_inc_tax {decimal_7_2_type},
+ ss_net_profit {decimal_7_2_type}
{primary_key} (ss_item_sk, ss_ticket_number)
)
{partition_by}(ss_item_sk, ss_ticket_number)