diff --git a/05_sync/hive_tables.json b/05_sync/hive_tables.json new file mode 100644 index 0000000..3db32de --- /dev/null +++ b/05_sync/hive_tables.json @@ -0,0 +1,1377 @@ +{ + "tables": [ + { + "db": "ads", + "table": "ads_purchase_kpi_1d", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/ads.db/ads_purchase_kpi_1d", + "comment": "???KPI", + "columns": [ + { + "name": "active_supplier_cnt", + "type": "bigint", + "comment": "???????????" + }, + { + "name": "order_cnt", + "type": "bigint", + "comment": "??????" + }, + { + "name": "received_amount", + "type": "double", + "comment": "??????" + }, + { + "name": "received_amount_month", + "type": "double", + "comment": "????????" + }, + { + "name": "received_order_cnt", + "type": "bigint", + "comment": "??????" + }, + { + "name": "stat_date", + "type": "string", + "comment": "????" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "" + } + ] + }, + { + "db": "ads", + "table": "ads_sales_kpi_1d", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/ads.db/ads_sales_kpi_1d", + "comment": "???KPI", + "columns": [ + { + "name": "active_customer_cnt", + "type": "bigint", + "comment": "??????????" + }, + { + "name": "order_cnt", + "type": "bigint", + "comment": "??????" + }, + { + "name": "shipped_amount", + "type": "double", + "comment": "??????" + }, + { + "name": "shipped_amount_month", + "type": "double", + "comment": "????????" + }, + { + "name": "shipped_order_cnt", + "type": "bigint", + "comment": "??????" + }, + { + "name": "stat_date", + "type": "string", + "comment": "????" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "" + } + ] + }, + { + "db": "ads", + "table": "ads_sku_top_sale_1d", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/ads.db/ads_sku_top_sale_1d", + "comment": "?30???SKU TOP?", + "columns": [ + { + "name": "rank_no", + "type": "int", + "comment": "???????" + }, + { + "name": "shipped_amount_30d", + "type": "double", + "comment": "?30?????" + }, + { + "name": "shipped_qty_30d", + "type": "double", + "comment": "?30?????" + }, + { + "name": "sku_code", + "type": "string", + "comment": "SKU??" + }, + { + "name": "sku_name", + "type": "string", + "comment": "SKU??" + }, + { + "name": "unit", + "type": "string", + "comment": "????" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "" + } + ] + }, + { + "db": "ads", + "table": "ads_stock_alert_1d", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/ads.db/ads_stock_alert_1d", + "comment": "???????", + "columns": [ + { + "name": "gap_qty", + "type": "double", + "comment": "??=????-???" + }, + { + "name": "out_qty_1d", + "type": "double", + "comment": "?????" + }, + { + "name": "qty_on_hand", + "type": "double", + "comment": "???" + }, + { + "name": "safety_stock", + "type": "double", + "comment": "????" + }, + { + "name": "sku_code", + "type": "string", + "comment": "SKU??" + }, + { + "name": "sku_name", + "type": "string", + "comment": "SKU??" + }, + { + "name": "unit", + "type": "string", + "comment": "????" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "" + } + ] + }, + { + "db": "dwd", + "table": "dwd_customer_df", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/dwd.db/dwd_customer_df", + "comment": "??????", + "columns": [ + { + "name": "address", + "type": "string", + "comment": "" + }, + { + "name": "contact_person", + "type": "string", + "comment": "" + }, + { + "name": "contact_phone", + "type": "string", + "comment": "" + }, + { + "name": "customer_code", + "type": "string", + "comment": "" + }, + { + "name": "customer_name", + "type": "string", + "comment": "" + }, + { + "name": "remark", + "type": "string", + "comment": "" + }, + { + "name": "src_updated_at", + "type": "timestamp", + "comment": "" + }, + { + "name": "status", + "type": "string", + "comment": "" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "" + } + ] + }, + { + "db": "dwd", + "table": "dwd_purchase_order_df", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/dwd.db/dwd_purchase_order_df", + "comment": "????????(?×?×???×SKU)", + "columns": [ + { + "name": "amount", + "type": "double", + "comment": "???" + }, + { + "name": "handler", + "type": "string", + "comment": "???" + }, + { + "name": "line_no", + "type": "int", + "comment": "????" + }, + { + "name": "order_date", + "type": "string", + "comment": "????" + }, + { + "name": "order_id", + "type": "bigint", + "comment": "???ID" + }, + { + "name": "order_no", + "type": "string", + "comment": "????" + }, + { + "name": "price", + "type": "double", + "comment": "????" + }, + { + "name": "qty", + "type": "double", + "comment": "????" + }, + { + "name": "received_at", + "type": "timestamp", + "comment": "????" + }, + { + "name": "sku_code", + "type": "string", + "comment": "SKU??" + }, + { + "name": "sku_name", + "type": "string", + "comment": "SKU??" + }, + { + "name": "src_updated_at", + "type": "timestamp", + "comment": "??????" + }, + { + "name": "status", + "type": "string", + "comment": "???? DRAFT/CONFIRMED/RECEIVED/CANCELLED" + }, + { + "name": "supplier_code", + "type": "string", + "comment": "?????" + }, + { + "name": "supplier_name", + "type": "string", + "comment": "?????" + }, + { + "name": "unit", + "type": "string", + "comment": "????" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "???? yyyy-MM-dd" + } + ] + }, + { + "db": "dwd", + "table": "dwd_sales_order_df", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/dwd.db/dwd_sales_order_df", + "comment": "????????(?×?×??×SKU)", + "columns": [ + { + "name": "amount", + "type": "double", + "comment": "???" + }, + { + "name": "customer_code", + "type": "string", + "comment": "????" + }, + { + "name": "customer_name", + "type": "string", + "comment": "????" + }, + { + "name": "handler", + "type": "string", + "comment": "???" + }, + { + "name": "line_no", + "type": "int", + "comment": "????" + }, + { + "name": "order_date", + "type": "string", + "comment": "????" + }, + { + "name": "order_id", + "type": "bigint", + "comment": "???ID" + }, + { + "name": "order_no", + "type": "string", + "comment": "????" + }, + { + "name": "price", + "type": "double", + "comment": "????" + }, + { + "name": "qty", + "type": "double", + "comment": "????" + }, + { + "name": "shipped_at", + "type": "timestamp", + "comment": "????" + }, + { + "name": "sku_code", + "type": "string", + "comment": "SKU??" + }, + { + "name": "sku_name", + "type": "string", + "comment": "SKU??" + }, + { + "name": "src_updated_at", + "type": "timestamp", + "comment": "??????" + }, + { + "name": "status", + "type": "string", + "comment": "???? DRAFT/CONFIRMED/SHIPPED/CANCELLED" + }, + { + "name": "unit", + "type": "string", + "comment": "????" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "???? yyyy-MM-dd" + } + ] + }, + { + "db": "dwd", + "table": "dwd_sku_df", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/dwd.db/dwd_sku_df", + "comment": "SKU????", + "columns": [ + { + "name": "category", + "type": "string", + "comment": "" + }, + { + "name": "purchase_price", + "type": "double", + "comment": "" + }, + { + "name": "safety_stock", + "type": "double", + "comment": "" + }, + { + "name": "sale_price", + "type": "double", + "comment": "" + }, + { + "name": "sku_code", + "type": "string", + "comment": "" + }, + { + "name": "sku_name", + "type": "string", + "comment": "" + }, + { + "name": "spec", + "type": "string", + "comment": "" + }, + { + "name": "src_updated_at", + "type": "timestamp", + "comment": "" + }, + { + "name": "status", + "type": "string", + "comment": "" + }, + { + "name": "unit", + "type": "string", + "comment": "" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "" + } + ] + }, + { + "db": "dwd", + "table": "dwd_stock_flow_df", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/dwd.db/dwd_stock_flow_df", + "comment": "??????(?????)", + "columns": [ + { + "name": "biz_order_no", + "type": "string", + "comment": "????" + }, + { + "name": "biz_type", + "type": "string", + "comment": "???? INIT/PO_RECEIVE/SO_SHIP/ADJUST" + }, + { + "name": "flow_id", + "type": "bigint", + "comment": "??ID" + }, + { + "name": "flow_time", + "type": "timestamp", + "comment": "????" + }, + { + "name": "qty_after", + "type": "double", + "comment": "?????" + }, + { + "name": "qty_delta", + "type": "double", + "comment": "????(????)" + }, + { + "name": "sku_code", + "type": "string", + "comment": "SKU??" + }, + { + "name": "sku_name", + "type": "string", + "comment": "SKU??" + }, + { + "name": "unit", + "type": "string", + "comment": "????" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "???? yyyy-MM-dd" + } + ] + }, + { + "db": "dwd", + "table": "dwd_supplier_df", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/dwd.db/dwd_supplier_df", + "comment": "???????", + "columns": [ + { + "name": "address", + "type": "string", + "comment": "" + }, + { + "name": "contact_person", + "type": "string", + "comment": "" + }, + { + "name": "contact_phone", + "type": "string", + "comment": "" + }, + { + "name": "remark", + "type": "string", + "comment": "" + }, + { + "name": "src_updated_at", + "type": "timestamp", + "comment": "" + }, + { + "name": "status", + "type": "string", + "comment": "" + }, + { + "name": "supplier_code", + "type": "string", + "comment": "" + }, + { + "name": "supplier_name", + "type": "string", + "comment": "" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "" + } + ] + }, + { + "db": "dws", + "table": "dws_purchase_supplier_1d", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/dws.db/dws_purchase_supplier_1d", + "comment": "????????", + "columns": [ + { + "name": "order_cnt", + "type": "bigint", + "comment": "??????(order_date=dt)" + }, + { + "name": "received_amount", + "type": "double", + "comment": "??????=RECEIVED??????(??:????4)" + }, + { + "name": "received_order_cnt", + "type": "bigint", + "comment": "??????(received_at??=dt)" + }, + { + "name": "received_qty", + "type": "double", + "comment": "??????" + }, + { + "name": "supplier_code", + "type": "string", + "comment": "?????" + }, + { + "name": "supplier_name", + "type": "string", + "comment": "?????" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "" + } + ] + }, + { + "db": "dws", + "table": "dws_sales_customer_1d", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/dws.db/dws_sales_customer_1d", + "comment": "???????", + "columns": [ + { + "name": "customer_code", + "type": "string", + "comment": "????" + }, + { + "name": "customer_name", + "type": "string", + "comment": "????" + }, + { + "name": "order_cnt", + "type": "bigint", + "comment": "??????" + }, + { + "name": "shipped_amount", + "type": "double", + "comment": "??????(SHIPPED??????)" + }, + { + "name": "shipped_order_cnt", + "type": "bigint", + "comment": "??????" + }, + { + "name": "shipped_qty", + "type": "double", + "comment": "??????" + } + ], + "partition_keys": [ + { + "name": "dt", + "type": "string", + "comment": "" + } + ] + }, + { + "db": "dws", + "table": "dws_sku_stock_1d", + "tbl_type": "EXTERNAL_TABLE", + "location": "s3a://warehouse/hive/warehouse/dws.db/dws_sku_stock_1d", + "comment": "SKU??????????", + "columns": [ + { + "name": "category", + "type": "string", + "comment": "??" + }, + { + "name": "in_qty_1d", + "type": "double", + "comment": "?????" + }, + { + "name": "low_stock", + "type": "boolean", + "comment": "?????(???