From 7425c1d90922199a3ad9dba11e37e8250c8627db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=88=9F?= <13007110208@163.com> Date: Fri, 25 Jul 2025 16:59:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A45?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 996/Hologres/元数据.sql | 9 +- 996/doirs/dhsf_engine.sql | 6512 ++++++++++++++++++++++++++- 996/doirs/dhsf_engine_ods.sql | 138 + 996/doirs/sdk_statis.sql | 5468 +++++++++++++++++++++- 996/doirs/sdk_statis_ods.sql | 290 ++ 996/flinksql/996flink整理.sql | 77 + 996/flinksql/flink.sql | 27 + 996/热血江湖/1.sql | 189 + 996/热血江湖/dhsf_engine.sql | 74 + 996/热血江湖/sdk_statis.sql | 693 +++ 996/热血江湖/tab_spend.sql | 51 + 996/热血江湖/改sdk_statis的gmid.sql | 1124 +++++ python/uv/1.sql | 25 + 13 files changed, 14191 insertions(+), 486 deletions(-) create mode 100644 996/doirs/dhsf_engine_ods.sql create mode 100644 996/doirs/sdk_statis_ods.sql create mode 100644 996/flinksql/996flink整理.sql create mode 100644 996/flinksql/flink.sql create mode 100644 996/热血江湖/1.sql create mode 100644 996/热血江湖/dhsf_engine.sql create mode 100644 996/热血江湖/sdk_statis.sql create mode 100644 996/热血江湖/tab_spend.sql create mode 100644 996/热血江湖/改sdk_statis的gmid.sql create mode 100644 python/uv/1.sql diff --git a/996/Hologres/元数据.sql b/996/Hologres/元数据.sql index 25d28e1..f29c93b 100644 --- a/996/Hologres/元数据.sql +++ b/996/Hologres/元数据.sql @@ -71,4 +71,11 @@ AND A .relkind = 'p' -- 关系的类型,可以是普通表('r')、索引 AND relpartbound is NULL - +获取包含字段的表 +SELECT t2.relname, t1.attname +from +(select distinct attrelid,attname from +pg_catalog.pg_attribute a where a.attname = 'gmid') t1 +inner JOIN +pg_catalog.pg_class t2 +on t1.attrelid=t2.oid \ No newline at end of file diff --git a/996/doirs/dhsf_engine.sql b/996/doirs/dhsf_engine.sql index 72ec8d4..d6b666f 100644 --- a/996/doirs/dhsf_engine.sql +++ b/996/doirs/dhsf_engine.sql @@ -1,248 +1,6268 @@ -CREATE TABLE `ods_active_role` ( `game_id` INT NOT NULL, `role_id` VARCHAR(64) NOT NULL, `ds` VARCHAR(64) NOT NULL, `user_account` varchar(64), `server_id` INT, `role_name` VARCHAR(50), `create_time` BIGINT) UNIQUE KEY (`game_id`, `role_id`,`ds`) DISTRIBUTED BY HASH ( `game_id`, `role_id`) BUCKETS 10 - -CREATE TABLE `ods_platform_order` ( - `game_id` INT NOT NULL, - `order_id` varchar(100) NOT NULL, - `game_name` varchar(30), - `user_id` int, - `user_account` varchar(50), - `user_nickname` varchar(30), - `role_id` varchar(50), - `role_name` varchar(100), - `server_id` varchar(50), - `server_name` varchar(30), - `platform_id` INT, - `promote_id` INT, - `amount` DECIMAL(10, 2), +drop TABLE box_user_game_recharge; +CREATE TABLE `box_user_game_recharge` ( + `type` int NOT NULL, + `game_id` bigint NOT NULL, + `create_time` bigint NOT NULL, + `pay_money` bigint NULL, + `pay_count` int NULL, + `pay_num` int NULL +) ENGINE=OLAP +UNIQUE KEY(`type`, `game_id`, `create_time`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dim_account; +CREATE TABLE `dim_account` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(64) NOT NULL, + `last_active_time` int MAX NULL, + `last_pay_time` int MAX NULL, + `payment_amount` int SUM NULL, + `payment_count` int SUM NULL +) ENGINE=OLAP +AGGREGATE KEY(`game_id`, `server_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE dim_account_pd; +CREATE TABLE `dim_account_pd` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(64) NOT NULL, + `ds` date NOT NULL, + `last_active_time` int MAX NULL, + `last_pay_time` int MAX NULL, + `payment_amount` int SUM NULL, + `payment_count` int SUM NULL +) ENGINE=OLAP +AGGREGATE KEY(`game_id`, `server_id`, `user_account`, `ds`) +DISTRIBUTED BY HASH(`ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE dim_date_table; +CREATE TABLE `dim_date_table` ( + `time_date` date NOT NULL COMMENT "date日期", + `date_str` varchar(8) NOT NULL COMMENT "ds日期-yyyymmdd", + `year_week_str` varchar(8) NOT NULL COMMENT "年00周", + `year_week_date` date NOT NULL COMMENT "年周第一天", + `week_rn` int NOT NULL COMMENT "周排行(用于跨年周计算)", + `year_month_str` varchar(8) NOT NULL COMMENT "年月00", + `year_month_date` date NOT NULL COMMENT "年月第一天", + `month_rn` int NOT NULL COMMENT "月排行(用于跨年月计算)" +) ENGINE=OLAP +UNIQUE KEY(`time_date`) +DISTRIBUTED BY HASH(`time_date`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dim_month_table; +CREATE TABLE `dim_month_table` ( + `time_date` date NOT NULL COMMENT "date日期", + `date_str` varchar(8) NOT NULL COMMENT "ds日期-yyyymmdd", + `year_month_str` varchar(8) NOT NULL COMMENT "年月00", + `year_month_date` date NOT NULL COMMENT "年月第一天", + `month_rn` int NOT NULL COMMENT "月排行(用于跨年月计算)" +) ENGINE=OLAP +UNIQUE KEY(`time_date`) +DISTRIBUTED BY HASH(`time_date`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dim_role_pd; +CREATE TABLE `dim_role_pd` ( + `game_id` int NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `last_active_time` int MAX NULL, + `last_pay_time` int MAX NULL, + `payment_amount` int SUM NULL, + `payment_count` int SUM NULL, + `duration` int SUM NULL +) ENGINE=OLAP +AGGREGATE KEY(`game_id`, `role_id`, `ds`) +DISTRIBUTED BY HASH(`ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE dim_week_table; +CREATE TABLE `dim_week_table` ( + `time_date` date NOT NULL COMMENT "date日期", + `date_str` varchar(8) NOT NULL COMMENT "ds日期-yyyymmdd", + `year_week_str` varchar(8) NOT NULL COMMENT "年00周", + `year_week_date` date NOT NULL COMMENT "年周第一天", + `week_rn` int NOT NULL COMMENT "周排行(用于跨年周计算)" +) ENGINE=OLAP +UNIQUE KEY(`time_date`) +DISTRIBUTED BY HASH(`time_date`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_1st_pay; +CREATE TABLE `dwd_1st_pay` ( + `game_id` bigint NOT NULL, + `server_id` bigint NOT NULL, + `user_account` varchar(64) NOT NULL, + `role_id` varchar(64) NULL, + `order_id` varchar(64) NULL, + `amount` bigint NULL, + `prod_id` varchar(64) NULL, + `prod_name` varchar(64) NULL, + `pay_time` datetime NULL, + `ds` date NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_ltv_reg; +CREATE TABLE `dwd_ltv_reg` ( + `game_id` int NOT NULL, + `user_id` int NULL, + `reg_date` date NULL, + `amount` bigint NULL, + `rd` bigint NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`) +DISTRIBUTED BY HASH(`game_id`, `user_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_ltv_role; +CREATE TABLE `dwd_ltv_role` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NULL, + `rd` int NULL, + `amount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `role_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_newly_payment; +CREATE TABLE `dwd_newly_payment` ( + `game_id` int NOT NULL, + `user_id` int NULL, + `game_name` varchar(30) NULL, + `user_account` varchar(50) NULL, + `user_nickname` varchar(30) NULL, + `order_id` varchar(100) NOT NULL, + `role_id` varchar(50) NULL, + `role_name` varchar(100) NULL, + `server_id` varchar(50) NULL, + `server_name` varchar(30) NULL, + `platform_id` int NULL, + `promote_id` int NULL, + `amount` decimal(10,2) NULL, `status` tinyint NOT NULL, - `pay_time` INT, - `pay_way` tinyint, - `pay_company` varchar(20), - `ip` varchar(50), - `is_box_pay` tinyint, - `scene` tinyint, - `prod_id` INT, - `prod_name` varchar(30), - `main_server_id` INT, - `refund_type` tinyint - -) UNIQUE KEY ( `game_id`,`order_id`) DISTRIBUTED BY HASH ( `game_id`,`order_id`) BUCKETS 32 - - + `pay_time` int NULL, + `pay_way` tinyint NULL, + `pay_company` varchar(20) NULL, + `ip` varchar(50) NULL, + `is_box_pay` tinyint NULL, + `scene` tinyint NULL, + `ds` date NULL, + `prod_id` int NULL, + `prod_name` varchar(30) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_platform_login_d; +CREATE TABLE `dwd_platform_login_d` ( + `game_id` int NOT NULL, + `user_id` bigint NOT NULL, + `ds` date NULL, + `user_account` varchar(100) NULL, + `promote_id` int NULL, + `platform_id` int NULL, + `login_time` int NOT NULL, + `login_ip` varchar(50) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_platform_login_m; +CREATE TABLE `dwd_platform_login_m` ( + `game_id` int NOT NULL, + `user_id` bigint NOT NULL, + `ds` date NULL, + `user_account` varchar(100) NULL, + `promote_id` int NULL, + `platform_id` int NULL, + `login_time` int NOT NULL, + `login_ip` varchar(50) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`) +PARTITION BY RANGE(`ds`) +(PARTITION dwd_platform_login_m_202307 VALUES [('2023-07-01'), ('2023-08-01')), +PARTITION dwd_platform_login_m_202308 VALUES [('2023-08-01'), ('2023-09-01')), +PARTITION dwd_platform_login_m_202309 VALUES [('2023-09-01'), ('2023-10-01')), +PARTITION dwd_platform_login_m_202310 VALUES [('2023-10-01'), ('2023-11-01')), +PARTITION dwd_platform_login_m_202311 VALUES [('2023-11-01'), ('2023-12-01')), +PARTITION dwd_platform_login_m_202312 VALUES [('2023-12-01'), ('2024-01-01')), +PARTITION dwd_platform_login_m_202401 VALUES [('2024-01-01'), ('2024-02-01')), +PARTITION dwd_platform_login_m_202402 VALUES [('2024-02-01'), ('2024-03-01')), +PARTITION dwd_platform_login_m_202403 VALUES [('2024-03-01'), ('2024-04-01')), +PARTITION dwd_platform_login_m_202404 VALUES [('2024-04-01'), ('2024-05-01')), +PARTITION dwd_platform_login_m_202405 VALUES [('2024-05-01'), ('2024-06-01')), +PARTITION dwd_platform_login_m_202406 VALUES [('2024-06-01'), ('2024-07-01')), +PARTITION dwd_platform_login_m_202407 VALUES [('2024-07-01'), ('2024-08-01')), +PARTITION dwd_platform_login_m_202408 VALUES [('2024-08-01'), ('2024-09-01')), +PARTITION dwd_platform_login_m_202409 VALUES [('2024-09-01'), ('2024-10-01')), +PARTITION dwd_platform_login_m_202410 VALUES [('2024-10-01'), ('2024-11-01')), +PARTITION dwd_platform_login_m_202411 VALUES [('2024-11-01'), ('2024-12-01')), +PARTITION dwd_platform_login_m_202412 VALUES [('2024-12-01'), ('2025-01-01')), +PARTITION dwd_platform_login_m_202501 VALUES [('2025-01-01'), ('2025-02-01')), +PARTITION dwd_platform_login_m_202502 VALUES [('2025-02-01'), ('2025-03-01')), +PARTITION dwd_platform_login_m_202503 VALUES [('2025-03-01'), ('2025-04-01')), +PARTITION dwd_platform_login_m_202504 VALUES [('2025-04-01'), ('2025-05-01')), +PARTITION dwd_platform_login_m_202505 VALUES [('2025-05-01'), ('2025-06-01')), +PARTITION dwd_platform_login_m_202506 VALUES [('2025-06-01'), ('2025-07-01')), +PARTITION dwd_platform_login_m_202507 VALUES [('2025-07-01'), ('2025-08-01')), +PARTITION dwd_platform_login_m_202508 VALUES [('2025-08-01'), ('2025-09-01')), +PARTITION dwd_platform_login_m_202509 VALUES [('2025-09-01'), ('2025-10-01')), +PARTITION dwd_platform_login_m_202510 VALUES [('2025-10-01'), ('2025-11-01'))) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "MONTH", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-24", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "dwd_platform_login_m_", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "true", +"dynamic_partition.history_partition_num" = "-1", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"dynamic_partition.start_day_of_month" = "1", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_platform_order; +CREATE TABLE `dwd_platform_order` ( + `game_id` int NOT NULL, + `order_id` varchar(100) NOT NULL, + `server_id` int NULL, + `user_id` int NULL, + `user_account` varchar(50) NULL, + `role_id` varchar(100) NULL, + `amount` int NULL, + `prod_id` int NULL, + `prod_name` varchar(30) NULL, + `status` tinyint NULL, + `pay_time` int NULL, + `ds` date NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `order_id`) +DISTRIBUTED BY HASH(`game_id`, `order_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_platform_user; +CREATE TABLE `dwd_platform_user` ( + `game_id` int NOT NULL, + `user_id` bigint NOT NULL, + `ds` date NULL, + `user_account` varchar(30) NULL, + `platform_id` int NULL, + `promote_id` int NULL, + `channel` varchar(20) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`) +PARTITION BY RANGE(`ds`) +(PARTITION p20250119 VALUES [('2025-01-19'), ('2025-01-20')), +PARTITION p20250120 VALUES [('2025-01-20'), ('2025-01-21')), +PARTITION p20250121 VALUES [('2025-01-21'), ('2025-01-22')), +PARTITION p20250122 VALUES [('2025-01-22'), ('2025-01-23')), +PARTITION p20250123 VALUES [('2025-01-23'), ('2025-01-24')), +PARTITION p20250124 VALUES [('2025-01-24'), ('2025-01-25')), +PARTITION p20250125 VALUES [('2025-01-25'), ('2025-01-26')), +PARTITION p20250126 VALUES [('2025-01-26'), ('2025-01-27')), +PARTITION p20250127 VALUES [('2025-01-27'), ('2025-01-28')), +PARTITION p20250128 VALUES [('2025-01-28'), ('2025-01-29')), +PARTITION p20250129 VALUES [('2025-01-29'), ('2025-01-30')), +PARTITION p20250130 VALUES [('2025-01-30'), ('2025-01-31')), +PARTITION p20250131 VALUES [('2025-01-31'), ('2025-02-01')), +PARTITION p20250201 VALUES [('2025-02-01'), ('2025-02-02')), +PARTITION p20250202 VALUES [('2025-02-02'), ('2025-02-03')), +PARTITION p20250203 VALUES [('2025-02-03'), ('2025-02-04')), +PARTITION p20250204 VALUES [('2025-02-04'), ('2025-02-05')), +PARTITION p20250205 VALUES [('2025-02-05'), ('2025-02-06')), +PARTITION p20250206 VALUES [('2025-02-06'), ('2025-02-07')), +PARTITION p20250207 VALUES [('2025-02-07'), ('2025-02-08')), +PARTITION p20250208 VALUES [('2025-02-08'), ('2025-02-09')), +PARTITION p20250209 VALUES [('2025-02-09'), ('2025-02-10')), +PARTITION p20250210 VALUES [('2025-02-10'), ('2025-02-11')), +PARTITION p20250211 VALUES [('2025-02-11'), ('2025-02-12')), +PARTITION p20250212 VALUES [('2025-02-12'), ('2025-02-13')), +PARTITION p20250213 VALUES [('2025-02-13'), ('2025-02-14')), +PARTITION p20250214 VALUES [('2025-02-14'), ('2025-02-15')), +PARTITION p20250215 VALUES [('2025-02-15'), ('2025-02-16')), +PARTITION p20250216 VALUES [('2025-02-16'), ('2025-02-17')), +PARTITION p20250217 VALUES [('2025-02-17'), ('2025-02-18')), +PARTITION p20250218 VALUES [('2025-02-18'), ('2025-02-19')), +PARTITION p20250219 VALUES [('2025-02-19'), ('2025-02-20')), +PARTITION p20250220 VALUES [('2025-02-20'), ('2025-02-21')), +PARTITION p20250221 VALUES [('2025-02-21'), ('2025-02-22')), +PARTITION p20250222 VALUES [('2025-02-22'), ('2025-02-23')), +PARTITION p20250223 VALUES [('2025-02-23'), ('2025-02-24')), +PARTITION p20250224 VALUES [('2025-02-24'), ('2025-02-25')), +PARTITION p20250225 VALUES [('2025-02-25'), ('2025-02-26')), +PARTITION p20250226 VALUES [('2025-02-26'), ('2025-02-27')), +PARTITION p20250227 VALUES [('2025-02-27'), ('2025-02-28')), +PARTITION p20250228 VALUES [('2025-02-28'), ('2025-03-01')), +PARTITION p20250301 VALUES [('2025-03-01'), ('2025-03-02')), +PARTITION p20250302 VALUES [('2025-03-02'), ('2025-03-03')), +PARTITION p20250303 VALUES [('2025-03-03'), ('2025-03-04')), +PARTITION p20250304 VALUES [('2025-03-04'), ('2025-03-05')), +PARTITION p20250305 VALUES [('2025-03-05'), ('2025-03-06')), +PARTITION p20250306 VALUES [('2025-03-06'), ('2025-03-07')), +PARTITION p20250307 VALUES [('2025-03-07'), ('2025-03-08')), +PARTITION p20250308 VALUES [('2025-03-08'), ('2025-03-09')), +PARTITION p20250309 VALUES [('2025-03-09'), ('2025-03-10')), +PARTITION p20250310 VALUES [('2025-03-10'), ('2025-03-11')), +PARTITION p20250311 VALUES [('2025-03-11'), ('2025-03-12')), +PARTITION p20250312 VALUES [('2025-03-12'), ('2025-03-13')), +PARTITION p20250313 VALUES [('2025-03-13'), ('2025-03-14')), +PARTITION p20250314 VALUES [('2025-03-14'), ('2025-03-15')), +PARTITION p20250315 VALUES [('2025-03-15'), ('2025-03-16')), +PARTITION p20250316 VALUES [('2025-03-16'), ('2025-03-17')), +PARTITION p20250317 VALUES [('2025-03-17'), ('2025-03-18')), +PARTITION p20250318 VALUES [('2025-03-18'), ('2025-03-19')), +PARTITION p20250319 VALUES [('2025-03-19'), ('2025-03-20')), +PARTITION p20250320 VALUES [('2025-03-20'), ('2025-03-21')), +PARTITION p20250321 VALUES [('2025-03-21'), ('2025-03-22')), +PARTITION p20250322 VALUES [('2025-03-22'), ('2025-03-23')), +PARTITION p20250323 VALUES [('2025-03-23'), ('2025-03-24')), +PARTITION p20250324 VALUES [('2025-03-24'), ('2025-03-25')), +PARTITION p20250325 VALUES [('2025-03-25'), ('2025-03-26')), +PARTITION p20250326 VALUES [('2025-03-26'), ('2025-03-27')), +PARTITION p20250327 VALUES [('2025-03-27'), ('2025-03-28')), +PARTITION p20250328 VALUES [('2025-03-28'), ('2025-03-29')), +PARTITION p20250329 VALUES [('2025-03-29'), ('2025-03-30')), +PARTITION p20250330 VALUES [('2025-03-30'), ('2025-03-31')), +PARTITION p20250331 VALUES [('2025-03-31'), ('2025-04-01')), +PARTITION p20250401 VALUES [('2025-04-01'), ('2025-04-02')), +PARTITION p20250402 VALUES [('2025-04-02'), ('2025-04-03')), +PARTITION p20250403 VALUES [('2025-04-03'), ('2025-04-04')), +PARTITION p20250404 VALUES [('2025-04-04'), ('2025-04-05')), +PARTITION p20250405 VALUES [('2025-04-05'), ('2025-04-06')), +PARTITION p20250406 VALUES [('2025-04-06'), ('2025-04-07')), +PARTITION p20250407 VALUES [('2025-04-07'), ('2025-04-08')), +PARTITION p20250408 VALUES [('2025-04-08'), ('2025-04-09')), +PARTITION p20250409 VALUES [('2025-04-09'), ('2025-04-10')), +PARTITION p20250410 VALUES [('2025-04-10'), ('2025-04-11')), +PARTITION p20250411 VALUES [('2025-04-11'), ('2025-04-12')), +PARTITION p20250412 VALUES [('2025-04-12'), ('2025-04-13')), +PARTITION p20250413 VALUES [('2025-04-13'), ('2025-04-14')), +PARTITION p20250414 VALUES [('2025-04-14'), ('2025-04-15')), +PARTITION p20250415 VALUES [('2025-04-15'), ('2025-04-16')), +PARTITION p20250416 VALUES [('2025-04-16'), ('2025-04-17')), +PARTITION p20250417 VALUES [('2025-04-17'), ('2025-04-18')), +PARTITION p20250418 VALUES [('2025-04-18'), ('2025-04-19')), +PARTITION p20250419 VALUES [('2025-04-19'), ('2025-04-20')), +PARTITION p20250420 VALUES [('2025-04-20'), ('2025-04-21')), +PARTITION p20250421 VALUES [('2025-04-21'), ('2025-04-22')), +PARTITION p20250422 VALUES [('2025-04-22'), ('2025-04-23')), +PARTITION p20250423 VALUES [('2025-04-23'), ('2025-04-24')), +PARTITION p20250424 VALUES [('2025-04-24'), ('2025-04-25')), +PARTITION p20250425 VALUES [('2025-04-25'), ('2025-04-26')), +PARTITION p20250426 VALUES [('2025-04-26'), ('2025-04-27')), +PARTITION p20250427 VALUES [('2025-04-27'), ('2025-04-28')), +PARTITION p20250428 VALUES [('2025-04-28'), ('2025-04-29')), +PARTITION p20250429 VALUES [('2025-04-29'), ('2025-04-30')), +PARTITION p20250430 VALUES [('2025-04-30'), ('2025-05-01')), +PARTITION p20250501 VALUES [('2025-05-01'), ('2025-05-02')), +PARTITION p20250502 VALUES [('2025-05-02'), ('2025-05-03')), +PARTITION p20250503 VALUES [('2025-05-03'), ('2025-05-04')), +PARTITION p20250504 VALUES [('2025-05-04'), ('2025-05-05')), +PARTITION p20250505 VALUES [('2025-05-05'), ('2025-05-06')), +PARTITION p20250506 VALUES [('2025-05-06'), ('2025-05-07')), +PARTITION p20250507 VALUES [('2025-05-07'), ('2025-05-08')), +PARTITION p20250508 VALUES [('2025-05-08'), ('2025-05-09')), +PARTITION p20250509 VALUES [('2025-05-09'), ('2025-05-10')), +PARTITION p20250510 VALUES [('2025-05-10'), ('2025-05-11')), +PARTITION p20250511 VALUES [('2025-05-11'), ('2025-05-12')), +PARTITION p20250512 VALUES [('2025-05-12'), ('2025-05-13')), +PARTITION p20250513 VALUES [('2025-05-13'), ('2025-05-14')), +PARTITION p20250514 VALUES [('2025-05-14'), ('2025-05-15')), +PARTITION p20250515 VALUES [('2025-05-15'), ('2025-05-16')), +PARTITION p20250516 VALUES [('2025-05-16'), ('2025-05-17')), +PARTITION p20250517 VALUES [('2025-05-17'), ('2025-05-18')), +PARTITION p20250518 VALUES [('2025-05-18'), ('2025-05-19')), +PARTITION p20250519 VALUES [('2025-05-19'), ('2025-05-20')), +PARTITION p20250520 VALUES [('2025-05-20'), ('2025-05-21')), +PARTITION p20250521 VALUES [('2025-05-21'), ('2025-05-22')), +PARTITION p20250522 VALUES [('2025-05-22'), ('2025-05-23')), +PARTITION p20250523 VALUES [('2025-05-23'), ('2025-05-24')), +PARTITION p20250524 VALUES [('2025-05-24'), ('2025-05-25')), +PARTITION p20250525 VALUES [('2025-05-25'), ('2025-05-26')), +PARTITION p20250526 VALUES [('2025-05-26'), ('2025-05-27')), +PARTITION p20250527 VALUES [('2025-05-27'), ('2025-05-28')), +PARTITION p20250528 VALUES [('2025-05-28'), ('2025-05-29')), +PARTITION p20250529 VALUES [('2025-05-29'), ('2025-05-30')), +PARTITION p20250530 VALUES [('2025-05-30'), ('2025-05-31')), +PARTITION p20250531 VALUES [('2025-05-31'), ('2025-06-01')), +PARTITION p20250601 VALUES [('2025-06-01'), ('2025-06-02')), +PARTITION p20250602 VALUES [('2025-06-02'), ('2025-06-03')), +PARTITION p20250603 VALUES [('2025-06-03'), ('2025-06-04')), +PARTITION p20250604 VALUES [('2025-06-04'), ('2025-06-05')), +PARTITION p20250605 VALUES [('2025-06-05'), ('2025-06-06')), +PARTITION p20250606 VALUES [('2025-06-06'), ('2025-06-07')), +PARTITION p20250607 VALUES [('2025-06-07'), ('2025-06-08')), +PARTITION p20250608 VALUES [('2025-06-08'), ('2025-06-09')), +PARTITION p20250609 VALUES [('2025-06-09'), ('2025-06-10')), +PARTITION p20250610 VALUES [('2025-06-10'), ('2025-06-11')), +PARTITION p20250611 VALUES [('2025-06-11'), ('2025-06-12')), +PARTITION p20250612 VALUES [('2025-06-12'), ('2025-06-13')), +PARTITION p20250613 VALUES [('2025-06-13'), ('2025-06-14')), +PARTITION p20250614 VALUES [('2025-06-14'), ('2025-06-15')), +PARTITION p20250615 VALUES [('2025-06-15'), ('2025-06-16')), +PARTITION p20250616 VALUES [('2025-06-16'), ('2025-06-17')), +PARTITION p20250617 VALUES [('2025-06-17'), ('2025-06-18')), +PARTITION p20250618 VALUES [('2025-06-18'), ('2025-06-19')), +PARTITION p20250619 VALUES [('2025-06-19'), ('2025-06-20')), +PARTITION p20250620 VALUES [('2025-06-20'), ('2025-06-21')), +PARTITION p20250621 VALUES [('2025-06-21'), ('2025-06-22')), +PARTITION p20250622 VALUES [('2025-06-22'), ('2025-06-23')), +PARTITION p20250623 VALUES [('2025-06-23'), ('2025-06-24')), +PARTITION p20250624 VALUES [('2025-06-24'), ('2025-06-25')), +PARTITION p20250625 VALUES [('2025-06-25'), ('2025-06-26')), +PARTITION p20250626 VALUES [('2025-06-26'), ('2025-06-27')), +PARTITION p20250627 VALUES [('2025-06-27'), ('2025-06-28')), +PARTITION p20250628 VALUES [('2025-06-28'), ('2025-06-29')), +PARTITION p20250629 VALUES [('2025-06-29'), ('2025-06-30')), +PARTITION p20250630 VALUES [('2025-06-30'), ('2025-07-01')), +PARTITION p20250701 VALUES [('2025-07-01'), ('2025-07-02')), +PARTITION p20250702 VALUES [('2025-07-02'), ('2025-07-03')), +PARTITION p20250703 VALUES [('2025-07-03'), ('2025-07-04')), +PARTITION p20250704 VALUES [('2025-07-04'), ('2025-07-05')), +PARTITION p20250705 VALUES [('2025-07-05'), ('2025-07-06')), +PARTITION p20250706 VALUES [('2025-07-06'), ('2025-07-07')), +PARTITION p20250707 VALUES [('2025-07-07'), ('2025-07-08')), +PARTITION p20250708 VALUES [('2025-07-08'), ('2025-07-09')), +PARTITION p20250709 VALUES [('2025-07-09'), ('2025-07-10')), +PARTITION p20250710 VALUES [('2025-07-10'), ('2025-07-11')), +PARTITION p20250711 VALUES [('2025-07-11'), ('2025-07-12')), +PARTITION p20250712 VALUES [('2025-07-12'), ('2025-07-13')), +PARTITION p20250713 VALUES [('2025-07-13'), ('2025-07-14')), +PARTITION p20250714 VALUES [('2025-07-14'), ('2025-07-15')), +PARTITION p20250715 VALUES [('2025-07-15'), ('2025-07-16')), +PARTITION p20250716 VALUES [('2025-07-16'), ('2025-07-17')), +PARTITION p20250717 VALUES [('2025-07-17'), ('2025-07-18')), +PARTITION p20250718 VALUES [('2025-07-18'), ('2025-07-19')), +PARTITION p20250719 VALUES [('2025-07-19'), ('2025-07-20')), +PARTITION p20250720 VALUES [('2025-07-20'), ('2025-07-21')), +PARTITION p20250721 VALUES [('2025-07-21'), ('2025-07-22')), +PARTITION p20250722 VALUES [('2025-07-22'), ('2025-07-23')), +PARTITION p20250723 VALUES [('2025-07-23'), ('2025-07-24')), +PARTITION p20250724 VALUES [('2025-07-24'), ('2025-07-25')), +PARTITION p20250725 VALUES [('2025-07-25'), ('2025-07-26')), +PARTITION p20250726 VALUES [('2025-07-26'), ('2025-07-27'))) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "DAY", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-185", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "p", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "true", +"dynamic_partition.history_partition_num" = "-1", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_act; +CREATE TABLE `dwd_retention_act` ( + `game_id` int NOT NULL, + `user_id` bigint NOT NULL, + `ds` date NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +PARTITION BY RANGE(`ds`) +(PARTITION dwd_retention_act20250704 VALUES [('2025-07-04'), ('2025-07-05')), +PARTITION dwd_retention_act20250705 VALUES [('2025-07-05'), ('2025-07-06')), +PARTITION dwd_retention_act20250706 VALUES [('2025-07-06'), ('2025-07-07')), +PARTITION dwd_retention_act20250707 VALUES [('2025-07-07'), ('2025-07-08')), +PARTITION dwd_retention_act20250708 VALUES [('2025-07-08'), ('2025-07-09')), +PARTITION dwd_retention_act20250709 VALUES [('2025-07-09'), ('2025-07-10')), +PARTITION dwd_retention_act20250710 VALUES [('2025-07-10'), ('2025-07-11')), +PARTITION dwd_retention_act20250711 VALUES [('2025-07-11'), ('2025-07-12')), +PARTITION dwd_retention_act20250712 VALUES [('2025-07-12'), ('2025-07-13')), +PARTITION dwd_retention_act20250713 VALUES [('2025-07-13'), ('2025-07-14')), +PARTITION dwd_retention_act20250714 VALUES [('2025-07-14'), ('2025-07-15')), +PARTITION dwd_retention_act20250715 VALUES [('2025-07-15'), ('2025-07-16')), +PARTITION dwd_retention_act20250716 VALUES [('2025-07-16'), ('2025-07-17')), +PARTITION dwd_retention_act20250717 VALUES [('2025-07-17'), ('2025-07-18')), +PARTITION dwd_retention_act20250718 VALUES [('2025-07-18'), ('2025-07-19')), +PARTITION dwd_retention_act20250719 VALUES [('2025-07-19'), ('2025-07-20')), +PARTITION dwd_retention_act20250720 VALUES [('2025-07-20'), ('2025-07-21')), +PARTITION dwd_retention_act20250721 VALUES [('2025-07-21'), ('2025-07-22')), +PARTITION dwd_retention_act20250722 VALUES [('2025-07-22'), ('2025-07-23')), +PARTITION dwd_retention_act20250723 VALUES [('2025-07-23'), ('2025-07-24')), +PARTITION dwd_retention_act20250724 VALUES [('2025-07-24'), ('2025-07-25')), +PARTITION dwd_retention_act20250725 VALUES [('2025-07-25'), ('2025-07-26')), +PARTITION dwd_retention_act20250726 VALUES [('2025-07-26'), ('2025-07-27'))) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "DAY", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-190", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "dwd_retention_act", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "false", +"dynamic_partition.history_partition_num" = "-1", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_act_m; +CREATE TABLE `dwd_retention_act_m` ( + `game_id` int NOT NULL, + `user_id` bigint NOT NULL, + `ds` date NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +PARTITION BY RANGE(`ds`) +(PARTITION p202507 VALUES [('2025-07-01'), ('2025-08-01')), +PARTITION p202508 VALUES [('2025-08-01'), ('2025-09-01')), +PARTITION p202509 VALUES [('2025-09-01'), ('2025-10-01')), +PARTITION p202510 VALUES [('2025-10-01'), ('2025-11-01'))) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "MONTH", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-5", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "p", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "false", +"dynamic_partition.history_partition_num" = "24", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"dynamic_partition.start_day_of_month" = "1", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_act_w; +CREATE TABLE `dwd_retention_act_w` ( + `game_id` int NOT NULL, + `user_id` bigint NOT NULL, + `ds` date NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +PARTITION BY RANGE(`ds`) +(PARTITION p2025_27 VALUES [('2025-06-30'), ('2025-07-07')), +PARTITION p2025_28 VALUES [('2025-07-07'), ('2025-07-14')), +PARTITION p2025_29 VALUES [('2025-07-14'), ('2025-07-21')), +PARTITION p2025_30 VALUES [('2025-07-21'), ('2025-07-28')), +PARTITION p2025_31 VALUES [('2025-07-28'), ('2025-08-04')), +PARTITION p2025_32 VALUES [('2025-08-04'), ('2025-08-11')), +PARTITION p2025_33 VALUES [('2025-08-11'), ('2025-08-18'))) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "WEEK", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-5", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "p", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "false", +"dynamic_partition.history_partition_num" = "24", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"dynamic_partition.start_day_of_week" = "1", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_active_device_m; +CREATE TABLE `dwd_retention_active_device_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` varchar(64) NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_active_device_w; +CREATE TABLE `dwd_retention_active_device_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` varchar(64) NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_active_role; +CREATE TABLE `dwd_retention_active_role` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NULL, + `dt` int NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `role_id`, `ds`, `dt`, `rd`) +DISTRIBUTED BY HASH(`dt`, `ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_active_role_d; +CREATE TABLE `dwd_retention_active_role_d` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NULL, + `dt` int NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `role_id`, `ds`, `dt`, `rd`) +DISTRIBUTED BY HASH(`dt`, `ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_apr; +CREATE TABLE `dwd_retention_apr` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NULL, + `dt` int NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `role_id`, `ds`, `dt`, `rd`) +DISTRIBUTED BY HASH(`dt`, `ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_apu; +CREATE TABLE `dwd_retention_apu` ( + `game_id` int NOT NULL, + `user_id` bigint NOT NULL, + `ds` date NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`ds`, `rd`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_apu_m; +CREATE TABLE `dwd_retention_apu_m` ( + `game_id` int NOT NULL, + `user_id` bigint NOT NULL, + `ds` date NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`ds`, `rd`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_apu_w; +CREATE TABLE `dwd_retention_apu_w` ( + `game_id` int NOT NULL, + `user_id` bigint NOT NULL, + `ds` date NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`ds`, `rd`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_newly_role; +CREATE TABLE `dwd_retention_newly_role` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NULL, + `dt` int NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `role_id`, `ds`, `dt`, `rd`) +DISTRIBUTED BY HASH(`dt`, `ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_npa_repay; +CREATE TABLE `dwd_retention_npa_repay` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_id` int NOT NULL, + `ds` date NULL, + `dt` int NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `user_id`, `ds`, `dt`, `rd`) +DISTRIBUTED BY HASH(`dt`, `ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_npu; +CREATE TABLE `dwd_retention_npu` ( + `game_id` int NOT NULL, + `user_id` int NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_npu_m; +CREATE TABLE `dwd_retention_npu_m` ( + `game_id` int NOT NULL, + `user_id` int NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_npu_w; +CREATE TABLE `dwd_retention_npu_w` ( + `game_id` int NOT NULL, + `user_id` int NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_reg; +CREATE TABLE `dwd_retention_reg` ( + `game_id` int NOT NULL, + `user_id` int NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_reg_m; +CREATE TABLE `dwd_retention_reg_m` ( + `game_id` int NOT NULL, + `user_id` int NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_reg_w; +CREATE TABLE `dwd_retention_reg_w` ( + `game_id` int NOT NULL, + `user_id` int NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_repay_d; +CREATE TABLE `dwd_retention_repay_d` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_id` int NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_1st_payment; +CREATE TABLE `dwd_union_1st_payment` ( + `game_id` int NOT NULL, + `server_id` bigint NOT NULL, + `user_account` varchar(64) NOT NULL, + `role_id` varchar(64) NULL, + `order_id` varchar(64) NULL, + `amount` bigint NULL, + `prod_id` varchar(64) NULL, + `prod_name` varchar(64) NULL, + `pay_time` datetime NULL, + `ds` date NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_newly_payment; +CREATE TABLE `dwd_union_newly_payment` ( + `game_id` int NOT NULL, + `user_account` varchar(64) NULL, + `order_id` varchar(64) NOT NULL, + `role_id` varchar(64) NULL, + `server_id` int NULL, + `platform_id` varchar(64) NULL, + `product_id` varchar(64) NULL, + `amount` bigint NULL, + `status` int NULL, + `create_time` datetime NULL, + `ds` date NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 30 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_ltv; +CREATE TABLE `dwd_union_oper_ltv` ( + `game_id` int NOT NULL, + `server_id` int NULL, + `user_account` varchar(64) NULL, + `amount` bigint NULL, + `ds` date NULL, + `rd` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_act_d; +CREATE TABLE `dwd_union_oper_retention_act_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_act_m; +CREATE TABLE `dwd_union_oper_retention_act_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_act_w; +CREATE TABLE `dwd_union_oper_retention_act_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_apu_d; +CREATE TABLE `dwd_union_oper_retention_apu_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_apu_m; +CREATE TABLE `dwd_union_oper_retention_apu_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_apu_w; +CREATE TABLE `dwd_union_oper_retention_apu_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_npu_d; +CREATE TABLE `dwd_union_oper_retention_npu_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_npu_m; +CREATE TABLE `dwd_union_oper_retention_npu_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_npu_w; +CREATE TABLE `dwd_union_oper_retention_npu_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_reg_d; +CREATE TABLE `dwd_union_oper_retention_reg_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_reg_m; +CREATE TABLE `dwd_union_oper_retention_reg_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_oper_retention_reg_w; +CREATE TABLE `dwd_union_oper_retention_reg_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_retention_npa_repay; +CREATE TABLE `dwd_union_retention_npa_repay` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `dt` int NOT NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `dt`) +DISTRIBUTED BY HASH(`dt`, `ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_union_retention_repay_d; +CREATE TABLE `dwd_union_retention_repay_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(50) NULL, + `rd` int NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `user_account`, `rd`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dws_account_1stpay; +CREATE TABLE `dws_account_1stpay` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(64) NOT NULL, + `pay_time` int NULL, + `amount` int NULL, + `prod_id` varchar(64) NULL, + `prod_name` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"function_column.sequence_type" = "int", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dws_analyze_account_1st; +CREATE TABLE `dws_analyze_account_1st` ( + `game_id` bigint NOT NULL, + `server_id` bigint NOT NULL, + `user_account` varchar(64) NOT NULL, + `first_pay_time` datetime NOT NULL, + `amount` bigint NULL, + `prod_id` varchar(64) NULL, + `prod_name` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dws_role_1stpay; +CREATE TABLE `dws_role_1stpay` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `role_id` varchar(64) NOT NULL, + `pay_time` int NULL, + `amount` int NULL, + `prod_id` varchar(64) NULL, + `prod_name` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `role_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"function_column.sequence_type" = "int", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dws_rolw_last; +CREATE TABLE `dws_rolw_last` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `role_id` varchar(64) NOT NULL, + `last_active_time` int MAX NULL, + `last_pay_time` int MAX NULL +) ENGINE=OLAP +AGGREGATE KEY(`game_id`, `server_id`, `role_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE example_table_yinzhou; +CREATE TABLE `example_table_yinzhou` ( + `a` varchar(50) NOT NULL COMMENT "唯一键", + `b` bigint MIN NULL COMMENT "冲突时更新为新值", + `c` double REPLACE NULL COMMENT "冲突时更新为新值", + `d` datetime MIN NULL COMMENT "冲突时保留所有记录中的最小值", + `first_occur_time` datetime REPLACE_IF_NOT_NULL NULL DEFAULT CURRENT_TIMESTAMP +) ENGINE=OLAP +AGGREGATE KEY(`a`) +DISTRIBUTED BY HASH(`a`) BUCKETS 10 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE game_info; +CREATE TABLE `game_info` ( + `id` bigint NOT NULL, + `name` varchar(64) NOT NULL, + `zh_name` varchar(64) NOT NULL, + `gm_uid` bigint NOT NULL, + `gm_account` varchar(64) NULL, + `gm_name` varchar(64) NULL, + `gm_orig_uid` bigint NULL, + `is_union_oper` int NULL, + `create_time` bigint NULL, + `pay_company` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`id`) +DISTRIBUTED BY HASH(`id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE game_merge; +CREATE TABLE `game_merge` ( + `src` varchar(64) NOT NULL, + `id` bigint NOT NULL, + `game_id` int NULL, + `start_id` int NULL, + `end_ids` varchar(64) NULL, + `isconfirm` int NULL, + `merge_time` int NULL +) ENGINE=OLAP +UNIQUE KEY(`src`, `id`) +DISTRIBUTED BY HASH(`src`, `id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE game_server; +CREATE TABLE `game_server` ( + `game_id` int NOT NULL, + `id` int NOT NULL, + `mid` int NULL, + `name` varchar(50) NULL, + `isconfirm` tinyint NULL, + `del` tinyint NULL, + `state` tinyint NULL, + `open_time` int NULL, + `space_id` int NULL, + `space_type` tinyint NULL, + `engine_version` varchar(255) NULL, + `server_type` varchar(16) NULL, + `kuafu_game_id` varchar(20) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `id`) +DISTRIBUTED BY HASH(`game_id`, `id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE gm_apply; +CREATE TABLE `gm_apply` ( + `id` int NULL COMMENT "主键", + `appkey` char(32) NULL COMMENT "appkey", + `name` varchar(50) NOT NULL COMMENT "标题", + `chart` varchar(10) NULL COMMENT "首字母", + `platform` int NOT NULL DEFAULT "1" COMMENT "1-Android,2-iphone,3-pc", + `desc` varchar(255) NULL COMMENT "描述", + `status` tinyint NOT NULL DEFAULT "1" COMMENT "状态:1-有效,0-失效", + `game_id` int NOT NULL COMMENT "游戏id", + `channel_id` int NOT NULL COMMENT "渠道id", + `uid` int NOT NULL COMMENT "所属用户id", + `account` varchar(50) NOT NULL COMMENT "所属用户账号", + `relation_advert` tinyint NOT NULL COMMENT "关联广告:0-否,1-是", + `payment_appear_way` tinyint NOT NULL DEFAULT "1" COMMENT "付费上报方式:1-服务端上报,2-客户端上报", + `advert_callback_way` tinyint NOT NULL DEFAULT "1" COMMENT "事件回传逻辑(1激活归因 2注册归因 )", + `active_expire_days` int NOT NULL DEFAULT "30" COMMENT "激活有效期(天)", + `create_time` int NOT NULL COMMENT "创建时间", + `update_time` int NOT NULL COMMENT "更新时间", + `analysis_limit` bigint NOT NULL DEFAULT "500000000" COMMENT "自定义分析额度", + `event_limit` int NOT NULL DEFAULT "30" COMMENT "自定义分析数量限制", + `analysis_status` tinyint NOT NULL DEFAULT "1" COMMENT "自定义分析限制状态 0.已限制 1.未限制", + `bind_game_id` int NOT NULL COMMENT "绑定游戏id", + `bind_type` tinyint NOT NULL COMMENT "0-常规应用,1-游戏默认应用", + `bind_appid` int NOT NULL COMMENT "绑定的默认应用appid", + `analysis_used` bigint NOT NULL COMMENT "自定义分析已用额度", + `bind_game_type` tinyint NOT NULL COMMENT "游戏绑定类型:0-默认|1-传奇|2-传世|3-仙侠|4-传3", + `app_id` char(32) NULL COMMENT "appid", + `demo` tinyint NOT NULL COMMENT "demo数据展示,1-展示", + `event_report` tinyint NOT NULL COMMENT "是否生成默认报表:1-是", + `engine_push_sw` int NULL COMMENT "引擎上报开关,二进制表示法,参考model", + `qq` varchar(32) NOT NULL DEFAULT "" COMMENT "qq", + `prodid` text NOT NULL COMMENT "prodid和名称关系", + `prodid_time` int NOT NULL COMMENT "申请时间", + `analysis_full_time` int NULL COMMENT "自定义分析额度满额时间", + `return_account_status` tinyint NULL COMMENT "回流账号判断 0关闭 1开启" +) ENGINE=OLAP +UNIQUE KEY(`id`) +DISTRIBUTED BY HASH(`id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE gm_info; +CREATE TABLE `gm_info` ( + `id` bigint NOT NULL, + `biz_name` varchar(64) NOT NULL, + `account` varchar(64) NULL, + `real_name` varchar(64) NULL, + `parent_uid` bigint NULL, + `mode` int NULL, + `signing` int NULL, + `status` varchar(64) NULL, + `join_time` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`id`, `biz_name`) +DISTRIBUTED BY HASH(`id`, `biz_name`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE gm_space; +CREATE TABLE `gm_space` ( + `id` int NOT NULL, + `gm_uid` int NOT NULL, + `space_name` varchar(50) NULL, + `space_type` int NULL, + `buy_time` int NULL, + `stime` int NULL, + `etime` int NULL, + `server_id` int NULL, + `state` tinyint NULL +) ENGINE=OLAP +UNIQUE KEY(`id`) +DISTRIBUTED BY HASH(`id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE juhe_order; +CREATE TABLE `juhe_order` ( + `id` bigint NOT NULL, + `user_external_id` varchar(64) NULL, + `game_identient` varchar(64) NULL, + `game_name` varchar(64) NULL, + `server_id` varchar(64) NULL, + `server_name` varchar(64) NULL, + `game_player_id` varchar(64) NULL, + `game_player_name` varchar(64) NULL, + `order_number` varchar(64) NULL, + `game_order_number` varchar(64) NULL, + `pay_order_number` varchar(64) NULL, + `product_id` varchar(64) NULL, + `props_name` varchar(64) NULL, + `pay_amount` decimal(10,2) NULL, + `create_time` bigint NULL, + `pay_time` bigint NULL, + `pay_status` int NULL, + `pay_game_status` int NULL, + `ip` varchar(64) NULL, + `deviceinfo` varchar(64) NULL, + `channel_id` varchar(64) NULL, + `package_id` varchar(64) NULL, + `channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`id`) +DISTRIBUTED BY HASH(`id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE juhe_user; +CREATE TABLE `juhe_user` ( + `id` bigint NOT NULL, + `account` varchar(64) NULL, + `register_time` bigint NULL, + `register_ip` varchar(64) NULL, + `external_id` varchar(64) NULL, + `device_id` varchar(64) NULL, + `game_id` int NULL, + `game_name` varchar(64) NULL, + `device` varchar(64) NULL, + `channel_id` varchar(64) NULL, + `package_id` varchar(64) NULL, + `channel` varchar(64) NULL, + `channel_uid` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`id`) +DISTRIBUTED BY HASH(`id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE monthly_sales; +CREATE TABLE `monthly_sales` ( + `order_id` bigint NOT NULL COMMENT "订单ID", + `sale_date` date NOT NULL COMMENT "销售日期(分区列)", + `product_id` int NOT NULL COMMENT "商品ID", + `revenue` decimal(12,2) NULL DEFAULT "0" COMMENT "销售额", + `quantity` int NULL DEFAULT "0" COMMENT "销量" +) ENGINE=OLAP +UNIQUE KEY(`order_id`, `sale_date`) +PARTITION BY RANGE(`sale_date`) +(PARTITION p_202501 VALUES [('2025-01-01'), ('2025-02-01')), +PARTITION p_202502 VALUES [('2025-02-01'), ('2025-03-01')), +PARTITION p_202503 VALUES [('2025-03-01'), ('2025-04-01')), +PARTITION p_202504 VALUES [('2025-04-01'), ('2025-05-01')), +PARTITION p_202505 VALUES [('2025-05-01'), ('2025-06-01')), +PARTITION p_202506 VALUES [('2025-06-01'), ('2025-07-01')), +PARTITION p_202507 VALUES [('2025-07-01'), ('2025-08-01')), +PARTITION p_202508 VALUES [('2025-08-01'), ('2025-09-01')), +PARTITION p_202509 VALUES [('2025-09-01'), ('2025-10-01')), +PARTITION p_202510 VALUES [('2025-10-01'), ('2025-11-01'))) +DISTRIBUTED BY HASH(`order_id`) BUCKETS 8 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "MONTH", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-6", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "p_", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "true", +"dynamic_partition.history_partition_num" = "-1", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"dynamic_partition.start_day_of_month" = "1", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_across_server; +CREATE TABLE `ods_across_server` ( + `id` int NOT NULL, + `game_id` int NOT NULL, + `serverids` varchar(100) NULL, + `status` tinyint NULL, + `create_time` datetime NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`id`) +DISTRIBUTED BY HASH(`id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_active_account; +CREATE TABLE `ods_active_account` ( + `game_id` int NOT NULL COMMENT "游戏ID", + `server_id` int NOT NULL COMMENT "服务器ID", + `user_account` varchar(64) NOT NULL COMMENT "用户账号", + `ds` date NOT NULL COMMENT "日期分区", + `create_time` bigint NULL COMMENT "创建时间戳" +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `user_account`, `ds`) +PARTITION BY RANGE(`ds`) +(PARTITION ods_active_account_20250114 VALUES [('2025-01-14'), ('2025-01-15')), +PARTITION ods_active_account_20250115 VALUES [('2025-01-15'), ('2025-01-16')), +PARTITION ods_active_account_20250116 VALUES [('2025-01-16'), ('2025-01-17')), +PARTITION ods_active_account_20250117 VALUES [('2025-01-17'), ('2025-01-18')), +PARTITION ods_active_account_20250118 VALUES [('2025-01-18'), ('2025-01-19')), +PARTITION ods_active_account_20250119 VALUES [('2025-01-19'), ('2025-01-20')), +PARTITION ods_active_account_20250120 VALUES [('2025-01-20'), ('2025-01-21')), +PARTITION ods_active_account_20250121 VALUES [('2025-01-21'), ('2025-01-22')), +PARTITION ods_active_account_20250122 VALUES [('2025-01-22'), ('2025-01-23')), +PARTITION ods_active_account_20250123 VALUES [('2025-01-23'), ('2025-01-24')), +PARTITION ods_active_account_20250124 VALUES [('2025-01-24'), ('2025-01-25')), +PARTITION ods_active_account_20250125 VALUES [('2025-01-25'), ('2025-01-26')), +PARTITION ods_active_account_20250126 VALUES [('2025-01-26'), ('2025-01-27')), +PARTITION ods_active_account_20250127 VALUES [('2025-01-27'), ('2025-01-28')), +PARTITION ods_active_account_20250128 VALUES [('2025-01-28'), ('2025-01-29')), +PARTITION ods_active_account_20250129 VALUES [('2025-01-29'), ('2025-01-30')), +PARTITION ods_active_account_20250130 VALUES [('2025-01-30'), ('2025-01-31')), +PARTITION ods_active_account_20250131 VALUES [('2025-01-31'), ('2025-02-01')), +PARTITION ods_active_account_20250201 VALUES [('2025-02-01'), ('2025-02-02')), +PARTITION ods_active_account_20250202 VALUES [('2025-02-02'), ('2025-02-03')), +PARTITION ods_active_account_20250203 VALUES [('2025-02-03'), ('2025-02-04')), +PARTITION ods_active_account_20250204 VALUES [('2025-02-04'), ('2025-02-05')), +PARTITION ods_active_account_20250205 VALUES [('2025-02-05'), ('2025-02-06')), +PARTITION ods_active_account_20250206 VALUES [('2025-02-06'), ('2025-02-07')), +PARTITION ods_active_account_20250207 VALUES [('2025-02-07'), ('2025-02-08')), +PARTITION ods_active_account_20250208 VALUES [('2025-02-08'), ('2025-02-09')), +PARTITION ods_active_account_20250209 VALUES [('2025-02-09'), ('2025-02-10')), +PARTITION ods_active_account_20250210 VALUES [('2025-02-10'), ('2025-02-11')), +PARTITION ods_active_account_20250211 VALUES [('2025-02-11'), ('2025-02-12')), +PARTITION ods_active_account_20250212 VALUES [('2025-02-12'), ('2025-02-13')), +PARTITION ods_active_account_20250213 VALUES [('2025-02-13'), ('2025-02-14')), +PARTITION ods_active_account_20250214 VALUES [('2025-02-14'), ('2025-02-15')), +PARTITION ods_active_account_20250215 VALUES [('2025-02-15'), ('2025-02-16')), +PARTITION ods_active_account_20250216 VALUES [('2025-02-16'), ('2025-02-17')), +PARTITION ods_active_account_20250217 VALUES [('2025-02-17'), ('2025-02-18')), +PARTITION ods_active_account_20250218 VALUES [('2025-02-18'), ('2025-02-19')), +PARTITION ods_active_account_20250219 VALUES [('2025-02-19'), ('2025-02-20')), +PARTITION ods_active_account_20250220 VALUES [('2025-02-20'), ('2025-02-21')), +PARTITION ods_active_account_20250221 VALUES [('2025-02-21'), ('2025-02-22')), +PARTITION ods_active_account_20250222 VALUES [('2025-02-22'), ('2025-02-23')), +PARTITION ods_active_account_20250223 VALUES [('2025-02-23'), ('2025-02-24')), +PARTITION ods_active_account_20250224 VALUES [('2025-02-24'), ('2025-02-25')), +PARTITION ods_active_account_20250225 VALUES [('2025-02-25'), ('2025-02-26')), +PARTITION ods_active_account_20250226 VALUES [('2025-02-26'), ('2025-02-27')), +PARTITION ods_active_account_20250227 VALUES [('2025-02-27'), ('2025-02-28')), +PARTITION ods_active_account_20250228 VALUES [('2025-02-28'), ('2025-03-01')), +PARTITION ods_active_account_20250301 VALUES [('2025-03-01'), ('2025-03-02')), +PARTITION ods_active_account_20250302 VALUES [('2025-03-02'), ('2025-03-03')), +PARTITION ods_active_account_20250303 VALUES [('2025-03-03'), ('2025-03-04')), +PARTITION ods_active_account_20250304 VALUES [('2025-03-04'), ('2025-03-05')), +PARTITION ods_active_account_20250305 VALUES [('2025-03-05'), ('2025-03-06')), +PARTITION ods_active_account_20250306 VALUES [('2025-03-06'), ('2025-03-07')), +PARTITION ods_active_account_20250307 VALUES [('2025-03-07'), ('2025-03-08')), +PARTITION ods_active_account_20250308 VALUES [('2025-03-08'), ('2025-03-09')), +PARTITION ods_active_account_20250309 VALUES [('2025-03-09'), ('2025-03-10')), +PARTITION ods_active_account_20250310 VALUES [('2025-03-10'), ('2025-03-11')), +PARTITION ods_active_account_20250311 VALUES [('2025-03-11'), ('2025-03-12')), +PARTITION ods_active_account_20250312 VALUES [('2025-03-12'), ('2025-03-13')), +PARTITION ods_active_account_20250313 VALUES [('2025-03-13'), ('2025-03-14')), +PARTITION ods_active_account_20250314 VALUES [('2025-03-14'), ('2025-03-15')), +PARTITION ods_active_account_20250315 VALUES [('2025-03-15'), ('2025-03-16')), +PARTITION ods_active_account_20250316 VALUES [('2025-03-16'), ('2025-03-17')), +PARTITION ods_active_account_20250317 VALUES [('2025-03-17'), ('2025-03-18')), +PARTITION ods_active_account_20250318 VALUES [('2025-03-18'), ('2025-03-19')), +PARTITION ods_active_account_20250319 VALUES [('2025-03-19'), ('2025-03-20')), +PARTITION ods_active_account_20250320 VALUES [('2025-03-20'), ('2025-03-21')), +PARTITION ods_active_account_20250321 VALUES [('2025-03-21'), ('2025-03-22')), +PARTITION ods_active_account_20250322 VALUES [('2025-03-22'), ('2025-03-23')), +PARTITION ods_active_account_20250323 VALUES [('2025-03-23'), ('2025-03-24')), +PARTITION ods_active_account_20250324 VALUES [('2025-03-24'), ('2025-03-25')), +PARTITION ods_active_account_20250325 VALUES [('2025-03-25'), ('2025-03-26')), +PARTITION ods_active_account_20250326 VALUES [('2025-03-26'), ('2025-03-27')), +PARTITION ods_active_account_20250327 VALUES [('2025-03-27'), ('2025-03-28')), +PARTITION ods_active_account_20250328 VALUES [('2025-03-28'), ('2025-03-29')), +PARTITION ods_active_account_20250329 VALUES [('2025-03-29'), ('2025-03-30')), +PARTITION ods_active_account_20250330 VALUES [('2025-03-30'), ('2025-03-31')), +PARTITION ods_active_account_20250331 VALUES [('2025-03-31'), ('2025-04-01')), +PARTITION ods_active_account_20250401 VALUES [('2025-04-01'), ('2025-04-02')), +PARTITION ods_active_account_20250402 VALUES [('2025-04-02'), ('2025-04-03')), +PARTITION ods_active_account_20250403 VALUES [('2025-04-03'), ('2025-04-04')), +PARTITION ods_active_account_20250404 VALUES [('2025-04-04'), ('2025-04-05')), +PARTITION ods_active_account_20250405 VALUES [('2025-04-05'), ('2025-04-06')), +PARTITION ods_active_account_20250406 VALUES [('2025-04-06'), ('2025-04-07')), +PARTITION ods_active_account_20250407 VALUES [('2025-04-07'), ('2025-04-08')), +PARTITION ods_active_account_20250408 VALUES [('2025-04-08'), ('2025-04-09')), +PARTITION ods_active_account_20250409 VALUES [('2025-04-09'), ('2025-04-10')), +PARTITION ods_active_account_20250410 VALUES [('2025-04-10'), ('2025-04-11')), +PARTITION ods_active_account_20250411 VALUES [('2025-04-11'), ('2025-04-12')), +PARTITION ods_active_account_20250412 VALUES [('2025-04-12'), ('2025-04-13')), +PARTITION ods_active_account_20250413 VALUES [('2025-04-13'), ('2025-04-14')), +PARTITION ods_active_account_20250414 VALUES [('2025-04-14'), ('2025-04-15')), +PARTITION ods_active_account_20250415 VALUES [('2025-04-15'), ('2025-04-16')), +PARTITION ods_active_account_20250416 VALUES [('2025-04-16'), ('2025-04-17')), +PARTITION ods_active_account_20250417 VALUES [('2025-04-17'), ('2025-04-18')), +PARTITION ods_active_account_20250418 VALUES [('2025-04-18'), ('2025-04-19')), +PARTITION ods_active_account_20250419 VALUES [('2025-04-19'), ('2025-04-20')), +PARTITION ods_active_account_20250420 VALUES [('2025-04-20'), ('2025-04-21')), +PARTITION ods_active_account_20250421 VALUES [('2025-04-21'), ('2025-04-22')), +PARTITION ods_active_account_20250422 VALUES [('2025-04-22'), ('2025-04-23')), +PARTITION ods_active_account_20250423 VALUES [('2025-04-23'), ('2025-04-24')), +PARTITION ods_active_account_20250424 VALUES [('2025-04-24'), ('2025-04-25')), +PARTITION ods_active_account_20250425 VALUES [('2025-04-25'), ('2025-04-26')), +PARTITION ods_active_account_20250426 VALUES [('2025-04-26'), ('2025-04-27')), +PARTITION ods_active_account_20250427 VALUES [('2025-04-27'), ('2025-04-28')), +PARTITION ods_active_account_20250428 VALUES [('2025-04-28'), ('2025-04-29')), +PARTITION ods_active_account_20250429 VALUES [('2025-04-29'), ('2025-04-30')), +PARTITION ods_active_account_20250430 VALUES [('2025-04-30'), ('2025-05-01')), +PARTITION ods_active_account_20250501 VALUES [('2025-05-01'), ('2025-05-02')), +PARTITION ods_active_account_20250502 VALUES [('2025-05-02'), ('2025-05-03')), +PARTITION ods_active_account_20250503 VALUES [('2025-05-03'), ('2025-05-04')), +PARTITION ods_active_account_20250504 VALUES [('2025-05-04'), ('2025-05-05')), +PARTITION ods_active_account_20250505 VALUES [('2025-05-05'), ('2025-05-06')), +PARTITION ods_active_account_20250506 VALUES [('2025-05-06'), ('2025-05-07')), +PARTITION ods_active_account_20250507 VALUES [('2025-05-07'), ('2025-05-08')), +PARTITION ods_active_account_20250508 VALUES [('2025-05-08'), ('2025-05-09')), +PARTITION ods_active_account_20250509 VALUES [('2025-05-09'), ('2025-05-10')), +PARTITION ods_active_account_20250510 VALUES [('2025-05-10'), ('2025-05-11')), +PARTITION ods_active_account_20250511 VALUES [('2025-05-11'), ('2025-05-12')), +PARTITION ods_active_account_20250512 VALUES [('2025-05-12'), ('2025-05-13')), +PARTITION ods_active_account_20250513 VALUES [('2025-05-13'), ('2025-05-14')), +PARTITION ods_active_account_20250514 VALUES [('2025-05-14'), ('2025-05-15')), +PARTITION ods_active_account_20250515 VALUES [('2025-05-15'), ('2025-05-16')), +PARTITION ods_active_account_20250516 VALUES [('2025-05-16'), ('2025-05-17')), +PARTITION ods_active_account_20250517 VALUES [('2025-05-17'), ('2025-05-18')), +PARTITION ods_active_account_20250518 VALUES [('2025-05-18'), ('2025-05-19')), +PARTITION ods_active_account_20250519 VALUES [('2025-05-19'), ('2025-05-20')), +PARTITION ods_active_account_20250520 VALUES [('2025-05-20'), ('2025-05-21')), +PARTITION ods_active_account_20250521 VALUES [('2025-05-21'), ('2025-05-22')), +PARTITION ods_active_account_20250522 VALUES [('2025-05-22'), ('2025-05-23')), +PARTITION ods_active_account_20250523 VALUES [('2025-05-23'), ('2025-05-24')), +PARTITION ods_active_account_20250524 VALUES [('2025-05-24'), ('2025-05-25')), +PARTITION ods_active_account_20250525 VALUES [('2025-05-25'), ('2025-05-26')), +PARTITION ods_active_account_20250526 VALUES [('2025-05-26'), ('2025-05-27')), +PARTITION ods_active_account_20250527 VALUES [('2025-05-27'), ('2025-05-28')), +PARTITION ods_active_account_20250528 VALUES [('2025-05-28'), ('2025-05-29')), +PARTITION ods_active_account_20250529 VALUES [('2025-05-29'), ('2025-05-30')), +PARTITION ods_active_account_20250530 VALUES [('2025-05-30'), ('2025-05-31')), +PARTITION ods_active_account_20250531 VALUES [('2025-05-31'), ('2025-06-01')), +PARTITION ods_active_account_20250601 VALUES [('2025-06-01'), ('2025-06-02')), +PARTITION ods_active_account_20250602 VALUES [('2025-06-02'), ('2025-06-03')), +PARTITION ods_active_account_20250603 VALUES [('2025-06-03'), ('2025-06-04')), +PARTITION ods_active_account_20250604 VALUES [('2025-06-04'), ('2025-06-05')), +PARTITION ods_active_account_20250605 VALUES [('2025-06-05'), ('2025-06-06')), +PARTITION ods_active_account_20250606 VALUES [('2025-06-06'), ('2025-06-07')), +PARTITION ods_active_account_20250607 VALUES [('2025-06-07'), ('2025-06-08')), +PARTITION ods_active_account_20250608 VALUES [('2025-06-08'), ('2025-06-09')), +PARTITION ods_active_account_20250609 VALUES [('2025-06-09'), ('2025-06-10')), +PARTITION ods_active_account_20250610 VALUES [('2025-06-10'), ('2025-06-11')), +PARTITION ods_active_account_20250611 VALUES [('2025-06-11'), ('2025-06-12')), +PARTITION ods_active_account_20250612 VALUES [('2025-06-12'), ('2025-06-13')), +PARTITION ods_active_account_20250613 VALUES [('2025-06-13'), ('2025-06-14')), +PARTITION ods_active_account_20250614 VALUES [('2025-06-14'), ('2025-06-15')), +PARTITION ods_active_account_20250615 VALUES [('2025-06-15'), ('2025-06-16')), +PARTITION ods_active_account_20250616 VALUES [('2025-06-16'), ('2025-06-17')), +PARTITION ods_active_account_20250617 VALUES [('2025-06-17'), ('2025-06-18')), +PARTITION ods_active_account_20250618 VALUES [('2025-06-18'), ('2025-06-19')), +PARTITION ods_active_account_20250619 VALUES [('2025-06-19'), ('2025-06-20')), +PARTITION ods_active_account_20250620 VALUES [('2025-06-20'), ('2025-06-21')), +PARTITION ods_active_account_20250621 VALUES [('2025-06-21'), ('2025-06-22')), +PARTITION ods_active_account_20250622 VALUES [('2025-06-22'), ('2025-06-23')), +PARTITION ods_active_account_20250623 VALUES [('2025-06-23'), ('2025-06-24')), +PARTITION ods_active_account_20250624 VALUES [('2025-06-24'), ('2025-06-25')), +PARTITION ods_active_account_20250625 VALUES [('2025-06-25'), ('2025-06-26')), +PARTITION ods_active_account_20250626 VALUES [('2025-06-26'), ('2025-06-27')), +PARTITION ods_active_account_20250627 VALUES [('2025-06-27'), ('2025-06-28')), +PARTITION ods_active_account_20250628 VALUES [('2025-06-28'), ('2025-06-29')), +PARTITION ods_active_account_20250629 VALUES [('2025-06-29'), ('2025-06-30')), +PARTITION ods_active_account_20250630 VALUES [('2025-06-30'), ('2025-07-01')), +PARTITION ods_active_account_20250701 VALUES [('2025-07-01'), ('2025-07-02')), +PARTITION ods_active_account_20250702 VALUES [('2025-07-02'), ('2025-07-03')), +PARTITION ods_active_account_20250703 VALUES [('2025-07-03'), ('2025-07-04')), +PARTITION ods_active_account_20250704 VALUES [('2025-07-04'), ('2025-07-05')), +PARTITION ods_active_account_20250705 VALUES [('2025-07-05'), ('2025-07-06')), +PARTITION ods_active_account_20250706 VALUES [('2025-07-06'), ('2025-07-07')), +PARTITION ods_active_account_20250707 VALUES [('2025-07-07'), ('2025-07-08')), +PARTITION ods_active_account_20250708 VALUES [('2025-07-08'), ('2025-07-09')), +PARTITION ods_active_account_20250709 VALUES [('2025-07-09'), ('2025-07-10')), +PARTITION ods_active_account_20250710 VALUES [('2025-07-10'), ('2025-07-11')), +PARTITION ods_active_account_20250711 VALUES [('2025-07-11'), ('2025-07-12')), +PARTITION ods_active_account_20250712 VALUES [('2025-07-12'), ('2025-07-13')), +PARTITION ods_active_account_20250713 VALUES [('2025-07-13'), ('2025-07-14')), +PARTITION ods_active_account_20250714 VALUES [('2025-07-14'), ('2025-07-15')), +PARTITION ods_active_account_20250715 VALUES [('2025-07-15'), ('2025-07-16')), +PARTITION ods_active_account_20250716 VALUES [('2025-07-16'), ('2025-07-17')), +PARTITION ods_active_account_20250717 VALUES [('2025-07-17'), ('2025-07-18')), +PARTITION ods_active_account_20250718 VALUES [('2025-07-18'), ('2025-07-19')), +PARTITION ods_active_account_20250719 VALUES [('2025-07-19'), ('2025-07-20')), +PARTITION ods_active_account_20250720 VALUES [('2025-07-20'), ('2025-07-21')), +PARTITION ods_active_account_20250721 VALUES [('2025-07-21'), ('2025-07-22')), +PARTITION ods_active_account_20250722 VALUES [('2025-07-22'), ('2025-07-23')), +PARTITION ods_active_account_20250723 VALUES [('2025-07-23'), ('2025-07-24')), +PARTITION ods_active_account_20250724 VALUES [('2025-07-24'), ('2025-07-25')), +PARTITION ods_active_account_20250725 VALUES [('2025-07-25'), ('2025-07-26')), +PARTITION ods_active_account_20250726 VALUES [('2025-07-26'), ('2025-07-27'))) +DISTRIBUTED BY HASH(`ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "DAY", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-190", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "ods_active_account_", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "true", +"dynamic_partition.history_partition_num" = "-1", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_active_role; +CREATE TABLE `ods_active_role` ( + `game_id` int NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `server_id` int NULL DEFAULT "0", + `user_account` varchar(50) NULL, + `role_name` varchar(128) NULL, + `create_time` int NULL DEFAULT "0" +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `role_id`, `ds`) +DISTRIBUTED BY HASH(`ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_game_order; +CREATE TABLE `ods_game_order` ( + `game_id` int NOT NULL, + `order_id` varchar(64) NOT NULL, + `status` int NOT NULL, + `user_account` varchar(64) NULL, + `role_id` varchar(64) NULL, + `server_id` int NULL, + `platform_id` varchar(64) NULL, + `product_id` varchar(64) NULL, + `amount` bigint NULL, + `create_time` datetime NULL, + `ds` varchar(64) NULL, + `receive_time` datetime NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `order_id`, `status`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_order; +CREATE TABLE `ods_order` ( + `game_id` int NOT NULL, + `order_id` varchar(64) NOT NULL, + `user_account` varchar(64) NULL, + `role_id` varchar(64) NULL, + `server_id` int NULL, + `platform_id` varchar(64) NULL, + `product_id` varchar(64) NULL, + `amount` bigint NULL, + `create_time` datetime NULL, + `ds` date NOT NULL, + `receive_time` datetime NULL, + `pay_company` varchar(64) NULL, + `pay_type` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `order_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_order_history; +CREATE TABLE `ods_order_history` ( + `id` bigint NOT NULL, + `orderid` varchar(64) NOT NULL, + `account` varchar(64) NULL, + `platformid` varchar(64) NULL, + `serverid` bigint NULL, + `username` varchar(64) NULL, + `roleid` varchar(64) NULL, + `money` bigint NULL, + `yuanbao` bigint NULL, + `goods` bigint NULL, + `level` bigint NULL, + `time` bigint NULL, + `gid` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`id`, `orderid`) +DISTRIBUTED BY HASH(`id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_platform_account; +CREATE TABLE `ods_platform_account` ( + `uid` bigint NOT NULL, + `account` varchar(64) NULL, + `promote_id` bigint NULL, + `phone` varchar(64) NULL, + `idcard` varchar(64) NULL, + `birthday` varchar(64) NULL, + `gender` smallint NULL, + `reg_way` smallint NULL, + `reg_type` smallint NULL, + `reg_time` datetime NOT NULL, + `reg_ip` varchar(64) NULL, + `is_union` smallint NULL, + `age_status` smallint NULL, + `is_wechat_subscribe` smallint NULL, + `platform_id` int NULL, + `box_account_time` bigint NULL, + `box_channel` varchar(64) NULL, + `auth_time` datetime NULL +) ENGINE=OLAP +UNIQUE KEY(`uid`) +DISTRIBUTED BY HASH(`uid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_platform_login; +CREATE TABLE `ods_platform_login` ( + `game_id` int NOT NULL, + `user_id` bigint NOT NULL, + `user_account` varchar(100) NULL, + `promote_id` int NULL, + `platform_id` int NULL, + `login_time` int NOT NULL, + `login_ip` varchar(50) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_platform_order; +CREATE TABLE `ods_platform_order` ( + `game_id` int NOT NULL, + `order_id` varchar(100) NOT NULL, + `game_name` varchar(30) NULL, + `user_id` int NULL, + `user_account` varchar(50) NULL, + `user_nickname` varchar(30) NULL, + `role_id` varchar(50) NULL, + `role_name` varchar(100) NULL, + `server_id` varchar(50) NULL, + `server_name` varchar(30) NULL, + `platform_id` int NULL, + `promote_id` int NULL, + `amount` decimal(10,2) NULL, + `status` tinyint NOT NULL, + `pay_time` int NULL, + `pay_way` tinyint NULL, + `pay_company` varchar(20) NULL, + `ip` varchar(50) NULL, + `is_box_pay` tinyint NULL, + `scene` tinyint NULL, + `prod_id` int NULL, + `prod_name` varchar(30) NULL, + `main_server_id` int NULL, + `refund_type` tinyint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `order_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_platform_user; CREATE TABLE `ods_platform_user` ( - `game_id` INT NOT NULL, - `user_id` BIGINT NOT NULL, - `user_account` varchar(30), - `platform_id` INT, - `promote_id` INT, - `create_time` BIGINT, - `channel` varchar(20) -) - UNIQUE KEY (`game_id`, `user_id`) -DISTRIBUTED BY HASH (`game_id`, `user_id`) BUCKETS 32; - - - CREATE TABLE `ods_role` ( - `game_id` INT NOT NULL COMMENT "游戏ID", - `server_id` INT NOT NULL COMMENT "服务器ID", - `role_id` VARCHAR(64) NOT NULL COMMENT "角色ID", - `user_account` VARCHAR(64) COMMENT "用户账号", - `role_name` VARCHAR(64) COMMENT "角色名称", - `job` INT COMMENT "职业", - `level` INT COMMENT "等级", - `exp` BIGINT COMMENT "经验值", - `relevel` INT COMMENT "转生等级", - `platform_id` VARCHAR(64) COMMENT "平台ID", - `create_time` DATETIME COMMENT "创建时间", -- 修正:TIMESTAMP → DATETIME - `ds` VARCHAR(64) COMMENT "日期分区", -- 优化:VARCHAR → DATE - `main_server_id` INT COMMENT "主服ID" -) -ENGINE = OLAP -- 必须显式指定表引擎[1,6](@ref) -UNIQUE KEY (`game_id`, `server_id`, `role_id`) - -DISTRIBUTED BY HASH (`game_id`, `server_id`, `role_id`) BUCKETS 32 -; - -CREATE TABLE ods_role_duration ( - game_id INT NOT NULL, - server_id INT NOT NULL, - role_id VARCHAR(64) NOT NULL, - create_time DATETIME, - user_account VARCHAR(64), - duration INT, - level INT, - role_name VARCHAR(64) -) UNIQUE KEY (game_id, server_id, role_id, create_time) -DISTRIBUTED BY HASH (game_id, server_id, role_id, create_time) BUCKETS 32 -; - - -CREATE TABLE ods_order ( - game_id int NOT NULL, - order_id VARCHAR(64) NOT NULL, - status int NOT NULL, - user_account VARCHAR(64), - role_id VARCHAR(64), - server_id int, - platform_id VARCHAR(64), - product_id VARCHAR(64), - amount bigint, - create_time DATETIME, - ds VARCHAR(64), - receive_time DATETIME, - pay_company VARCHAR(64), - pay_type int - -) -UNIQUE KEY (game_id, order_id, status) -DISTRIBUTED BY HASH (game_id, order_id, status) BUCKETS 32; - -CREATE TABLE ods_server_user ( -game_id int NOT NULL, -server_id int NOT NULL, -user_account VARCHAR(64) NOT NULL, -role_id VARCHAR(64), -role_name VARCHAR(64), - -platform_id VARCHAR(64), -create_time DATETIME, -ds VARCHAR(64) -) -UNIQUE KEY (game_id, server_id, user_account) DISTRIBUTED BY HASH (game_id, server_id, user_account) BUCKETS 32; - - -CREATE TABLE ods_user ( -game_id int NOT NULL, -user_account VARCHAR(64) NOT NULL, -role_id VARCHAR(64), -role_name VARCHAR(64), -server_id int, -platform_id VARCHAR(64), -create_time DATETIME, -ds VARCHAR(64) -) -UNIQUE KEY (game_id, user_account) DISTRIBUTED BY HASH (game_id, user_account) BUCKETS 32; - - - - -CREATE TABLE ods_platform_user ( -game_id int NOT NULL, -user_id int NOT NULL, -user_account VARCHAR, -platform_id int, -promote_id int, -create_time bigint, -channel VARCHAR -) -UNIQUE KEY (game_id, user_id) DISTRIBUTED BY HASH (game_id, user_id) BUCKETS 32; - - -CREATE TABLE ods_platform_login ( -game_id int NOT NULL, -user_id bigint NOT NULL, -user_account VARCHAR(100), -promote_id int, -platform_id int, -login_time int NOT NULL, -login_ip VARCHAR(50) -) ENGINE = OLAP DISTRIBUTED BY HASH (game_id, user_id) BUCKETS 32 -; - - -CREATE TABLE juhe_user ( -id bigint NOT NULL, -account VARCHAR, -register_time bigint, -register_ip VARCHAR, -external_id VARCHAR, -device_id VARCHAR, -game_id int, -game_name VARCHAR, -device VARCHAR, -channel_id VARCHAR, -package_id VARCHAR, -channel VARCHAR, -channel_uid VARCHAR -) -UNIQUE KEY (id) DISTRIBUTED BY HASH (id) BUCKETS 32; - - -CREATE TABLE juhe_order ( -id bigint NOT NULL, -user_external_id VARCHAR, -game_identient VARCHAR, -game_name VARCHAR, -server_id VARCHAR, -server_name VARCHAR, -game_player_id VARCHAR, -game_player_name VARCHAR, -order_number VARCHAR, -game_order_number VARCHAR, -pay_order_number VARCHAR, -product_id VARCHAR, -props_name VARCHAR, -pay_amount DECIMAL(10,2), -create_time bigint, -pay_time bigint, -pay_status int, -pay_game_status int, -ip VARCHAR, -deviceinfo VARCHAR, -channel_id VARCHAR, -package_id VARCHAR, -channel VARCHAR -) -UNIQUE KEY (id) DISTRIBUTED BY HASH (id) BUCKETS 32; - - -CREATE TABLE game_server ( -game_id int NOT NULL, -id int NOT NULL, -mid int, -name VARCHAR(50), -isconfirm tinyint, -del tinyint, -state tinyint, -open_time int, -space_id int, -space_type tinyint, -engine_version VARCHAR(255), -server_type VARCHAR(16), -kuafu_game_id VARCHAR(20) -) -UNIQUE KEY (game_id, id) DISTRIBUTED BY HASH (game_id, id) BUCKETS 32; - - -CREATE TABLE gm_space ( -id int NOT NULL, -gm_uid int NOT NULL, -space_name VARCHAR(50), -space_type int, -buy_time int, -stime int, -etime int, -server_id int, -state tinyint -) -UNIQUE KEY (id) DISTRIBUTED BY HASH (id) BUCKETS 32; - -CREATE TABLE ods_across_server ( -id int NOT NULL, -game_id int NOT NULL, -serverids VARCHAR(100), -status tinyint, -create_time DATETIME NOT NULL -) -UNIQUE KEY (id) DISTRIBUTED BY HASH (id) BUCKETS 32; - - -CREATE TABLE cq_game_merge ( -id bigint NOT NULL, -game_id int, -start_id int, -end_ids VARCHAR, -isconfirm int, -merge_time int -) -UNIQUE KEY (id) DISTRIBUTED BY HASH (id) BUCKETS 32; \ No newline at end of file + `game_id` int NOT NULL, + `user_id` bigint NOT NULL, + `user_account` varchar(30) NULL, + `platform_id` int NULL, + `promote_id` int NULL, + `create_time` bigint NULL, + `channel` varchar(20) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_role; +CREATE TABLE `ods_role` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `role_id` varchar(64) NOT NULL, + `user_account` varchar(64) NULL, + `role_name` varchar(64) NULL, + `job` int NULL, + `level` int NULL, + `exp` bigint NULL, + `relevel` int NULL, + `platform_id` varchar(64) NULL, + `create_time` datetime NULL, + `ds` date NULL, + `main_server_id` int NULL, + `update_time` datetime NULL, + `is_del` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `role_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_role_duration; +CREATE TABLE `ods_role_duration` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `role_id` varchar(64) NOT NULL, + `create_time` datetime NOT NULL, + `user_account` varchar(64) NULL, + `duration` int NULL, + `level` int NULL, + `role_name` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `role_id`, `create_time`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_rollserv_user; +CREATE TABLE `ods_rollserv_user` ( + `game_id` int NULL, + `server_id` int NULL, + `user_account` varchar(64) NULL, + `role_id` varchar(64) NULL, + `role_name` varchar(64) NULL, + `job` int NULL, + `level` int NULL, + `exp` bigint NULL, + `relevel` int NULL, + `platform_id` varchar(64) NULL, + `create_time` datetime NULL, + `ds` date NOT NULL +) ENGINE=OLAP +DUPLICATE KEY(`game_id`, `server_id`, `user_account`) +PARTITION BY RANGE(`ds`) +(PARTITION p_20250124 VALUES [('2025-01-24'), ('2025-01-25')), +PARTITION p_20250125 VALUES [('2025-01-25'), ('2025-01-26')), +PARTITION p_20250126 VALUES [('2025-01-26'), ('2025-01-27')), +PARTITION p_20250127 VALUES [('2025-01-27'), ('2025-01-28')), +PARTITION p_20250128 VALUES [('2025-01-28'), ('2025-01-29')), +PARTITION p_20250129 VALUES [('2025-01-29'), ('2025-01-30')), +PARTITION p_20250130 VALUES [('2025-01-30'), ('2025-01-31')), +PARTITION p_20250131 VALUES [('2025-01-31'), ('2025-02-01')), +PARTITION p_20250201 VALUES [('2025-02-01'), ('2025-02-02')), +PARTITION p_20250202 VALUES [('2025-02-02'), ('2025-02-03')), +PARTITION p_20250203 VALUES [('2025-02-03'), ('2025-02-04')), +PARTITION p_20250204 VALUES [('2025-02-04'), ('2025-02-05')), +PARTITION p_20250205 VALUES [('2025-02-05'), ('2025-02-06')), +PARTITION p_20250206 VALUES [('2025-02-06'), ('2025-02-07')), +PARTITION p_20250207 VALUES [('2025-02-07'), ('2025-02-08')), +PARTITION p_20250208 VALUES [('2025-02-08'), ('2025-02-09')), +PARTITION p_20250209 VALUES [('2025-02-09'), ('2025-02-10')), +PARTITION p_20250210 VALUES [('2025-02-10'), ('2025-02-11')), +PARTITION p_20250211 VALUES [('2025-02-11'), ('2025-02-12')), +PARTITION p_20250212 VALUES [('2025-02-12'), ('2025-02-13')), +PARTITION p_20250213 VALUES [('2025-02-13'), ('2025-02-14')), +PARTITION p_20250214 VALUES [('2025-02-14'), ('2025-02-15')), +PARTITION p_20250215 VALUES [('2025-02-15'), ('2025-02-16')), +PARTITION p_20250216 VALUES [('2025-02-16'), ('2025-02-17')), +PARTITION p_20250217 VALUES [('2025-02-17'), ('2025-02-18')), +PARTITION p_20250218 VALUES [('2025-02-18'), ('2025-02-19')), +PARTITION p_20250219 VALUES [('2025-02-19'), ('2025-02-20')), +PARTITION p_20250220 VALUES [('2025-02-20'), ('2025-02-21')), +PARTITION p_20250221 VALUES [('2025-02-21'), ('2025-02-22')), +PARTITION p_20250222 VALUES [('2025-02-22'), ('2025-02-23')), +PARTITION p_20250223 VALUES [('2025-02-23'), ('2025-02-24')), +PARTITION p_20250224 VALUES [('2025-02-24'), ('2025-02-25')), +PARTITION p_20250225 VALUES [('2025-02-25'), ('2025-02-26')), +PARTITION p_20250226 VALUES [('2025-02-26'), ('2025-02-27')), +PARTITION p_20250227 VALUES [('2025-02-27'), ('2025-02-28')), +PARTITION p_20250228 VALUES [('2025-02-28'), ('2025-03-01')), +PARTITION p_20250301 VALUES [('2025-03-01'), ('2025-03-02')), +PARTITION p_20250302 VALUES [('2025-03-02'), ('2025-03-03')), +PARTITION p_20250303 VALUES [('2025-03-03'), ('2025-03-04')), +PARTITION p_20250304 VALUES [('2025-03-04'), ('2025-03-05')), +PARTITION p_20250305 VALUES [('2025-03-05'), ('2025-03-06')), +PARTITION p_20250306 VALUES [('2025-03-06'), ('2025-03-07')), +PARTITION p_20250307 VALUES [('2025-03-07'), ('2025-03-08')), +PARTITION p_20250308 VALUES [('2025-03-08'), ('2025-03-09')), +PARTITION p_20250309 VALUES [('2025-03-09'), ('2025-03-10')), +PARTITION p_20250310 VALUES [('2025-03-10'), ('2025-03-11')), +PARTITION p_20250311 VALUES [('2025-03-11'), ('2025-03-12')), +PARTITION p_20250312 VALUES [('2025-03-12'), ('2025-03-13')), +PARTITION p_20250313 VALUES [('2025-03-13'), ('2025-03-14')), +PARTITION p_20250314 VALUES [('2025-03-14'), ('2025-03-15')), +PARTITION p_20250315 VALUES [('2025-03-15'), ('2025-03-16')), +PARTITION p_20250316 VALUES [('2025-03-16'), ('2025-03-17')), +PARTITION p_20250317 VALUES [('2025-03-17'), ('2025-03-18')), +PARTITION p_20250318 VALUES [('2025-03-18'), ('2025-03-19')), +PARTITION p_20250319 VALUES [('2025-03-19'), ('2025-03-20')), +PARTITION p_20250320 VALUES [('2025-03-20'), ('2025-03-21')), +PARTITION p_20250321 VALUES [('2025-03-21'), ('2025-03-22')), +PARTITION p_20250322 VALUES [('2025-03-22'), ('2025-03-23')), +PARTITION p_20250323 VALUES [('2025-03-23'), ('2025-03-24')), +PARTITION p_20250324 VALUES [('2025-03-24'), ('2025-03-25')), +PARTITION p_20250325 VALUES [('2025-03-25'), ('2025-03-26')), +PARTITION p_20250326 VALUES [('2025-03-26'), ('2025-03-27')), +PARTITION p_20250327 VALUES [('2025-03-27'), ('2025-03-28')), +PARTITION p_20250328 VALUES [('2025-03-28'), ('2025-03-29')), +PARTITION p_20250329 VALUES [('2025-03-29'), ('2025-03-30')), +PARTITION p_20250330 VALUES [('2025-03-30'), ('2025-03-31')), +PARTITION p_20250331 VALUES [('2025-03-31'), ('2025-04-01')), +PARTITION p_20250401 VALUES [('2025-04-01'), ('2025-04-02')), +PARTITION p_20250402 VALUES [('2025-04-02'), ('2025-04-03')), +PARTITION p_20250403 VALUES [('2025-04-03'), ('2025-04-04')), +PARTITION p_20250404 VALUES [('2025-04-04'), ('2025-04-05')), +PARTITION p_20250405 VALUES [('2025-04-05'), ('2025-04-06')), +PARTITION p_20250406 VALUES [('2025-04-06'), ('2025-04-07')), +PARTITION p_20250407 VALUES [('2025-04-07'), ('2025-04-08')), +PARTITION p_20250408 VALUES [('2025-04-08'), ('2025-04-09')), +PARTITION p_20250409 VALUES [('2025-04-09'), ('2025-04-10')), +PARTITION p_20250410 VALUES [('2025-04-10'), ('2025-04-11')), +PARTITION p_20250411 VALUES [('2025-04-11'), ('2025-04-12')), +PARTITION p_20250412 VALUES [('2025-04-12'), ('2025-04-13')), +PARTITION p_20250413 VALUES [('2025-04-13'), ('2025-04-14')), +PARTITION p_20250414 VALUES [('2025-04-14'), ('2025-04-15')), +PARTITION p_20250415 VALUES [('2025-04-15'), ('2025-04-16')), +PARTITION p_20250416 VALUES [('2025-04-16'), ('2025-04-17')), +PARTITION p_20250417 VALUES [('2025-04-17'), ('2025-04-18')), +PARTITION p_20250418 VALUES [('2025-04-18'), ('2025-04-19')), +PARTITION p_20250419 VALUES [('2025-04-19'), ('2025-04-20')), +PARTITION p_20250420 VALUES [('2025-04-20'), ('2025-04-21')), +PARTITION p_20250421 VALUES [('2025-04-21'), ('2025-04-22')), +PARTITION p_20250422 VALUES [('2025-04-22'), ('2025-04-23')), +PARTITION p_20250423 VALUES [('2025-04-23'), ('2025-04-24')), +PARTITION p_20250424 VALUES [('2025-04-24'), ('2025-04-25')), +PARTITION p_20250425 VALUES [('2025-04-25'), ('2025-04-26')), +PARTITION p_20250426 VALUES [('2025-04-26'), ('2025-04-27')), +PARTITION p_20250427 VALUES [('2025-04-27'), ('2025-04-28')), +PARTITION p_20250428 VALUES [('2025-04-28'), ('2025-04-29')), +PARTITION p_20250429 VALUES [('2025-04-29'), ('2025-04-30')), +PARTITION p_20250430 VALUES [('2025-04-30'), ('2025-05-01')), +PARTITION p_20250501 VALUES [('2025-05-01'), ('2025-05-02')), +PARTITION p_20250502 VALUES [('2025-05-02'), ('2025-05-03')), +PARTITION p_20250503 VALUES [('2025-05-03'), ('2025-05-04')), +PARTITION p_20250504 VALUES [('2025-05-04'), ('2025-05-05')), +PARTITION p_20250505 VALUES [('2025-05-05'), ('2025-05-06')), +PARTITION p_20250506 VALUES [('2025-05-06'), ('2025-05-07')), +PARTITION p_20250507 VALUES [('2025-05-07'), ('2025-05-08')), +PARTITION p_20250508 VALUES [('2025-05-08'), ('2025-05-09')), +PARTITION p_20250509 VALUES [('2025-05-09'), ('2025-05-10')), +PARTITION p_20250510 VALUES [('2025-05-10'), ('2025-05-11')), +PARTITION p_20250511 VALUES [('2025-05-11'), ('2025-05-12')), +PARTITION p_20250512 VALUES [('2025-05-12'), ('2025-05-13')), +PARTITION p_20250513 VALUES [('2025-05-13'), ('2025-05-14')), +PARTITION p_20250514 VALUES [('2025-05-14'), ('2025-05-15')), +PARTITION p_20250515 VALUES [('2025-05-15'), ('2025-05-16')), +PARTITION p_20250516 VALUES [('2025-05-16'), ('2025-05-17')), +PARTITION p_20250517 VALUES [('2025-05-17'), ('2025-05-18')), +PARTITION p_20250518 VALUES [('2025-05-18'), ('2025-05-19')), +PARTITION p_20250519 VALUES [('2025-05-19'), ('2025-05-20')), +PARTITION p_20250520 VALUES [('2025-05-20'), ('2025-05-21')), +PARTITION p_20250521 VALUES [('2025-05-21'), ('2025-05-22')), +PARTITION p_20250522 VALUES [('2025-05-22'), ('2025-05-23')), +PARTITION p_20250523 VALUES [('2025-05-23'), ('2025-05-24')), +PARTITION p_20250524 VALUES [('2025-05-24'), ('2025-05-25')), +PARTITION p_20250525 VALUES [('2025-05-25'), ('2025-05-26')), +PARTITION p_20250526 VALUES [('2025-05-26'), ('2025-05-27')), +PARTITION p_20250527 VALUES [('2025-05-27'), ('2025-05-28')), +PARTITION p_20250528 VALUES [('2025-05-28'), ('2025-05-29')), +PARTITION p_20250529 VALUES [('2025-05-29'), ('2025-05-30')), +PARTITION p_20250530 VALUES [('2025-05-30'), ('2025-05-31')), +PARTITION p_20250531 VALUES [('2025-05-31'), ('2025-06-01')), +PARTITION p_20250601 VALUES [('2025-06-01'), ('2025-06-02')), +PARTITION p_20250602 VALUES [('2025-06-02'), ('2025-06-03')), +PARTITION p_20250603 VALUES [('2025-06-03'), ('2025-06-04')), +PARTITION p_20250604 VALUES [('2025-06-04'), ('2025-06-05')), +PARTITION p_20250605 VALUES [('2025-06-05'), ('2025-06-06')), +PARTITION p_20250606 VALUES [('2025-06-06'), ('2025-06-07')), +PARTITION p_20250607 VALUES [('2025-06-07'), ('2025-06-08')), +PARTITION p_20250608 VALUES [('2025-06-08'), ('2025-06-09')), +PARTITION p_20250609 VALUES [('2025-06-09'), ('2025-06-10')), +PARTITION p_20250610 VALUES [('2025-06-10'), ('2025-06-11')), +PARTITION p_20250611 VALUES [('2025-06-11'), ('2025-06-12')), +PARTITION p_20250612 VALUES [('2025-06-12'), ('2025-06-13')), +PARTITION p_20250613 VALUES [('2025-06-13'), ('2025-06-14')), +PARTITION p_20250614 VALUES [('2025-06-14'), ('2025-06-15')), +PARTITION p_20250615 VALUES [('2025-06-15'), ('2025-06-16')), +PARTITION p_20250616 VALUES [('2025-06-16'), ('2025-06-17')), +PARTITION p_20250617 VALUES [('2025-06-17'), ('2025-06-18')), +PARTITION p_20250618 VALUES [('2025-06-18'), ('2025-06-19')), +PARTITION p_20250619 VALUES [('2025-06-19'), ('2025-06-20')), +PARTITION p_20250620 VALUES [('2025-06-20'), ('2025-06-21')), +PARTITION p_20250621 VALUES [('2025-06-21'), ('2025-06-22')), +PARTITION p_20250622 VALUES [('2025-06-22'), ('2025-06-23')), +PARTITION p_20250623 VALUES [('2025-06-23'), ('2025-06-24')), +PARTITION p_20250624 VALUES [('2025-06-24'), ('2025-06-25')), +PARTITION p_20250625 VALUES [('2025-06-25'), ('2025-06-26')), +PARTITION p_20250626 VALUES [('2025-06-26'), ('2025-06-27')), +PARTITION p_20250627 VALUES [('2025-06-27'), ('2025-06-28')), +PARTITION p_20250628 VALUES [('2025-06-28'), ('2025-06-29')), +PARTITION p_20250629 VALUES [('2025-06-29'), ('2025-06-30')), +PARTITION p_20250630 VALUES [('2025-06-30'), ('2025-07-01')), +PARTITION p_20250701 VALUES [('2025-07-01'), ('2025-07-02')), +PARTITION p_20250702 VALUES [('2025-07-02'), ('2025-07-03')), +PARTITION p_20250703 VALUES [('2025-07-03'), ('2025-07-04')), +PARTITION p_20250704 VALUES [('2025-07-04'), ('2025-07-05')), +PARTITION p_20250705 VALUES [('2025-07-05'), ('2025-07-06')), +PARTITION p_20250706 VALUES [('2025-07-06'), ('2025-07-07')), +PARTITION p_20250707 VALUES [('2025-07-07'), ('2025-07-08')), +PARTITION p_20250708 VALUES [('2025-07-08'), ('2025-07-09')), +PARTITION p_20250709 VALUES [('2025-07-09'), ('2025-07-10')), +PARTITION p_20250710 VALUES [('2025-07-10'), ('2025-07-11')), +PARTITION p_20250711 VALUES [('2025-07-11'), ('2025-07-12')), +PARTITION p_20250712 VALUES [('2025-07-12'), ('2025-07-13')), +PARTITION p_20250713 VALUES [('2025-07-13'), ('2025-07-14')), +PARTITION p_20250714 VALUES [('2025-07-14'), ('2025-07-15')), +PARTITION p_20250715 VALUES [('2025-07-15'), ('2025-07-16')), +PARTITION p_20250716 VALUES [('2025-07-16'), ('2025-07-17')), +PARTITION p_20250717 VALUES [('2025-07-17'), ('2025-07-18')), +PARTITION p_20250718 VALUES [('2025-07-18'), ('2025-07-19')), +PARTITION p_20250719 VALUES [('2025-07-19'), ('2025-07-20')), +PARTITION p_20250720 VALUES [('2025-07-20'), ('2025-07-21')), +PARTITION p_20250721 VALUES [('2025-07-21'), ('2025-07-22')), +PARTITION p_20250722 VALUES [('2025-07-22'), ('2025-07-23')), +PARTITION p_20250723 VALUES [('2025-07-23'), ('2025-07-24')), +PARTITION p_20250724 VALUES [('2025-07-24'), ('2025-07-25')), +PARTITION p_20250725 VALUES [('2025-07-25'), ('2025-07-26')), +PARTITION p_20250726 VALUES [('2025-07-26'), ('2025-07-27'))) +DISTRIBUTED BY HASH(`ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "DAY", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-180", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "p_", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "true", +"dynamic_partition.history_partition_num" = "-1", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE ods_rollserv_user_r; +CREATE TABLE `ods_rollserv_user_r` ( + `game_id` int NULL, + `server_id` int NULL, + `user_account` varchar(64) NULL, + `role_id` varchar(64) NULL, + `role_name` varchar(64) NULL, + `job` int NULL, + `level` int NULL, + `exp` bigint NULL, + `relevel` int NULL, + `platform_id` varchar(64) NULL +) ENGINE=OLAP +DUPLICATE KEY(`game_id`, `server_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE ods_server_user; +CREATE TABLE `ods_server_user` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(64) NOT NULL, + `role_id` varchar(64) NULL, + `role_name` varchar(64) NULL, + `platform_id` varchar(64) NULL, + `create_time` datetime NULL, + `ds` date NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"function_column.sequence_type" = "int", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_user; +CREATE TABLE `ods_user` ( + `game_id` int NOT NULL, + `user_account` varchar(64) NOT NULL, + `role_id` varchar(64) NULL, + `role_name` varchar(64) NULL, + `server_id` int NULL, + `platform_id` varchar(64) NULL, + `create_time` datetime NULL, + `ds` date NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"function_column.sequence_type" = "int", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_user_profile_login; +CREATE TABLE `ods_user_profile_login` ( + `appid` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `app_ver` varchar(64) NULL, + `channel` varchar(64) NULL, + `device_lang` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `device_height` int NULL, + `device_width` int NULL, + `ip` varchar(64) NULL, + `net_type` varchar(64) NULL, + `user_id` int NULL, + `event_time` datetime NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `device_id`, `ds`) +DISTRIBUTED BY HASH(`appid`, `device_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_user_profile_lt; +CREATE TABLE `ods_user_profile_lt` ( + `account` varchar(64) NOT NULL, + `game_id` int NOT NULL, + `_update_time_` datetime NOT NULL, + `total_order` bigint NULL, + `total_payment` bigint NULL, + `total_played` int NULL, + `first_login` datetime NULL, + `last_login` datetime NULL, + `gd` int NULL, + `sd` int NULL, + `ld` int NULL, + `score` decimal(10,2) NULL +) ENGINE=OLAP +UNIQUE KEY(`account`, `game_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_user_profile_player; +CREATE TABLE `ods_user_profile_player` ( + `account` varchar(64) NOT NULL, + `game_id` int NOT NULL, + `_update_time_` datetime NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`account`, `game_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_xqhuyu_order; +CREATE TABLE `ods_xqhuyu_order` ( + `game_id` int NOT NULL, + `order_id` varchar(64) NOT NULL, + `status` int NOT NULL, + `user_account` varchar(64) NULL, + `role_id` varchar(64) NULL, + `server_id` int NULL, + `platform_id` varchar(64) NULL, + `product_id` varchar(64) NULL, + `amount` bigint NULL, + `create_time` datetime NULL, + `ds` date NULL, + `receive_time` datetime NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `order_id`, `status`) +DISTRIBUTED BY HASH(`game_id`, `order_id`, `status`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_1st_payment; +CREATE TABLE `rpt_1st_payment` ( + `game_id` int NOT NULL, + `server_id` bigint NOT NULL, + `ds` date NOT NULL, + `total_account` bigint NULL, + `total_amount` bigint NULL, + `newly_account` bigint NULL, + `newly_amount` bigint NULL, + `avg_paytime` bigint NULL, + `median_paytime` bigint NULL, + `mode_paytime` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_1st_payment_r; +CREATE TABLE `rpt_1st_payment_r` ( + `game_id` int NOT NULL, + `server_id` bigint NOT NULL, + `ds` date NOT NULL, + `hm` varchar(64) NOT NULL, + `total_account` bigint NULL, + `total_amount` bigint NULL, + `newly_account` bigint NULL, + `newly_amount` bigint NULL, + `hh` varchar(64) NULL, + `avg_paytime` bigint NULL, + `median_paytime` bigint NULL, + `mode_paytime` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`, `hm`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_biz_statis_d; +CREATE TABLE `rpt_biz_statis_d` ( + `game_id` int NOT NULL, + `ds` date NOT NULL, + `newly_gm` bigint NULL, + `newly_game` bigint NULL, + `newly_server` bigint NULL, + `stoped_server` bigint NULL, + `gm` bigint NULL, + `game` bigint NULL, + `server` bigint NULL, + `merge_server` bigint NULL, + `box_game_num` bigint NULL, + `uo_game_num` bigint NULL, + `cs_game_num` bigint NULL, + `free_server` bigint NULL, + `total_server` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `ds`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_ltv_reg; +CREATE TABLE `rpt_ltv_reg` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `ds` date NULL, + `num` bigint NULL, + `ltv1` bigint NULL, + `ltv2` bigint NULL, + `ltv3` bigint NULL, + `ltv4` bigint NULL, + `ltv5` bigint NULL, + `ltv6` bigint NULL, + `ltv7` bigint NULL, + `ltv8` bigint NULL, + `ltv9` bigint NULL, + `ltv10` bigint NULL, + `ltv11` bigint NULL, + `ltv12` bigint NULL, + `ltv13` bigint NULL, + `ltv14` bigint NULL, + `ltv15` bigint NULL, + `ltv16` bigint NULL, + `ltv17` bigint NULL, + `ltv18` bigint NULL, + `ltv19` bigint NULL, + `ltv20` bigint NULL, + `ltv21` bigint NULL, + `ltv22` bigint NULL, + `ltv23` bigint NULL, + `ltv24` bigint NULL, + `ltv25` bigint NULL, + `ltv26` bigint NULL, + `ltv27` bigint NULL, + `ltv28` bigint NULL, + `ltv29` bigint NULL, + `ltv30` bigint NULL, + `ltv31` bigint NULL, + `ltv45` bigint NULL, + `ltv60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_ltv_role; +CREATE TABLE `rpt_ltv_role` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `ltv1` bigint NULL, + `ltv2` bigint NULL, + `ltv3` bigint NULL, + `ltv4` bigint NULL, + `ltv5` bigint NULL, + `ltv6` bigint NULL, + `ltv7` bigint NULL, + `ltv8` bigint NULL, + `ltv9` bigint NULL, + `ltv10` bigint NULL, + `ltv11` bigint NULL, + `ltv12` bigint NULL, + `ltv13` bigint NULL, + `ltv14` bigint NULL, + `ltv15` bigint NULL, + `ltv16` bigint NULL, + `ltv17` bigint NULL, + `ltv18` bigint NULL, + `ltv19` bigint NULL, + `ltv20` bigint NULL, + `ltv21` bigint NULL, + `ltv22` bigint NULL, + `ltv23` bigint NULL, + `ltv24` bigint NULL, + `ltv25` bigint NULL, + `ltv26` bigint NULL, + `ltv27` bigint NULL, + `ltv28` bigint NULL, + `ltv29` bigint NULL, + `ltv30` bigint NULL, + `ltv31` bigint NULL, + `ltv45` bigint NULL, + `ltv60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_payment_distribution; +CREATE TABLE `rpt_payment_distribution` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `ds` date NOT NULL, + `dt` int NOT NULL, + `total_account` bigint NULL, + `payment_account` bigint NULL, + `range1` bigint NULL, + `range2` bigint NULL, + `range3` bigint NULL, + `range4` bigint NULL, + `range5` bigint NULL, + `range6` bigint NULL, + `range7` bigint NULL, + `range8` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`, `dt`) +DISTRIBUTED BY HASH(`dt`, `ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_platform_statis_d; +CREATE TABLE `rpt_platform_statis_d` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `ds` date NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `login_account` bigint NULL, + `total_order` bigint NULL, + `payment_order` bigint NULL, + `payment_account` bigint NULL, + `payment_amount` bigint NULL, + `newly_payment_order` bigint NULL, + `newly_payment_account` bigint NULL, + `newly_payment_amount` bigint NULL, + `cm_newly_account` bigint NULL, + `cm_payment_amount` bigint NULL, + `box_payment_order` bigint NULL, + `box_payment_account` bigint NULL, + `box_payment_amount` bigint NULL, + `total_amount` bigint NULL, + `total_account` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_platform_statis_m; +CREATE TABLE `rpt_platform_statis_m` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `ds` date NOT NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `login_account` bigint NULL, + `total_order` bigint NULL, + `payment_order` bigint NULL, + `payment_account` bigint NULL, + `payment_amount` bigint NULL, + `newly_payment_order` bigint NULL, + `newly_payment_account` bigint NULL, + `newly_payment_amount` bigint NULL, + `cm_newly_account` bigint NULL, + `cm_payment_amount` bigint NULL, + `box_payment_order` bigint NULL, + `box_payment_account` bigint NULL, + `box_payment_amount` bigint NULL, + `total_amount` bigint NULL, + `total_account` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_platform_statis_r; +CREATE TABLE `rpt_platform_statis_r` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `ds` date NOT NULL, + `hh` varchar(10) NULL, + `hm` varchar(10) NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `login_account` bigint NULL, + `total_order` bigint NULL, + `payment_order` bigint NULL, + `payment_account` bigint NULL, + `payment_amount` bigint NULL, + `newly_payment_order` bigint NULL, + `newly_payment_account` bigint NULL, + `newly_payment_amount` bigint NULL, + `cm_newly_account` bigint NULL, + `cm_payment_amount` bigint NULL, + `box_payment_order` bigint NULL, + `box_payment_account` bigint NULL, + `box_payment_amount` bigint NULL, + `total_amount` bigint NULL, + `total_account` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_platform_statis_rt; +CREATE TABLE `rpt_platform_statis_rt` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `ds` date NOT NULL, + `hh` varchar(10) NULL, + `hm` varchar(10) NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `login_account` bigint NULL, + `total_order` bigint NULL, + `payment_order` bigint NULL, + `payment_account` bigint NULL, + `payment_amount` bigint NULL, + `newly_payment_order` bigint NULL, + `newly_payment_account` bigint NULL, + `newly_payment_amount` bigint NULL, + `cm_newly_account` bigint NULL, + `cm_payment_amount` bigint NULL, + `box_payment_order` bigint NULL, + `box_payment_account` bigint NULL, + `box_payment_amount` bigint NULL, + `total_amount` bigint NULL, + `total_account` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_platform_statis_w; +CREATE TABLE `rpt_platform_statis_w` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `ds` date NOT NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `login_account` bigint NULL, + `total_order` bigint NULL, + `payment_order` bigint NULL, + `payment_account` bigint NULL, + `payment_amount` bigint NULL, + `newly_payment_order` bigint NULL, + `newly_payment_account` bigint NULL, + `newly_payment_amount` bigint NULL, + `cm_newly_account` bigint NULL, + `cm_payment_amount` bigint NULL, + `box_payment_order` bigint NULL, + `box_payment_account` bigint NULL, + `box_payment_amount` bigint NULL, + `total_amount` bigint NULL, + `total_account` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_reflux_user; +CREATE TABLE `rpt_reflux_user` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd7` bigint NULL, + `rd14` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_act; +CREATE TABLE `rpt_retention_act` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_act_m; +CREATE TABLE `rpt_retention_act_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_act_w; +CREATE TABLE `rpt_retention_act_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_active_role_d; +CREATE TABLE `rpt_retention_active_role_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_active_role_m; +CREATE TABLE `rpt_retention_active_role_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_active_role_w; +CREATE TABLE `rpt_retention_active_role_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_apr_d; +CREATE TABLE `rpt_retention_apr_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_apr_m; +CREATE TABLE `rpt_retention_apr_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_apr_w; +CREATE TABLE `rpt_retention_apr_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_apu; +CREATE TABLE `rpt_retention_apu` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_apu_m; +CREATE TABLE `rpt_retention_apu_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_apu_w; +CREATE TABLE `rpt_retention_apu_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_role_d; +CREATE TABLE `rpt_retention_newly_role_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_role_m; +CREATE TABLE `rpt_retention_newly_role_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_role_w; +CREATE TABLE `rpt_retention_newly_role_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npa_repay; +CREATE TABLE `rpt_retention_npa_repay` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `dt` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `dt`) +DISTRIBUTED BY HASH(`dt`, `ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npr_d; +CREATE TABLE `rpt_retention_npr_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npr_m; +CREATE TABLE `rpt_retention_npr_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npr_w; +CREATE TABLE `rpt_retention_npr_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npu; +CREATE TABLE `rpt_retention_npu` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npu_m; +CREATE TABLE `rpt_retention_npu_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npu_w; +CREATE TABLE `rpt_retention_npu_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_reg; +CREATE TABLE `rpt_retention_reg` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_reg_m; +CREATE TABLE `rpt_retention_reg_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_reg_w; +CREATE TABLE `rpt_retention_reg_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_repay_d; +CREATE TABLE `rpt_retention_repay_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_1st_payment_r; +CREATE TABLE `rpt_union_1st_payment_r` ( + `game_id` int NOT NULL, + `server_id` bigint NOT NULL, + `ds` date NOT NULL, + `hm` varchar(64) NOT NULL, + `total_account` bigint NULL, + `total_amount` bigint NULL, + `newly_account` bigint NULL, + `newly_amount` bigint NULL, + `hh` varchar(64) NULL, + `avg_paytime` bigint NULL, + `median_paytime` bigint NULL, + `mode_paytime` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`, `hm`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_ltv; +CREATE TABLE `rpt_union_oper_ltv` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `ltv1` bigint NULL, + `ltv2` bigint NULL, + `ltv3` bigint NULL, + `ltv4` bigint NULL, + `ltv5` bigint NULL, + `ltv6` bigint NULL, + `ltv7` bigint NULL, + `ltv8` bigint NULL, + `ltv9` bigint NULL, + `ltv10` bigint NULL, + `ltv11` bigint NULL, + `ltv12` bigint NULL, + `ltv13` bigint NULL, + `ltv14` bigint NULL, + `ltv15` bigint NULL, + `ltv16` bigint NULL, + `ltv17` bigint NULL, + `ltv18` bigint NULL, + `ltv19` bigint NULL, + `ltv20` bigint NULL, + `ltv21` bigint NULL, + `ltv22` bigint NULL, + `ltv23` bigint NULL, + `ltv24` bigint NULL, + `ltv25` bigint NULL, + `ltv26` bigint NULL, + `ltv27` bigint NULL, + `ltv28` bigint NULL, + `ltv29` bigint NULL, + `ltv30` bigint NULL, + `ltv31` bigint NULL, + `ltv45` bigint NULL, + `ltv60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_reflux_user; +CREATE TABLE `rpt_union_oper_reflux_user` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd7` bigint NULL, + `rd14` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_act_d; +CREATE TABLE `rpt_union_oper_retention_act_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd31` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_act_m; +CREATE TABLE `rpt_union_oper_retention_act_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `ltv1` bigint NULL, + `ltv2` bigint NULL, + `ltv3` bigint NULL, + `ltv4` bigint NULL, + `ltv5` bigint NULL, + `ltv6` bigint NULL, + `ltv7` bigint NULL, + `ltv8` bigint NULL, + `ltv9` bigint NULL, + `ltv10` bigint NULL, + `ltv11` bigint NULL, + `ltv12` bigint NULL, + `ltv13` bigint NULL, + `ltv14` bigint NULL, + `ltv15` bigint NULL, + `ltv16` bigint NULL, + `ltv17` bigint NULL, + `ltv18` bigint NULL, + `ltv19` bigint NULL, + `ltv20` bigint NULL, + `ltv21` bigint NULL, + `ltv22` bigint NULL, + `ltv23` bigint NULL, + `ltv24` bigint NULL, + `ltv25` bigint NULL, + `ltv26` bigint NULL, + `ltv27` bigint NULL, + `ltv28` bigint NULL, + `ltv29` bigint NULL, + `ltv30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_act_w; +CREATE TABLE `rpt_union_oper_retention_act_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_apu_d; +CREATE TABLE `rpt_union_oper_retention_apu_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_apu_m; +CREATE TABLE `rpt_union_oper_retention_apu_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_apu_w; +CREATE TABLE `rpt_union_oper_retention_apu_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_npu_d; +CREATE TABLE `rpt_union_oper_retention_npu_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `ltv1` bigint NULL, + `ltv2` bigint NULL, + `ltv3` bigint NULL, + `ltv4` bigint NULL, + `ltv5` bigint NULL, + `ltv6` bigint NULL, + `ltv7` bigint NULL, + `ltv8` bigint NULL, + `ltv9` bigint NULL, + `ltv10` bigint NULL, + `ltv11` bigint NULL, + `ltv12` bigint NULL, + `ltv13` bigint NULL, + `ltv14` bigint NULL, + `ltv15` bigint NULL, + `ltv16` bigint NULL, + `ltv17` bigint NULL, + `ltv18` bigint NULL, + `ltv19` bigint NULL, + `ltv20` bigint NULL, + `ltv21` bigint NULL, + `ltv22` bigint NULL, + `ltv23` bigint NULL, + `ltv24` bigint NULL, + `ltv25` bigint NULL, + `ltv26` bigint NULL, + `ltv27` bigint NULL, + `ltv28` bigint NULL, + `ltv29` bigint NULL, + `ltv30` bigint NULL, + `ltv31` bigint NULL, + `ltv45` bigint NULL, + `ltv60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_npu_m; +CREATE TABLE `rpt_union_oper_retention_npu_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `ltv1` bigint NULL, + `ltv2` bigint NULL, + `ltv3` bigint NULL, + `ltv4` bigint NULL, + `ltv5` bigint NULL, + `ltv6` bigint NULL, + `ltv7` bigint NULL, + `ltv8` bigint NULL, + `ltv9` bigint NULL, + `ltv10` bigint NULL, + `ltv11` bigint NULL, + `ltv12` bigint NULL, + `ltv13` bigint NULL, + `ltv14` bigint NULL, + `ltv15` bigint NULL, + `ltv16` bigint NULL, + `ltv17` bigint NULL, + `ltv18` bigint NULL, + `ltv19` bigint NULL, + `ltv20` bigint NULL, + `ltv21` bigint NULL, + `ltv22` bigint NULL, + `ltv23` bigint NULL, + `ltv24` bigint NULL, + `ltv25` bigint NULL, + `ltv26` bigint NULL, + `ltv27` bigint NULL, + `ltv28` bigint NULL, + `ltv29` bigint NULL, + `ltv30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_npu_w; +CREATE TABLE `rpt_union_oper_retention_npu_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_reg_d; +CREATE TABLE `rpt_union_oper_retention_reg_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_reg_m; +CREATE TABLE `rpt_union_oper_retention_reg_m` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_retention_reg_w; +CREATE TABLE `rpt_union_oper_retention_reg_w` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `ltv1` bigint NULL, + `ltv2` bigint NULL, + `ltv3` bigint NULL, + `ltv4` bigint NULL, + `ltv5` bigint NULL, + `ltv6` bigint NULL, + `ltv7` bigint NULL, + `ltv8` bigint NULL, + `ltv9` bigint NULL, + `ltv10` bigint NULL, + `ltv11` bigint NULL, + `ltv12` bigint NULL, + `ltv13` bigint NULL, + `ltv14` bigint NULL, + `ltv15` bigint NULL, + `ltv16` bigint NULL, + `ltv17` bigint NULL, + `ltv18` bigint NULL, + `ltv19` bigint NULL, + `ltv20` bigint NULL, + `ltv21` bigint NULL, + `ltv22` bigint NULL, + `ltv23` bigint NULL, + `ltv24` bigint NULL, + `ltv25` bigint NULL, + `ltv26` bigint NULL, + `ltv27` bigint NULL, + `ltv28` bigint NULL, + `ltv29` bigint NULL, + `ltv30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_statis_d; +CREATE TABLE `rpt_union_oper_statis_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `login_account` bigint NULL, + `payment_order` bigint NULL, + `payment_account` bigint NULL, + `payment_amount` bigint NULL, + `newly_payment_account` bigint NULL, + `newly_payment_amount` bigint NULL, + `cm_newly_account` bigint NULL, + `cm_payment_amount` bigint NULL, + `newly_payment_order` bigint NULL, + `main_server` bigint NULL, + `main_server_id` bigint NULL, + `newly_account_role` bigint NULL, + `role_newly_account` bigint NULL, + `max_online` bigint NULL, + `avg_online` decimal(15,2) NULL, + `total_amount` bigint NULL, + `total_account` bigint NULL, + `total_order` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_statis_m; +CREATE TABLE `rpt_union_oper_statis_m` ( + `ds` date NOT NULL, + `game_id` bigint NOT NULL, + `server_id` bigint NOT NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `login_account` bigint NULL, + `payment_order` bigint NULL, + `payment_account` bigint NULL, + `payment_amount` bigint NULL, + `newly_payment_order` bigint NULL, + `newly_payment_account` bigint NULL, + `newly_payment_amount` bigint NULL, + `cm_newly_account` bigint NULL, + `cm_payment_amount` bigint NULL, + `max_online` bigint NULL, + `avg_online` bigint NULL, + `total_amount` bigint NULL, + `total_account` bigint NULL, + `total_order` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_statis_r; +CREATE TABLE `rpt_union_oper_statis_r` ( + `ds` varchar(10) NOT NULL, + `game_id` bigint NOT NULL, + `server_id` bigint NOT NULL, + `hm` varchar(10) NOT NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `login_account` bigint NULL, + `payment_order` bigint NULL, + `payment_account` bigint NULL, + `payment_amount` bigint NULL, + `newly_payment_account` bigint NULL, + `newly_payment_amount` bigint NULL, + `cm_newly_account` bigint NULL, + `cm_payment_amount` bigint NULL, + `hh` varchar(10) NULL, + `newly_payment_order` bigint NULL, + `main_server` bigint NULL, + `main_server_id` bigint NULL, + `newly_account_role` bigint NULL, + `role_newly_account` bigint NULL, + `max_online` bigint NULL, + `avg_online` decimal(15,2) NULL, + `total_amount` bigint NULL, + `total_account` bigint NULL, + `total_order` bigint NULL, + `active_role` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `hm`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_oper_statis_rt; +CREATE TABLE `rpt_union_oper_statis_rt` ( + `game_id` bigint NOT NULL, + `server_id` bigint NOT NULL, + `ds` date NOT NULL, + `hm` varchar(64) NOT NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `login_account` bigint NULL, + `payment_order` bigint NULL, + `payment_account` bigint NULL, + `payment_amount` bigint NULL, + `newly_payment_account` bigint NULL, + `newly_payment_amount` bigint NULL, + `cm_newly_account` bigint NULL, + `cm_payment_amount` bigint NULL, + `newly_payment_order` bigint NULL, + `hh` varchar(64) NULL, + `main_server` bigint NULL, + `main_server_id` bigint NULL, + `newly_account_role` bigint NULL, + `role_newly_account` bigint NULL, + `total_amount` bigint NULL, + `total_account` bigint NULL, + `total_order` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `ds`, `hm`) +DISTRIBUTED BY HASH(`game_id`, `server_id`, `ds`, `hm`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_payment_distribution; +CREATE TABLE `rpt_union_payment_distribution` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `dt` int NOT NULL, + `total_account` bigint NULL, + `payment_account` bigint NULL, + `range1` bigint NULL, + `range2` bigint NULL, + `range3` bigint NULL, + `range4` bigint NULL, + `range5` bigint NULL, + `range6` bigint NULL, + `range7` bigint NULL, + `range8` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `dt`) +DISTRIBUTED BY HASH(`dt`, `ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_retention_npa_repay; +CREATE TABLE `rpt_union_retention_npa_repay` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `dt` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`, `dt`) +DISTRIBUTED BY HASH(`dt`, `ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_union_retention_repay_d; +CREATE TABLE `rpt_union_retention_repay_d` ( + `ds` date NOT NULL, + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `game_id`, `server_id`) +DISTRIBUTED BY HASH(`ds`, `game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE tab_spend; +CREATE TABLE `tab_spend` ( + `id` int NOT NULL COMMENT "自增主键", + `user_id` int NOT NULL COMMENT " 用户ID", + `user_account` varchar(50) NULL COMMENT "用户账号", + `user_nickname` varchar(30) NULL COMMENT "用户昵称", + `game_id` int NOT NULL COMMENT "游戏id", + `game_appid` varchar(32) NULL COMMENT "游戏appid", + `game_name` varchar(30) NULL COMMENT "游戏名称", + `server_id` varchar(50) NULL COMMENT "区服id", + `server_name` varchar(30) NULL COMMENT "区服名称", + `game_player_id` varchar(50) NULL COMMENT "玩家游戏内id", + `game_player_name` varchar(100) NULL COMMENT "游戏玩家昵称", + `promote_id` int NOT NULL COMMENT "推广员id", + `promote_account` varchar(30) NULL COMMENT "推广员账号", + `order_number` varchar(100) NULL COMMENT "订单号", + `pay_order_number` varchar(100) NULL COMMENT "支付订单号", + `props_name` varchar(30) NULL COMMENT "道具名称", + `pay_amount` decimal(10,2) NULL COMMENT "支付金额", + `pay_time` int NULL COMMENT "支付时间", + `pay_status` tinyint NULL COMMENT "支付状态", + `pay_game_status` tinyint NULL COMMENT "游戏支付状态", + `extend` varchar(150) NULL COMMENT "通知游戏方扩展(一般是游戏方透传)", + `pay_way` tinyint NULL, + `spend_ip` varchar(50) NULL COMMENT "支付IP", + `settle_check` tinyint NOT NULL DEFAULT "0" COMMENT "渠道结算 0未结算 1 已结算", + `selle_status` int NOT NULL DEFAULT "0" COMMENT "CP结算 0未结算1 结算", + `selle_ratio` decimal(5,2) NULL DEFAULT "0.00" COMMENT "cp分成比例", + `sub_status` int NOT NULL DEFAULT "0" COMMENT "子渠道结算状态", + `selle_time` varchar(30) NULL COMMENT "cp结算时间", + `sdk_version` tinyint NULL COMMENT "区别sdk版本1安卓 2苹果 ", + `cost` decimal(10,2) NULL COMMENT "原价", + `discount_type` int NULL DEFAULT "0" COMMENT "0:无折扣 1:首冲 2:续冲", + `auto_compensation` int NULL DEFAULT "0" COMMENT "自动补单次数", + `diamond` varchar(255) NOT NULL DEFAULT "0" COMMENT "元宝", + `payplatform2cp` varchar(128) NULL COMMENT "游戏方透传参数,目前是存了货币id,用于发货", + `platform_id` int NULL COMMENT "渠道号", + `settle_ratio_id` int NOT NULL DEFAULT "0" COMMENT "结算单id", + `pay_game_amount` decimal(10,2) NULL COMMENT "通知游戏金额", + `settle_state` tinyint NOT NULL DEFAULT "0" COMMENT "结算状态(0未结算 1打款中 2已打款)", + `ratio_state` tinyint NOT NULL DEFAULT "0" COMMENT "是否返点 0未返点 1打款中 2已打款", + `is_box_pay` tinyint NOT NULL DEFAULT "0" COMMENT "是否是盒子充值 1盒子直充游戏 2盒子余额", + `create_time` int NOT NULL DEFAULT "0" COMMENT "下单时间", + `pay_company` varchar(20) NULL DEFAULT "xianqu" COMMENT "付款公司", + `live_no` int NOT NULL DEFAULT "0" COMMENT "进入游戏的直播房间号", + `scene` tinyint NOT NULL DEFAULT "1" COMMENT "订单场景:0其他,1banner,2直播,3新游,4找服,5开服列表,6排行榜,7语音房", + `main_server_id` int NOT NULL DEFAULT "0", + `refund_type` tinyint NULL DEFAULT "0" COMMENT "退款状态(0 未退款,1 已退款)", + `ticket_type` tinyint NULL DEFAULT "0", + `pay_uid` varchar(200) NULL +) ENGINE=OLAP +UNIQUE KEY(`id`) +DISTRIBUTED BY HASH(`id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE yin_tmp; +CREATE TABLE `yin_tmp` ( + `game_id` int NOT NULL, + `server_id` int NULL, + `tt` int NULL, + `tt2` int NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE yin_tmp_game_server; +CREATE TABLE `yin_tmp_game_server` ( + `game_id` int NOT NULL, + `id` int NOT NULL, + `mid` int NULL, + `name` varchar(50) NULL, + `isconfirm` tinyint NULL, + `del` tinyint NULL, + `state` tinyint NULL, + `open_time` int NULL, + `space_id` int NULL, + `space_type` tinyint NULL, + `engine_version` varchar(255) NULL, + `server_type` varchar(16) NULL, + `kuafu_game_id` varchar(20) NULL +) ENGINE=OLAP +DUPLICATE KEY(`game_id`, `id`, `mid`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 10 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); \ No newline at end of file diff --git a/996/doirs/dhsf_engine_ods.sql b/996/doirs/dhsf_engine_ods.sql new file mode 100644 index 0000000..e26af30 --- /dev/null +++ b/996/doirs/dhsf_engine_ods.sql @@ -0,0 +1,138 @@ +CREATE TABLE ods_game_order ( +game_id int NOT NULL, +order_id VARCHAR NOT NULL, +status int NOT NULL, +user_account VARCHAR, +role_id VARCHAR, +server_id int, +platform_id VARCHAR, +product_id VARCHAR, +amount bigint, +create_time DATETIME, +ds VARCHAR, +receive_time DATETIME +) +UNIQUE KEY (game_id, order_id, status) DISTRIBUTED BY HASH (game_id) BUCKETS 32; + +CREATE TABLE ods_order_history ( +id bigint NOT NULL, +orderid VARCHAR NOT NULL, +account VARCHAR, +platformid VARCHAR, +serverid bigint, +username VARCHAR, +roleid VARCHAR, +money bigint, +yuanbao bigint, +goods bigint, +level bigint, +`time` bigint, +gid bigint +) +UNIQUE KEY (id, orderid) DISTRIBUTED BY HASH (id) BUCKETS 32; + + +drop TABLE ods_role; +CREATE TABLE ods_role ( +game_id int NOT NULL, +server_id int NOT NULL, +role_id VARCHAR NOT NULL, +user_account VARCHAR, +role_name VARCHAR, +job int, +level int, +exp bigint, +relevel int, +platform_id VARCHAR, +create_time DATETIME, +ds date, +main_server_id int, +update_time DATETIME, +is_del int +) +UNIQUE KEY (game_id, server_id, role_id) DISTRIBUTED BY HASH (game_id) BUCKETS 32; + + +CREATE TABLE ods_role_duration ( +game_id int NOT NULL, +server_id int NOT NULL, +role_id VARCHAR NOT NULL, +create_time DATETIME NOT NULL, + +user_account VARCHAR, +duration int, +level int, +role_name VARCHAR +) +UNIQUE KEY (game_id, server_id, role_id, create_time) DISTRIBUTED BY HASH (game_id) BUCKETS 32; + + + +CREATE TABLE ods_rollserv_user ( +game_id int, +server_id int, +user_account VARCHAR, +role_id VARCHAR, +role_name VARCHAR, +job int, +level int, +exp bigint, +relevel int, +platform_id VARCHAR, +create_time DATETIME, +ds date NOT NULL +) +ENGINE=OLAP +PARTITION BY RANGE(`ds`) () DISTRIBUTED BY HASH (ds) BUCKETS 32 PROPERTIES + ( + "min_load_replica_num" = "-1", + "dynamic_partition.enable" = "true", + "dynamic_partition.time_unit" = "DAY", + "dynamic_partition.time_zone" = "Asia/Shanghai", + "dynamic_partition.start" = "-180", + "dynamic_partition.end" = "3", + "dynamic_partition.buckets" = "32", + "dynamic_partition.create_history_partition" = "true", + "dynamic_partition.prefix" = "p_", + "storage_medium" = "hdd" +); + + +CREATE TABLE ods_rollserv_user_r ( +game_id int, +server_id int, +user_account VARCHAR, +role_id VARCHAR, +role_name VARCHAR, +job int, +level int, +exp bigint, +relevel int, +platform_id VARCHAR +) + DISTRIBUTED BY HASH (game_id) BUCKETS 32 ; + + + CREATE TABLE ods_user_profile_lt ( +account VARCHAR NOT NULL, +game_id int NOT NULL, +_update_time_ DATETIME NOT NULL, +total_order bigint, +total_payment bigint, +total_played int, +first_login DATETIME, +last_login DATETIME, +gd int, +sd int, +ld int, +score DECIMAL(10,2) +) +UNIQUE KEY (account, game_id) DISTRIBUTED BY HASH (game_id) BUCKETS 32; + + +CREATE TABLE ods_user_profile_player ( +account VARCHAR NOT NULL, +game_id int NOT NULL, +_update_time_ DATETIME NOT NULL +) +UNIQUE KEY (account, game_id) DISTRIBUTED BY HASH ( game_id) BUCKETS 32; \ No newline at end of file diff --git a/996/doirs/sdk_statis.sql b/996/doirs/sdk_statis.sql index f4ffb89..b04f223 100644 --- a/996/doirs/sdk_statis.sql +++ b/996/doirs/sdk_statis.sql @@ -1,239 +1,5229 @@ -CREATE TABLE ods_active_account ( -appid bigint NOT NULL, -channel VARCHAR(64) NOT NULL, -user_id VARCHAR(64) NOT NULL, -ds VARCHAR(64) NOT NULL, -gmid bigint, -app_ver VARCHAR(64), -sdk_ver VARCHAR(64), -country VARCHAR(64), -province VARCHAR(64), -city VARCHAR(64), -isp VARCHAR(64), -ip VARCHAR(64), -device_width int, -device_height int, -device_id VARCHAR(64), -device_lang VARCHAR(64), -device_model VARCHAR(64), -device_brand VARCHAR(64), -device_os VARCHAR(64), -device_type VARCHAR(64), -event_time bigint, -servid VARCHAR(64), -role_id VARCHAR(64) -) -UNIQUE KEY (appid, channel, user_id, ds) DISTRIBUTED BY HASH (appid, channel, user_id, ds) BUCKETS 32; - - -CREATE TABLE ods_active_device ( -appid bigint NOT NULL, -device_id VARCHAR(64) NOT NULL, -channel VARCHAR(64) NOT NULL, -ds VARCHAR(64) NOT NULL, -gmid bigint, -app_ver VARCHAR(64), -sdk_ver VARCHAR(64), -country VARCHAR(64), -province VARCHAR(64), -city VARCHAR(64), -isp VARCHAR(64), -ip VARCHAR(64), -device_width int, -device_height int, -device_lang VARCHAR(64), -device_model VARCHAR(64), -device_brand VARCHAR(64), -device_os VARCHAR(64), -device_type VARCHAR(64), -event_time bigint, -user_id VARCHAR(64), -servid VARCHAR(64), -role_id VARCHAR(64) -) -UNIQUE KEY (appid, device_id, channel, ds) DISTRIBUTED BY HASH (appid, device_id, channel, ds) BUCKETS 32; - - -CREATE TABLE ods_active_role ( -appid bigint NOT NULL, -channel VARCHAR(64) NOT NULL, -role_id VARCHAR(64) NOT NULL, -ds VARCHAR(64) NOT NULL, -gmid bigint, -app_ver VARCHAR(64), -sdk_ver VARCHAR(64), -country VARCHAR(64), -province VARCHAR(64), -city VARCHAR(64), -isp VARCHAR(64), -ip VARCHAR(64), -device_id VARCHAR(64), -device_model VARCHAR(64), -device_brand VARCHAR(64), -device_os VARCHAR(64), -device_type VARCHAR(64), -event_time bigint, -user_id VARCHAR(64), -servid VARCHAR(64), -job_id VARCHAR(64), -role_level VARCHAR(64), -role_name VARCHAR(64), -job_name VARCHAR(64), -server_name VARCHAR(64) -) -UNIQUE KEY (appid, channel, role_id, ds) DISTRIBUTED BY HASH (appid, channel, role_id, ds) BUCKETS 32; - - -CREATE TABLE ods_newly_account ( -appid bigint NOT NULL, -user_id VARCHAR(64) NOT NULL, -gmid bigint, -app_ver VARCHAR(64), -sdk_ver VARCHAR(64), -channel VARCHAR(64), -country VARCHAR(64), -province VARCHAR(64), -city VARCHAR(64), -isp VARCHAR(64), -ip VARCHAR(64), -device_width int, -device_height int, -device_id VARCHAR(64), -device_lang VARCHAR(64), -device_model VARCHAR(64), -device_brand VARCHAR(64), -device_os VARCHAR(64), -device_type VARCHAR(64), -event_time bigint, -ds VARCHAR(64) NOT NULL -) -UNIQUE KEY (appid, user_id) DISTRIBUTED BY HASH (appid, user_id) BUCKETS 32; - - - -CREATE TABLE ods_newly_device ( - appid bigint NOT NULL, - device_id VARCHAR(64) NOT NULL, -gmid bigint, -app_ver VARCHAR(64), -sdk_ver VARCHAR(64), -channel VARCHAR(64), -country VARCHAR(64), -province VARCHAR(64), -city VARCHAR(64), -isp VARCHAR(64), -ip VARCHAR(64), -device_width int, -device_height int, -device_lang VARCHAR(64), -device_model VARCHAR(64), -device_brand VARCHAR(64), -device_os VARCHAR(64), -device_type VARCHAR(64), -event_time bigint, -user_id VARCHAR(64), -ds VARCHAR(64) NOT NULL -) -UNIQUE KEY (appid, device_id) DISTRIBUTED BY HASH (appid, device_id) BUCKETS 32; - - -CREATE TABLE ods_newly_role ( - appid bigint NOT NULL, - - role_id VARCHAR(64) NOT NULL, -gmid bigint, -app_ver VARCHAR(64), -sdk_ver VARCHAR(64), -channel VARCHAR(64), -country VARCHAR(64), -province VARCHAR(64), -city VARCHAR(64), -isp VARCHAR(64), -ip VARCHAR(64), -device_id VARCHAR(64), -device_model VARCHAR(64), -device_brand VARCHAR(64), -device_os VARCHAR(64), -device_type VARCHAR(64), -event_time bigint, -user_id VARCHAR(64), -servid VARCHAR(64), - -ds VARCHAR(64) NOT NULL, -job_id VARCHAR(64), -role_level VARCHAR(64), -role_name VARCHAR(64), -job_name VARCHAR(64), -server_name VARCHAR(64) -) -UNIQUE KEY (appid, role_id) DISTRIBUTED BY HASH (appid, role_id) BUCKETS 32; - - -CREATE TABLE ods_payment_object ( -appid bigint NOT NULL, -channel VARCHAR(64) NOT NULL, -typd VARCHAR(64) NOT NULL, -typv VARCHAR(64) NOT NULL, -ds VARCHAR(64) NOT NULL, -gmid bigint, -app_ver VARCHAR(64), -event_time bigint -) -UNIQUE KEY (appid, channel, typd, typv, ds) DISTRIBUTED BY HASH (appid, channel, typd, typv, ds) BUCKETS 32; - - -CREATE TABLE ods_payment_order ( -appid bigint NOT NULL, -order_id VARCHAR(64) NOT NULL, -status int NOT NULL, -gmid bigint, -app_ver VARCHAR(64), -sdk_ver VARCHAR(64), -channel VARCHAR(64), -country VARCHAR(64), -province VARCHAR(64), -city VARCHAR(64), -isp VARCHAR(64), -ip VARCHAR(64), -device_id VARCHAR(64), -device_model VARCHAR(64), -device_brand VARCHAR(64), -device_os VARCHAR(64), -device_type VARCHAR(64), -event_time bigint, -user_id VARCHAR(64), -amount bigint, -platform VARCHAR(64), -servid VARCHAR(64), -role_id VARCHAR(64), -prodid VARCHAR(64), -prod_name VARCHAR(64), -ds VARCHAR(64) NOT NULL -) -UNIQUE KEY (appid, order_id, status) DISTRIBUTED BY HASH (appid, order_id, status) BUCKETS 32; - - - -CREATE TABLE game_channel ( - id VARCHAR NOT NULL, - name VARCHAR, - game_id bigint -) UNIQUE KEY (id) DISTRIBUTED BY HASH (id) BUCKETS 32; - - -CREATE TABLE gm_apply ( -id bigint NOT NULL, -name VARCHAR, -platform bigint, -status bigint, -uid bigint, -account VARCHAR, -create_time bigint, -bind_game_id bigint, -bind_type bigint, -bind_appid bigint, -bind_game_type bigint, -appid VARCHAR -) -UNIQUE KEY (id) DISTRIBUTED BY HASH (id) BUCKETS 32; - +drop TABLE ads_new_account_ltv_statis; +CREATE TABLE `ads_new_account_ltv_statis` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `new_add` bigint NULL, + `ltv1` bigint NULL, + `ltv2` bigint NULL, + `ltv3` bigint NULL, + `ltv4` bigint NULL, + `ltv5` bigint NULL, + `ltv6` bigint NULL, + `ltv7` bigint NULL, + `ltv8` bigint NULL, + `ltv9` bigint NULL, + `ltv10` bigint NULL, + `ltv11` bigint NULL, + `ltv12` bigint NULL, + `ltv13` bigint NULL, + `ltv14` bigint NULL, + `ltv15` bigint NULL, + `ltv16` bigint NULL, + `ltv17` bigint NULL, + `ltv18` bigint NULL, + `ltv19` bigint NULL, + `ltv20` bigint NULL, + `ltv21` bigint NULL, + `ltv22` bigint NULL, + `ltv23` bigint NULL, + `ltv24` bigint NULL, + `ltv25` bigint NULL, + `ltv26` bigint NULL, + `ltv27` bigint NULL, + `ltv28` bigint NULL, + `ltv29` bigint NULL, + `ltv30` bigint NULL, + `ltv31` bigint NULL, + `ltv45` bigint NULL, + `ltv60` bigint NULL, + `ltv90` bigint NULL, + `ltv120` bigint NULL, + `ltv150` bigint NULL, + `ltv180` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ads_new_device_ltv_statis; +CREATE TABLE `ads_new_device_ltv_statis` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `new_add` bigint NULL, + `ltv1` bigint NULL, + `ltv2` bigint NULL, + `ltv3` bigint NULL, + `ltv4` bigint NULL, + `ltv5` bigint NULL, + `ltv6` bigint NULL, + `ltv7` bigint NULL, + `ltv8` bigint NULL, + `ltv9` bigint NULL, + `ltv10` bigint NULL, + `ltv11` bigint NULL, + `ltv12` bigint NULL, + `ltv13` bigint NULL, + `ltv14` bigint NULL, + `ltv15` bigint NULL, + `ltv16` bigint NULL, + `ltv17` bigint NULL, + `ltv18` bigint NULL, + `ltv19` bigint NULL, + `ltv20` bigint NULL, + `ltv21` bigint NULL, + `ltv22` bigint NULL, + `ltv23` bigint NULL, + `ltv24` bigint NULL, + `ltv25` bigint NULL, + `ltv26` bigint NULL, + `ltv27` bigint NULL, + `ltv28` bigint NULL, + `ltv29` bigint NULL, + `ltv30` bigint NULL, + `ltv31` bigint NULL, + `ltv45` bigint NULL, + `ltv60` bigint NULL, + `ltv90` bigint NULL, + `ltv120` bigint NULL, + `ltv150` bigint NULL, + `ltv180` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ads_new_role_ltv_statis; +CREATE TABLE `ads_new_role_ltv_statis` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `new_add` bigint NULL, + `ltv1` bigint NULL, + `ltv2` bigint NULL, + `ltv3` bigint NULL, + `ltv4` bigint NULL, + `ltv5` bigint NULL, + `ltv6` bigint NULL, + `ltv7` bigint NULL, + `ltv8` bigint NULL, + `ltv9` bigint NULL, + `ltv10` bigint NULL, + `ltv11` bigint NULL, + `ltv12` bigint NULL, + `ltv13` bigint NULL, + `ltv14` bigint NULL, + `ltv15` bigint NULL, + `ltv16` bigint NULL, + `ltv17` bigint NULL, + `ltv18` bigint NULL, + `ltv19` bigint NULL, + `ltv20` bigint NULL, + `ltv21` bigint NULL, + `ltv22` bigint NULL, + `ltv23` bigint NULL, + `ltv24` bigint NULL, + `ltv25` bigint NULL, + `ltv26` bigint NULL, + `ltv27` bigint NULL, + `ltv28` bigint NULL, + `ltv29` bigint NULL, + `ltv30` bigint NULL, + `ltv31` bigint NULL, + `ltv45` bigint NULL, + `ltv60` bigint NULL, + `ltv90` bigint NULL, + `ltv120` bigint NULL, + `ltv150` bigint NULL, + `ltv180` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`, `channel`, `ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dtd_ltv_rollserv_account; +CREATE TABLE `dtd_ltv_rollserv_account` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `amount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_account_first_pay; +CREATE TABLE `dwd_account_first_pay` ( + `appid` bigint NOT NULL, + `user_id` varchar(64) NOT NULL, + `order_id` varchar(64) NULL, + `event_time` bigint NULL, + `ds` date NULL, + `role_level` varchar(64) NULL, + `channel` varchar(64) NULL, + `prod` varchar(64) NULL, + `amount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `user_id`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_event_analyze_role; +CREATE TABLE `dwd_event_analyze_role` ( + `appid` bigint NOT NULL, + `role_id` varchar(64) NOT NULL, + `_update_time_` datetime NULL, + `latest_level` int NULL, + `latest_active_time` int NULL, + `latest_pay_time` int NULL, + `latest_power` bigint NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `payment_amount` bigint NULL, + `payment_number` int NULL, + `latest_user_id` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `role_id`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_ltv_new_account; +CREATE TABLE `dwd_ltv_new_account` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `amount` bigint NULL, + `order` int NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_ltv_new_device; +CREATE TABLE `dwd_ltv_new_device` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `amount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_ltv_new_role; +CREATE TABLE `dwd_ltv_new_role` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `amount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `role_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_newly_account_payment; +CREATE TABLE `dwd_newly_account_payment` ( + `appid` int NULL, + `channel` varchar(64) NULL, + `user_id` varchar(64) NULL, + `servid` varchar(64) NULL, + `payment_order` int NULL, + `payment_amount` bigint NULL, + `ds` date NULL +) ENGINE=OLAP +DUPLICATE KEY(`appid`, `channel`) +DISTRIBUTED BY HASH(`ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE dwd_retention_active_account_d; +CREATE TABLE `dwd_retention_active_account_d` ( + `ds` varchar(64) NOT NULL, + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `appid`, `channel`, `user_id`, `rd`) +DISTRIBUTED BY HASH(`ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_active_account_m; +CREATE TABLE `dwd_retention_active_account_m` ( + `ds` varchar(64) NOT NULL, + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `appid`, `channel`, `user_id`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_active_account_w; +CREATE TABLE `dwd_retention_active_account_w` ( + `ds` varchar(64) NOT NULL, + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`ds`, `appid`, `channel`, `user_id`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_active_device_d; +CREATE TABLE `dwd_retention_active_device_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` varchar(64) NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_active_device_m; +CREATE TABLE `dwd_retention_active_device_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` varchar(64) NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_active_device_w; +CREATE TABLE `dwd_retention_active_device_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` varchar(64) NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_active_role; +CREATE TABLE `dwd_retention_active_role` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `dt` int NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `role_id`, `ds`, `dt`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_newly_account_d; +CREATE TABLE `dwd_retention_newly_account_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_newly_account_m; +CREATE TABLE `dwd_retention_newly_account_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_newly_account_w; +CREATE TABLE `dwd_retention_newly_account_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_newly_device_d; +CREATE TABLE `dwd_retention_newly_device_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_newly_device_m; +CREATE TABLE `dwd_retention_newly_device_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_newly_device_w; +CREATE TABLE `dwd_retention_newly_device_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_newly_role; +CREATE TABLE `dwd_retention_newly_role` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `dt` int NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `role_id`, `ds`, `dt`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_npa_repay; +CREATE TABLE `dwd_retention_npa_repay` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `dt` int NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `user_id`, `ds`, `dt`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_payment_account_d; +CREATE TABLE `dwd_retention_payment_account_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_payment_account_m; +CREATE TABLE `dwd_retention_payment_account_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_payment_account_w; +CREATE TABLE `dwd_retention_payment_account_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_payment_device_d; +CREATE TABLE `dwd_retention_payment_device_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_payment_device_m; +CREATE TABLE `dwd_retention_payment_device_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_payment_device_w; +CREATE TABLE `dwd_retention_payment_device_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `device_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_payment_role; +CREATE TABLE `dwd_retention_payment_role` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `dt` int NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `role_id`, `ds`, `dt`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dwd_retention_repay_d; +CREATE TABLE `dwd_retention_repay_d` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `rd` int NOT NULL, + `orig_channel` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `user_id`, `ds`, `rd`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dws_event_analyze_account; +CREATE TABLE `dws_event_analyze_account` ( + `appid` bigint NOT NULL, + `user_id` varchar(64) NOT NULL, + `_update_time_` datetime NOT NULL, + `channel` varchar(64) NULL, + `register_time` int NULL, + `first_create_role_time` int NULL, + `first_pay_time` int NULL, + `latest_active_time` int NULL, + `latest_pay_time` int NULL, + `total_payment` bigint NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `city_level` smallint NULL, + `area_code` varchar(64) NULL, + `var1` varchar(64) NULL, + `var2` varchar(64) NULL, + `var3` varchar(64) NULL, + `var4` varchar(64) NULL, + `var5` varchar(64) NULL, + `var6` varchar(64) NULL, + `var7` varchar(64) NULL, + `var8` varchar(64) NULL, + `var9` varchar(64) NULL, + `var10` varchar(64) NULL, + `var11` varchar(64) NULL, + `var12` varchar(64) NULL, + `var13` varchar(64) NULL, + `var14` varchar(64) NULL, + `var15` varchar(64) NULL, + `payment_number` int NULL, + `first_pay_amount` bigint NULL, + `first_pay_prod` varchar(64) NULL, + `pre_total_payment` bigint NULL, + `pre_payment_number` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `user_id`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dws_event_analyze_role; +CREATE TABLE `dws_event_analyze_role` ( + `appid` bigint NOT NULL, + `role_id` varchar(64) NOT NULL, + `user_id` varchar(64) NULL, + `job_id` varchar(64) NULL, + `create_time` int NULL, + `latest_level` int NULL, + `first_login_time` int NULL, + `first_pay_time` int NULL, + `latest_active_time` int NULL, + `latest_pay_time` int NULL, + `total_payment` bigint NULL, + `server_id` varchar(64) NULL, + `role_name` varchar(64) NULL, + `server_name` varchar(64) NULL, + `latest_power` bigint NULL, + `var1` varchar(64) NULL, + `var2` varchar(64) NULL, + `var3` varchar(64) NULL, + `var4` varchar(64) NULL, + `var5` varchar(64) NULL, + `var6` varchar(64) NULL, + `var7` varchar(64) NULL, + `var8` varchar(64) NULL, + `var9` varchar(64) NULL, + `var10` varchar(64) NULL, + `var11` varchar(64) NULL, + `var12` varchar(64) NULL, + `var13` varchar(64) NULL, + `var14` varchar(64) NULL, + `var15` varchar(64) NULL, + `is_roll` int NULL, + `channel` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `city_level` smallint NULL, + `area_code` varchar(64) NULL, + `payment_number` int NULL, + `first_pay_amount` bigint NULL, + `first_pay_prod` varchar(64) NULL, + `pre_total_payment` bigint NULL, + `pre_payment_number` bigint NULL, + `first_pay_level` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `role_id`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE dws_event_analyze_server; +CREATE TABLE `dws_event_analyze_server` ( + `appid` bigint NOT NULL, + `server_id` varchar(64) NOT NULL, + `server_name` varchar(64) NULL, + `open_time` bigint NULL, + `merge_time` bigint NULL, + `merge_number` int NULL, + `is_primary` int NULL, + `var1` varchar(64) NULL, + `var2` varchar(64) NULL, + `var3` varchar(64) NULL, + `var4` varchar(64) NULL, + `var5` varchar(64) NULL, + `var6` varchar(64) NULL, + `var7` varchar(64) NULL, + `var8` varchar(64) NULL, + `var9` varchar(64) NULL, + `var10` varchar(64) NULL, + `var11` varchar(64) NULL, + `var12` varchar(64) NULL, + `var13` varchar(64) NULL, + `var14` varchar(64) NULL, + `var15` varchar(64) NULL, + `var16` varchar(64) NULL, + `var17` varchar(64) NULL, + `var18` varchar(64) NULL, + `var19` varchar(64) NULL, + `var20` varchar(64) NULL, + `total_amount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `server_id`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE game_server; +CREATE TABLE `game_server` ( + `id` int NULL, + `game_id` int NOT NULL, + `servid` bigint NOT NULL, + `main_servid` bigint NULL, + `name` varchar(50) NULL, + `open_time` bigint NULL, + `space_id` bigint NULL, + `space_type` int NULL, + `engine_version` varchar(255) NULL +) ENGINE=OLAP +UNIQUE KEY(`id`) +DISTRIBUTED BY HASH(`id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE gm_apply; +CREATE TABLE `gm_apply` ( + `id` int NOT NULL COMMENT "主键", + `appkey` char(32) NULL COMMENT "appkey", + `name` varchar(50) NOT NULL COMMENT "标题", + `chart` varchar(10) NULL COMMENT "首字母", + `platform` int NOT NULL COMMENT "1-Android,2-iphone,3-pc", + `desc` varchar(255) NULL COMMENT "描述", + `status` tinyint NOT NULL COMMENT "状态:1-有效,0-失效", + `game_id` int NOT NULL COMMENT "游戏id", + `channel_id` int NOT NULL COMMENT "渠道id", + `uid` int NOT NULL COMMENT "所属用户id", + `account` varchar(50) NOT NULL COMMENT "所属用户账号", + `relation_advert` tinyint NOT NULL COMMENT "关联广告:0-否,1-是", + `payment_appear_way` tinyint NOT NULL COMMENT "付费上报方式:1-服务端上报,2-客户端上报", + `advert_callback_way` tinyint NOT NULL COMMENT "事件回传逻辑(1激活归因 2注册归因 )", + `active_expire_days` int NOT NULL COMMENT "激活有效期(天)", + `create_time` int NOT NULL COMMENT "创建时间", + `update_time` int NOT NULL COMMENT "更新时间", + `analysis_limit` bigint NOT NULL COMMENT "自定义分析额度", + `event_limit` int NOT NULL COMMENT "自定义分析数量限制", + `analysis_status` tinyint NOT NULL COMMENT "自定义分析限制状态 0.已限制 1.未限制", + `bind_game_id` int NOT NULL COMMENT "绑定游戏id", + `bind_type` tinyint NOT NULL COMMENT "0-常规应用,1-游戏默认应用", + `bind_appid` int NOT NULL COMMENT "绑定的默认应用appid", + `analysis_used` bigint NOT NULL COMMENT "自定义分析已用额度", + `bind_game_type` tinyint NOT NULL COMMENT "游戏绑定类型:0-默认|1-传奇|2-传世|3-仙侠|4-传3", + `app_id` char(32) NULL COMMENT "appid", + `demo` tinyint NOT NULL COMMENT "demo数据展示,1-展示", + `event_report` tinyint NOT NULL COMMENT "是否生成默认报表:1-是", + `engine_push_sw` int NULL COMMENT "引擎上报开关,二进制表示法,参考model", + `qq` varchar(32) NOT NULL DEFAULT "" COMMENT "qq", + `prodid` text NOT NULL COMMENT "prodid和名称关系", + `prodid_time` int NOT NULL COMMENT "申请时间", + `analysis_full_time` int NULL COMMENT "自定义分析额度满额时间", + `return_account_status` tinyint NULL COMMENT "回流账号判断 0关闭 1开启" +) ENGINE=OLAP +UNIQUE KEY(`id`) +DISTRIBUTED BY HASH(`id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_active_account; +CREATE TABLE `ods_active_account` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `user_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `gmid` bigint NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_width` int NULL, + `device_height` int NULL, + `device_id` varchar(64) NULL, + `device_lang` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_time` bigint NULL, + `servid` varchar(64) NULL, + `role_id` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `user_id`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_active_device; +CREATE TABLE `ods_active_device` ( + `appid` bigint NOT NULL, + `device_id` varchar(64) NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `gmid` bigint NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_width` int NULL, + `device_height` int NULL, + `device_lang` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_time` bigint NULL, + `user_id` varchar(64) NULL, + `servid` varchar(64) NULL, + `role_id` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `device_id`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_active_role; +CREATE TABLE `ods_active_role` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `role_id` varchar(64) NOT NULL, + `ds` date NOT NULL, + `gmid` bigint NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_id` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_time` bigint NULL, + `user_id` varchar(64) NULL, + `servid` varchar(64) NULL, + `job_id` varchar(64) NULL, + `role_level` varchar(64) NULL, + `role_name` varchar(64) NULL, + `job_name` varchar(64) NULL, + `server_name` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `role_id`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_anti_plugin; +CREATE TABLE `ods_anti_plugin` ( + `appid` int NOT NULL, + `channel_id` int NULL, + `device_id` varchar(64) NOT NULL, + `game_id` int NULL, + `servid` bigint NULL, + `user_id` varchar(64) NULL, + `role_id` varchar(64) NULL, + `ip` varchar(64) NULL, + `location` varchar(64) NULL, + `env_risk` varchar(64) NULL, + `plug_risk` varchar(64) NULL, + `other_risk` varchar(64) NULL, + `event_time` datetime NOT NULL +) ENGINE=OLAP +DUPLICATE KEY(`appid`, `channel_id`, `device_id`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE ods_apm_crash; +CREATE TABLE `ods_apm_crash` ( + `guid` bigint NOT NULL, + `errno` varchar(64) NULL, + `gmid` bigint NULL, + `appid` bigint NULL, + `app_id` varchar(64) NULL, + `app_ver` varchar(64) NULL, + `app_pkg` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `channel` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_width` int NULL, + `device_height` int NULL, + `device_id` varchar(64) NULL, + `device_lang` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `cpu_abi` varchar(64) NULL, + `device_ram` int NULL, + `avail_ram` int NULL, + `device_hdd` int NULL, + `avail_hdd` int NULL, + `is_root` smallint NULL, + `is_front` smallint NULL, + `battery_temp` varchar(64) NULL, + `cpu_usage` varchar(64) NULL, + `use_time` bigint NULL, + `crash_file` varchar(64) NULL, + `crash_type` varchar(64) NULL, + `brief_content` varchar(64) NULL, + `brief_title` varchar(64) NULL, + `is_parsed` smallint NULL, + `net_type` varchar(64) NULL, + `user_id` varchar(64) NULL, + `server_id` varchar(64) NULL, + `report_time` datetime NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`guid`) +DISTRIBUTED BY HASH(`guid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_app_statis4ad; +CREATE TABLE `ods_app_statis4ad` ( + `appid` bigint NOT NULL, + `user_id` varchar(64) NOT NULL, + `role_id` varchar(64) NOT NULL, + `channel` varchar(64) NULL, + `ds` date NOT NULL, + `hh` varchar(8) NULL, + `event_time` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `user_id`, `role_id`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_event_analyze_task; +CREATE TABLE `ods_event_analyze_task` ( + `id` bigint NOT NULL, + `task_type` varchar(64) NOT NULL, + `code` varchar(64) NOT NULL, + `params` varchar(64) NOT NULL, + `run_type` int NULL, + `cron_express` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`id`, `task_type`) +DISTRIBUTED BY HASH(`id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_game_pm_log; +CREATE TABLE `ods_game_pm_log` ( + `gmid` bigint NOT NULL, + `appid` bigint NOT NULL, + `app_id` varchar(64) NOT NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `channel` varchar(64) NOT NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_width` int NULL, + `device_height` int NULL, + `device_id` varchar(64) NOT NULL, + `device_lang` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_name` varchar(64) NOT NULL, + `event_type` varchar(64) NULL, + `event_time` datetime NOT NULL, + `net_type` varchar(64) NULL, + `user_id` varchar(64) NULL, + `order_id` varchar(64) NULL, + `amount` bigint NULL, + `platform` varchar(64) NULL, + `status` int NULL, + `servid` varchar(64) NULL, + `server_name` varchar(64) NULL, + `role_id` varchar(64) NULL, + `role_name` varchar(64) NULL, + `role_level` varchar(64) NULL, + `job_id` varchar(64) NULL, + `job_name` varchar(64) NULL, + `var1` varchar(64) NULL, + `var2` varchar(64) NULL, + `var3` varchar(64) NULL, + `var4` varchar(64) NULL, + `var5` varchar(64) NULL, + `var6` varchar(64) NULL, + `var7` varchar(64) NULL, + `var8` varchar(64) NULL, + `var9` varchar(64) NULL, + `var10` varchar(64) NULL, + `var11` varchar(64) NULL, + `var12` varchar(64) NULL, + `var13` varchar(64) NULL, + `var14` varchar(64) NULL, + `var15` varchar(64) NULL, + `var16` varchar(64) NULL, + `var17` varchar(64) NULL, + `var18` varchar(64) NULL, + `var19` varchar(64) NULL, + `var20` varchar(64) NULL, + `var21` varchar(64) NULL, + `var22` varchar(64) NULL, + `var23` varchar(64) NULL, + `var24` varchar(64) NULL, + `var25` varchar(64) NULL, + `var26` varchar(64) NULL, + `var27` varchar(64) NULL, + `var28` varchar(64) NULL, + `var29` varchar(64) NULL, + `var30` varchar(64) NULL, + `ds` date NOT NULL, + `prodid` varchar(64) NULL, + `prod_name` varchar(64) NULL, + `sub_servid` varchar(64) NULL, + `sub_server_name` varchar(64) NULL +) ENGINE=OLAP +DUPLICATE KEY(`gmid`, `appid`, `app_id`) +PARTITION BY RANGE(`ds`) +(PARTITION p_20250708 VALUES [('2025-07-08'), ('2025-07-09')), +PARTITION p_20250709 VALUES [('2025-07-09'), ('2025-07-10')), +PARTITION p_20250710 VALUES [('2025-07-10'), ('2025-07-11')), +PARTITION p_20250711 VALUES [('2025-07-11'), ('2025-07-12')), +PARTITION p_20250712 VALUES [('2025-07-12'), ('2025-07-13')), +PARTITION p_20250713 VALUES [('2025-07-13'), ('2025-07-14')), +PARTITION p_20250714 VALUES [('2025-07-14'), ('2025-07-15')), +PARTITION p_20250715 VALUES [('2025-07-15'), ('2025-07-16')), +PARTITION p_20250716 VALUES [('2025-07-16'), ('2025-07-17')), +PARTITION p_20250717 VALUES [('2025-07-17'), ('2025-07-18')), +PARTITION p_20250718 VALUES [('2025-07-18'), ('2025-07-19')), +PARTITION p_20250719 VALUES [('2025-07-19'), ('2025-07-20')), +PARTITION p_20250720 VALUES [('2025-07-20'), ('2025-07-21')), +PARTITION p_20250721 VALUES [('2025-07-21'), ('2025-07-22')), +PARTITION p_20250722 VALUES [('2025-07-22'), ('2025-07-23')), +PARTITION p_20250723 VALUES [('2025-07-23'), ('2025-07-24')), +PARTITION p_20250724 VALUES [('2025-07-24'), ('2025-07-25')), +PARTITION p_20250725 VALUES [('2025-07-25'), ('2025-07-26')), +PARTITION p_20250726 VALUES [('2025-07-26'), ('2025-07-27'))) +DISTRIBUTED BY HASH(`ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "DAY", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-15", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "p_", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "true", +"dynamic_partition.history_partition_num" = "-1", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE ods_newly_account; +CREATE TABLE `ods_newly_account` ( + `appid` bigint NOT NULL, + `user_id` varchar(64) NOT NULL, + `gmid` bigint NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `channel` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_width` int NULL, + `device_height` int NULL, + `device_id` varchar(64) NULL, + `device_lang` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_time` bigint NULL, + `ds` date NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `user_id`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_newly_device; +CREATE TABLE `ods_newly_device` ( + `appid` bigint NOT NULL, + `device_id` varchar(64) NOT NULL, + `gmid` bigint NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `channel` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_width` int NULL, + `device_height` int NULL, + `device_lang` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_time` bigint NULL, + `user_id` varchar(64) NULL, + `ds` date NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `device_id`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_newly_role; +CREATE TABLE `ods_newly_role` ( + `appid` bigint NOT NULL, + `role_id` varchar(64) NOT NULL, + `gmid` bigint NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `channel` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_id` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_time` bigint NULL, + `user_id` varchar(64) NULL, + `servid` varchar(64) NULL, + `ds` date NOT NULL, + `job_id` varchar(64) NULL, + `role_level` varchar(64) NULL, + `role_name` varchar(64) NULL, + `job_name` varchar(64) NULL, + `server_name` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `role_id`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_payment_object; +CREATE TABLE `ods_payment_object` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `typd` varchar(64) NOT NULL, + `typv` varchar(64) NOT NULL, + `ds` date NOT NULL, + `gmid` bigint NULL, + `app_ver` varchar(64) NULL, + `event_time` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `typd`, `typv`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_payment_order; +CREATE TABLE `ods_payment_order` ( + `appid` bigint NOT NULL, + `order_id` varchar(64) NOT NULL, + `status` int NOT NULL, + `gmid` bigint NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `channel` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_id` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_time` bigint NULL, + `user_id` varchar(64) NULL, + `amount` bigint NULL, + `platform` varchar(64) NULL, + `servid` varchar(64) NULL, + `role_id` varchar(64) NULL, + `prodid` varchar(64) NULL, + `prod_name` varchar(64) NULL, + `ds` date NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `order_id`, `status`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_risk_detail; +CREATE TABLE `ods_risk_detail` ( + `appid` int NOT NULL, + `channel_id` int NULL, + `device_id` varchar(64) NULL, + `game_id` int NULL, + `servid` bigint NULL, + `user_id` varchar(64) NULL, + `role_id` varchar(64) NULL, + `ip` varchar(64) NULL, + `location` varchar(64) NULL, + `env_risk` varchar(64) NULL, + `plug_risk` varchar(64) NULL, + `other_risk` varchar(64) NULL, + `event_time` datetime NOT NULL +) ENGINE=OLAP +DUPLICATE KEY(`appid`, `channel_id`, `device_id`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE ods_risk_device; +CREATE TABLE `ods_risk_device` ( + `appid` int NOT NULL, + `device_id` varchar(64) NOT NULL, + `ds` varchar(64) NOT NULL, + `channel_id` varchar(64) NULL, + `game_id` int NULL, + `servid` bigint NULL, + `user_id` varchar(64) NULL, + `role_id` varchar(64) NULL, + `ip` varchar(64) NULL, + `location` varchar(64) NULL, + `env_risk` varchar(64) NULL, + `plug_risk` varchar(64) NULL, + `other_risk` varchar(64) NULL, + `event_time` datetime NOT NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `device_id`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_rollserv_account; +CREATE TABLE `ods_rollserv_account` ( + `gmid` int NULL, + `appid` int NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `channel` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_id` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_time` bigint NULL, + `user_id` varchar(64) NULL, + `servid` varchar(64) NULL, + `role_id` varchar(64) NULL, + `job_id` varchar(64) NULL, + `role_level` varchar(64) NULL, + `role_name` varchar(64) NULL, + `job_name` varchar(64) NULL, + `ds` date NOT NULL +) ENGINE=OLAP +DUPLICATE KEY(`gmid`, `appid`, `app_ver`) +PARTITION BY RANGE(`ds`) +(PARTITION p_20250622 VALUES [('2025-06-22'), ('2025-06-23')), +PARTITION p_20250623 VALUES [('2025-06-23'), ('2025-06-24')), +PARTITION p_20250624 VALUES [('2025-06-24'), ('2025-06-25')), +PARTITION p_20250625 VALUES [('2025-06-25'), ('2025-06-26')), +PARTITION p_20250626 VALUES [('2025-06-26'), ('2025-06-27')), +PARTITION p_20250627 VALUES [('2025-06-27'), ('2025-06-28')), +PARTITION p_20250628 VALUES [('2025-06-28'), ('2025-06-29')), +PARTITION p_20250629 VALUES [('2025-06-29'), ('2025-06-30')), +PARTITION p_20250630 VALUES [('2025-06-30'), ('2025-07-01')), +PARTITION p_20250701 VALUES [('2025-07-01'), ('2025-07-02')), +PARTITION p_20250702 VALUES [('2025-07-02'), ('2025-07-03')), +PARTITION p_20250703 VALUES [('2025-07-03'), ('2025-07-04')), +PARTITION p_20250704 VALUES [('2025-07-04'), ('2025-07-05')), +PARTITION p_20250705 VALUES [('2025-07-05'), ('2025-07-06')), +PARTITION p_20250706 VALUES [('2025-07-06'), ('2025-07-07')), +PARTITION p_20250707 VALUES [('2025-07-07'), ('2025-07-08')), +PARTITION p_20250708 VALUES [('2025-07-08'), ('2025-07-09')), +PARTITION p_20250709 VALUES [('2025-07-09'), ('2025-07-10')), +PARTITION p_20250710 VALUES [('2025-07-10'), ('2025-07-11')), +PARTITION p_20250711 VALUES [('2025-07-11'), ('2025-07-12')), +PARTITION p_20250712 VALUES [('2025-07-12'), ('2025-07-13')), +PARTITION p_20250713 VALUES [('2025-07-13'), ('2025-07-14')), +PARTITION p_20250714 VALUES [('2025-07-14'), ('2025-07-15')), +PARTITION p_20250715 VALUES [('2025-07-15'), ('2025-07-16')), +PARTITION p_20250716 VALUES [('2025-07-16'), ('2025-07-17')), +PARTITION p_20250717 VALUES [('2025-07-17'), ('2025-07-18')), +PARTITION p_20250718 VALUES [('2025-07-18'), ('2025-07-19')), +PARTITION p_20250719 VALUES [('2025-07-19'), ('2025-07-20')), +PARTITION p_20250720 VALUES [('2025-07-20'), ('2025-07-21')), +PARTITION p_20250721 VALUES [('2025-07-21'), ('2025-07-22')), +PARTITION p_20250722 VALUES [('2025-07-22'), ('2025-07-23')), +PARTITION p_20250723 VALUES [('2025-07-23'), ('2025-07-24')), +PARTITION p_20250724 VALUES [('2025-07-24'), ('2025-07-25')), +PARTITION p_20250725 VALUES [('2025-07-25'), ('2025-07-26')), +PARTITION p_20250726 VALUES [('2025-07-26'), ('2025-07-27'))) +DISTRIBUTED BY HASH(`ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "DAY", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-31", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "p_", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "true", +"dynamic_partition.history_partition_num" = "-1", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE ods_rollserv_account_r; +CREATE TABLE `ods_rollserv_account_r` ( + `gmid` int NULL, + `appid` int NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `channel` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_id` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_time` bigint NULL, + `user_id` varchar(64) NULL, + `servid` varchar(64) NULL, + `role_id` varchar(64) NULL, + `job_id` varchar(64) NULL, + `role_level` varchar(64) NULL, + `role_name` varchar(64) NULL, + `job_name` varchar(64) NULL, + `ds` date NULL +) ENGINE=OLAP +DUPLICATE KEY(`gmid`, `appid`, `app_ver`) +DISTRIBUTED BY HASH(`gmid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE ods_server_user; +CREATE TABLE `ods_server_user` ( + `game_id` int NOT NULL, + `server_id` int NOT NULL, + `user_account` varchar(64) NOT NULL, + `role_id` varchar(64) NULL, + `role_name` varchar(64) NULL, + `platform_id` varchar(64) NULL, + `create_time` datetime NULL, + `ds` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `server_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE ods_track_log; +CREATE TABLE `ods_track_log` ( + `gmid` bigint NOT NULL, + `appid` bigint NOT NULL, + `app_id` varchar(64) NOT NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `channel` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_width` int NULL, + `device_height` int NULL, + `device_id` varchar(64) NOT NULL, + `device_lang` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_name` varchar(64) NOT NULL, + `event_type` varchar(64) NULL, + `event_time` bigint NOT NULL, + `net_type` varchar(64) NULL, + `user_id` varchar(64) NULL, + `order_id` varchar(64) NULL, + `amount` bigint NULL, + `platform` varchar(64) NULL, + `status` int NULL, + `servid` varchar(64) NULL, + `server_name` varchar(64) NULL, + `role_id` varchar(64) NULL, + `role_name` varchar(64) NULL, + `role_level` varchar(64) NULL, + `job_id` varchar(64) NULL, + `job_name` varchar(64) NULL, + `var1` varchar(64) NULL, + `var2` varchar(64) NULL, + `var3` varchar(64) NULL, + `var4` varchar(64) NULL, + `var5` varchar(64) NULL, + `var6` varchar(64) NULL, + `var7` varchar(64) NULL, + `var8` varchar(64) NULL, + `var9` varchar(64) NULL, + `var10` varchar(64) NULL, + `var11` varchar(64) NULL, + `var12` varchar(64) NULL, + `var13` varchar(64) NULL, + `var14` varchar(64) NULL, + `var15` varchar(64) NULL, + `var16` varchar(64) NULL, + `var17` varchar(64) NULL, + `var18` varchar(64) NULL, + `var19` varchar(64) NULL, + `var20` varchar(64) NULL, + `var21` varchar(64) NULL, + `var22` varchar(64) NULL, + `var23` varchar(64) NULL, + `var24` varchar(64) NULL, + `var25` varchar(64) NULL, + `var26` varchar(64) NULL, + `var27` varchar(64) NULL, + `var28` varchar(64) NULL, + `var29` varchar(64) NULL, + `var30` varchar(64) NULL, + `ds` date NOT NULL, + `prodid` varchar(64) NULL, + `prod_name` varchar(64) NULL, + `sub_servid` varchar(64) NULL, + `sub_server_name` varchar(64) NULL +) ENGINE=OLAP +DUPLICATE KEY(`gmid`, `appid`, `app_id`) +PARTITION BY RANGE(`ds`) +(PARTITION p_20250114 VALUES [('2025-01-14'), ('2025-01-15')), +PARTITION p_20250115 VALUES [('2025-01-15'), ('2025-01-16')), +PARTITION p_20250116 VALUES [('2025-01-16'), ('2025-01-17')), +PARTITION p_20250117 VALUES [('2025-01-17'), ('2025-01-18')), +PARTITION p_20250118 VALUES [('2025-01-18'), ('2025-01-19')), +PARTITION p_20250119 VALUES [('2025-01-19'), ('2025-01-20')), +PARTITION p_20250120 VALUES [('2025-01-20'), ('2025-01-21')), +PARTITION p_20250121 VALUES [('2025-01-21'), ('2025-01-22')), +PARTITION p_20250122 VALUES [('2025-01-22'), ('2025-01-23')), +PARTITION p_20250123 VALUES [('2025-01-23'), ('2025-01-24')), +PARTITION p_20250124 VALUES [('2025-01-24'), ('2025-01-25')), +PARTITION p_20250125 VALUES [('2025-01-25'), ('2025-01-26')), +PARTITION p_20250126 VALUES [('2025-01-26'), ('2025-01-27')), +PARTITION p_20250127 VALUES [('2025-01-27'), ('2025-01-28')), +PARTITION p_20250128 VALUES [('2025-01-28'), ('2025-01-29')), +PARTITION p_20250129 VALUES [('2025-01-29'), ('2025-01-30')), +PARTITION p_20250130 VALUES [('2025-01-30'), ('2025-01-31')), +PARTITION p_20250131 VALUES [('2025-01-31'), ('2025-02-01')), +PARTITION p_20250201 VALUES [('2025-02-01'), ('2025-02-02')), +PARTITION p_20250202 VALUES [('2025-02-02'), ('2025-02-03')), +PARTITION p_20250203 VALUES [('2025-02-03'), ('2025-02-04')), +PARTITION p_20250204 VALUES [('2025-02-04'), ('2025-02-05')), +PARTITION p_20250205 VALUES [('2025-02-05'), ('2025-02-06')), +PARTITION p_20250206 VALUES [('2025-02-06'), ('2025-02-07')), +PARTITION p_20250207 VALUES [('2025-02-07'), ('2025-02-08')), +PARTITION p_20250208 VALUES [('2025-02-08'), ('2025-02-09')), +PARTITION p_20250209 VALUES [('2025-02-09'), ('2025-02-10')), +PARTITION p_20250210 VALUES [('2025-02-10'), ('2025-02-11')), +PARTITION p_20250211 VALUES [('2025-02-11'), ('2025-02-12')), +PARTITION p_20250212 VALUES [('2025-02-12'), ('2025-02-13')), +PARTITION p_20250213 VALUES [('2025-02-13'), ('2025-02-14')), +PARTITION p_20250214 VALUES [('2025-02-14'), ('2025-02-15')), +PARTITION p_20250215 VALUES [('2025-02-15'), ('2025-02-16')), +PARTITION p_20250216 VALUES [('2025-02-16'), ('2025-02-17')), +PARTITION p_20250217 VALUES [('2025-02-17'), ('2025-02-18')), +PARTITION p_20250218 VALUES [('2025-02-18'), ('2025-02-19')), +PARTITION p_20250219 VALUES [('2025-02-19'), ('2025-02-20')), +PARTITION p_20250220 VALUES [('2025-02-20'), ('2025-02-21')), +PARTITION p_20250221 VALUES [('2025-02-21'), ('2025-02-22')), +PARTITION p_20250222 VALUES [('2025-02-22'), ('2025-02-23')), +PARTITION p_20250223 VALUES [('2025-02-23'), ('2025-02-24')), +PARTITION p_20250224 VALUES [('2025-02-24'), ('2025-02-25')), +PARTITION p_20250225 VALUES [('2025-02-25'), ('2025-02-26')), +PARTITION p_20250226 VALUES [('2025-02-26'), ('2025-02-27')), +PARTITION p_20250227 VALUES [('2025-02-27'), ('2025-02-28')), +PARTITION p_20250228 VALUES [('2025-02-28'), ('2025-03-01')), +PARTITION p_20250301 VALUES [('2025-03-01'), ('2025-03-02')), +PARTITION p_20250302 VALUES [('2025-03-02'), ('2025-03-03')), +PARTITION p_20250303 VALUES [('2025-03-03'), ('2025-03-04')), +PARTITION p_20250304 VALUES [('2025-03-04'), ('2025-03-05')), +PARTITION p_20250305 VALUES [('2025-03-05'), ('2025-03-06')), +PARTITION p_20250306 VALUES [('2025-03-06'), ('2025-03-07')), +PARTITION p_20250307 VALUES [('2025-03-07'), ('2025-03-08')), +PARTITION p_20250308 VALUES [('2025-03-08'), ('2025-03-09')), +PARTITION p_20250309 VALUES [('2025-03-09'), ('2025-03-10')), +PARTITION p_20250310 VALUES [('2025-03-10'), ('2025-03-11')), +PARTITION p_20250311 VALUES [('2025-03-11'), ('2025-03-12')), +PARTITION p_20250312 VALUES [('2025-03-12'), ('2025-03-13')), +PARTITION p_20250313 VALUES [('2025-03-13'), ('2025-03-14')), +PARTITION p_20250314 VALUES [('2025-03-14'), ('2025-03-15')), +PARTITION p_20250315 VALUES [('2025-03-15'), ('2025-03-16')), +PARTITION p_20250316 VALUES [('2025-03-16'), ('2025-03-17')), +PARTITION p_20250317 VALUES [('2025-03-17'), ('2025-03-18')), +PARTITION p_20250318 VALUES [('2025-03-18'), ('2025-03-19')), +PARTITION p_20250319 VALUES [('2025-03-19'), ('2025-03-20')), +PARTITION p_20250320 VALUES [('2025-03-20'), ('2025-03-21')), +PARTITION p_20250321 VALUES [('2025-03-21'), ('2025-03-22')), +PARTITION p_20250322 VALUES [('2025-03-22'), ('2025-03-23')), +PARTITION p_20250323 VALUES [('2025-03-23'), ('2025-03-24')), +PARTITION p_20250324 VALUES [('2025-03-24'), ('2025-03-25')), +PARTITION p_20250325 VALUES [('2025-03-25'), ('2025-03-26')), +PARTITION p_20250326 VALUES [('2025-03-26'), ('2025-03-27')), +PARTITION p_20250327 VALUES [('2025-03-27'), ('2025-03-28')), +PARTITION p_20250328 VALUES [('2025-03-28'), ('2025-03-29')), +PARTITION p_20250329 VALUES [('2025-03-29'), ('2025-03-30')), +PARTITION p_20250330 VALUES [('2025-03-30'), ('2025-03-31')), +PARTITION p_20250331 VALUES [('2025-03-31'), ('2025-04-01')), +PARTITION p_20250401 VALUES [('2025-04-01'), ('2025-04-02')), +PARTITION p_20250402 VALUES [('2025-04-02'), ('2025-04-03')), +PARTITION p_20250403 VALUES [('2025-04-03'), ('2025-04-04')), +PARTITION p_20250404 VALUES [('2025-04-04'), ('2025-04-05')), +PARTITION p_20250405 VALUES [('2025-04-05'), ('2025-04-06')), +PARTITION p_20250406 VALUES [('2025-04-06'), ('2025-04-07')), +PARTITION p_20250407 VALUES [('2025-04-07'), ('2025-04-08')), +PARTITION p_20250408 VALUES [('2025-04-08'), ('2025-04-09')), +PARTITION p_20250409 VALUES [('2025-04-09'), ('2025-04-10')), +PARTITION p_20250410 VALUES [('2025-04-10'), ('2025-04-11')), +PARTITION p_20250411 VALUES [('2025-04-11'), ('2025-04-12')), +PARTITION p_20250412 VALUES [('2025-04-12'), ('2025-04-13')), +PARTITION p_20250413 VALUES [('2025-04-13'), ('2025-04-14')), +PARTITION p_20250414 VALUES [('2025-04-14'), ('2025-04-15')), +PARTITION p_20250415 VALUES [('2025-04-15'), ('2025-04-16')), +PARTITION p_20250416 VALUES [('2025-04-16'), ('2025-04-17')), +PARTITION p_20250417 VALUES [('2025-04-17'), ('2025-04-18')), +PARTITION p_20250418 VALUES [('2025-04-18'), ('2025-04-19')), +PARTITION p_20250419 VALUES [('2025-04-19'), ('2025-04-20')), +PARTITION p_20250420 VALUES [('2025-04-20'), ('2025-04-21')), +PARTITION p_20250421 VALUES [('2025-04-21'), ('2025-04-22')), +PARTITION p_20250422 VALUES [('2025-04-22'), ('2025-04-23')), +PARTITION p_20250423 VALUES [('2025-04-23'), ('2025-04-24')), +PARTITION p_20250424 VALUES [('2025-04-24'), ('2025-04-25')), +PARTITION p_20250425 VALUES [('2025-04-25'), ('2025-04-26')), +PARTITION p_20250426 VALUES [('2025-04-26'), ('2025-04-27')), +PARTITION p_20250427 VALUES [('2025-04-27'), ('2025-04-28')), +PARTITION p_20250428 VALUES [('2025-04-28'), ('2025-04-29')), +PARTITION p_20250429 VALUES [('2025-04-29'), ('2025-04-30')), +PARTITION p_20250430 VALUES [('2025-04-30'), ('2025-05-01')), +PARTITION p_20250501 VALUES [('2025-05-01'), ('2025-05-02')), +PARTITION p_20250502 VALUES [('2025-05-02'), ('2025-05-03')), +PARTITION p_20250503 VALUES [('2025-05-03'), ('2025-05-04')), +PARTITION p_20250504 VALUES [('2025-05-04'), ('2025-05-05')), +PARTITION p_20250505 VALUES [('2025-05-05'), ('2025-05-06')), +PARTITION p_20250506 VALUES [('2025-05-06'), ('2025-05-07')), +PARTITION p_20250507 VALUES [('2025-05-07'), ('2025-05-08')), +PARTITION p_20250508 VALUES [('2025-05-08'), ('2025-05-09')), +PARTITION p_20250509 VALUES [('2025-05-09'), ('2025-05-10')), +PARTITION p_20250510 VALUES [('2025-05-10'), ('2025-05-11')), +PARTITION p_20250511 VALUES [('2025-05-11'), ('2025-05-12')), +PARTITION p_20250512 VALUES [('2025-05-12'), ('2025-05-13')), +PARTITION p_20250513 VALUES [('2025-05-13'), ('2025-05-14')), +PARTITION p_20250514 VALUES [('2025-05-14'), ('2025-05-15')), +PARTITION p_20250515 VALUES [('2025-05-15'), ('2025-05-16')), +PARTITION p_20250516 VALUES [('2025-05-16'), ('2025-05-17')), +PARTITION p_20250517 VALUES [('2025-05-17'), ('2025-05-18')), +PARTITION p_20250518 VALUES [('2025-05-18'), ('2025-05-19')), +PARTITION p_20250519 VALUES [('2025-05-19'), ('2025-05-20')), +PARTITION p_20250520 VALUES [('2025-05-20'), ('2025-05-21')), +PARTITION p_20250521 VALUES [('2025-05-21'), ('2025-05-22')), +PARTITION p_20250522 VALUES [('2025-05-22'), ('2025-05-23')), +PARTITION p_20250523 VALUES [('2025-05-23'), ('2025-05-24')), +PARTITION p_20250524 VALUES [('2025-05-24'), ('2025-05-25')), +PARTITION p_20250525 VALUES [('2025-05-25'), ('2025-05-26')), +PARTITION p_20250526 VALUES [('2025-05-26'), ('2025-05-27')), +PARTITION p_20250527 VALUES [('2025-05-27'), ('2025-05-28')), +PARTITION p_20250528 VALUES [('2025-05-28'), ('2025-05-29')), +PARTITION p_20250529 VALUES [('2025-05-29'), ('2025-05-30')), +PARTITION p_20250530 VALUES [('2025-05-30'), ('2025-05-31')), +PARTITION p_20250531 VALUES [('2025-05-31'), ('2025-06-01')), +PARTITION p_20250601 VALUES [('2025-06-01'), ('2025-06-02')), +PARTITION p_20250602 VALUES [('2025-06-02'), ('2025-06-03')), +PARTITION p_20250603 VALUES [('2025-06-03'), ('2025-06-04')), +PARTITION p_20250604 VALUES [('2025-06-04'), ('2025-06-05')), +PARTITION p_20250605 VALUES [('2025-06-05'), ('2025-06-06')), +PARTITION p_20250606 VALUES [('2025-06-06'), ('2025-06-07')), +PARTITION p_20250607 VALUES [('2025-06-07'), ('2025-06-08')), +PARTITION p_20250608 VALUES [('2025-06-08'), ('2025-06-09')), +PARTITION p_20250609 VALUES [('2025-06-09'), ('2025-06-10')), +PARTITION p_20250610 VALUES [('2025-06-10'), ('2025-06-11')), +PARTITION p_20250611 VALUES [('2025-06-11'), ('2025-06-12')), +PARTITION p_20250612 VALUES [('2025-06-12'), ('2025-06-13')), +PARTITION p_20250613 VALUES [('2025-06-13'), ('2025-06-14')), +PARTITION p_20250614 VALUES [('2025-06-14'), ('2025-06-15')), +PARTITION p_20250615 VALUES [('2025-06-15'), ('2025-06-16')), +PARTITION p_20250616 VALUES [('2025-06-16'), ('2025-06-17')), +PARTITION p_20250617 VALUES [('2025-06-17'), ('2025-06-18')), +PARTITION p_20250618 VALUES [('2025-06-18'), ('2025-06-19')), +PARTITION p_20250619 VALUES [('2025-06-19'), ('2025-06-20')), +PARTITION p_20250620 VALUES [('2025-06-20'), ('2025-06-21')), +PARTITION p_20250621 VALUES [('2025-06-21'), ('2025-06-22')), +PARTITION p_20250622 VALUES [('2025-06-22'), ('2025-06-23')), +PARTITION p_20250623 VALUES [('2025-06-23'), ('2025-06-24')), +PARTITION p_20250624 VALUES [('2025-06-24'), ('2025-06-25')), +PARTITION p_20250625 VALUES [('2025-06-25'), ('2025-06-26')), +PARTITION p_20250626 VALUES [('2025-06-26'), ('2025-06-27')), +PARTITION p_20250627 VALUES [('2025-06-27'), ('2025-06-28')), +PARTITION p_20250628 VALUES [('2025-06-28'), ('2025-06-29')), +PARTITION p_20250629 VALUES [('2025-06-29'), ('2025-06-30')), +PARTITION p_20250630 VALUES [('2025-06-30'), ('2025-07-01')), +PARTITION p_20250701 VALUES [('2025-07-01'), ('2025-07-02')), +PARTITION p_20250702 VALUES [('2025-07-02'), ('2025-07-03')), +PARTITION p_20250703 VALUES [('2025-07-03'), ('2025-07-04')), +PARTITION p_20250704 VALUES [('2025-07-04'), ('2025-07-05')), +PARTITION p_20250705 VALUES [('2025-07-05'), ('2025-07-06')), +PARTITION p_20250706 VALUES [('2025-07-06'), ('2025-07-07')), +PARTITION p_20250707 VALUES [('2025-07-07'), ('2025-07-08')), +PARTITION p_20250708 VALUES [('2025-07-08'), ('2025-07-09')), +PARTITION p_20250709 VALUES [('2025-07-09'), ('2025-07-10')), +PARTITION p_20250710 VALUES [('2025-07-10'), ('2025-07-11')), +PARTITION p_20250711 VALUES [('2025-07-11'), ('2025-07-12')), +PARTITION p_20250712 VALUES [('2025-07-12'), ('2025-07-13')), +PARTITION p_20250713 VALUES [('2025-07-13'), ('2025-07-14')), +PARTITION p_20250714 VALUES [('2025-07-14'), ('2025-07-15')), +PARTITION p_20250715 VALUES [('2025-07-15'), ('2025-07-16')), +PARTITION p_20250716 VALUES [('2025-07-16'), ('2025-07-17')), +PARTITION p_20250717 VALUES [('2025-07-17'), ('2025-07-18')), +PARTITION p_20250718 VALUES [('2025-07-18'), ('2025-07-19')), +PARTITION p_20250719 VALUES [('2025-07-19'), ('2025-07-20')), +PARTITION p_20250720 VALUES [('2025-07-20'), ('2025-07-21')), +PARTITION p_20250721 VALUES [('2025-07-21'), ('2025-07-22')), +PARTITION p_20250722 VALUES [('2025-07-22'), ('2025-07-23')), +PARTITION p_20250723 VALUES [('2025-07-23'), ('2025-07-24')), +PARTITION p_20250724 VALUES [('2025-07-24'), ('2025-07-25')), +PARTITION p_20250725 VALUES [('2025-07-25'), ('2025-07-26')), +PARTITION p_20250726 VALUES [('2025-07-26'), ('2025-07-27'))) +DISTRIBUTED BY HASH(`ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "DAY", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-190", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "p_", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "true", +"dynamic_partition.history_partition_num" = "-1", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE ods_track_log4dur; +CREATE TABLE `ods_track_log4dur` ( + `gmid` bigint NOT NULL, + `appid` bigint NOT NULL, + `app_id` varchar(64) NOT NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `channel` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `device_width` int NULL, + `device_height` int NULL, + `device_id` varchar(64) NOT NULL, + `device_lang` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_name` varchar(64) NOT NULL, + `event_type` varchar(64) NULL, + `event_time` bigint NOT NULL, + `net_type` varchar(64) NULL, + `user_id` varchar(64) NULL, + `order_id` varchar(64) NULL, + `amount` bigint NULL, + `platform` varchar(64) NULL, + `status` int NULL, + `servid` varchar(64) NULL, + `server_name` varchar(64) NULL, + `role_id` varchar(64) NULL, + `role_name` varchar(64) NULL, + `role_level` varchar(64) NULL, + `job_id` varchar(64) NULL, + `job_name` varchar(64) NULL, + `var1` varchar(64) NULL, + `var2` varchar(64) NULL, + `var3` varchar(64) NULL, + `var4` varchar(64) NULL, + `var5` varchar(64) NULL, + `var6` varchar(64) NULL, + `var7` varchar(64) NULL, + `var8` varchar(64) NULL, + `var9` varchar(64) NULL, + `var10` varchar(64) NULL, + `var11` varchar(64) NULL, + `var12` varchar(64) NULL, + `var13` varchar(64) NULL, + `var14` varchar(64) NULL, + `var15` varchar(64) NULL, + `var16` varchar(64) NULL, + `var17` varchar(64) NULL, + `var18` varchar(64) NULL, + `var19` varchar(64) NULL, + `var20` varchar(64) NULL, + `var21` varchar(64) NULL, + `var22` varchar(64) NULL, + `var23` varchar(64) NULL, + `var24` varchar(64) NULL, + `var25` varchar(64) NULL, + `var26` varchar(64) NULL, + `var27` varchar(64) NULL, + `var28` varchar(64) NULL, + `var29` varchar(64) NULL, + `var30` varchar(64) NULL, + `ds` date NOT NULL, + `prodid` varchar(64) NULL, + `prod_name` varchar(64) NULL, + `sub_servid` varchar(64) NULL, + `sub_server_name` varchar(64) NULL +) ENGINE=OLAP +DUPLICATE KEY(`gmid`, `appid`, `app_id`) +PARTITION BY RANGE(`ds`) +(PARTITION p_20250715 VALUES [('2025-07-15'), ('2025-07-16')), +PARTITION p_20250716 VALUES [('2025-07-16'), ('2025-07-17')), +PARTITION p_20250717 VALUES [('2025-07-17'), ('2025-07-18')), +PARTITION p_20250718 VALUES [('2025-07-18'), ('2025-07-19')), +PARTITION p_20250719 VALUES [('2025-07-19'), ('2025-07-20')), +PARTITION p_20250720 VALUES [('2025-07-20'), ('2025-07-21')), +PARTITION p_20250721 VALUES [('2025-07-21'), ('2025-07-22')), +PARTITION p_20250722 VALUES [('2025-07-22'), ('2025-07-23')), +PARTITION p_20250723 VALUES [('2025-07-23'), ('2025-07-24')), +PARTITION p_20250724 VALUES [('2025-07-24'), ('2025-07-25')), +PARTITION p_20250725 VALUES [('2025-07-25'), ('2025-07-26')), +PARTITION p_20250726 VALUES [('2025-07-26'), ('2025-07-27'))) +DISTRIBUTED BY HASH(`ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"dynamic_partition.enable" = "true", +"dynamic_partition.time_unit" = "DAY", +"dynamic_partition.time_zone" = "Asia/Shanghai", +"dynamic_partition.start" = "-8", +"dynamic_partition.end" = "3", +"dynamic_partition.prefix" = "p_", +"dynamic_partition.replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"dynamic_partition.buckets" = "32", +"dynamic_partition.create_history_partition" = "true", +"dynamic_partition.history_partition_num" = "-1", +"dynamic_partition.hot_partition_num" = "0", +"dynamic_partition.reserved_history_periods" = "NULL", +"dynamic_partition.storage_policy" = "", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE ods_track_log_for_gmweb; +CREATE TABLE `ods_track_log_for_gmweb` ( + `appid` bigint NOT NULL, + `ds` date NOT NULL, + `app_id` varchar(64) NULL, + `app_ver` varchar(64) NULL, + `sdk_ver` varchar(64) NULL, + `channel` varchar(64) NULL, + `country` varchar(64) NULL, + `province` varchar(64) NULL, + `city` varchar(64) NULL, + `isp` varchar(64) NULL, + `ip` varchar(64) NULL, + `net_type` varchar(64) NULL, + `device_width` int NULL, + `device_height` int NULL, + `device_id` varchar(64) NOT NULL, + `device_lang` varchar(64) NULL, + `device_model` varchar(64) NULL, + `device_brand` varchar(64) NULL, + `device_os` varchar(64) NULL, + `device_type` varchar(64) NULL, + `event_name` varchar(64) NOT NULL, + `event_type` varchar(64) NULL, + `event_time` datetime NOT NULL, + `user_id` varchar(64) NULL, + `var1` varchar(64) NULL, + `var2` varchar(64) NULL, + `var3` varchar(64) NULL, + `var4` varchar(64) NULL, + `var5` varchar(64) NULL, + `var6` varchar(64) NULL, + `var7` varchar(64) NULL, + `var8` varchar(64) NULL, + `var9` varchar(64) NULL, + `var10` varchar(64) NULL, + `var11` varchar(64) NULL, + `var12` varchar(64) NULL, + `var13` varchar(64) NULL, + `var14` varchar(64) NULL, + `var15` varchar(64) NULL, + `var16` varchar(64) NULL, + `var17` varchar(64) NULL, + `var18` varchar(64) NULL, + `var19` varchar(64) NULL, + `var20` varchar(64) NULL, + `var21` varchar(64) NULL, + `var22` varchar(64) NULL, + `var23` varchar(64) NULL, + `var24` varchar(64) NULL, + `var25` varchar(64) NULL, + `var26` varchar(64) NULL, + `var27` varchar(64) NULL, + `var28` varchar(64) NULL, + `var29` varchar(64) NULL, + `var30` varchar(64) NULL +) ENGINE=OLAP +DUPLICATE KEY(`appid`, `ds`, `app_id`) +DISTRIBUTED BY HASH(`appid`, `ds`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); +drop TABLE ods_user; +CREATE TABLE `ods_user` ( + `game_id` int NOT NULL, + `user_account` varchar(64) NOT NULL, + `role_id` varchar(64) NULL, + `role_name` varchar(64) NULL, + `server_id` int NULL, + `platform_id` varchar(64) NULL, + `create_time` datetime NULL, + `ds` varchar(64) NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `user_account`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_1st_payment; +CREATE TABLE `rpt_1st_payment` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `total_account` bigint NULL, + `total_amount` bigint NULL, + `newly_account` bigint NULL, + `newly_amount` bigint NULL, + `avg_paytime` bigint NULL, + `median_paytime` bigint NULL, + `mode_paytime` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_app_statis_ht; +CREATE TABLE `rpt_app_statis_ht` ( + `appid` bigint NOT NULL, + `app_ver` varchar(64) NOT NULL, + `channel` varchar(64) NOT NULL, + `hh` varchar(64) NOT NULL, + `ds` date NOT NULL, + `active_device` bigint NULL, + `newly_device` bigint NULL, + `active_account` bigint NULL, + `newly_account` bigint NULL, + `order_created` bigint NULL, + `order_amount` bigint NULL, + `order_payment` bigint NULL, + `payment_device` bigint NULL, + `payment_account` bigint NULL, + `payment_amount` bigint NULL, + `newly_payment_account` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `app_ver`, `channel`, `hh`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_app_statis_pd; +CREATE TABLE `rpt_app_statis_pd` ( + `gmid` int NOT NULL, + `appid` int NOT NULL, + `app_ver` varchar(64) NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` varchar(64) NOT NULL, + `active_device` bigint NULL, + `newly_device` bigint NULL, + `start_device` bigint NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `payment_device` bigint NULL, + `payment_account` bigint NULL, + `order_created` bigint NULL, + `order_amount` bigint NULL, + `order_payment` bigint NULL, + `total_device` bigint NULL, + `newly_distinct` bigint NULL, + `active_distinct` bigint NULL, + `new_role_users` bigint NULL, + `new_roles` bigint NULL, + `new_pay_account` bigint NULL, + `new_ac_amount` bigint NULL, + `new_ac_pay_num` bigint NULL, + `new_pay_user` bigint NULL, + `new_user_amount` bigint NULL, + `payment_order` bigint NULL, + `total_amount` bigint NULL, + `orig_active_device` bigint NULL, + `orig_payment_amount` bigint NULL, + `orig_total_amount` bigint NULL, + `orig_newly_payment_device` bigint NULL DEFAULT "0", + `total_payment_order` bigint NULL DEFAULT "0", + `total_payment_device` bigint NULL DEFAULT "0", + `dbl_newly_device` bigint NULL DEFAULT "0", + `dbl_newly_account` bigint NULL DEFAULT "0", + `nd_old_account` bigint NULL DEFAULT "0", + `login_account` bigint NULL DEFAULT "0", + `newly_account_role` bigint NULL, + `rollserv_account` bigint NULL, + `rollserv_u_role` bigint NULL, + `rollserv_u_payment_account` bigint NULL, + `rollserv_u_order_payment` bigint NULL, + `rollserv_u_order_amount` bigint NULL, + `role_newly_account` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`gmid`, `appid`, `app_ver`, `channel`, `ds`) +DISTRIBUTED BY HASH(`gmid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_app_statis_pm; +CREATE TABLE `rpt_app_statis_pm` ( + `gmid` int NOT NULL, + `appid` int NOT NULL, + `app_ver` varchar(64) NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `active_device` bigint NULL, + `newly_device` bigint NULL, + `start_device` bigint NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `payment_device` bigint NULL, + `payment_account` bigint NULL, + `order_created` bigint NULL, + `order_amount` bigint NULL, + `order_payment` bigint NULL, + `total_device` bigint NULL, + `newly_distinct` bigint NULL, + `active_distinct` bigint NULL, + `new_role_users` bigint NULL, + `new_roles` bigint NULL, + `new_pay_account` bigint NULL, + `new_ac_amount` bigint NULL, + `new_ac_pay_num` bigint NULL, + `new_pay_user` bigint NULL, + `new_user_amount` bigint NULL, + `payment_order` bigint NULL, + `total_amount` bigint NULL, + `orig_active_device` bigint NULL, + `orig_payment_amount` bigint NULL, + `orig_total_amount` bigint NULL, + `orig_newly_payment_device` bigint NULL DEFAULT "0", + `total_payment_order` bigint NULL DEFAULT "0", + `total_payment_device` bigint NULL DEFAULT "0", + `dbl_newly_device` bigint NULL DEFAULT "0", + `dbl_newly_account` bigint NULL DEFAULT "0", + `nd_old_account` bigint NULL DEFAULT "0", + `login_account` bigint NULL DEFAULT "0", + `newly_account_role` bigint NULL, + `rollserv_account` bigint NULL, + `rollserv_u_role` bigint NULL, + `rollserv_u_payment_account` bigint NULL, + `rollserv_u_order_payment` bigint NULL, + `rollserv_u_order_amount` bigint NULL, + `role_newly_account` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`gmid`, `appid`, `app_ver`, `channel`, `ds`) +DISTRIBUTED BY HASH(`gmid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_app_statis_pw; +CREATE TABLE `rpt_app_statis_pw` ( + `gmid` int NOT NULL, + `appid` int NOT NULL, + `app_ver` varchar(64) NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `active_device` bigint NULL, + `newly_device` bigint NULL, + `start_device` bigint NULL, + `newly_account` bigint NULL, + `active_account` bigint NULL, + `payment_device` bigint NULL, + `payment_account` bigint NULL, + `order_created` bigint NULL, + `order_amount` bigint NULL, + `order_payment` bigint NULL, + `total_device` bigint NULL, + `newly_distinct` bigint NULL, + `active_distinct` bigint NULL, + `new_role_users` bigint NULL, + `new_roles` bigint NULL, + `new_pay_account` bigint NULL, + `new_ac_amount` bigint NULL, + `new_ac_pay_num` bigint NULL, + `new_pay_user` bigint NULL, + `new_user_amount` bigint NULL, + `payment_order` bigint NULL, + `total_amount` bigint NULL, + `orig_active_device` bigint NULL, + `orig_payment_amount` bigint NULL, + `orig_total_amount` bigint NULL, + `orig_newly_payment_device` bigint NULL DEFAULT "0", + `total_payment_order` bigint NULL DEFAULT "0", + `total_payment_device` bigint NULL DEFAULT "0", + `dbl_newly_device` bigint NULL DEFAULT "0", + `dbl_newly_account` bigint NULL DEFAULT "0", + `nd_old_account` bigint NULL DEFAULT "0", + `login_account` bigint NULL DEFAULT "0", + `newly_account_role` bigint NULL, + `rollserv_account` bigint NULL, + `rollserv_u_role` bigint NULL, + `rollserv_u_payment_account` bigint NULL, + `rollserv_u_order_payment` bigint NULL, + `rollserv_u_order_amount` bigint NULL, + `role_newly_account` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`gmid`, `appid`, `app_ver`, `channel`, `ds`) +DISTRIBUTED BY HASH(`gmid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_app_statis_rt; +CREATE TABLE `rpt_app_statis_rt` ( + `gmid` bigint NOT NULL, + `appid` bigint NOT NULL, + `app_ver` varchar(64) NOT NULL, + `channel` varchar(64) NOT NULL, + `hm` varchar(64) NOT NULL, + `ds` date NOT NULL, + `start_device` bigint NULL, + `rt_active_device` bigint NULL, + `active_device` bigint NULL, + `newly_device` bigint NULL, + `active_account` bigint NULL, + `newly_account` bigint NULL, + `order_created` bigint NULL, + `order_amount` bigint NULL, + `order_payment` bigint NULL, + `payment_device` bigint NULL, + `payment_account` bigint NULL, + `payment_amount` bigint NULL, + `newly_role_account` bigint NULL, + `newly_role` bigint NULL, + `newly_payment_account` bigint NULL, + `newly_payment_amount` bigint NULL, + `newly_order_payment` bigint NULL, + `newly_payment_device` bigint NULL, + `newly_device_payment_amount` bigint NULL, + `orig_active_device` bigint NULL, + `orig_payment_amount` bigint NULL, + `orig_total_amount` bigint NULL, + `orig_newly_payment_device` bigint NULL, + `total_device` bigint NULL, + `total_amount` bigint NULL, + `total_payment_order` bigint NULL, + `total_payment_device` bigint NULL, + `dbl_newly_device` bigint NULL, + `dbl_newly_account` bigint NULL, + `nd_old_account` bigint NULL, + `login_account` bigint NULL, + `newly_account_role` bigint NULL, + `hh` varchar(64) NULL, + `role_newly_account` bigint NULL, + `rollserv_account` bigint NULL, + `rollserv_u_role` bigint NULL, + `rollserv_u_payment_account` bigint NULL, + `rollserv_u_order_payment` bigint NULL, + `rollserv_u_order_amount` bigint NULL, + `rt_active_account` bigint NULL, + `rt_payment_account` bigint NULL, + `rt_newly_payment_account` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`gmid`, `appid`, `app_ver`, `channel`, `hm`, `ds`) +DISTRIBUTED BY HASH(`gmid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_game_duration_d; +CREATE TABLE `rpt_game_duration_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `newly_duration` bigint NULL, + `newly_times` bigint NULL, + `real_newly` bigint NULL, + `range1` bigint NULL, + `range2` bigint NULL, + `range3` bigint NULL, + `range4` bigint NULL, + `range5` bigint NULL, + `range6` bigint NULL, + `range7` bigint NULL, + `range8` bigint NULL, + `range9` bigint NULL, + `range10` bigint NULL, + `range11` bigint NULL, + `range12` bigint NULL, + `range13` bigint NULL, + `range14` bigint NULL, + `range15` bigint NULL, + `range16` bigint NULL, + `range17` bigint NULL, + `range18` bigint NULL, + `range19` bigint NULL, + `range20` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_ltv_rollserv_account; +CREATE TABLE `rpt_ltv_rollserv_account` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` varchar(64) NOT NULL, + `num` bigint NULL, + `ltv1` bigint NULL, + `ltv2` bigint NULL, + `ltv3` bigint NULL, + `ltv4` bigint NULL, + `ltv5` bigint NULL, + `ltv6` bigint NULL, + `ltv7` bigint NULL, + `ltv8` bigint NULL, + `ltv9` bigint NULL, + `ltv10` bigint NULL, + `ltv11` bigint NULL, + `ltv12` bigint NULL, + `ltv13` bigint NULL, + `ltv14` bigint NULL, + `ltv15` bigint NULL, + `ltv16` bigint NULL, + `ltv17` bigint NULL, + `ltv18` bigint NULL, + `ltv19` bigint NULL, + `ltv20` bigint NULL, + `ltv21` bigint NULL, + `ltv22` bigint NULL, + `ltv23` bigint NULL, + `ltv24` bigint NULL, + `ltv25` bigint NULL, + `ltv26` bigint NULL, + `ltv27` bigint NULL, + `ltv28` bigint NULL, + `ltv29` bigint NULL, + `ltv30` bigint NULL, + `ltv31` bigint NULL, + `ltv45` bigint NULL, + `ltv60` bigint NULL, + `ltv90` bigint NULL, + `ltv120` bigint NULL, + `ltv150` bigint NULL, + `ltv180` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_origchan_statis_d; +CREATE TABLE `rpt_origchan_statis_d` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `active_device` bigint NULL, + `active_account` bigint NULL, + `payment_device` bigint NULL, + `payment_account` bigint NULL, + `order_payment` bigint NULL, + `order_amount` bigint NULL, + `total_account` bigint NULL, + `total_amount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_origchan_statis_r; +CREATE TABLE `rpt_origchan_statis_r` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `hm` varchar(64) NOT NULL, + `active_device` bigint NULL, + `active_account` bigint NULL, + `payment_device` bigint NULL, + `payment_account` bigint NULL, + `order_payment` bigint NULL, + `order_amount` bigint NULL, + `total_account` bigint NULL, + `total_amount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`, `hm`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_payment_distribution; +CREATE TABLE `rpt_payment_distribution` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `is_orig` int NOT NULL, + `ds` date NOT NULL, + `dt` int NOT NULL, + `payment_account` bigint NULL, + `range1` bigint NULL, + `range2` bigint NULL, + `range3` bigint NULL, + `range4` bigint NULL, + `range5` bigint NULL, + `range6` bigint NULL, + `range7` bigint NULL, + `range8` bigint NULL, + `range9` bigint NULL, + `range10` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `is_orig`, `ds`, `dt`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_active_account_d; +CREATE TABLE `rpt_retention_active_account_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_active_account_m; +CREATE TABLE `rpt_retention_active_account_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_active_account_w; +CREATE TABLE `rpt_retention_active_account_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_active_device_d; +CREATE TABLE `rpt_retention_active_device_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_active_device_m; +CREATE TABLE `rpt_retention_active_device_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_active_device_w; +CREATE TABLE `rpt_retention_active_device_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_account_d; +CREATE TABLE `rpt_retention_newly_account_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_account_m; +CREATE TABLE `rpt_retention_newly_account_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_account_w; +CREATE TABLE `rpt_retention_newly_account_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_device_d; +CREATE TABLE `rpt_retention_newly_device_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_device_m; +CREATE TABLE `rpt_retention_newly_device_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_device_w; +CREATE TABLE `rpt_retention_newly_device_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_role_d; +CREATE TABLE `rpt_retention_newly_role_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_role_m; +CREATE TABLE `rpt_retention_newly_role_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_newly_role_w; +CREATE TABLE `rpt_retention_newly_role_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npa_repay; +CREATE TABLE `rpt_retention_npa_repay` ( + `game_id` int NOT NULL, + `channel` int NOT NULL, + `ds` date NOT NULL, + `dt` int NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`game_id`, `channel`, `ds`, `dt`) +DISTRIBUTED BY HASH(`game_id`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npayment_account_d; +CREATE TABLE `rpt_retention_npayment_account_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npayment_account_m; +CREATE TABLE `rpt_retention_npayment_account_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npayment_account_w; +CREATE TABLE `rpt_retention_npayment_account_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npayment_device_d; +CREATE TABLE `rpt_retention_npayment_device_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npayment_device_m; +CREATE TABLE `rpt_retention_npayment_device_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npayment_device_w; +CREATE TABLE `rpt_retention_npayment_device_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npayment_role_d; +CREATE TABLE `rpt_retention_npayment_role_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npayment_role_m; +CREATE TABLE `rpt_retention_npayment_role_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_npayment_role_w; +CREATE TABLE `rpt_retention_npayment_role_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_payment_account_d; +CREATE TABLE `rpt_retention_payment_account_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_payment_account_m; +CREATE TABLE `rpt_retention_payment_account_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_payment_account_w; +CREATE TABLE `rpt_retention_payment_account_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_payment_device_d; +CREATE TABLE `rpt_retention_payment_device_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_payment_device_m; +CREATE TABLE `rpt_retention_payment_device_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_payment_device_w; +CREATE TABLE `rpt_retention_payment_device_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_payment_role_d; +CREATE TABLE `rpt_retention_payment_role_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_payment_role_m; +CREATE TABLE `rpt_retention_payment_role_m` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_payment_role_w; +CREATE TABLE `rpt_retention_payment_role_w` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_repay_d; +CREATE TABLE `rpt_retention_repay_d` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_retention_rollserv_act_d; +CREATE TABLE `rpt_retention_rollserv_act_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `ds` date NOT NULL, + `num` bigint NULL, + `rd1` bigint NULL, + `rd2` bigint NULL, + `rd3` bigint NULL, + `rd4` bigint NULL, + `rd5` bigint NULL, + `rd6` bigint NULL, + `rd7` bigint NULL, + `rd8` bigint NULL, + `rd9` bigint NULL, + `rd10` bigint NULL, + `rd11` bigint NULL, + `rd12` bigint NULL, + `rd13` bigint NULL, + `rd14` bigint NULL, + `rd15` bigint NULL, + `rd16` bigint NULL, + `rd17` bigint NULL, + `rd18` bigint NULL, + `rd19` bigint NULL, + `rd20` bigint NULL, + `rd21` bigint NULL, + `rd22` bigint NULL, + `rd23` bigint NULL, + `rd24` bigint NULL, + `rd25` bigint NULL, + `rd26` bigint NULL, + `rd27` bigint NULL, + `rd28` bigint NULL, + `rd29` bigint NULL, + `rd30` bigint NULL, + `rd45` bigint NULL, + `rd60` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_rolejob_statis_d; +CREATE TABLE `rpt_rolejob_statis_d` ( + `appid` int NOT NULL, + `channel` varchar(64) NOT NULL, + `job_name` varchar(64) NOT NULL, + `ds` date NOT NULL, + `days` int NOT NULL, + `account` bigint NULL, + `role` bigint NULL, + `newly_account` bigint NULL, + `newly_role` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `job_name`, `ds`, `days`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_roletask_statis_d; +CREATE TABLE `rpt_roletask_statis_d` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `task_name` varchar(64) NOT NULL, + `ds` date NOT NULL, + `account` bigint NULL, + `role` bigint NULL, + `newly_account` bigint NULL, + `newly_account_role` bigint NULL, + `newly_role` bigint NULL, + `newly_role_acount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `task_name`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_serv_statis_d; +CREATE TABLE `rpt_serv_statis_d` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `servid` varchar(64) NOT NULL, + `ds` date NOT NULL, + `newly_role` bigint NULL, + `role_account` bigint NULL, + `role_newly_account` bigint NULL, + `newly_account_role` bigint NULL, + `role_newly_device` bigint NULL, + `newly_device_role` bigint NULL, + `active_account` bigint NULL, + `active_device` bigint NULL, + `payment_account` bigint NULL, + `payment_device` bigint NULL, + `payment_order` bigint NULL, + `payment_amount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `servid`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_serv_statis_m; +CREATE TABLE `rpt_serv_statis_m` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `servid` varchar(64) NOT NULL, + `ds` date NOT NULL, + `newly_role` bigint NULL, + `role_account` bigint NULL, + `role_newly_account` bigint NULL, + `newly_account_role` bigint NULL, + `role_newly_device` bigint NULL, + `newly_device_role` bigint NULL, + `active_account` bigint NULL, + `active_device` bigint NULL, + `payment_account` bigint NULL, + `payment_device` bigint NULL, + `payment_order` bigint NULL, + `payment_amount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `servid`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); +drop TABLE rpt_serv_statis_w; +CREATE TABLE `rpt_serv_statis_w` ( + `appid` bigint NOT NULL, + `channel` varchar(64) NOT NULL, + `servid` varchar(64) NOT NULL, + `ds` date NOT NULL, + `newly_role` bigint NULL, + `role_account` bigint NULL, + `role_newly_account` bigint NULL, + `newly_account_role` bigint NULL, + `role_newly_device` bigint NULL, + `newly_device_role` bigint NULL, + `active_account` bigint NULL, + `active_device` bigint NULL, + `payment_account` bigint NULL, + `payment_device` bigint NULL, + `payment_order` bigint NULL, + `payment_amount` bigint NULL +) ENGINE=OLAP +UNIQUE KEY(`appid`, `channel`, `servid`, `ds`) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 +PROPERTIES ( +"replication_allocation" = "tag.location.ap_shanghai_8: 1, tag.location.ap_shanghai_5: 1, tag.location.ap_shanghai_4: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V1", +"enable_unique_key_merge_on_write" = "true", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728", +"enable_mow_light_delete" = "false" +); \ No newline at end of file diff --git a/996/doirs/sdk_statis_ods.sql b/996/doirs/sdk_statis_ods.sql new file mode 100644 index 0000000..64a6a19 --- /dev/null +++ b/996/doirs/sdk_statis_ods.sql @@ -0,0 +1,290 @@ +CREATE TABLE ods_anti_plugin ( +appid int NOT NULL, +channel_id int, +device_id VARCHAR NOT NULL, +game_id int, +servid bigint, +user_id VARCHAR, +role_id VARCHAR, +ip VARCHAR, +location VARCHAR, +env_risk VARCHAR, +plug_risk VARCHAR, +other_risk VARCHAR, +event_time DATETIME NOT NULL +) + ENGINE=OLAP +DISTRIBUTED BY HASH(`appid`) BUCKETS 32; + + +CREATE TABLE ods_apm_crash ( +guid bigint NOT NULL, +errno VARCHAR, +gmid bigint, +appid bigint, +app_id VARCHAR, +app_ver VARCHAR, +app_pkg VARCHAR, +sdk_ver VARCHAR, +channel VARCHAR, +country VARCHAR, +province VARCHAR, +city VARCHAR, +isp VARCHAR, +ip VARCHAR, +device_width int, +device_height int, +device_id VARCHAR, +device_lang VARCHAR, +device_model VARCHAR, +device_brand VARCHAR, +device_os VARCHAR, +device_type VARCHAR, +cpu_abi VARCHAR, +device_ram int, +avail_ram int, +device_hdd int, +avail_hdd int, +is_root smallint, +is_front smallint, +battery_temp VARCHAR, +cpu_usage VARCHAR, +use_time bigint, +crash_file VARCHAR, +crash_type VARCHAR, +brief_content VARCHAR, +brief_title VARCHAR, +is_parsed smallint, +net_type VARCHAR, +user_id VARCHAR, +server_id VARCHAR, +report_time DATETIME NOT NULL +) +UNIQUE KEY (guid) DISTRIBUTED BY HASH (guid) BUCKETS 32; + + + +CREATE TABLE ods_event_analyze_task ( +id bigint NOT NULL, +task_type VARCHAR NOT NULL, +code VARCHAR NOT NULL, +params VARCHAR NOT NULL, +run_type int, +cron_express VARCHAR +) +UNIQUE KEY (id, task_type) DISTRIBUTED BY HASH (id) BUCKETS 32; + + + +CREATE TABLE ods_game_pm_log ( +gmid bigint NOT NULL, +appid bigint NOT NULL, +app_id VARCHAR NOT NULL, +app_ver VARCHAR, +sdk_ver VARCHAR, +channel VARCHAR NOT NULL, +country VARCHAR, +province VARCHAR, +city VARCHAR, +isp VARCHAR, +ip VARCHAR, +device_width int, +device_height int, +device_id VARCHAR NOT NULL, +device_lang VARCHAR, +device_model VARCHAR, +device_brand VARCHAR, +device_os VARCHAR, +device_type VARCHAR, +event_name VARCHAR NOT NULL, +event_type VARCHAR, +event_time DATETIME NOT NULL, +net_type VARCHAR, +user_id VARCHAR, +order_id VARCHAR, +amount bigint, +platform VARCHAR, +status int, +servid VARCHAR, +server_name VARCHAR, +role_id VARCHAR, +role_name VARCHAR, +role_level VARCHAR, +job_id VARCHAR, +job_name VARCHAR, +var1 VARCHAR, +var2 VARCHAR, +var3 VARCHAR, +var4 VARCHAR, +var5 VARCHAR, +var6 VARCHAR, +var7 VARCHAR, +var8 VARCHAR, +var9 VARCHAR, +var10 VARCHAR, +var11 VARCHAR, +var12 VARCHAR, +var13 VARCHAR, +var14 VARCHAR, +var15 VARCHAR, +var16 VARCHAR, +var17 VARCHAR, +var18 VARCHAR, +var19 VARCHAR, +var20 VARCHAR, +var21 VARCHAR, +var22 VARCHAR, +var23 VARCHAR, +var24 VARCHAR, +var25 VARCHAR, +var26 VARCHAR, +var27 VARCHAR, +var28 VARCHAR, +var29 VARCHAR, +var30 VARCHAR, +ds date NOT NULL, +prodid VARCHAR, +prod_name VARCHAR, +sub_servid VARCHAR, +sub_server_name VARCHAR +) +ENGINE=OLAP +PARTITION BY RANGE(`ds`) () DISTRIBUTED BY HASH (ds) BUCKETS 32 PROPERTIES + ( + "min_load_replica_num" = "-1", + "dynamic_partition.enable" = "true", + "dynamic_partition.time_unit" = "DAY", + "dynamic_partition.time_zone" = "Asia/Shanghai", + "dynamic_partition.start" = "-15", + "dynamic_partition.end" = "3", + "dynamic_partition.buckets" = "32", + "dynamic_partition.create_history_partition" = "true", + "dynamic_partition.prefix" = "p_", + "storage_medium" = "hdd" +); + + +CREATE TABLE ods_risk_detail ( +appid int NOT NULL, +channel_id int, +device_id VARCHAR, +game_id int, +servid bigint, +user_id VARCHAR, +role_id VARCHAR, +ip VARCHAR, +location VARCHAR, +env_risk VARCHAR, +plug_risk VARCHAR, +other_risk VARCHAR, +event_time DATETIME NOT NULL +) +DISTRIBUTED BY HASH(`appid`) BUCKETS 32 + + +CREATE TABLE ods_risk_device ( +appid int NOT NULL, +device_id VARCHAR NOT NULL, +ds VARCHAR NOT NULL, +channel_id VARCHAR, +game_id int, +servid bigint, +user_id VARCHAR, +role_id VARCHAR, +ip VARCHAR, +location VARCHAR, +env_risk VARCHAR, +plug_risk VARCHAR, +other_risk VARCHAR, +event_time DATETIME NOT NULL +) +UNIQUE KEY (appid, device_id, ds) DISTRIBUTED BY HASH (appid) BUCKETS 32; + + +drop table ods_rollserv_account_r; +CREATE TABLE ods_rollserv_account_r ( +gmid int, +appid int, +app_ver VARCHAR, +sdk_ver VARCHAR, +channel VARCHAR, +country VARCHAR, +province VARCHAR, +city VARCHAR, +isp VARCHAR, +ip VARCHAR, +device_id VARCHAR, +device_model VARCHAR, +device_brand VARCHAR, +device_os VARCHAR, +device_type VARCHAR, +event_time bigint, +user_id VARCHAR, +servid VARCHAR, +role_id VARCHAR, +job_id VARCHAR, +role_level VARCHAR, +role_name VARCHAR, +job_name VARCHAR, +ds date +) + DISTRIBUTED BY HASH (gmid) BUCKETS 32; + + + CREATE TABLE ods_track_log_for_gmweb ( +appid bigint NOT NULL, +ds date NOT NULL, +app_id VARCHAR, +app_ver VARCHAR, +sdk_ver VARCHAR, +channel VARCHAR, +country VARCHAR, +province VARCHAR, +city VARCHAR, +isp VARCHAR, +ip VARCHAR, +net_type VARCHAR, +device_width int, +device_height int, +device_id VARCHAR NOT NULL, +device_lang VARCHAR, +device_model VARCHAR, +device_brand VARCHAR, +device_os VARCHAR, +device_type VARCHAR, +event_name VARCHAR NOT NULL, +event_type VARCHAR, +event_time DATETIME NOT NULL, +user_id VARCHAR, +var1 VARCHAR, +var2 VARCHAR, +var3 VARCHAR, +var4 VARCHAR, +var5 VARCHAR, +var6 VARCHAR, +var7 VARCHAR, +var8 VARCHAR, +var9 VARCHAR, +var10 VARCHAR, +var11 VARCHAR, +var12 VARCHAR, +var13 VARCHAR, +var14 VARCHAR, +var15 VARCHAR, +var16 VARCHAR, +var17 VARCHAR, +var18 VARCHAR, +var19 VARCHAR, +var20 VARCHAR, +var21 VARCHAR, +var22 VARCHAR, +var23 VARCHAR, +var24 VARCHAR, +var25 VARCHAR, +var26 VARCHAR, +var27 VARCHAR, +var28 VARCHAR, +var29 VARCHAR, +var30 VARCHAR +) + DISTRIBUTED BY HASH (appid,ds) BUCKETS 32; \ No newline at end of file diff --git a/996/flinksql/996flink整理.sql b/996/flinksql/996flink整理.sql new file mode 100644 index 0000000..e4b5a19 --- /dev/null +++ b/996/flinksql/996flink整理.sql @@ -0,0 +1,77 @@ +-- 源 sls +传世 传三 996 'logStore' = 'login-log' *|where saccount <> '' + -- 目标 + hologres dhsf_engine.ods_active_role insertorignore + hologres dhsf_engine.ods_role insertorupdate + hologres dhsf_engine.dwd_role_level insertorupdate + hologres dhsf_engine.ods_role_duration insertorignore + hologres dhsf_engine.ods_platform_login insertorignore + hologres dhsf_engine.dws_analyze_account insertorupdate + hologres dhsf_engine.dws_analyze_role insertorupdate + +-- 源 sls +game-sdk.com-login sls_com_login_log + -- 目标 + hologres dhsf_engine.ods_user_profile_login insertorignore + + + +-- 源 sls +sh996sdk track-log * | where channel is not null + `holo`.`sdk_statis`.`ods_active_account` + `holo`.`sdk_statis`.`ods_newly_account` + `holo`.`sdk_statis`.`ods_active_device` + `holo`.`sdk_statis`.`ods_newly_device` + `holo`.`sdk_statis`.`ods_payment_order` + `holo`.`sdk_statis`.`ods_payment_object` + `holo`.`sdk_statis`.`ods_newly_role` + `holo`.`sdk_statis`.`ods_active_role` + `holo`.`sdk_statis`.`dws_app_props` + + + +-- 源 sls +996sdk-mapis yidun-ban-data + -- 目标 + odps sh996dac.ods_ban_data + + +-- 源 mysql +dhsf_gm apply_hefu_servers +csyq_gm apply_hefu_servers +c3yq_gm apply_hefu_servers + -- 目标 + hologres dhsf_engine.game_merge insertorupdate + + +-- 源 mysql +platform tab_user + -- 目标 + hologres dhsf_engine.ods_platform_account insertorreplace + hologres dhsf_engine.biz.dwd_event_analyze_account insertorupdate + + +-- 源hologres +dhsf_engine ods_order + -- 目标 + hologres dhsf_engine.public.ods_order_union insertorupdate + + +-- 源hologres +sdk_statis dws_event_analyze_account jdbc + + -- 目标 + `holo`.sdk_statis.`biz.dwd_account_reg` + `holo`.sdk_statis.`biz.dwd_account_pay` + `holo`.sdk_statis.`biz.dwd_account_create_role` + sdk_statis biz.dws_event_analyze_account insertorupdate + + +sdk_statis dws_event_analyze_device jdbc + -- 目标 + `holo`.sdk_statis.`biz.dwd_device_launch` + `holo`.sdk_statis.`biz.dwd_device_pay` + sdk_statis biz.dws_event_analyze_device insertorupdate + + + diff --git a/996/flinksql/flink.sql b/996/flinksql/flink.sql new file mode 100644 index 0000000..1a5492c --- /dev/null +++ b/996/flinksql/flink.sql @@ -0,0 +1,27 @@ +'mutatetype' = 'insertorupdate' +insert​​ 默认模式。仅追加写入,主键冲突时报错。 无主键冲突的流式数据(如日志) +insertorupdate UPSERT 模式:主键存在则更新整行,不存在则插入。 需要实时更新的状态表(如用户画像) +insertorignore 主键存在则忽略新数据,不存在则插入。 避免重复的维度表 +insertorreplace 主键存在则删除旧行并插入新行(非更新),不存在则插入。 需要完全覆盖历史数据的场景 + + +'ignoredelete' = 'true', +'query' = '*|where saccount <> '''', + +'server-id' = '24071-24078', +'scan.startup.mode' = 'initial', +'server-time-zone' = 'Asia/Shanghai' + + + 'binlog' = 'true', + 'cdcMode' = 'true', + 'upsertSource' = 'true', + 'binlogMaxRetryTimes' = '10', + 'binlogRetryIntervalMs' = '500', + 'binlogBatchReadSize' = '100', + 'startTime' = '2025-04-11 15:00:00' + + + + 'connector'='print', + 'logger'='true' \ No newline at end of file diff --git a/996/热血江湖/1.sql b/996/热血江湖/1.sql new file mode 100644 index 0000000..342dd8e --- /dev/null +++ b/996/热血江湖/1.sql @@ -0,0 +1,189 @@ +BEGIN; + +/* +DROP TABLE public.ods_payment_order; +*/ + +-- Type: TABLE ; Name: ods_payment_order; Owner: sdk_statis_developer + +CREATE TABLE public.ods_payment_order ( + gmid bigint, + appid bigint NOT NULL, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_id text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + user_id text, + order_id text NOT NULL, + amount bigint, + platform text, + servid text, + role_id text, + prodid text, + prod_name text, + status integer NOT NULL, + ds text NOT NULL + ,PRIMARY KEY (appid, order_id, status) +) WITH ( +orientation = 'column', +storage_format = 'orc', +binlog_level = 'replica', +binlog_ttl = '604800', +bitmap_columns = 'appid,device_id,servid,order_id,user_id,status,ds,event_time', +clustering_key = 'ds:asc', +dictionary_encoding_columns = '', +distribution_key = 'appid', +table_group = 'sdk_statis_tg_s80', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); + + + +COMMENT ON TABLE public.ods_payment_order IS NULL; +COMMENT ON COLUMN public.ods_payment_order.status IS '0预支付/1已支付'; +COMMENT ON COLUMN public.ods_payment_order.ds IS 'yyyymmdd'; + + +END; + + + + + + +BEGIN; + +/* +DROP TABLE public.ods_active_role; +*/ + +-- Type: TABLE ; Name: ods_active_role; Owner: sdk_statis_developer + +CREATE TABLE public.ods_active_role ( + appid bigint NOT NULL, + channel text NOT NULL, + role_id text NOT NULL, + ds text NOT NULL, + gmid bigint, + app_ver text, + sdk_ver text, + country text, + province text, + city text, + isp text, + ip text, + device_id text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + user_id text, + servid text, + job_id text, + role_level text, + role_name text, + job_name text, + server_name text + ,PRIMARY KEY (appid, channel, role_id, ds) +) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'appid,ds', +clustering_key = 'ds:asc', +dictionary_encoding_columns = '', +distribution_key = 'appid,role_id,ds', +table_group = 'sdk_statis_tg_s80', +table_storage_mode = 'any', +time_to_live_in_seconds = '31536000' +); + + + +COMMENT ON TABLE public.ods_active_role IS NULL; +ALTER TABLE public.ods_active_role OWNER TO sdk_statis_developer; + + +END; + + + +BEGIN; + +/* +DROP TABLE public.ads_app_statis_md; +*/ + +-- Type: TABLE ; Name: ads_app_statis_md; Owner: sdk_statis_developer + +CREATE TABLE public.ads_app_statis_md ( + gmid integer NOT NULL, + appid integer NOT NULL, + app_ver text NOT NULL, + channel text NOT NULL, + newly_device bigint, + newly_account bigint, + active_device bigint, + active_account bigint, + payment_device bigint, + payment_account bigint, + order_created bigint, + order_amount bigint, + order_payment bigint, + ds text NOT NULL, + new_role_users bigint, + new_roles bigint, + new_pay_account bigint, + new_ac_amount bigint, + new_ac_pay_num bigint, + new_pay_user bigint, + new_user_amount bigint, + payment_order bigint + ,PRIMARY KEY (gmid, appid, app_ver, channel, ds) +) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'app_ver,channel,ds', +dictionary_encoding_columns = 'app_ver:auto,channel:auto,ds:auto', +distribution_key = 'gmid,appid,app_ver,channel,ds', +table_group = 'sdk_statis_tg_s80', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); + + + +COMMENT ON TABLE public.ads_app_statis_md IS NULL; +ALTER TABLE public.ads_app_statis_md OWNER TO sdk_statis_developer; +COMMENT ON COLUMN public.ads_app_statis_md.newly_device IS '新增设备'; +COMMENT ON COLUMN public.ads_app_statis_md.newly_account IS '新增账号'; +COMMENT ON COLUMN public.ads_app_statis_md.active_device IS '活跃设备'; +COMMENT ON COLUMN public.ads_app_statis_md.active_account IS '活跃账号'; +COMMENT ON COLUMN public.ads_app_statis_md.payment_device IS '付费设备'; +COMMENT ON COLUMN public.ads_app_statis_md.payment_account IS '付费账号'; +COMMENT ON COLUMN public.ads_app_statis_md.order_created IS '创建订单数'; +COMMENT ON COLUMN public.ads_app_statis_md.order_amount IS '订单总金额'; +COMMENT ON COLUMN public.ads_app_statis_md.order_payment IS '订单实付款'; +COMMENT ON COLUMN public.ads_app_statis_md.ds IS '统计月份yyyy-mm'; +COMMENT ON COLUMN public.ads_app_statis_md.new_role_users IS '新增创角账号数'; +COMMENT ON COLUMN public.ads_app_statis_md.new_roles IS '新增创建角色数'; +COMMENT ON COLUMN public.ads_app_statis_md.new_pay_account IS '新增付费账号数'; +COMMENT ON COLUMN public.ads_app_statis_md.new_ac_amount IS '新增付费金额(账号)'; +COMMENT ON COLUMN public.ads_app_statis_md.new_ac_pay_num IS '新增付费次数'; +COMMENT ON COLUMN public.ads_app_statis_md.new_pay_user IS '新增付费用户数'; +COMMENT ON COLUMN public.ads_app_statis_md.new_user_amount IS '新增付费用户付费金额'; +COMMENT ON COLUMN public.ads_app_statis_md.payment_order IS '付费订单数'; + + +END; \ No newline at end of file diff --git a/996/热血江湖/dhsf_engine.sql b/996/热血江湖/dhsf_engine.sql new file mode 100644 index 0000000..aa6903f --- /dev/null +++ b/996/热血江湖/dhsf_engine.sql @@ -0,0 +1,74 @@ +CREATE TABLE public.dwd_platform_login_m ( + game_id integer NOT NULL, + user_id integer NOT NULL, + user_account text, + promote_id integer, + platform_id integer, + login_time integer, + login_ip text, + ds date NOT NULL + ,PRIMARY KEY (game_id, user_id, ds) +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'game_id', + partition_expiration_time = '138 day', + partition_require_filter = TRUE + +); + + +CREATE TABLE public.dwd_user_profile_lt ( + account text NOT NULL, + game_id integer NOT NULL, + ds date NOT NULL, + total_order bigint, + total_payment bigint, + total_played integer, + first_login timestamp with time zone, + last_login timestamp with time zone, + gd integer, + sd integer, + ld integer, + score numeric(10,2) + ,PRIMARY KEY (account, game_id, ds) +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'game_id', + partition_expiration_time = '180 day', + partition_require_filter = TRUE + +); + + + + +CREATE TABLE public.ods_rollserv_user ( + game_id integer, + server_id integer, + user_account text, + role_id text, + role_name text, + job integer, + level integer, + exp bigint, + relevel integer, + platform_id text, + create_time timestamp with time zone, + ds date NOT NULL +) + + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'game_id', + partition_expiration_time = '180 day', + partition_require_filter = TRUE + +); + + + diff --git a/996/热血江湖/sdk_statis.sql b/996/热血江湖/sdk_statis.sql new file mode 100644 index 0000000..fb186bb --- /dev/null +++ b/996/热血江湖/sdk_statis.sql @@ -0,0 +1,693 @@ + + +CREATE TABLE public.ods_track_log ( + gmid bigint NOT NULL, + appid bigint NOT NULL, + app_id text NOT NULL, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_width integer, + device_height integer, + device_id text NOT NULL, + device_lang text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_name text NOT NULL, + event_type text, + event_time bigint NOT NULL, + net_type text, + user_id text, + order_id text, + amount bigint, + platform text, + status integer, + servid text, + server_name text, + role_id text, + role_name text, + role_level text, + job_id text, + job_name text, + var1 text, + var2 text, + var3 text, + var4 text, + var5 text, + var6 text, + var7 text, + var8 text, + var9 text, + var10 text, + var11 text, + var12 text, + var13 text, + var14 text, + var15 text, + var16 text, + var17 text, + var18 text, + var19 text, + var20 text, + var21 text, + var22 text, + var23 text, + var24 text, + var25 text, + var26 text, + var27 text, + var28 text, + var29 text, + var30 text, + ds DATE NOT NULL, + prodid text, + prod_name text, + sub_servid text, + sub_server_name text +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'appid', + partition_expiration_time = '370 day', + partition_require_filter = TRUE + +); + + + +COMMENT ON TABLE public.ods_track_log IS '日志明细表'; +COMMENT ON COLUMN public.ods_track_log.device_brand IS 'from device_model'; +COMMENT ON COLUMN public.ods_track_log.status IS '-1非支付事件/0预支付/1已支付'; + + + + + +CREATE TABLE public.dwd_device_profile ( + ds date NOT NULL, + appid integer NOT NULL, + device_id text NOT NULL, + gd integer, + sd integer, + ld integer + ,PRIMARY KEY (ds, appid, device_id) +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'appid', + partition_expiration_time = '30 day', + partition_require_filter = TRUE + +); + + + +CREATE TABLE public.ods_rollserv_account ( + gmid integer, + appid integer, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_id text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + user_id text, + servid text, + role_id text, + job_id text, + role_level text, + role_name text, + job_name text, + ds date NOT NULL +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'appid', + partition_expiration_time = '30 day', + partition_require_filter = TRUE + +); + + +CREATE TABLE public.ods_track_log4dur ( + gmid bigint NOT NULL, + appid bigint NOT NULL, + app_id text NOT NULL, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_width integer, + device_height integer, + device_id text NOT NULL, + device_lang text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_name text NOT NULL, + event_type text, + event_time bigint NOT NULL, + net_type text, + user_id text, + order_id text, + amount bigint, + platform text, + status integer, + servid text, + server_name text, + role_id text, + role_name text, + role_level text, + job_id text, + job_name text, + var1 text, + var2 text, + var3 text, + var4 text, + var5 text, + var6 text, + var7 text, + var8 text, + var9 text, + var10 text, + var11 text, + var12 text, + var13 text, + var14 text, + var15 text, + var16 text, + var17 text, + var18 text, + var19 text, + var20 text, + var21 text, + var22 text, + var23 text, + var24 text, + var25 text, + var26 text, + var27 text, + var28 text, + var29 text, + var30 text, + ds date NOT NULL, + prodid text, + prod_name text, + sub_servid text, + sub_server_name text +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'appid', + partition_expiration_time = '7 day', + partition_require_filter = TRUE + +); + + +CREATE TABLE public.dwd_newly_account_payment ( + appid integer, + channel text, + user_id text, + servid text, + payment_order integer, + payment_amount bigint, + ds text ,PRIMARY KEY (appid, channel,user_id,servid,ds) +)with ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'appid', +distribution_key = 'appid', +time_to_live_in_seconds = '16416000' +); + + + +CREATE TABLE datasci.dws_role_churn_map_task_d ( + gmid text NOT NULL, + appid integer NOT NULL, + servid text NOT NULL, + server_name text, + user_id text NOT NULL, + role_id text NOT NULL, + ds date NOT NULL, + role_level text, + map text, + task text, + victor_name text, + death_person_cnt integer, + death_enemy_cnt integer, + event_time timestamp with time zone NOT NULL +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'appid', + partition_expiration_time = '30 day', + partition_require_filter = TRUE + +); + + +CREATE TABLE datasci.ads_resc_product_change_analysis_h ( + event_date timestamp with time zone NOT NULL, + event_hour timestamp with time zone NOT NULL, + gm_id bigint, + app_id bigint, + app_id_str text, + app_name text, + prod_id text, + svr_id text, + svr_name text, + user_id text, + role_id text, + role_name text, + role_level text, + role_att text, + consumable_grade text, + job_id text, + job_name text, + change_type text, + change_reason text, + latest_map text, + latest_task text, + change_times_sum bigint, + change_nums_sum bigint, + change_times_increased bigint, + change_times_reduced bigint, + change_times_dropped bigint, + change_nums_increased bigint, + change_nums_reduced bigint, + change_nums_dropped bigint, + ds date NOT NULL, + change_nums_increased_sum bigint, + map_rn bigint, + prod_id_category text, + open_time timestamp with time zone, + merge_time timestamp with time zone, + prod_name text, + prod_desc text, + role_create_time timestamp with time zone, + svr_desc text, + device_id text +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'app_id', + partition_expiration_time = '30 day', + partition_require_filter = TRUE + +); + + +CREATE TABLE datasci.ads_role_first_pay_analysis_d ( + app_id bigint NOT NULL, + app_id_str text, + app_name text, + user_id text, + server_id text, + server_name text, + role_id text NOT NULL, + role_name text, + job_id text, + job_name text, + create_time bigint, + first_login_time bigint, + first_pay_time bigint, + first_pay_role_level text, + order_id text, + order_amount bigint, + prod_id text, + prod_name text, + real_interval bigint, + game_interval bigint, + ds date NOT NULL, + last_game_interval integer, + last_role_level text + ,PRIMARY KEY (app_id, role_id, ds) +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'app_id', + partition_expiration_time = '3666 day', + partition_require_filter = TRUE + +); + +CREATE TABLE datasci.dws_resc_monetary_stock_detail_d ( + stock_date timestamp with time zone NOT NULL, + gm_id bigint, + app_id bigint, + app_id_str text, + app_name text, + svr_id text, + svr_name text, + open_time timestamp with time zone, + merge_time timestamp with time zone, + merge_number integer, + is_primary integer, + user_id text, + role_id text, + role_name text, + prod_id text, + event_date timestamp with time zone NOT NULL, + event_hour timestamp with time zone, + event_time timestamp with time zone, + change_type text, + latest_num_day bigint, + ds date NOT NULL, + prod_name text, + prod_desc text, + role_create_time timestamp with time zone, + svr_desc text +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'app_id', + partition_expiration_time = '181 day', + partition_require_filter = TRUE + +); + + +CREATE TABLE datasci.dws_resc_product_change_detail_h ( + event_date timestamp with time zone, + event_hour timestamp with time zone, + gm_id bigint, + app_id bigint, + app_id_str text, + app_name text, + prod_id text, + svr_id text, + svr_name text, + user_id text, + role_id text, + role_name text, + role_level text, + role_att text, + consumable_grade text, + job_id text, + job_name text, + change_type text, + change_reason text, + latest_map text, + latest_task text, + change_times bigint, + change_nums bigint, + event_time timestamp with time zone NOT NULL, + ds date NOT NULL, + device_id text +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'app_id', + partition_expiration_time = '181 day', + partition_require_filter = TRUE + +); + + +CREATE TABLE datasci.dws_account_game_tag_duration_d ( + user_id text NOT NULL, + game_type text NOT NULL, + tag_type text NOT NULL, + game_tag text NOT NULL, + ds date NOT NULL, + real_duration bigint + ,PRIMARY KEY (ds, user_id, game_type, tag_type, game_tag) +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'user_id', + partition_expiration_time = '190 day', + partition_require_filter = TRUE + +); + + +CREATE TABLE datasci.ads_resc_monetary_change_analysis_h ( + event_date timestamp with time zone NOT NULL, + event_hour timestamp with time zone NOT NULL, + gm_id bigint, + app_id bigint, + app_id_str text, + app_name text, + prod_id text, + svr_id text, + svr_name text, + user_id text, + role_id text, + role_name text, + role_level text, + role_att text, + consumable_grade text, + job_id text, + job_name text, + change_type text, + change_reason text, + latest_map text, + latest_task text, + latest_num_day bigint, + open_in_7_days_flag integer, + merge_in_7_days_flag integer, + open_in_14_days_flag integer, + merge_in_14_days_flag integer, + open_in_30_days_flag integer, + merge_in_30_days_flag integer, + mon_times_sum bigint, + change_num_sum bigint, + mon_times_increased bigint, + mon_times_reduced bigint, + change_num_increased bigint, + change_num_reduced bigint, + ds date NOT NULL, + open_time timestamp with time zone, + merge_time timestamp with time zone, + prod_name text, + prod_desc text, + mon_times_circul_increased bigint, + mon_times_circul_reduced bigint, + change_num_circul_increased bigint, + change_num_circul_reduced bigint, + mon_times_tax bigint, + change_num_tax bigint, + role_create_time timestamp with time zone, + svr_desc text, + device_id text +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'app_id', + partition_expiration_time = '30 day', + partition_require_filter = TRUE + +); + + + +CREATE TABLE datasci.dws_resc_monetary_change_detail_h ( + event_date timestamp with time zone NOT NULL, + event_hour timestamp with time zone NOT NULL, + gm_id bigint, + app_id bigint, + app_id_str text, + app_name text, + prod_id text, + svr_id text, + svr_name text, + user_id text, + role_id text, + role_name text, + role_level text, + role_att text, + consumable_grade text, + job_id text, + job_name text, + change_type text, + change_reason text, + latest_map text, + latest_task text, + mon_times bigint, + change_num bigint, + latest_num bigint, + event_time timestamp with time zone NOT NULL, + ds date NOT NULL, + get_prod_id text, + get_prod_num text, + extra_info text, + device_id text +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'app_id', + partition_expiration_time = '181 day', + partition_require_filter = TRUE + +); + +CREATE TABLE datasci.dws_role_churn_log_original_d ( + appid bigint NOT NULL, + user_id text NOT NULL, + role_id text NOT NULL, + ds text NOT NULL, + event_time bigint NOT NULL, + sub_status text, + channel text, + device_id text +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'app_id', + partition_expiration_time = '31 day', + partition_require_filter = TRUE + +); + + +CREATE TABLE datasci.dws_role_last_action_d ( + app_id integer NOT NULL, + app_name text, + svr_id text, + svr_name text, + user_id text, + role_id text NOT NULL, + role_name text, + job_id text, + job_name text, + last_map text, + death_enemy_cnt integer, + death_person_cnt integer, + victor_type text, + victor_role_id text, + victor_role_name text, + victor_level text, + victor_job text, + last_task_id text, + last_task_name text, + last_task_status integer, + last_role_level text, + ds date NOT NULL + ,PRIMARY KEY (app_id, role_id, ds) +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'app_id', + partition_expiration_time = '31 day', + partition_require_filter = TRUE + +); + + +CREATE TABLE public.ods_game_pm_log ( + gmid bigint NOT NULL, + appid bigint NOT NULL, + app_id text NOT NULL, + app_ver text, + sdk_ver text, + channel text NOT NULL, + country text, + province text, + city text, + isp text, + ip text, + device_width integer, + device_height integer, + device_id text NOT NULL, + device_lang text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_name text NOT NULL, + event_type text, + event_time timestamp with time zone NOT NULL, + net_type text, + user_id text, + order_id text, + amount bigint, + platform text, + status integer, + servid text, + server_name text, + role_id text, + role_name text, + role_level text, + job_id text, + job_name text, + var1 text, + var2 text, + var3 text, + var4 text, + var5 text, + var6 text, + var7 text, + var8 text, + var9 text, + var10 text, + var11 text, + var12 text, + var13 text, + var14 text, + var15 text, + var16 text, + var17 text, + var18 text, + var19 text, + var20 text, + var21 text, + var22 text, + var23 text, + var24 text, + var25 text, + var26 text, + var27 text, + var28 text, + var29 text, + var30 text, + ds date NOT NULL, + prodid text, + prod_name text, + sub_servid text, + sub_server_name text +) + LOGICAL PARTITION BY LIST (ds) + WITH ( + orientation = 'column', + distribution_key = 'app_id', + partition_expiration_time = '16 day', + partition_require_filter = TRUE + +); \ No newline at end of file diff --git a/996/热血江湖/tab_spend.sql b/996/热血江湖/tab_spend.sql new file mode 100644 index 0000000..f233c1c --- /dev/null +++ b/996/热血江湖/tab_spend.sql @@ -0,0 +1,51 @@ +CREATE TABLE public.tab_spend ( + id BIGINT NOT NULL , + user_id BIGINT NOT NULL , + user_account text, + user_nickname text, + game_id BIGINT NOT NULL , + game_appid text , + game_name text , + server_id text , + server_name text , + game_player_id text , + game_player_name text, + promote_id BIGINT NOT NULL , + promote_account text, + order_number text , + pay_order_number text , + props_name text , + pay_amount numeric(10,2) , + pay_time BIGINT , + pay_status int4, + pay_game_status int4 , + extend text , + pay_way int4 , + spend_ip text , + settle_check int4 NOT NULL , + selle_status BIGINT NOT NULL , + selle_ratio DOUBLE PRECISION , + sub_status BIGINT NOT NULL, + selle_time text , + sdk_version int4 , + cost numeric(10,2) , + discount_type BIGINT , + auto_compensation BIGINT , + diamond text, + payplatform2cp text , + platform_id BIGINT , + settle_ratio_id BIGINT , + pay_game_amount numeric(10,2) , + settle_state int4 NOT NULL , + ratio_state int4 NOT NULL , + is_box_pay int4 NOT NULL , + create_time BIGINT NOT NULL , + pay_company text , + live_no BIGINT NOT NULL , + scene int4 NOT NULL , + main_server_id BIGINT , + refund_type int4 , + ticket_type int4 , + pay_uid text +,PRIMARY KEY (id) +) \ No newline at end of file diff --git a/996/热血江湖/改sdk_statis的gmid.sql b/996/热血江湖/改sdk_statis的gmid.sql new file mode 100644 index 0000000..92c9b2d --- /dev/null +++ b/996/热血江湖/改sdk_statis的gmid.sql @@ -0,0 +1,1124 @@ +DROP TABLE public.ods_payment_order; +CREATE TABLE public.ods_payment_order ( + appid bigint NOT NULL, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_id text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + user_id text, + order_id text NOT NULL, + amount bigint, + platform text, + servid text, + role_id text, + prodid text, + prod_name text, + status integer NOT NULL, + ds text NOT NULL + ,PRIMARY KEY (appid, order_id, status) +) WITH ( +orientation = 'column', +storage_format = 'orc', +binlog_level = 'replica', +binlog_ttl = '604800', +bitmap_columns = 'appid,device_id,servid,order_id,user_id,status,ds,event_time', +clustering_key = 'ds:asc', +dictionary_encoding_columns = '', +distribution_key = 'appid', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); +COMMENT ON COLUMN public.ods_payment_order.status IS '0预支付/1已支付'; +COMMENT ON COLUMN public.ods_payment_order.ds IS 'yyyymmdd'; + + + +DROP TABLE public.ods_active_role; +CREATE TABLE public.ods_active_role ( + appid bigint NOT NULL, + channel text NOT NULL, + role_id text NOT NULL, + ds text NOT NULL, + app_ver text, + sdk_ver text, + country text, + province text, + city text, + isp text, + ip text, + device_id text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + user_id text, + servid text, + job_id text, + role_level text, + role_name text, + job_name text, + server_name text + ,PRIMARY KEY (appid, channel, role_id, ds) +) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'appid,ds', +clustering_key = 'ds:asc', +dictionary_encoding_columns = '', +distribution_key = 'appid,role_id,ds', +table_storage_mode = 'any', +time_to_live_in_seconds = '31536000' +); + + +DROP TABLE public.ads_app_statis_md; +CREATE TABLE public.ads_app_statis_md ( + appid integer NOT NULL, + app_ver text NOT NULL, + channel text NOT NULL, + newly_device bigint, + newly_account bigint, + active_device bigint, + active_account bigint, + payment_device bigint, + payment_account bigint, + order_created bigint, + order_amount bigint, + order_payment bigint, + ds text NOT NULL, + new_role_users bigint, + new_roles bigint, + new_pay_account bigint, + new_ac_amount bigint, + new_ac_pay_num bigint, + new_pay_user bigint, + new_user_amount bigint, + payment_order bigint + ,PRIMARY KEY ( appid, app_ver, channel, ds) +) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'app_ver,channel,ds', +dictionary_encoding_columns = 'app_ver:auto,channel:auto,ds:auto', +distribution_key = 'appid,app_ver,channel,ds', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); +COMMENT ON COLUMN public.ads_app_statis_md.newly_device IS '新增设备'; +COMMENT ON COLUMN public.ads_app_statis_md.newly_account IS '新增账号'; +COMMENT ON COLUMN public.ads_app_statis_md.active_device IS '活跃设备'; +COMMENT ON COLUMN public.ads_app_statis_md.active_account IS '活跃账号'; +COMMENT ON COLUMN public.ads_app_statis_md.payment_device IS '付费设备'; +COMMENT ON COLUMN public.ads_app_statis_md.payment_account IS '付费账号'; +COMMENT ON COLUMN public.ads_app_statis_md.order_created IS '创建订单数'; +COMMENT ON COLUMN public.ads_app_statis_md.order_amount IS '订单总金额'; +COMMENT ON COLUMN public.ads_app_statis_md.order_payment IS '订单实付款'; +COMMENT ON COLUMN public.ads_app_statis_md.ds IS '统计月份yyyy-mm'; +COMMENT ON COLUMN public.ads_app_statis_md.new_role_users IS '新增创角账号数'; +COMMENT ON COLUMN public.ads_app_statis_md.new_roles IS '新增创建角色数'; +COMMENT ON COLUMN public.ads_app_statis_md.new_pay_account IS '新增付费账号数'; +COMMENT ON COLUMN public.ads_app_statis_md.new_ac_amount IS '新增付费金额(账号)'; +COMMENT ON COLUMN public.ads_app_statis_md.new_ac_pay_num IS '新增付费次数'; +COMMENT ON COLUMN public.ads_app_statis_md.new_pay_user IS '新增付费用户数'; +COMMENT ON COLUMN public.ads_app_statis_md.new_user_amount IS '新增付费用户付费金额'; +COMMENT ON COLUMN public.ads_app_statis_md.payment_order IS '付费订单数'; + + +DROP TABLE public.rpt_app_statis_pd; +CREATE TABLE public.rpt_app_statis_pd ( + appid integer NOT NULL, + app_ver text NOT NULL, + channel text NOT NULL, + ds text NOT NULL, + active_device bigint, + newly_device bigint, + start_device bigint, + newly_account bigint, + active_account bigint, + payment_device bigint, + payment_account bigint, + order_created bigint, + order_amount bigint, + order_payment bigint, + total_device bigint, + newly_distinct bigint, + active_distinct bigint, + new_role_users bigint, + new_roles bigint, + new_pay_account bigint, + new_ac_amount bigint, + new_ac_pay_num bigint, + new_pay_user bigint, + new_user_amount bigint, + payment_order bigint, + total_amount bigint, + orig_active_device bigint, + orig_payment_amount bigint, + orig_total_amount bigint, + orig_newly_payment_device bigint default 0, + total_payment_order bigint default 0, + total_payment_device bigint default 0, + dbl_newly_device bigint default 0, + dbl_newly_account bigint default 0, + nd_old_account bigint default 0, + login_account bigint default 0, + newly_account_role bigint, + rollserv_account bigint, + rollserv_u_role bigint, + rollserv_u_payment_account bigint, + rollserv_u_order_payment bigint, + rollserv_u_order_amount bigint, + role_newly_account bigint + ,PRIMARY KEY ( appid, app_ver, channel, ds) +) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'app_ver,channel,ds,appid', +clustering_key = 'ds:asc', +dictionary_encoding_columns = 'app_ver:auto,channel:auto,ds:auto', +distribution_key = 'appid', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); + + + +COMMENT ON TABLE public.rpt_app_statis_pd IS NULL; +COMMENT ON COLUMN public.rpt_app_statis_pd.active_device IS '活跃设备'; +COMMENT ON COLUMN public.rpt_app_statis_pd.newly_device IS '新增设备'; +COMMENT ON COLUMN public.rpt_app_statis_pd.start_device IS '启动次数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.newly_account IS '新增账号'; +COMMENT ON COLUMN public.rpt_app_statis_pd.active_account IS '活跃账号'; +COMMENT ON COLUMN public.rpt_app_statis_pd.payment_device IS '付费设备'; +COMMENT ON COLUMN public.rpt_app_statis_pd.payment_account IS '付费账号'; +COMMENT ON COLUMN public.rpt_app_statis_pd.order_created IS '创建订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.order_amount IS '订单总金额'; +COMMENT ON COLUMN public.rpt_app_statis_pd.order_payment IS '订单实付款'; +COMMENT ON COLUMN public.rpt_app_statis_pd.total_device IS '累计设备'; +COMMENT ON COLUMN public.rpt_app_statis_pd.newly_distinct IS '新增独立'; +COMMENT ON COLUMN public.rpt_app_statis_pd.active_distinct IS '活跃独立'; +COMMENT ON COLUMN public.rpt_app_statis_pd.new_role_users IS '创角的账号总数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.new_roles IS '新增角色数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.new_pay_account IS '新增付费账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.new_ac_amount IS '新增账号付费金额'; +COMMENT ON COLUMN public.rpt_app_statis_pd.new_ac_pay_num IS '新增账号付费定单数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.new_pay_user IS '新增付费金额(设备)'; +COMMENT ON COLUMN public.rpt_app_statis_pd.new_user_amount IS '新增付费用户付费金额'; +COMMENT ON COLUMN public.rpt_app_statis_pd.payment_order IS '付费订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.total_amount IS '累计充值'; +COMMENT ON COLUMN public.rpt_app_statis_pd.orig_active_device IS '源渠道活跃设备'; +COMMENT ON COLUMN public.rpt_app_statis_pd.orig_payment_amount IS '源渠道充值金额'; +COMMENT ON COLUMN public.rpt_app_statis_pd.orig_total_amount IS '源渠道累计充值'; +COMMENT ON COLUMN public.rpt_app_statis_pd.orig_newly_payment_device IS '源渠道新增付费设备'; +COMMENT ON COLUMN public.rpt_app_statis_pd.total_payment_order IS '累计付费订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.total_payment_device IS '累计付费设备数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.dbl_newly_device IS '双新设备数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.dbl_newly_account IS '双新账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.nd_old_account IS '新设备老账号设备数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.login_account IS '登录账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.newly_account_role IS '新账号创角数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.rollserv_account IS '滚服账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.rollserv_u_role IS '滚服账号创角数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.rollserv_u_payment_account IS '滚服账号付费账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.rollserv_u_order_payment IS '滚服账号订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pd.rollserv_u_order_amount IS '滚服账号订单金额'; +COMMENT ON COLUMN public.rpt_app_statis_pd.role_newly_account IS '创角的新账号数'; + + +DROP TABLE public.rpt_app_statis_pw; +CREATE TABLE public.rpt_app_statis_pw ( + appid integer NOT NULL, + app_ver text NOT NULL, + channel text NOT NULL, + ds text NOT NULL, + active_device bigint, + newly_device bigint, + start_device bigint, + newly_account bigint, + active_account bigint, + payment_device bigint, + payment_account bigint, + order_created bigint, + order_amount bigint, + order_payment bigint, + total_device bigint, + newly_distinct bigint, + active_distinct bigint, + new_role_users bigint, + new_roles bigint, + new_pay_account bigint, + new_ac_amount bigint, + new_ac_pay_num bigint, + new_pay_user bigint, + new_user_amount bigint, + payment_order bigint, + total_amount bigint, + orig_active_device bigint, + orig_payment_amount bigint, + orig_total_amount bigint, + orig_newly_payment_device bigint default 0, + total_payment_order bigint default 0, + total_payment_device bigint default 0, + dbl_newly_device bigint default 0, + dbl_newly_account bigint default 0, + nd_old_account bigint default 0, + login_account bigint default 0, + newly_account_role bigint, + rollserv_account bigint, + rollserv_u_role bigint, + rollserv_u_payment_account bigint, + rollserv_u_order_payment bigint, + rollserv_u_order_amount bigint, + role_newly_account bigint + ,PRIMARY KEY ( appid, app_ver, channel, ds) +) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'app_ver,channel,ds', +clustering_key = 'ds:asc', +dictionary_encoding_columns = '', +distribution_key = 'appid', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); +COMMENT ON TABLE public.rpt_app_statis_pw IS NULL; +COMMENT ON COLUMN public.rpt_app_statis_pw.active_device IS '活跃设备'; +COMMENT ON COLUMN public.rpt_app_statis_pw.newly_device IS '新增设备'; +COMMENT ON COLUMN public.rpt_app_statis_pw.start_device IS '启动次数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.newly_account IS '新增账号'; +COMMENT ON COLUMN public.rpt_app_statis_pw.active_account IS '活跃账号'; +COMMENT ON COLUMN public.rpt_app_statis_pw.payment_device IS '付费设备'; +COMMENT ON COLUMN public.rpt_app_statis_pw.payment_account IS '付费账号'; +COMMENT ON COLUMN public.rpt_app_statis_pw.order_created IS '创建订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.order_amount IS '订单总金额'; +COMMENT ON COLUMN public.rpt_app_statis_pw.order_payment IS '订单实付款'; +COMMENT ON COLUMN public.rpt_app_statis_pw.total_device IS '累计设备'; +COMMENT ON COLUMN public.rpt_app_statis_pw.newly_distinct IS '新增独立'; +COMMENT ON COLUMN public.rpt_app_statis_pw.active_distinct IS '活跃独立'; +COMMENT ON COLUMN public.rpt_app_statis_pw.new_role_users IS '创角新用户数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.new_roles IS '新增角色数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.new_pay_account IS '新增付费账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.new_ac_amount IS '新增账号付费金额'; +COMMENT ON COLUMN public.rpt_app_statis_pw.new_ac_pay_num IS '新增账号付费定单数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.new_pay_user IS '新增付费用户数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.new_user_amount IS '新增付费用户付费金额'; +COMMENT ON COLUMN public.rpt_app_statis_pw.payment_order IS '付费订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.total_amount IS '累计充值'; +COMMENT ON COLUMN public.rpt_app_statis_pw.orig_active_device IS '源渠道活跃设备'; +COMMENT ON COLUMN public.rpt_app_statis_pw.orig_payment_amount IS '源渠道充值金额'; +COMMENT ON COLUMN public.rpt_app_statis_pw.orig_total_amount IS '源渠道累计充值'; +COMMENT ON COLUMN public.rpt_app_statis_pw.orig_newly_payment_device IS '源渠道新增付费设备'; +COMMENT ON COLUMN public.rpt_app_statis_pw.total_payment_order IS '累计付费订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.total_payment_device IS '累计付费设备数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.dbl_newly_device IS '双新设备数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.dbl_newly_account IS '双新账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.nd_old_account IS '新设备老账号设备数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.login_account IS '登录账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.newly_account_role IS '新账号创角数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.rollserv_account IS '滚服账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.rollserv_u_role IS '滚服账号创角数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.rollserv_u_payment_account IS '滚服账号付费账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.rollserv_u_order_payment IS '滚服账号订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pw.rollserv_u_order_amount IS '滚服账号订单金额'; + + + + +DROP TABLE public.ods_active_account; +CREATE TABLE public.ods_active_account ( + appid bigint NOT NULL, + channel text NOT NULL, + user_id text NOT NULL, + ds text NOT NULL, + app_ver text, + sdk_ver text, + country text, + province text, + city text, + isp text, + ip text, + device_width integer, + device_height integer, + device_id text, + device_lang text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + servid text, + role_id text + ,PRIMARY KEY (appid, channel, user_id, ds) +) WITH ( +orientation = 'column', +storage_format = 'orc', +binlog_level = 'replica', +binlog_ttl = '604800', +bitmap_columns = 'appid,user_id,event_time,ds', +clustering_key = 'ds:asc', +dictionary_encoding_columns = '', +distribution_key = 'appid', +table_storage_mode = 'any', +time_to_live_in_seconds = '31536000' +); + + +DROP TABLE public.ods_payment_object; +CREATE TABLE public.ods_payment_object ( + appid bigint NOT NULL, + channel text NOT NULL, + typd text NOT NULL, + typv text NOT NULL, + ds text NOT NULL, + app_ver text, + event_time bigint + ,PRIMARY KEY (appid, channel, typd, typv, ds) +) WITH ( +orientation = 'column', +storage_format = 'orc', +binlog_level = 'replica', +binlog_ttl = '604800', +bitmap_columns = 'typd,ds,event_time', +dictionary_encoding_columns = '', +distribution_key = 'ds', +table_storage_mode = 'any', +time_to_live_in_seconds = '10368000' +); + + + +DROP TABLE public.ods_active_device; +CREATE TABLE public.ods_active_device ( + appid bigint NOT NULL, + channel text NOT NULL, + device_id text NOT NULL, + ds text NOT NULL, + app_ver text, + sdk_ver text, + country text, + province text, + city text, + isp text, + ip text, + device_width integer, + device_height integer, + device_lang text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + user_id text, + servid text, + role_id text + ,PRIMARY KEY (appid, device_id, channel, ds) +) WITH ( +orientation = 'column', +storage_format = 'orc', +binlog_level = 'replica', +binlog_ttl = '604800', +bitmap_columns = 'appid,device_id,event_time,ds', +clustering_key = 'ds:asc', +dictionary_encoding_columns = '', +distribution_key = 'appid', +table_storage_mode = 'any', +time_to_live_in_seconds = '10368000' +); + + +DROP TABLE public.ods_newly_account; + +CREATE TABLE public.ods_newly_account ( + appid bigint NOT NULL, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_width integer, + device_height integer, + device_id text, + device_lang text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + user_id text NOT NULL, + ds text NOT NULL + ,PRIMARY KEY (appid, user_id) +) WITH ( +orientation = 'column', +storage_format = 'orc', +binlog_level = 'replica', +binlog_ttl = '604800', +bitmap_columns = 'appid,user_id,event_time,ds', +clustering_key = 'ds:asc', +dictionary_encoding_columns = '', +distribution_key = 'appid', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); + + + +DROP TABLE public.rpt_app_statis_rt; + +CREATE TABLE public.rpt_app_statis_rt ( + appid bigint NOT NULL, + app_ver text NOT NULL, + channel text NOT NULL, + start_device bigint, + rt_active_device bigint, + active_device bigint, + newly_device bigint, + active_account bigint, + newly_account bigint, + order_created bigint, + order_amount bigint, + order_payment bigint, + payment_device bigint, + payment_account bigint, + payment_amount bigint, + newly_role_account bigint, + newly_role bigint, + newly_payment_account bigint, + newly_payment_amount bigint, + newly_order_payment bigint, + newly_payment_device bigint, + newly_device_payment_amount bigint, + orig_active_device bigint, + orig_payment_amount bigint, + orig_total_amount bigint, + orig_newly_payment_device bigint, + total_device bigint, + total_amount bigint, + total_payment_order bigint, + total_payment_device bigint, + dbl_newly_device bigint, + dbl_newly_account bigint, + nd_old_account bigint, + login_account bigint, + newly_account_role bigint, + hh text, + hm text NOT NULL, + ds text NOT NULL, + role_newly_account bigint, + rollserv_account bigint, + rollserv_u_role bigint, + rollserv_u_payment_account bigint, + rollserv_u_order_payment bigint, + rollserv_u_order_amount bigint, + rt_active_account bigint, + rt_payment_account bigint, + rt_newly_payment_account bigint + ,PRIMARY KEY ( appid, app_ver, channel, hm, ds) +) WITH ( +orientation = 'row,column', +storage_format = 'sst,orc', +bitmap_columns = 'appid,app_ver,channel,hh,hm,ds', +dictionary_encoding_columns = '', +distribution_key = 'ds,appid', +table_storage_mode = 'any', +time_to_live_in_seconds = '777600' +); +COMMENT ON COLUMN public.rpt_app_statis_rt.start_device IS '启动次数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.rt_active_device IS '活跃次数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.active_device IS '活跃设备'; +COMMENT ON COLUMN public.rpt_app_statis_rt.newly_device IS '新增设备'; +COMMENT ON COLUMN public.rpt_app_statis_rt.active_account IS '活跃账号'; +COMMENT ON COLUMN public.rpt_app_statis_rt.newly_account IS '新增账号'; +COMMENT ON COLUMN public.rpt_app_statis_rt.order_created IS '创建订单数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.order_amount IS '订单总金额'; +COMMENT ON COLUMN public.rpt_app_statis_rt.order_payment IS '付款订单数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.payment_device IS '付费设备'; +COMMENT ON COLUMN public.rpt_app_statis_rt.payment_account IS '付费账号'; +COMMENT ON COLUMN public.rpt_app_statis_rt.payment_amount IS '付费金额'; +COMMENT ON COLUMN public.rpt_app_statis_rt.newly_role_account IS '创角账号数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.newly_role IS '新增创角数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.newly_payment_account IS '新增付费账号数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.newly_payment_amount IS '新增付费金额(账号)'; +COMMENT ON COLUMN public.rpt_app_statis_rt.newly_order_payment IS '新增付费次数(账号)'; +COMMENT ON COLUMN public.rpt_app_statis_rt.newly_payment_device IS '新增付费数(设备)'; +COMMENT ON COLUMN public.rpt_app_statis_rt.newly_device_payment_amount IS '新增付费金额(设备)'; +COMMENT ON COLUMN public.rpt_app_statis_rt.orig_active_device IS '源渠道活跃设备'; +COMMENT ON COLUMN public.rpt_app_statis_rt.orig_payment_amount IS '源渠道充值金额'; +COMMENT ON COLUMN public.rpt_app_statis_rt.orig_total_amount IS '源渠道累计充值'; +COMMENT ON COLUMN public.rpt_app_statis_rt.orig_newly_payment_device IS '源渠道新增付费设备'; +COMMENT ON COLUMN public.rpt_app_statis_rt.total_device IS '昨日累计设备'; +COMMENT ON COLUMN public.rpt_app_statis_rt.total_amount IS '昨日累计充值'; +COMMENT ON COLUMN public.rpt_app_statis_rt.total_payment_order IS '累计付费订单数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.total_payment_device IS '累计付费设备数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.dbl_newly_device IS '双新设备数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.dbl_newly_account IS '双新账号数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.nd_old_account IS '新设备老账号设备数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.login_account IS '登录账号数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.newly_account_role IS '新账号创角数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.role_newly_account IS '创角的新账号数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.rollserv_u_role IS '滚服账号创角数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.rollserv_u_payment_account IS '滚服账号付费账号数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.rollserv_u_order_payment IS '滚服账号订单数'; +COMMENT ON COLUMN public.rpt_app_statis_rt.rollserv_u_order_amount IS '滚服账号订单金额'; + + + +DROP TABLE public.ods_newly_role; +CREATE TABLE public.ods_newly_role ( + appid bigint NOT NULL, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_id text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + user_id text, + servid text, + role_id text NOT NULL, + ds text NOT NULL, + job_id text, + role_level text, + role_name text, + job_name text, + server_name text + ,PRIMARY KEY (appid, role_id) +) WITH ( +orientation = 'row,column', +storage_format = 'sst,orc', +bitmap_columns = 'appid,user_id,servid,ds,event_time', +clustering_key = 'ds:asc', +dictionary_encoding_columns = '', +distribution_key = 'appid', +table_group = 'sdk_statis_tg_s80', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); + + + +DROP TABLE public.rpt_app_statis_pm; +CREATE TABLE public.rpt_app_statis_pm ( + appid integer NOT NULL, + app_ver text NOT NULL, + channel text NOT NULL, + ds text NOT NULL, + active_device bigint, + newly_device bigint, + start_device bigint, + newly_account bigint, + active_account bigint, + payment_device bigint, + payment_account bigint, + order_created bigint, + order_amount bigint, + order_payment bigint, + total_device bigint, + newly_distinct bigint, + active_distinct bigint, + new_role_users bigint, + new_roles bigint, + new_pay_account bigint, + new_ac_amount bigint, + new_ac_pay_num bigint, + new_pay_user bigint, + new_user_amount bigint, + payment_order bigint, + total_amount bigint, + orig_active_device bigint, + orig_payment_amount bigint, + orig_total_amount bigint, + orig_newly_payment_device bigint default 0, + total_payment_order bigint default 0, + total_payment_device bigint default 0, + dbl_newly_device bigint default 0, + dbl_newly_account bigint default 0, + nd_old_account bigint default 0, + login_account bigint default 0, + newly_account_role bigint, + rollserv_account bigint, + rollserv_u_role bigint, + rollserv_u_payment_account bigint, + rollserv_u_order_payment bigint, + rollserv_u_order_amount bigint, + role_newly_account bigint + ,PRIMARY KEY ( appid, app_ver, channel, ds) +) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'app_ver,channel,ds', +clustering_key = 'ds:asc', +dictionary_encoding_columns = '', +distribution_key = 'appid', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); +COMMENT ON COLUMN public.rpt_app_statis_pm.active_device IS '活跃设备'; +COMMENT ON COLUMN public.rpt_app_statis_pm.newly_device IS '新增设备'; +COMMENT ON COLUMN public.rpt_app_statis_pm.start_device IS '启动次数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.newly_account IS '新增账号'; +COMMENT ON COLUMN public.rpt_app_statis_pm.active_account IS '活跃账号'; +COMMENT ON COLUMN public.rpt_app_statis_pm.payment_device IS '付费设备'; +COMMENT ON COLUMN public.rpt_app_statis_pm.payment_account IS '付费账号'; +COMMENT ON COLUMN public.rpt_app_statis_pm.order_created IS '创建订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.order_amount IS '订单总金额'; +COMMENT ON COLUMN public.rpt_app_statis_pm.order_payment IS '订单实付款'; +COMMENT ON COLUMN public.rpt_app_statis_pm.total_device IS '累计设备'; +COMMENT ON COLUMN public.rpt_app_statis_pm.newly_distinct IS '新增独立'; +COMMENT ON COLUMN public.rpt_app_statis_pm.active_distinct IS '活跃独立'; +COMMENT ON COLUMN public.rpt_app_statis_pm.new_role_users IS '创角新用户数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.new_roles IS '新增角色数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.new_pay_account IS '新增付费账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.new_ac_amount IS '新增账号付费金额'; +COMMENT ON COLUMN public.rpt_app_statis_pm.new_ac_pay_num IS '新增账号付费定单数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.new_pay_user IS '新增付费用户数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.new_user_amount IS '新增付费用户付费金额'; +COMMENT ON COLUMN public.rpt_app_statis_pm.payment_order IS '付费订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.total_amount IS '累计充值'; +COMMENT ON COLUMN public.rpt_app_statis_pm.orig_active_device IS '源渠道活跃设备'; +COMMENT ON COLUMN public.rpt_app_statis_pm.orig_payment_amount IS '源渠道充值金额'; +COMMENT ON COLUMN public.rpt_app_statis_pm.orig_total_amount IS '源渠道累计充值'; +COMMENT ON COLUMN public.rpt_app_statis_pm.orig_newly_payment_device IS '源渠道新增付费设备'; +COMMENT ON COLUMN public.rpt_app_statis_pm.total_payment_order IS '累计付费订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.total_payment_device IS '累计付费设备数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.dbl_newly_device IS '双新设备数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.dbl_newly_account IS '双新账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.nd_old_account IS '新设备老账号设备数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.login_account IS '登录账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.newly_account_role IS '新账号创角数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.rollserv_account IS '滚服账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.rollserv_u_role IS '滚服账号创角数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.rollserv_u_payment_account IS '滚服账号付费账号数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.rollserv_u_order_payment IS '滚服账号订单数'; +COMMENT ON COLUMN public.rpt_app_statis_pm.rollserv_u_order_amount IS '滚服账号订单金额'; + + + +DROP TABLE public.ods_newly_device; +CREATE TABLE public.ods_newly_device ( + appid bigint NOT NULL, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_width integer, + device_height integer, + device_id text NOT NULL, + device_lang text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + user_id text, + ds text NOT NULL + ,PRIMARY KEY (appid, device_id) +) WITH ( +orientation = 'column', +storage_format = 'orc', +binlog_level = 'replica', +binlog_ttl = '604800', +bitmap_columns = 'appid,device_id,ds', +clustering_key = 'ds:asc', +dictionary_encoding_columns = '', +distribution_key = 'appid', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); + + +DROP TABLE public.ods_rollserv_account_r; +CREATE TABLE public.ods_rollserv_account_r ( + appid integer, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_id text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + user_id text, + servid text, + role_id text, + job_id text, + role_level text, + role_name text, + job_name text, + ds text +) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'appid,channel,user_id,ds', +dictionary_encoding_columns = '', +distribution_key = 'appid', +table_group = 'sdk_statis_tg_s80', +table_storage_mode = 'any', +time_to_live_in_seconds = '604800' +); + + +DROP TABLE public.ods_rollserv_account; + +CREATE TABLE public.ods_rollserv_account ( + appid integer, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_id text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_time bigint, + user_id text, + servid text, + role_id text, + job_id text, + role_level text, + role_name text, + job_name text, + ds date NOT NULL +) + LOGICAL PARTITION BY LIST (ds) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'app_ver,sdk_ver,channel,country,province,city,isp,ip,device_id,device_model,device_brand,device_os,device_type,user_id,servid,role_id,job_id,role_level,role_name,job_name', +dictionary_encoding_columns = 'app_ver:auto,sdk_ver:auto,channel:auto,country:auto,province:auto,city:auto,isp:auto,ip:auto,device_id:auto,device_model:auto,device_brand:auto,device_os:auto,device_type:auto,user_id:auto,servid:auto,role_id:auto,job_id:auto,role_level:auto,role_name:auto,job_name:auto', +distribution_key = 'appid', +partition_expiration_time = '720 hour', +segment_key = 'ds', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); + + +DROP TABLE public.ods_game_pm_log; + +CREATE TABLE public.ods_game_pm_log ( + appid bigint NOT NULL, + app_id text NOT NULL, + app_ver text, + sdk_ver text, + channel text NOT NULL, + country text, + province text, + city text, + isp text, + ip text, + device_width integer, + device_height integer, + device_id text NOT NULL, + device_lang text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_name text NOT NULL, + event_type text, + event_time timestamp with time zone NOT NULL, + net_type text, + user_id text, + order_id text, + amount bigint, + platform text, + status integer, + servid text, + server_name text, + role_id text, + role_name text, + role_level text, + job_id text, + job_name text, + var1 text, + var2 text, + var3 text, + var4 text, + var5 text, + var6 text, + var7 text, + var8 text, + var9 text, + var10 text, + var11 text, + var12 text, + var13 text, + var14 text, + var15 text, + var16 text, + var17 text, + var18 text, + var19 text, + var20 text, + var21 text, + var22 text, + var23 text, + var24 text, + var25 text, + var26 text, + var27 text, + var28 text, + var29 text, + var30 text, + ds date NOT NULL, + prodid text, + prod_name text, + sub_servid text, + sub_server_name text +) + LOGICAL PARTITION BY LIST (ds) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'app_id,app_ver,sdk_ver,channel,country,province,city,isp,ip,device_id,device_lang,device_model,device_brand,device_os,device_type,event_name,event_type,net_type,user_id,order_id,platform,servid,server_name,role_id,role_name,role_level,job_id,job_name,var1,var2,var3,var4,var5,var6,var7,var8,var9,var10,var11,var12,var13,var14,var15,var16,var17,var18,var19,var20,var21,var22,var23,var24,var25,var26,var27,var28,var29,var30,prodid,prod_name,sub_servid,sub_server_name', +dictionary_encoding_columns = 'app_id:auto,app_ver:auto,sdk_ver:auto,channel:auto,country:auto,province:auto,city:auto,isp:auto,ip:auto,device_id:auto,device_lang:auto,device_model:auto,device_brand:auto,device_os:auto,device_type:auto,event_name:auto,event_type:auto,net_type:auto,user_id:auto,order_id:auto,platform:auto,servid:auto,server_name:auto,role_id:auto,role_name:auto,role_level:auto,job_id:auto,job_name:auto,var1:auto,var2:auto,var3:auto,var4:auto,var5:auto,var6:auto,var7:auto,var8:auto,var9:auto,var10:auto,var11:auto,var12:auto,var13:auto,var14:auto,var15:auto,var16:auto,var17:auto,var18:auto,var19:auto,var20:auto,var21:auto,var22:auto,var23:auto,var24:auto,var25:auto,var26:auto,var27:auto,var28:auto,var29:auto,var30:auto,prodid:auto,prod_name:auto,sub_servid:auto,sub_server_name:auto', +distribution_key = 'app_id', +partition_expiration_time = '384 hour', +partition_require_filter = 'true', +segment_key = 'event_time', +table_group = 'sdk_statis_tg_s80', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); + + +DROP TABLE public.ods_track_log; +CREATE TABLE public.ods_track_log ( + appid bigint NOT NULL, + app_id text NOT NULL, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_width integer, + device_height integer, + device_id text NOT NULL, + device_lang text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_name text NOT NULL, + event_type text, + event_time bigint NOT NULL, + net_type text, + user_id text, + order_id text, + amount bigint, + platform text, + status integer, + servid text, + server_name text, + role_id text, + role_name text, + role_level text, + job_id text, + job_name text, + var1 text, + var2 text, + var3 text, + var4 text, + var5 text, + var6 text, + var7 text, + var8 text, + var9 text, + var10 text, + var11 text, + var12 text, + var13 text, + var14 text, + var15 text, + var16 text, + var17 text, + var18 text, + var19 text, + var20 text, + var21 text, + var22 text, + var23 text, + var24 text, + var25 text, + var26 text, + var27 text, + var28 text, + var29 text, + var30 text, + ds date NOT NULL, + prodid text, + prod_name text, + sub_servid text, + sub_server_name text +) + LOGICAL PARTITION BY LIST (ds) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'app_id,app_ver,sdk_ver,channel,country,province,city,isp,ip,device_id,device_lang,device_model,device_brand,device_os,device_type,event_name,event_type,net_type,user_id,order_id,platform,servid,server_name,role_id,role_name,role_level,job_id,job_name,var1,var2,var3,var4,var5,var6,var7,var8,var9,var10,var11,var12,var13,var14,var15,var16,var17,var18,var19,var20,var21,var22,var23,var24,var25,var26,var27,var28,var29,var30,prodid,prod_name,sub_servid,sub_server_name', +dictionary_encoding_columns = 'app_id:auto,app_ver:auto,sdk_ver:auto,channel:auto,country:auto,province:auto,city:auto,isp:auto,ip:auto,device_id:auto,device_lang:auto,device_model:auto,device_brand:auto,device_os:auto,device_type:auto,event_name:auto,event_type:auto,net_type:auto,user_id:auto,order_id:auto,platform:auto,servid:auto,server_name:auto,role_id:auto,role_name:auto,role_level:auto,job_id:auto,job_name:auto,var1:auto,var2:auto,var3:auto,var4:auto,var5:auto,var6:auto,var7:auto,var8:auto,var9:auto,var10:auto,var11:auto,var12:auto,var13:auto,var14:auto,var15:auto,var16:auto,var17:auto,var18:auto,var19:auto,var20:auto,var21:auto,var22:auto,var23:auto,var24:auto,var25:auto,var26:auto,var27:auto,var28:auto,var29:auto,var30:auto,prodid:auto,prod_name:auto,sub_servid:auto,sub_server_name:auto', +distribution_key = 'appid', +partition_expiration_time = '8880 hour', +partition_require_filter = 'true', +segment_key = 'ds', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); +COMMENT ON TABLE public.ods_track_log IS '日志明细表'; +COMMENT ON COLUMN public.ods_track_log.device_brand IS 'from device_model'; +COMMENT ON COLUMN public.ods_track_log.status IS '-1非支付事件/0预支付/1已支付'; + + + +DROP TABLE public.ods_track_log4dur; +CREATE TABLE public.ods_track_log4dur ( + appid bigint NOT NULL, + app_id text NOT NULL, + app_ver text, + sdk_ver text, + channel text, + country text, + province text, + city text, + isp text, + ip text, + device_width integer, + device_height integer, + device_id text NOT NULL, + device_lang text, + device_model text, + device_brand text, + device_os text, + device_type text, + event_name text NOT NULL, + event_type text, + event_time bigint NOT NULL, + net_type text, + user_id text, + order_id text, + amount bigint, + platform text, + status integer, + servid text, + server_name text, + role_id text, + role_name text, + role_level text, + job_id text, + job_name text, + var1 text, + var2 text, + var3 text, + var4 text, + var5 text, + var6 text, + var7 text, + var8 text, + var9 text, + var10 text, + var11 text, + var12 text, + var13 text, + var14 text, + var15 text, + var16 text, + var17 text, + var18 text, + var19 text, + var20 text, + var21 text, + var22 text, + var23 text, + var24 text, + var25 text, + var26 text, + var27 text, + var28 text, + var29 text, + var30 text, + ds date NOT NULL, + prodid text, + prod_name text, + sub_servid text, + sub_server_name text +) + LOGICAL PARTITION BY LIST (ds) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'app_id,app_ver,sdk_ver,channel,country,province,city,isp,ip,device_id,device_lang,device_model,device_brand,device_os,device_type,event_name,event_type,net_type,user_id,order_id,platform,servid,server_name,role_id,role_name,role_level,job_id,job_name,var1,var2,var3,var4,var5,var6,var7,var8,var9,var10,var11,var12,var13,var14,var15,var16,var17,var18,var19,var20,var21,var22,var23,var24,var25,var26,var27,var28,var29,var30,prodid,prod_name,sub_servid,sub_server_name', +dictionary_encoding_columns = 'app_id:auto,app_ver:auto,sdk_ver:auto,channel:auto,country:auto,province:auto,city:auto,isp:auto,ip:auto,device_id:auto,device_lang:auto,device_model:auto,device_brand:auto,device_os:auto,device_type:auto,event_name:auto,event_type:auto,net_type:auto,user_id:auto,order_id:auto,platform:auto,servid:auto,server_name:auto,role_id:auto,role_name:auto,role_level:auto,job_id:auto,job_name:auto,var1:auto,var2:auto,var3:auto,var4:auto,var5:auto,var6:auto,var7:auto,var8:auto,var9:auto,var10:auto,var11:auto,var12:auto,var13:auto,var14:auto,var15:auto,var16:auto,var17:auto,var18:auto,var19:auto,var20:auto,var21:auto,var22:auto,var23:auto,var24:auto,var25:auto,var26:auto,var27:auto,var28:auto,var29:auto,var30:auto,prodid:auto,prod_name:auto,sub_servid:auto,sub_server_name:auto', +distribution_key = 'appid', +partition_expiration_time = '168 hour', +partition_require_filter = 'true', +segment_key = 'ds', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); + + + +DROP TABLE datasci.dws_role_churn_map_task_d; + +CREATE TABLE datasci.dws_role_churn_map_task_d ( + appid integer NOT NULL, + servid text NOT NULL, + server_name text, + user_id text NOT NULL, + role_id text NOT NULL, + ds date NOT NULL, + role_level text, + map text, + task text, + victor_name text, + death_person_cnt integer, + death_enemy_cnt integer, + event_time timestamp with time zone NOT NULL +) + LOGICAL PARTITION BY LIST (ds) WITH ( +orientation = 'column', +storage_format = 'orc', +bitmap_columns = 'servid,server_name,user_id,role_id,role_level,map,task,victor_name', +dictionary_encoding_columns = 'servid:auto,server_name:auto,user_id:auto,role_id:auto,role_level:auto,map:auto,task:auto,victor_name:auto', +distribution_key = 'appid', +partition_expiration_time = '720 hour', +partition_require_filter = 'true', +segment_key = 'event_time', +table_storage_mode = 'any', +time_to_live_in_seconds = '3153600000' +); diff --git a/python/uv/1.sql b/python/uv/1.sql new file mode 100644 index 0000000..fd4a884 --- /dev/null +++ b/python/uv/1.sql @@ -0,0 +1,25 @@ +uv python find 3.7 +uv venv -p python3.11 my-project-env +uv init +uv add xxx +uv run main.py + +uvx / uv tool run:在临时环境中运行工具。 +uv tool install:在用户范围内安装工具。 +uv tool uninstall:卸载工具。 +uv tool list:列出已安装的工具。 +uv tool update-shell:更新 shell 以包含工具可执行文件。 +uv pip install:将包安装到当前环境中。 +uv pip show:显示有关已安装包的详细信息。 +uv pip freeze:列出已安装的软件包及其版本。 +uv pip check:检查当前环境是否具有兼容的软件包。 +uv pip list:列出已安装的软件包。 +uv pip uninstall:卸载软件包。 +uv pip tree:查看环境的依赖关系树 + +uv cache clean:删除缓存条目。 +uv cache prune:删除过时的缓存条目。 +uv cache dir:显示uv缓存目录路径。 +uv tool dir:显示uv工具目录路径。 +uv python dir:显示 uv 安装的 Python 版本路径。 +uv self update:将 uv 更新到最新版本。 \ No newline at end of file