Skip to content

Instantly share code, notes, and snippets.

@shaipraj
Created April 4, 2017 08:55
Show Gist options
  • Save shaipraj/a09991ad1599bca5f43b38c5565dbebe to your computer and use it in GitHub Desktop.
Save shaipraj/a09991ad1599bca5f43b38c5565dbebe to your computer and use it in GitHub Desktop.
kylin cube description 1
{
"uuid": "268758b0-5e21-4bd1-bed5-7df845bd1454",
"last_modified": 1490889997197,
"version": "1.6.0",
"name": "CUBE_TPC_DS_PIPELINE_FACT",
"model_name": "model_CUBE_TPC_DS_PIPELINE_FACT",
"description": "",
"null_string": [
"null"
],
"dimensions": [
{
"name": "CUSTOMER_DEMOGRAPHICS",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.CUSTOMER_DEMOGRAPHICS",
"column": null,
"derived": [
"CD_DEMO_SK",
"CD_GENDER",
"CD_MARITAL_STATUS",
"CD_EDUCATION_STATUS",
"CD_PURCHASE_ESTIMATE",
"CD_CREDIT_RATING",
"CD_DEP_COUNT",
"CD_DEP_EMPLOYED_COUNT",
"CD_DEP_COLLEGE_COUNT"
]
},
{
"name": "ITEM",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.ITEM",
"column": null,
"derived": [
"I_ITEM_SK",
"I_ITEM_ID",
"I_REC_START_DATE",
"I_REC_END_DATE",
"I_ITEM_DESC",
"I_CURRENT_PRICE",
"I_WHOLESALE_COST",
"I_BRAND_ID",
"I_BRAND",
"I_CLASS_ID",
"I_CLASS",
"I_CATEGORY_ID",
"I_CATEGORY",
"I_MANUFACT_ID",
"I_MANUFACT",
"I_SIZE",
"I_FORMULATION",
"I_COLOR",
"I_UNITS",
"I_CONTAINER",
"I_MANAGER_ID",
"I_PRODUCT_NAME"
]
},
{
"name": "GEO",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.STORE",
"column": "S_COUNTRY",
"derived": null
},
{
"name": "GEO",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.STORE",
"column": "S_STATE",
"derived": null
},
{
"name": "GEO",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.STORE",
"column": "S_CITY",
"derived": null
},
{
"name": "ADD_N",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.STORE",
"column": "S_STORE_ID",
"derived": null
},
{
"name": "ADD_N",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.STORE",
"column": "S_STORE_NAME",
"derived": null
},
{
"name": "STORE",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.STORE",
"column": null,
"derived": [
"S_STORE_SK",
"S_REC_START_DATE",
"S_REC_END_DATE",
"S_CLOSED_DATE_SK",
"S_NUMBER_EMPLOYEES",
"S_FLOOR_SPACE",
"S_HOURS",
"S_MANAGER",
"S_MARKET_ID",
"S_GEOGRAPHY_CLASS",
"S_MARKET_DESC",
"S_MARKET_MANAGER",
"S_DIVISION_ID",
"S_DIVISION_NAME",
"S_COMPANY_ID",
"S_COMPANY_NAME",
"S_STREET_NUMBER",
"S_STREET_NAME",
"S_STREET_TYPE",
"S_SUITE_NUMBER",
"S_COUNTY",
"S_ZIP",
"S_GMT_OFFSET",
"S_TAX_PRECENTAGE"
]
},
{
"name": "CUSTOMER",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.CUSTOMER",
"column": null,
"derived": [
"C_CUSTOMER_SK",
"C_CUSTOMER_ID",
"C_CURRENT_CDEMO_SK",
"C_CURRENT_HDEMO_SK",
"C_CURRENT_ADDR_SK",
"C_FIRST_SHIPTO_DATE_SK",
"C_FIRST_SALES_DATE_SK",
"C_SALUTATION",
"C_FIRST_NAME",
"C_LAST_NAME",
"C_PREFERRED_CUST_FLAG",
"C_BIRTH_DAY",
"C_BIRTH_MONTH",
"C_BIRTH_YEAR",
"C_BIRTH_COUNTRY",
"C_LOGIN",
"C_EMAIL_ADDRESS",
"C_LAST_REVIEW_DATE"
]
},
{
"name": "DATE_DIM",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.DATE_DIM",
"column": null,
"derived": [
"D_DATE_SK",
"D_DATE_ID",
"D_DATE",
"D_MONTH_SEQ",
"D_WEEK_SEQ",
"D_QUARTER_SEQ",
"D_YEAR",
"D_DOW",
"D_MOY",
"D_DOM",
"D_QOY",
"D_FY_YEAR",
"D_FY_QUARTER_SEQ",
"D_FY_WEEK_SEQ",
"D_DAY_NAME",
"D_QUARTER_NAME",
"D_HOLIDAY",
"D_WEEKEND",
"D_FOLLOWING_HOLIDAY",
"D_FIRST_DOM",
"D_LAST_DOM",
"D_SAME_DAY_LY",
"D_SAME_DAY_LQ",
"D_CURRENT_DAY",
"D_CURRENT_WEEK",
"D_CURRENT_MONTH",
"D_CURRENT_QUARTER",
"D_CURRENT_YEAR"
]
},
{
"name": "TIME_DIM",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.TIME_DIM",
"column": null,
"derived": [
"T_TIME_SK",
"T_TIME_ID",
"T_TIME",
"T_HOUR",
"T_MINUTE",
"T_SECOND",
"T_AM_PM",
"T_SHIFT",
"T_SUB_SHIFT",
"T_MEAL_TIME"
]
},
{
"name": "ADD_N",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.PROMOTION",
"column": "P_PROMO_NAME",
"derived": null
},
{
"name": "ADD_N",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.PROMOTION",
"column": "DER_PROMO_NAME",
"derived": null
},
{
"name": "PROMOTION",
"table": "IW_CUBE_TPC_DS_PIPELINE_FACT.PROMOTION",
"column": null,
"derived": [
"P_PROMO_SK",
"P_PROMO_ID",
"P_START_DATE_SK",
"P_END_DATE_SK",
"P_ITEM_SK",
"P_COST",
"P_RESPONSE_TARGET",
"P_CHANNEL_DMAIL",
"P_CHANNEL_EMAIL",
"P_CHANNEL_CATALOG",
"P_CHANNEL_TV",
"P_CHANNEL_RADIO",
"P_CHANNEL_PRESS",
"P_CHANNEL_EVENT",
"P_CHANNEL_DEMO",
"P_CHANNEL_DETAILS",
"P_PURPOSE",
"P_DISCOUNT_ACTIVE"
]
}
],
"measures": [
{
"name": "_COUNT_",
"function": {
"expression": "COUNT",
"parameter": {
"type": "constant",
"value": "1",
"next_parameter": null
},
"returntype": "bigint"
},
"dependent_measure_ref": null
},
{
"name": "DISTINCT_TICKET",
"function": {
"expression": "COUNT_DISTINCT",
"parameter": {
"type": "column",
"value": "SS_TICKET_NUMBER",
"next_parameter": null
},
"returntype": "hllc(10)"
},
"dependent_measure_ref": null
},
{
"name": "AVG_QUANTITY",
"function": {
"expression": "SUM",
"parameter": {
"type": "column",
"value": "SS_QUANTITY",
"next_parameter": null
},
"returntype": "decimal"
},
"dependent_measure_ref": null
},
{
"name": "TOTAL_SALES_PRICE",
"function": {
"expression": "SUM",
"parameter": {
"type": "column",
"value": "SS_SALES_PRICE",
"next_parameter": null
},
"returntype": "decimal"
},
"dependent_measure_ref": null
},
{
"name": "TOTAL_DISCOUNT",
"function": {
"expression": "SUM",
"parameter": {
"type": "column",
"value": "SS_EXT_DISCOUNT_AMT",
"next_parameter": null
},
"returntype": "decimal"
},
"dependent_measure_ref": null
},
{
"name": "TOTAL_EXT_SALES_PRICE",
"function": {
"expression": "SUM",
"parameter": {
"type": "column",
"value": "SS_EXT_SALES_PRICE",
"next_parameter": null
},
"returntype": "decimal"
},
"dependent_measure_ref": null
},
{
"name": "MAX_WHOLESALE_COST",
"function": {
"expression": "MAX",
"parameter": {
"type": "column",
"value": "SS_EXT_WHOLESALE_COST",
"next_parameter": null
},
"returntype": "decimal"
},
"dependent_measure_ref": null
},
{
"name": "MIN_TAX",
"function": {
"expression": "MIN",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": null
},
"returntype": "decimal"
},
"dependent_measure_ref": null
},
{
"name": "TOPN_TAX_SS_ITEM_SK",
"function": {
"expression": "TOP_N",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": {
"type": "column",
"value": "SS_ITEM_SK",
"next_parameter": null
}
},
"returntype": "topn(100)"
},
"dependent_measure_ref": null
},
{
"name": "TOPN_TAX_SS_SOLD_TIME_SK",
"function": {
"expression": "TOP_N",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": {
"type": "column",
"value": "SS_SOLD_TIME_SK",
"next_parameter": null
}
},
"returntype": "topn(100)"
},
"dependent_measure_ref": null
},
{
"name": "TOPN_TAX_DER_CUSTOMER_SK",
"function": {
"expression": "TOP_N",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": {
"type": "column",
"value": "DER_CUSTOMER_SK",
"next_parameter": null
}
},
"returntype": "topn(100)"
},
"dependent_measure_ref": null
},
{
"name": "TOPN_TAX_SS_STORE_SK",
"function": {
"expression": "TOP_N",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": {
"type": "column",
"value": "SS_STORE_SK",
"next_parameter": null
}
},
"returntype": "topn(100)"
},
"dependent_measure_ref": null
},
{
"name": "TOPN_TAX_S_STORE_ID",
"function": {
"expression": "TOP_N",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": {
"type": "column",
"value": "S_STORE_ID",
"next_parameter": null
}
},
"returntype": "topn(100)"
},
"dependent_measure_ref": null
},
{
"name": "TOPN_TAX_S_STORE_NAME",
"function": {
"expression": "TOP_N",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": {
"type": "column",
"value": "S_STORE_NAME",
"next_parameter": null
}
},
"returntype": "topn(100)"
},
"dependent_measure_ref": null
},
{
"name": "TOPN_TAX_SS_PROMO_SK",
"function": {
"expression": "TOP_N",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": {
"type": "column",
"value": "SS_PROMO_SK",
"next_parameter": null
}
},
"returntype": "topn(100)"
},
"dependent_measure_ref": null
},
{
"name": "TOPN_TAX_P_PROMO_NAME",
"function": {
"expression": "TOP_N",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": {
"type": "column",
"value": "P_PROMO_NAME",
"next_parameter": null
}
},
"returntype": "topn(100)"
},
"dependent_measure_ref": null
},
{
"name": "TOPN_TAX_DER_PROMO_NAME",
"function": {
"expression": "TOP_N",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": {
"type": "column",
"value": "DER_PROMO_NAME",
"next_parameter": null
}
},
"returntype": "topn(100)"
},
"dependent_measure_ref": null
},
{
"name": "TOPN_TAX_SS_CDEMO_SK",
"function": {
"expression": "TOP_N",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": {
"type": "column",
"value": "SS_CDEMO_SK",
"next_parameter": null
}
},
"returntype": "topn(100)"
},
"dependent_measure_ref": null
},
{
"name": "TOPN_TAX_SS_SOLD_DATE_SK",
"function": {
"expression": "TOP_N",
"parameter": {
"type": "column",
"value": "SS_EXT_TAX",
"next_parameter": {
"type": "column",
"value": "SS_SOLD_DATE_SK",
"next_parameter": null
}
},
"returntype": "topn(100)"
},
"dependent_measure_ref": null
},
{
"name": "APPROX_DISTINCT_COUNT",
"function": {
"expression": "COUNT_DISTINCT",
"parameter": {
"type": "column",
"value": "D_DATE",
"next_parameter": null
},
"returntype": "hllc(10)"
},
"dependent_measure_ref": null
},
{
"name": "DISTINCT COUNT",
"function": {
"expression": "COUNT_DISTINCT",
"parameter": {
"type": "column",
"value": "T_FORMATTED_TIME",
"next_parameter": null
},
"returntype": "hllc(10)"
},
"dependent_measure_ref": null
}
],
"rowkey": {
"rowkey_columns": [
{
"column": "SS_CDEMO_SK",
"encoding": "dict",
"isShardBy": false
},
{
"column": "SS_ITEM_SK",
"encoding": "dict",
"isShardBy": false
},
{
"column": "S_COUNTRY",
"encoding": "dict",
"isShardBy": false
},
{
"column": "S_STATE",
"encoding": "dict",
"isShardBy": false
},
{
"column": "S_CITY",
"encoding": "dict",
"isShardBy": false
},
{
"column": "S_STORE_ID",
"encoding": "dict",
"isShardBy": false
},
{
"column": "S_STORE_NAME",
"encoding": "dict",
"isShardBy": false
},
{
"column": "SS_STORE_SK",
"encoding": "dict",
"isShardBy": false
},
{
"column": "DER_CUSTOMER_SK",
"encoding": "dict",
"isShardBy": false
},
{
"column": "SS_SOLD_DATE_SK",
"encoding": "dict",
"isShardBy": false
},
{
"column": "SS_SOLD_TIME_SK",
"encoding": "dict",
"isShardBy": false
},
{
"column": "P_PROMO_NAME",
"encoding": "dict",
"isShardBy": false
},
{
"column": "DER_PROMO_NAME",
"encoding": "dict",
"isShardBy": false
},
{
"column": "SS_PROMO_SK",
"encoding": "dict",
"isShardBy": false
}
]
},
"hbase_mapping": {
"column_family": [
{
"name": "F1",
"columns": [
{
"qualifier": "M",
"measure_refs": [
"_COUNT_",
"AVG_QUANTITY",
"TOTAL_SALES_PRICE",
"TOTAL_DISCOUNT",
"TOTAL_EXT_SALES_PRICE",
"MAX_WHOLESALE_COST",
"MIN_TAX",
"TOPN_TAX_SS_ITEM_SK",
"TOPN_TAX_SS_SOLD_TIME_SK",
"TOPN_TAX_DER_CUSTOMER_SK",
"TOPN_TAX_SS_STORE_SK",
"TOPN_TAX_S_STORE_ID",
"TOPN_TAX_S_STORE_NAME",
"TOPN_TAX_SS_PROMO_SK",
"TOPN_TAX_P_PROMO_NAME",
"TOPN_TAX_DER_PROMO_NAME",
"TOPN_TAX_SS_CDEMO_SK",
"TOPN_TAX_SS_SOLD_DATE_SK"
]
}
]
},
{
"name": "F2",
"columns": [
{
"qualifier": "M",
"measure_refs": [
"DISTINCT_TICKET",
"APPROX_DISTINCT_COUNT",
"DISTINCT COUNT"
]
}
]
}
]
},
"aggregation_groups": [
{
"includes": [
"DER_PROMO_NAME",
"S_STORE_NAME",
"P_PROMO_NAME",
"SS_SOLD_TIME_SK",
"SS_CDEMO_SK",
"DER_CUSTOMER_SK",
"S_COUNTRY",
"SS_SOLD_DATE_SK",
"S_CITY",
"SS_PROMO_SK",
"SS_STORE_SK",
"S_STORE_ID",
"SS_ITEM_SK",
"S_STATE"
],
"select_rule": {
"hierarchy_dims": [
[
"S_COUNTRY",
"S_CITY",
"S_STATE"
]
],
"mandatory_dims": [],
"joint_dims": [
[
"SS_CDEMO_SK",
"SS_SOLD_TIME_SK",
"DER_CUSTOMER_SK"
]
]
}
}
],
"signature": "2HBfM6GgW0ET1cU3tzqnqw==",
"notify_list": [],
"status_need_notify": [],
"partition_date_start": 0,
"partition_date_end": 4102444800000,
"auto_merge_time_ranges": [],
"retention_range": 0,
"engine_type": 2,
"storage_type": 2,
"override_kylin_properties": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment