From 9dbaaec3da25c6034f0d23af35d826f29ed6ed1d Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:21:17 +0800 Subject: [PATCH 01/23] Change 'type' to 'data_type' in schema.json --- .../plugins/tushare_weekly/schema.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_weekly/schema.json b/src/stock_datasource/plugins/tushare_weekly/schema.json index 9a6d2c1f..df05241c 100644 --- a/src/stock_datasource/plugins/tushare_weekly/schema.json +++ b/src/stock_datasource/plugins/tushare_weekly/schema.json @@ -2,17 +2,17 @@ "table_name": "ods_weekly", "database": "stock_datasource", "columns": [ - {"name": "ts_code", "type": "String", "comment": "股票代码"}, - {"name": "trade_date", "type": "String", "comment": "交易日期"}, - {"name": "open", "type": "Nullable(Float64)", "comment": "周开盘价"}, - {"name": "high", "type": "Nullable(Float64)", "comment": "周最高价"}, - {"name": "low", "type": "Nullable(Float64)", "comment": "周最低价"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "周收盘价"}, - {"name": "pre_close", "type": "Nullable(Float64)", "comment": "上一周收盘价"}, - {"name": "change", "type": "Nullable(Float64)", "comment": "周涨跌额"}, - {"name": "pct_chg", "type": "Nullable(Float64)", "comment": "周涨跌幅"}, - {"name": "vol", "type": "Nullable(Float64)", "comment": "周成交量"}, - {"name": "amount", "type": "Nullable(Float64)", "comment": "周成交额"} + {"name": "ts_code", "data_type": "String", "comment": "股票代码"}, + {"name": "trade_date", "data_type": "String", "comment": "交易日期"}, + {"name": "open", "data_type": "Nullable(Float64)", "comment": "周开盘价"}, + {"name": "high", "data_type": "Nullable(Float64)", "comment": "周最高价"}, + {"name": "low", "data_type": "Nullable(Float64)", "comment": "周最低价"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "周收盘价"}, + {"name": "pre_close", "data_type": "Nullable(Float64)", "comment": "上一周收盘价"}, + {"name": "change", "data_type": "Nullable(Float64)", "comment": "周涨跌额"}, + {"name": "pct_chg", "data_type": "Nullable(Float64)", "comment": "周涨跌幅"}, + {"name": "vol", "data_type": "Nullable(Float64)", "comment": "周成交量"}, + {"name": "amount", "data_type": "Nullable(Float64)", "comment": "周成交额"} ], "engine": "ReplacingMergeTree()", "partition_by": "substring(trade_date, 1, 4)", From fd89d6c2038987147452e70757ad315f0d39280c Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:22:27 +0800 Subject: [PATCH 02/23] Update schema.json --- .../plugins/tushare_suspend_d/schema.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_suspend_d/schema.json b/src/stock_datasource/plugins/tushare_suspend_d/schema.json index 71799820..c71625e2 100644 --- a/src/stock_datasource/plugins/tushare_suspend_d/schema.json +++ b/src/stock_datasource/plugins/tushare_suspend_d/schema.json @@ -2,10 +2,10 @@ "table_name": "ods_suspend_d", "database": "stock_datasource", "columns": [ - {"name": "ts_code", "type": "String", "comment": "股票代码"}, - {"name": "trade_date", "type": "String", "comment": "停复牌日期"}, - {"name": "suspend_timing", "type": "Nullable(String)", "comment": "日内停牌时间段"}, - {"name": "suspend_type", "type": "String", "comment": "停复牌类型:S-停牌,R-复牌"} + {"name": "ts_code", "data_type": "String", "comment": "股票代码"}, + {"name": "trade_date", "data_type": "String", "comment": "停复牌日期"}, + {"name": "suspend_timing", "data_type": "Nullable(String)", "comment": "日内停牌时间段"}, + {"name": "suspend_type", "data_type": "String", "comment": "停复牌类型:S-停牌,R-复牌"} ], "engine": "ReplacingMergeTree()", "partition_by": "substring(trade_date, 1, 6)", From 0b9dec2b512f1c461b2836d2d84a9a8167921fa3 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:23:35 +0800 Subject: [PATCH 03/23] Update schema.json --- .../plugins/tushare_stock_company/schema.json | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_stock_company/schema.json b/src/stock_datasource/plugins/tushare_stock_company/schema.json index 075ef2fa..aaf5c804 100644 --- a/src/stock_datasource/plugins/tushare_stock_company/schema.json +++ b/src/stock_datasource/plugins/tushare_stock_company/schema.json @@ -5,25 +5,25 @@ "order_by": ["ts_code"], "comment": "上市公司基础信息 from TuShare stock_company API", "columns": [ - {"name": "ts_code", "type": "LowCardinality(String)", "comment": "股票代码"}, - {"name": "com_name", "type": "String", "comment": "公司全称"}, - {"name": "com_id", "type": "String", "comment": "统一社会信用代码"}, - {"name": "exchange", "type": "LowCardinality(String)", "comment": "交易所代码"}, - {"name": "chairman", "type": "String", "comment": "法人代表"}, - {"name": "manager", "type": "String", "comment": "总经理"}, - {"name": "secretary", "type": "String", "comment": "董秘"}, - {"name": "reg_capital", "type": "Nullable(Float64)", "comment": "注册资本(万元)"}, - {"name": "setup_date", "type": "Nullable(Date)", "comment": "注册日期"}, - {"name": "province", "type": "String", "comment": "所在省份"}, - {"name": "city", "type": "String", "comment": "所在城市"}, - {"name": "introduction", "type": "String", "comment": "公司介绍"}, - {"name": "website", "type": "String", "comment": "公司主页"}, - {"name": "email", "type": "String", "comment": "电子邮件"}, - {"name": "office", "type": "String", "comment": "办公室地址"}, - {"name": "employees", "type": "Nullable(Int32)", "comment": "员工人数"}, - {"name": "main_business", "type": "String", "comment": "主要业务及产品"}, - {"name": "business_scope", "type": "String", "comment": "经营范围"}, - {"name": "version", "type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, - {"name": "_ingested_at", "type": "DateTime", "default": "now()", "comment": "数据入库时间"} + {"name": "ts_code", "data_type": "LowCardinality(String)", "comment": "股票代码"}, + {"name": "com_name", "data_type": "String", "comment": "公司全称"}, + {"name": "com_id", "data_type": "String", "comment": "统一社会信用代码"}, + {"name": "exchange", "data_type": "LowCardinality(String)", "comment": "交易所代码"}, + {"name": "chairman", "data_type": "String", "comment": "法人代表"}, + {"name": "manager", "data_type": "String", "comment": "总经理"}, + {"name": "secretary", "data_type": "String", "comment": "董秘"}, + {"name": "reg_capital", "data_type": "Nullable(Float64)", "comment": "注册资本(万元)"}, + {"name": "setup_date", "data_type": "Nullable(Date)", "comment": "注册日期"}, + {"name": "province", "data_type": "String", "comment": "所在省份"}, + {"name": "city", "data_type": "String", "comment": "所在城市"}, + {"name": "introduction", "data_type": "String", "comment": "公司介绍"}, + {"name": "website", "data_type": "String", "comment": "公司主页"}, + {"name": "email", "data_type": "String", "comment": "电子邮件"}, + {"name": "office", "data_type": "String", "comment": "办公室地址"}, + {"name": "employees", "data_type": "Nullable(Int32)", "comment": "员工人数"}, + {"name": "main_business", "data_type": "String", "comment": "主要业务及产品"}, + {"name": "business_scope", "data_type": "String", "comment": "经营范围"}, + {"name": "version", "data_type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, + {"name": "_ingested_at", "data_type": "DateTime", "default": "now()", "comment": "数据入库时间"} ] } From 254032731cb9356563b3c08bc24845732a243bb3 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:25:17 +0800 Subject: [PATCH 04/23] Update schema.json --- .../plugins/tushare_stk_mins/schema.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_stk_mins/schema.json b/src/stock_datasource/plugins/tushare_stk_mins/schema.json index 81df553b..e454350f 100644 --- a/src/stock_datasource/plugins/tushare_stk_mins/schema.json +++ b/src/stock_datasource/plugins/tushare_stk_mins/schema.json @@ -5,16 +5,16 @@ "order_by": ["ts_code", "freq", "trade_time"], "comment": "A股历史分钟行情 from TuShare stk_mins API", "columns": [ - {"name": "ts_code", "type": "LowCardinality(String)", "comment": "股票代码"}, - {"name": "freq", "type": "LowCardinality(String)", "comment": "分钟频度(1min/5min/15min/30min/60min)"}, - {"name": "trade_time", "type": "DateTime", "comment": "交易时间"}, - {"name": "open", "type": "Nullable(Float64)", "comment": "开盘价"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "收盘价"}, - {"name": "high", "type": "Nullable(Float64)", "comment": "最高价"}, - {"name": "low", "type": "Nullable(Float64)", "comment": "最低价"}, - {"name": "vol", "type": "Nullable(Int64)", "comment": "成交量(股)"}, - {"name": "amount", "type": "Nullable(Float64)", "comment": "成交金额(元)"}, - {"name": "version", "type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, - {"name": "_ingested_at", "type": "DateTime", "default": "now()", "comment": "数据入库时间"} + {"name": "ts_code", "data_type": "LowCardinality(String)", "comment": "股票代码"}, + {"name": "freq", "data_type": "LowCardinality(String)", "comment": "分钟频度(1min/5min/15min/30min/60min)"}, + {"name": "trade_time", "data_type": "DateTime", "comment": "交易时间"}, + {"name": "open", "data_type": "Nullable(Float64)", "comment": "开盘价"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "收盘价"}, + {"name": "high", "data_type": "Nullable(Float64)", "comment": "最高价"}, + {"name": "low", "data_type": "Nullable(Float64)", "comment": "最低价"}, + {"name": "vol", "data_type": "Nullable(Int64)", "comment": "成交量(股)"}, + {"name": "amount", "data_type": "Nullable(Float64)", "comment": "成交金额(元)"}, + {"name": "version", "data_type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, + {"name": "_ingested_at", "data_type": "DateTime", "default": "now()", "comment": "数据入库时间"} ] } From 6b30e0ac38c0699e2d307f88fa29fa7cdf409262 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:26:30 +0800 Subject: [PATCH 05/23] Update schema.json --- .../plugins/tushare_rt_min/schema.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_rt_min/schema.json b/src/stock_datasource/plugins/tushare_rt_min/schema.json index 78957527..0dc70dc9 100644 --- a/src/stock_datasource/plugins/tushare_rt_min/schema.json +++ b/src/stock_datasource/plugins/tushare_rt_min/schema.json @@ -5,16 +5,16 @@ "order_by": ["ts_code", "freq", "trade_time"], "comment": "A股实时分钟K线 from TuShare rt_min API", "columns": [ - {"name": "ts_code", "type": "LowCardinality(String)", "comment": "股票代码"}, - {"name": "freq", "type": "LowCardinality(String)", "comment": "K线频率(1MIN/5MIN/15MIN/30MIN/60MIN)"}, - {"name": "trade_time", "type": "DateTime", "comment": "交易时间"}, - {"name": "open", "type": "Nullable(Float64)", "comment": "开盘价"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "收盘价"}, - {"name": "high", "type": "Nullable(Float64)", "comment": "最高价"}, - {"name": "low", "type": "Nullable(Float64)", "comment": "最低价"}, - {"name": "vol", "type": "Nullable(Float64)", "comment": "成交量(股)"}, - {"name": "amount", "type": "Nullable(Float64)", "comment": "成交额(元)"}, - {"name": "version", "type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, - {"name": "_ingested_at", "type": "DateTime", "default": "now()", "comment": "数据入库时间"} + {"name": "ts_code", "data_type": "LowCardinality(String)", "comment": "股票代码"}, + {"name": "freq", "data_type": "LowCardinality(String)", "comment": "K线频率(1MIN/5MIN/15MIN/30MIN/60MIN)"}, + {"name": "trade_time", "data_type": "DateTime", "comment": "交易时间"}, + {"name": "open", "data_type": "Nullable(Float64)", "comment": "开盘价"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "收盘价"}, + {"name": "high", "data_type": "Nullable(Float64)", "comment": "最高价"}, + {"name": "low", "data_type": "Nullable(Float64)", "comment": "最低价"}, + {"name": "vol", "data_type": "Nullable(Float64)", "comment": "成交量(股)"}, + {"name": "amount", "data_type": "Nullable(Float64)", "comment": "成交额(元)"}, + {"name": "version", "data_type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, + {"name": "_ingested_at", "data_type": "DateTime", "default": "now()", "comment": "数据入库时间"} ] } From e528d9b937db395bd13b89b937d971590a278847 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:27:06 +0800 Subject: [PATCH 06/23] Update schema.json --- .../plugins/tushare_rt_k/schema.json | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_rt_k/schema.json b/src/stock_datasource/plugins/tushare_rt_k/schema.json index 60819c5d..deba2072 100644 --- a/src/stock_datasource/plugins/tushare_rt_k/schema.json +++ b/src/stock_datasource/plugins/tushare_rt_k/schema.json @@ -5,22 +5,22 @@ "order_by": ["ts_code", "trade_time"], "comment": "沪深京实时日线 from TuShare rt_k API", "columns": [ - {"name": "ts_code", "type": "LowCardinality(String)", "comment": "股票代码"}, - {"name": "name", "type": "String", "comment": "股票名称"}, - {"name": "pre_close", "type": "Nullable(Float64)", "comment": "昨收价"}, - {"name": "high", "type": "Nullable(Float64)", "comment": "最高价"}, - {"name": "open", "type": "Nullable(Float64)", "comment": "开盘价"}, - {"name": "low", "type": "Nullable(Float64)", "comment": "最低价"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "收盘价(最新价)"}, - {"name": "vol", "type": "Nullable(Int64)", "comment": "成交量(股)"}, - {"name": "amount", "type": "Nullable(Int64)", "comment": "成交金额(元)"}, - {"name": "num", "type": "Nullable(Int32)", "comment": "成交笔数"}, - {"name": "ask_price1", "type": "Nullable(Float64)", "comment": "委托卖一价"}, - {"name": "ask_volume1", "type": "Nullable(Int64)", "comment": "委托卖一量"}, - {"name": "bid_price1", "type": "Nullable(Float64)", "comment": "委托买一价"}, - {"name": "bid_volume1", "type": "Nullable(Int64)", "comment": "委托买一量"}, - {"name": "trade_time", "type": "DateTime", "comment": "交易时间"}, - {"name": "version", "type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, - {"name": "_ingested_at", "type": "DateTime", "default": "now()", "comment": "数据入库时间"} + {"name": "ts_code", "data_type": "LowCardinality(String)", "comment": "股票代码"}, + {"name": "name", "data_type": "String", "comment": "股票名称"}, + {"name": "pre_close", "data_type": "Nullable(Float64)", "comment": "昨收价"}, + {"name": "high", "data_type": "Nullable(Float64)", "comment": "最高价"}, + {"name": "open", "data_type": "Nullable(Float64)", "comment": "开盘价"}, + {"name": "low", "data_type": "Nullable(Float64)", "comment": "最低价"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "收盘价(最新价)"}, + {"name": "vol", "data_type": "Nullable(Int64)", "comment": "成交量(股)"}, + {"name": "amount", "data_type": "Nullable(Int64)", "comment": "成交金额(元)"}, + {"name": "num", "data_type": "Nullable(Int32)", "comment": "成交笔数"}, + {"name": "ask_price1", "data_type": "Nullable(Float64)", "comment": "委托卖一价"}, + {"name": "ask_volume1", "data_type": "Nullable(Int64)", "comment": "委托卖一量"}, + {"name": "bid_price1", "data_type": "Nullable(Float64)", "comment": "委托买一价"}, + {"name": "bid_volume1", "data_type": "Nullable(Int64)", "comment": "委托买一量"}, + {"name": "trade_time", "data_type": "DateTime", "comment": "交易时间"}, + {"name": "version", "data_type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, + {"name": "_ingested_at", "data_type": "DateTime", "default": "now()", "comment": "数据入库时间"} ] } From 4754bf361d1726a87d45043a8c9079b903b581af Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:27:37 +0800 Subject: [PATCH 07/23] Update schema.json --- .../plugins/tushare_rt_idx_k/schema.json | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_rt_idx_k/schema.json b/src/stock_datasource/plugins/tushare_rt_idx_k/schema.json index c35c4512..5fa1159a 100644 --- a/src/stock_datasource/plugins/tushare_rt_idx_k/schema.json +++ b/src/stock_datasource/plugins/tushare_rt_idx_k/schema.json @@ -5,17 +5,17 @@ "order_by": ["trade_date", "ts_code"], "comment": "指数实时日线快照 from TuShare rt_idx_k API", "columns": [ - {"name": "trade_date", "type": "Date", "comment": "交易日期"}, - {"name": "ts_code", "type": "LowCardinality(String)", "comment": "证券代码"}, - {"name": "name", "type": "String", "comment": "证券名称"}, - {"name": "open", "type": "Nullable(Float64)", "comment": "开盘价"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "收盘价/最新价"}, - {"name": "high", "type": "Nullable(Float64)", "comment": "最高价"}, - {"name": "low", "type": "Nullable(Float64)", "comment": "最低价"}, - {"name": "pre_close", "type": "Nullable(Float64)", "comment": "昨收价"}, - {"name": "vol", "type": "Nullable(Float64)", "comment": "成交量"}, - {"name": "pct_chg", "type": "Nullable(Float32)", "comment": "涨跌幅(%)"}, - {"name": "collected_at", "type": "DateTime", "comment": "采集时间"}, - {"name": "version", "type": "UInt64", "comment": "版本号(毫秒)"} + {"name": "trade_date", "data_type": "Date", "comment": "交易日期"}, + {"name": "ts_code", "data_type": "LowCardinality(String)", "comment": "证券代码"}, + {"name": "name", "data_type": "String", "comment": "证券名称"}, + {"name": "open", "data_type": "Nullable(Float64)", "comment": "开盘价"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "收盘价/最新价"}, + {"name": "high", "data_type": "Nullable(Float64)", "comment": "最高价"}, + {"name": "low", "data_type": "Nullable(Float64)", "comment": "最低价"}, + {"name": "pre_close", "data_type": "Nullable(Float64)", "comment": "昨收价"}, + {"name": "vol", "data_type": "Nullable(Float64)", "comment": "成交量"}, + {"name": "pct_chg", "data_type": "Nullable(Float32)", "comment": "涨跌幅(%)"}, + {"name": "collected_at", "data_type": "DateTime", "comment": "采集时间"}, + {"name": "version", "data_type": "UInt64", "comment": "版本号(毫秒)"} ] } From 4f9a4dc294cb1fc5b0d3b819d2fbd17251a5dbb0 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:28:09 +0800 Subject: [PATCH 08/23] Update schema.json --- .../plugins/tushare_rt_hk_k/schema.json | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_rt_hk_k/schema.json b/src/stock_datasource/plugins/tushare_rt_hk_k/schema.json index 743b4bd7..e575bfce 100644 --- a/src/stock_datasource/plugins/tushare_rt_hk_k/schema.json +++ b/src/stock_datasource/plugins/tushare_rt_hk_k/schema.json @@ -5,19 +5,19 @@ "order_by": ["trade_date", "ts_code"], "comment": "港股实时日线快照 from TuShare rt_hk_k API", "columns": [ - {"name": "trade_date", "type": "Date", "comment": "交易日期"}, - {"name": "ts_code", "type": "LowCardinality(String)", "comment": "证券代码"}, - {"name": "name", "type": "Nullable(String)", "comment": "证券名称"}, - {"name": "open", "type": "Nullable(Float64)", "comment": "开盘价"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "收盘价/最新价"}, - {"name": "high", "type": "Nullable(Float64)", "comment": "最高价"}, - {"name": "low", "type": "Nullable(Float64)", "comment": "最低价"}, - {"name": "pre_close", "type": "Nullable(Float64)", "comment": "昨收价"}, - {"name": "vol", "type": "Nullable(Float64)", "comment": "成交量"}, - {"name": "pct_chg", "type": "Nullable(Float32)", "comment": "涨跌幅(%)"}, - {"name": "bid", "type": "Nullable(Float64)", "comment": "买一价"}, - {"name": "ask", "type": "Nullable(Float64)", "comment": "卖一价"}, - {"name": "collected_at", "type": "DateTime", "comment": "采集时间"}, - {"name": "version", "type": "UInt64", "comment": "版本号(毫秒)"} + {"name": "trade_date", "data_type": "Date", "comment": "交易日期"}, + {"name": "ts_code", "data_type": "LowCardinality(String)", "comment": "证券代码"}, + {"name": "name", "data_type": "Nullable(String)", "comment": "证券名称"}, + {"name": "open", "data_type": "Nullable(Float64)", "comment": "开盘价"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "收盘价/最新价"}, + {"name": "high", "data_type": "Nullable(Float64)", "comment": "最高价"}, + {"name": "low", "data_type": "Nullable(Float64)", "comment": "最低价"}, + {"name": "pre_close", "data_type": "Nullable(Float64)", "comment": "昨收价"}, + {"name": "vol", "data_type": "Nullable(Float64)", "comment": "成交量"}, + {"name": "pct_chg", "data_type": "Nullable(Float32)", "comment": "涨跌幅(%)"}, + {"name": "bid", "data_type": "Nullable(Float64)", "comment": "买一价"}, + {"name": "ask", "data_type": "Nullable(Float64)", "comment": "卖一价"}, + {"name": "collected_at", "data_type": "DateTime", "comment": "采集时间"}, + {"name": "version", "data_type": "UInt64", "comment": "版本号(毫秒)"} ] } From cd5d51cd3fee79c0659400d4de0da691c46c4dd6 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:30:12 +0800 Subject: [PATCH 09/23] Update schema.json --- .../plugins/tushare_rt_etf_min/schema.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_rt_etf_min/schema.json b/src/stock_datasource/plugins/tushare_rt_etf_min/schema.json index ddbf9588..e0292cd4 100644 --- a/src/stock_datasource/plugins/tushare_rt_etf_min/schema.json +++ b/src/stock_datasource/plugins/tushare_rt_etf_min/schema.json @@ -5,16 +5,16 @@ "order_by": ["ts_code", "freq", "trade_time"], "comment": "ETF实时分钟K线 from TuShare rt_min API (ETF)", "columns": [ - {"name": "ts_code", "type": "LowCardinality(String)", "comment": "ETF代码"}, - {"name": "freq", "type": "LowCardinality(String)", "comment": "K线频率(1MIN/5MIN/15MIN/30MIN/60MIN)"}, - {"name": "trade_time", "type": "DateTime", "comment": "交易时间"}, - {"name": "open", "type": "Nullable(Float64)", "comment": "开盘价"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "收盘价"}, - {"name": "high", "type": "Nullable(Float64)", "comment": "最高价"}, - {"name": "low", "type": "Nullable(Float64)", "comment": "最低价"}, - {"name": "vol", "type": "Nullable(Float64)", "comment": "成交量(股)"}, - {"name": "amount", "type": "Nullable(Float64)", "comment": "成交额(元)"}, - {"name": "version", "type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, - {"name": "_ingested_at", "type": "DateTime", "default": "now()", "comment": "数据入库时间"} + {"name": "ts_code", "data_type": "LowCardinality(String)", "comment": "ETF代码"}, + {"name": "freq", "data_type": "LowCardinality(String)", "comment": "K线频率(1MIN/5MIN/15MIN/30MIN/60MIN)"}, + {"name": "trade_time", "data_type": "DateTime", "comment": "交易时间"}, + {"name": "open", "data_type": "Nullable(Float64)", "comment": "开盘价"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "收盘价"}, + {"name": "high", "data_type": "Nullable(Float64)", "comment": "最高价"}, + {"name": "low", "data_type": "Nullable(Float64)", "comment": "最低价"}, + {"name": "vol", "data_type": "Nullable(Float64)", "comment": "成交量(股)"}, + {"name": "amount", "data_type": "Nullable(Float64)", "comment": "成交额(元)"}, + {"name": "version", "data_type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, + {"name": "_ingested_at", "data_type": "DateTime", "default": "now()", "comment": "数据入库时间"} ] } From 4e180b9877bafac671fc72cdd7736d1fc8fcc1de Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:30:56 +0800 Subject: [PATCH 10/23] Update schema.json --- .../plugins/tushare_rt_etf_k/schema.json | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_rt_etf_k/schema.json b/src/stock_datasource/plugins/tushare_rt_etf_k/schema.json index ca0ef5f9..8013d29b 100644 --- a/src/stock_datasource/plugins/tushare_rt_etf_k/schema.json +++ b/src/stock_datasource/plugins/tushare_rt_etf_k/schema.json @@ -5,18 +5,18 @@ "order_by": ["trade_date", "ts_code"], "comment": "ETF实时日线快照 from TuShare rt_etf_k API", "columns": [ - {"name": "trade_date", "type": "Date", "comment": "交易日期"}, - {"name": "ts_code", "type": "LowCardinality(String)", "comment": "证券代码"}, - {"name": "name", "type": "String", "comment": "证券名称"}, - {"name": "open", "type": "Nullable(Float64)", "comment": "开盘价"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "收盘价/最新价"}, - {"name": "high", "type": "Nullable(Float64)", "comment": "最高价"}, - {"name": "low", "type": "Nullable(Float64)", "comment": "最低价"}, - {"name": "pre_close", "type": "Nullable(Float64)", "comment": "昨收价"}, - {"name": "vol", "type": "Nullable(Float64)", "comment": "成交量"}, - {"name": "amount", "type": "Nullable(Float64)", "comment": "成交额"}, - {"name": "pct_chg", "type": "Nullable(Float32)", "comment": "涨跌幅(%)"}, - {"name": "collected_at", "type": "DateTime", "comment": "采集时间"}, - {"name": "version", "type": "UInt64", "comment": "版本号(毫秒)"} + {"name": "trade_date", "data_type": "Date", "comment": "交易日期"}, + {"name": "ts_code", "data_type": "LowCardinality(String)", "comment": "证券代码"}, + {"name": "name", "data_type": "String", "comment": "证券名称"}, + {"name": "open", "data_type": "Nullable(Float64)", "comment": "开盘价"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "收盘价/最新价"}, + {"name": "high", "data_type": "Nullable(Float64)", "comment": "最高价"}, + {"name": "low", "data_type": "Nullable(Float64)", "comment": "最低价"}, + {"name": "pre_close", "data_type": "Nullable(Float64)", "comment": "昨收价"}, + {"name": "vol", "data_type": "Nullable(Float64)", "comment": "成交量"}, + {"name": "amount", "data_type": "Nullable(Float64)", "comment": "成交额"}, + {"name": "pct_chg", "data_type": "Nullable(Float32)", "comment": "涨跌幅(%)"}, + {"name": "collected_at", "data_type": "DateTime", "comment": "采集时间"}, + {"name": "version", "data_type": "UInt64", "comment": "版本号(毫秒)"} ] } From 504e711893a8e1ecd039e164643997a36b7c2d9e Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:31:46 +0800 Subject: [PATCH 11/23] Update schema.json --- .../plugins/tushare_monthly/schema.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_monthly/schema.json b/src/stock_datasource/plugins/tushare_monthly/schema.json index 3ce02980..62919728 100644 --- a/src/stock_datasource/plugins/tushare_monthly/schema.json +++ b/src/stock_datasource/plugins/tushare_monthly/schema.json @@ -2,17 +2,17 @@ "table_name": "ods_monthly", "database": "stock_datasource", "columns": [ - {"name": "ts_code", "type": "String", "comment": "股票代码"}, - {"name": "trade_date", "type": "String", "comment": "交易日期"}, - {"name": "open", "type": "Nullable(Float64)", "comment": "月开盘价"}, - {"name": "high", "type": "Nullable(Float64)", "comment": "月最高价"}, - {"name": "low", "type": "Nullable(Float64)", "comment": "月最低价"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "月收盘价"}, - {"name": "pre_close", "type": "Nullable(Float64)", "comment": "上月收盘价"}, - {"name": "change", "type": "Nullable(Float64)", "comment": "月涨跌额"}, - {"name": "pct_chg", "type": "Nullable(Float64)", "comment": "月涨跌幅"}, - {"name": "vol", "type": "Nullable(Float64)", "comment": "月成交量"}, - {"name": "amount", "type": "Nullable(Float64)", "comment": "月成交额"} + {"name": "ts_code", "data_type": "String", "comment": "股票代码"}, + {"name": "trade_date", "data_type": "String", "comment": "交易日期"}, + {"name": "open", "data_type": "Nullable(Float64)", "comment": "月开盘价"}, + {"name": "high", "data_type": "Nullable(Float64)", "comment": "月最高价"}, + {"name": "low", "data_type": "Nullable(Float64)", "comment": "月最低价"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "月收盘价"}, + {"name": "pre_close", "data_type": "Nullable(Float64)", "comment": "上月收盘价"}, + {"name": "change", "data_type": "Nullable(Float64)", "comment": "月涨跌额"}, + {"name": "pct_chg", "data_type": "Nullable(Float64)", "comment": "月涨跌幅"}, + {"name": "vol", "data_type": "Nullable(Float64)", "comment": "月成交量"}, + {"name": "amount", "data_type": "Nullable(Float64)", "comment": "月成交额"} ], "engine": "ReplacingMergeTree()", "partition_by": "substring(trade_date, 1, 4)", From 9abab8173684449c538ad48c8c685c019499ff9f Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:32:20 +0800 Subject: [PATCH 12/23] Update schema.json --- .../plugins/tushare_idx_mins/schema.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_idx_mins/schema.json b/src/stock_datasource/plugins/tushare_idx_mins/schema.json index 78dabe7d..0afde971 100644 --- a/src/stock_datasource/plugins/tushare_idx_mins/schema.json +++ b/src/stock_datasource/plugins/tushare_idx_mins/schema.json @@ -5,16 +5,16 @@ "order_by": ["ts_code", "freq", "trade_time"], "comment": "指数分钟K线行情数据", "columns": [ - {"name": "ts_code", "type": "LowCardinality(String)", "comment": "指数代码"}, - {"name": "freq", "type": "LowCardinality(String)", "comment": "分钟频度(1min/5min/15min/30min/60min)"}, - {"name": "trade_time", "type": "DateTime", "comment": "交易时间"}, - {"name": "open", "type": "Nullable(Float64)", "comment": "开盘价"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "收盘价"}, - {"name": "high", "type": "Nullable(Float64)", "comment": "最高价"}, - {"name": "low", "type": "Nullable(Float64)", "comment": "最低价"}, - {"name": "vol", "type": "Nullable(Float64)", "comment": "成交量(股)"}, - {"name": "amount", "type": "Nullable(Float64)", "comment": "成交金额(元)"}, - {"name": "version", "type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, - {"name": "_ingested_at", "type": "DateTime", "default": "now()", "comment": "数据入库时间"} + {"name": "ts_code", "data_type": "LowCardinality(String)", "comment": "指数代码"}, + {"name": "freq", "data_type": "LowCardinality(String)", "comment": "分钟频度(1min/5min/15min/30min/60min)"}, + {"name": "trade_time", "data_type": "DateTime", "comment": "交易时间"}, + {"name": "open", "data_type": "Nullable(Float64)", "comment": "开盘价"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "收盘价"}, + {"name": "high", "data_type": "Nullable(Float64)", "comment": "最高价"}, + {"name": "low", "data_type": "Nullable(Float64)", "comment": "最低价"}, + {"name": "vol", "data_type": "Nullable(Float64)", "comment": "成交量(股)"}, + {"name": "amount", "data_type": "Nullable(Float64)", "comment": "成交金额(元)"}, + {"name": "version", "data_type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, + {"name": "_ingested_at", "data_type": "DateTime", "default": "now()", "comment": "数据入库时间"} ] } From bd5f16ae0993a91f19264c23670821425bfe7f5a Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:33:05 +0800 Subject: [PATCH 13/23] Update schema.json --- .../plugins/tushare_hsgt_top10/schema.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_hsgt_top10/schema.json b/src/stock_datasource/plugins/tushare_hsgt_top10/schema.json index a481b892..dfd6f2f7 100644 --- a/src/stock_datasource/plugins/tushare_hsgt_top10/schema.json +++ b/src/stock_datasource/plugins/tushare_hsgt_top10/schema.json @@ -2,17 +2,17 @@ "table_name": "ods_hsgt_top10", "database": "stock_datasource", "columns": [ - {"name": "trade_date", "type": "String", "comment": "交易日期"}, - {"name": "ts_code", "type": "String", "comment": "股票代码"}, - {"name": "name", "type": "Nullable(String)", "comment": "股票名称"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "收盘价"}, - {"name": "change", "type": "Nullable(Float64)", "comment": "涨跌额"}, - {"name": "rank", "type": "Int32 DEFAULT 0", "comment": "资金排名"}, - {"name": "market_type", "type": "String", "comment": "市场类型:1-沪市,3-深市"}, - {"name": "amount", "type": "Nullable(Float64)", "comment": "成交金额(元)"}, - {"name": "net_amount", "type": "Nullable(Float64)", "comment": "净成交金额(元)"}, - {"name": "buy", "type": "Nullable(Float64)", "comment": "买入金额(元)"}, - {"name": "sell", "type": "Nullable(Float64)", "comment": "卖出金额(元)"} + {"name": "trade_date", "data_type": "String", "comment": "交易日期"}, + {"name": "ts_code", "data_type": "String", "comment": "股票代码"}, + {"name": "name", "data_type": "Nullable(String)", "comment": "股票名称"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "收盘价"}, + {"name": "change", "data_type": "Nullable(Float64)", "comment": "涨跌额"}, + {"name": "rank", "data_type": "Int32 DEFAULT 0", "comment": "资金排名"}, + {"name": "market_type", "data_type": "String", "comment": "市场类型:1-沪市,3-深市"}, + {"name": "amount", "data_type": "Nullable(Float64)", "comment": "成交金额(元)"}, + {"name": "net_amount", "data_type": "Nullable(Float64)", "comment": "净成交金额(元)"}, + {"name": "buy", "data_type": "Nullable(Float64)", "comment": "买入金额(元)"}, + {"name": "sell", "data_type": "Nullable(Float64)", "comment": "卖出金额(元)"} ], "engine": "ReplacingMergeTree()", "partition_by": "substring(trade_date, 1, 6)", From cddc8045738623711cb6630f475d7af7060998e8 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:34:03 +0800 Subject: [PATCH 14/23] Update schema.json --- .../plugins/tushare_hk_daily_adj/schema.json | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_hk_daily_adj/schema.json b/src/stock_datasource/plugins/tushare_hk_daily_adj/schema.json index ad889f69..0897954c 100644 --- a/src/stock_datasource/plugins/tushare_hk_daily_adj/schema.json +++ b/src/stock_datasource/plugins/tushare_hk_daily_adj/schema.json @@ -1,26 +1,26 @@ { "table_name": "ods_hk_daily_adj", "columns": [ - {"name": "ts_code", "type": "LowCardinality(String)", "comment": "股票代码"}, - {"name": "trade_date", "type": "Date", "comment": "交易日期"}, - {"name": "open", "type": "Nullable(Float64)", "comment": "开盘价"}, - {"name": "high", "type": "Nullable(Float64)", "comment": "最高价"}, - {"name": "low", "type": "Nullable(Float64)", "comment": "最低价"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "收盘价"}, - {"name": "pre_close", "type": "Nullable(Float64)", "comment": "昨收价"}, - {"name": "change", "type": "Nullable(Float64)", "comment": "涨跌额"}, - {"name": "pct_change", "type": "Nullable(Float64)", "comment": "涨跌幅"}, - {"name": "vol", "type": "Nullable(Float64)", "comment": "成交量"}, - {"name": "amount", "type": "Nullable(Float64)", "comment": "成交额"}, - {"name": "vwap", "type": "Nullable(Float64)", "comment": "平均价"}, - {"name": "adj_factor", "type": "Nullable(Float64)", "comment": "复权因子"}, - {"name": "turnover_ratio", "type": "Nullable(Float64)", "comment": "换手率(基于总股本)"}, - {"name": "free_share", "type": "Nullable(Float64)", "comment": "流通股本"}, - {"name": "total_share", "type": "Nullable(Float64)", "comment": "总股本"}, - {"name": "free_mv", "type": "Nullable(Float64)", "comment": "流通市值"}, - {"name": "total_mv", "type": "Nullable(Float64)", "comment": "总市值"}, - {"name": "version", "type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号"}, - {"name": "_ingested_at", "type": "DateTime", "default": "now()", "comment": "入库时间"} + {"name": "ts_code", "data_type": "LowCardinality(String)", "comment": "股票代码"}, + {"name": "trade_date", "data_type": "Date", "comment": "交易日期"}, + {"name": "open", "data_type": "Nullable(Float64)", "comment": "开盘价"}, + {"name": "high", "data_type": "Nullable(Float64)", "comment": "最高价"}, + {"name": "low", "data_type": "Nullable(Float64)", "comment": "最低价"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "收盘价"}, + {"name": "pre_close", "data_type": "Nullable(Float64)", "comment": "昨收价"}, + {"name": "change", "data_type": "Nullable(Float64)", "comment": "涨跌额"}, + {"name": "pct_change", "data_type": "Nullable(Float64)", "comment": "涨跌幅"}, + {"name": "vol", "data_type": "Nullable(Float64)", "comment": "成交量"}, + {"name": "amount", "data_type": "Nullable(Float64)", "comment": "成交额"}, + {"name": "vwap", "data_type": "Nullable(Float64)", "comment": "平均价"}, + {"name": "adj_factor", "data_type": "Nullable(Float64)", "comment": "复权因子"}, + {"name": "turnover_ratio", "data_type": "Nullable(Float64)", "comment": "换手率(基于总股本)"}, + {"name": "free_share", "data_type": "Nullable(Float64)", "comment": "流通股本"}, + {"name": "total_share", "data_type": "Nullable(Float64)", "comment": "总股本"}, + {"name": "free_mv", "data_type": "Nullable(Float64)", "comment": "流通市值"}, + {"name": "total_mv", "data_type": "Nullable(Float64)", "comment": "总市值"}, + {"name": "version", "data_type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号"}, + {"name": "_ingested_at", "data_type": "DateTime", "default": "now()", "comment": "入库时间"} ], "engine": "ReplacingMergeTree(version)", "partition_by": "toYYYYMM(trade_date)", From e249deb0b24a3fd758986a91548a149f7607135f Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:34:37 +0800 Subject: [PATCH 15/23] Update schema.json --- .../plugins/tushare_hk_adjfactor/schema.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_hk_adjfactor/schema.json b/src/stock_datasource/plugins/tushare_hk_adjfactor/schema.json index edd21dce..59478092 100644 --- a/src/stock_datasource/plugins/tushare_hk_adjfactor/schema.json +++ b/src/stock_datasource/plugins/tushare_hk_adjfactor/schema.json @@ -1,12 +1,12 @@ { "table_name": "ods_hk_adjfactor", "columns": [ - {"name": "ts_code", "type": "LowCardinality(String)", "comment": "股票代码"}, - {"name": "trade_date", "type": "Date", "comment": "交易日期"}, - {"name": "cum_adjfactor", "type": "Nullable(Float64)", "comment": "累计复权因子"}, - {"name": "close_price", "type": "Nullable(Float64)", "comment": "收盘价"}, - {"name": "version", "type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号"}, - {"name": "_ingested_at", "type": "DateTime", "default": "now()", "comment": "入库时间"} + {"name": "ts_code", "data_type": "LowCardinality(String)", "comment": "股票代码"}, + {"name": "trade_date", "data_type": "Date", "comment": "交易日期"}, + {"name": "cum_adjfactor", "data_type": "Nullable(Float64)", "comment": "累计复权因子"}, + {"name": "close_price", "data_type": "Nullable(Float64)", "comment": "收盘价"}, + {"name": "version", "data_type": "UInt32", "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号"}, + {"name": "_ingested_at", "data_type": "DateTime", "default": "now()", "comment": "入库时间"} ], "engine": "ReplacingMergeTree(version)", "partition_by": "toYYYYMM(trade_date)", From 0691c418df74a60008bbb3beecceba85f224d3f8 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:35:15 +0800 Subject: [PATCH 16/23] Update schema.json --- .../plugins/tushare_ggt_top10/schema.json | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_ggt_top10/schema.json b/src/stock_datasource/plugins/tushare_ggt_top10/schema.json index 9d60a844..bc3c6b10 100644 --- a/src/stock_datasource/plugins/tushare_ggt_top10/schema.json +++ b/src/stock_datasource/plugins/tushare_ggt_top10/schema.json @@ -6,22 +6,22 @@ "order_by": ["ts_code", "trade_date", "market_type"], "comment": "港股通每日十大成交股数据", "columns": [ - {"name": "trade_date", "type": "String", "comment": "交易日期"}, - {"name": "ts_code", "type": "String", "comment": "股票代码"}, - {"name": "name", "type": "Nullable(String)", "comment": "股票名称"}, - {"name": "close", "type": "Nullable(Float64)", "comment": "收盘价"}, - {"name": "p_change", "type": "Nullable(Float64)", "comment": "涨跌幅"}, - {"name": "rank", "type": "Int32 DEFAULT 0", "comment": "资金排名"}, - {"name": "market_type", "type": "String", "comment": "市场类型:2-港股通(沪),4-港股通(深)"}, - {"name": "amount", "type": "Nullable(Float64)", "comment": "累计成交金额(元)"}, - {"name": "net_amount", "type": "Nullable(Float64)", "comment": "净买入金额(元)"}, - {"name": "sh_amount", "type": "Nullable(Float64)", "comment": "沪市成交金额(元)"}, - {"name": "sh_net_amount", "type": "Nullable(Float64)", "comment": "沪市净买入金额(元)"}, - {"name": "sh_buy", "type": "Nullable(Float64)", "comment": "沪市买入金额(元)"}, - {"name": "sh_sell", "type": "Nullable(Float64)", "comment": "沪市卖出金额(元)"}, - {"name": "sz_amount", "type": "Nullable(Float64)", "comment": "深市成交金额(元)"}, - {"name": "sz_net_amount", "type": "Nullable(Float64)", "comment": "深市净买入金额(元)"}, - {"name": "sz_buy", "type": "Nullable(Float64)", "comment": "深市买入金额(元)"}, - {"name": "sz_sell", "type": "Nullable(Float64)", "comment": "深市卖出金额(元)"} + {"name": "trade_date", "data_type": "String", "comment": "交易日期"}, + {"name": "ts_code", "data_type": "String", "comment": "股票代码"}, + {"name": "name", "data_type": "Nullable(String)", "comment": "股票名称"}, + {"name": "close", "data_type": "Nullable(Float64)", "comment": "收盘价"}, + {"name": "p_change", "data_type": "Nullable(Float64)", "comment": "涨跌幅"}, + {"name": "rank", "data_type": "Int32 DEFAULT 0", "comment": "资金排名"}, + {"name": "market_type", "data_type": "String", "comment": "市场类型:2-港股通(沪),4-港股通(深)"}, + {"name": "amount", "data_type": "Nullable(Float64)", "comment": "累计成交金额(元)"}, + {"name": "net_amount", "data_type": "Nullable(Float64)", "comment": "净买入金额(元)"}, + {"name": "sh_amount", "data_type": "Nullable(Float64)", "comment": "沪市成交金额(元)"}, + {"name": "sh_net_amount", "data_type": "Nullable(Float64)", "comment": "沪市净买入金额(元)"}, + {"name": "sh_buy", "data_type": "Nullable(Float64)", "comment": "沪市买入金额(元)"}, + {"name": "sh_sell", "data_type": "Nullable(Float64)", "comment": "沪市卖出金额(元)"}, + {"name": "sz_amount", "data_type": "Nullable(Float64)", "comment": "深市成交金额(元)"}, + {"name": "sz_net_amount", "data_type": "Nullable(Float64)", "comment": "深市净买入金额(元)"}, + {"name": "sz_buy", "data_type": "Nullable(Float64)", "comment": "深市买入金额(元)"}, + {"name": "sz_sell", "data_type": "Nullable(Float64)", "comment": "深市卖出金额(元)"} ] } From 9fd306c47fa1c6cdc86a355aeb23d95f43c357dd Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:35:41 +0800 Subject: [PATCH 17/23] Update schema.json --- .../plugins/tushare_ggt_monthly/schema.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_ggt_monthly/schema.json b/src/stock_datasource/plugins/tushare_ggt_monthly/schema.json index 45a32bbc..a9b915c8 100644 --- a/src/stock_datasource/plugins/tushare_ggt_monthly/schema.json +++ b/src/stock_datasource/plugins/tushare_ggt_monthly/schema.json @@ -6,14 +6,14 @@ "order_by": ["month"], "comment": "港股通每月成交统计数据", "columns": [ - {"name": "month", "type": "String", "comment": "交易月份"}, - {"name": "day_buy_amt", "type": "Nullable(Float64)", "comment": "当月日均买入成交金额(亿元)"}, - {"name": "day_buy_vol", "type": "Nullable(Float64)", "comment": "当月日均买入成交笔数(万笔)"}, - {"name": "day_sell_amt", "type": "Nullable(Float64)", "comment": "当月日均卖出成交金额(亿元)"}, - {"name": "day_sell_vol", "type": "Nullable(Float64)", "comment": "当月日均卖出成交笔数(万笔)"}, - {"name": "total_buy_amt", "type": "Nullable(Float64)", "comment": "总买入成交金额(亿元)"}, - {"name": "total_buy_vol", "type": "Nullable(Float64)", "comment": "总买入成交笔数(万笔)"}, - {"name": "total_sell_amt", "type": "Nullable(Float64)", "comment": "总卖出成交金额(亿元)"}, - {"name": "total_sell_vol", "type": "Nullable(Float64)", "comment": "总卖出成交笔数(万笔)"} + {"name": "month", "data_type": "String", "comment": "交易月份"}, + {"name": "day_buy_amt", "data_type": "Nullable(Float64)", "comment": "当月日均买入成交金额(亿元)"}, + {"name": "day_buy_vol", "data_type": "Nullable(Float64)", "comment": "当月日均买入成交笔数(万笔)"}, + {"name": "day_sell_amt", "data_type": "Nullable(Float64)", "comment": "当月日均卖出成交金额(亿元)"}, + {"name": "day_sell_vol", "data_type": "Nullable(Float64)", "comment": "当月日均卖出成交笔数(万笔)"}, + {"name": "total_buy_amt", "data_type": "Nullable(Float64)", "comment": "总买入成交金额(亿元)"}, + {"name": "total_buy_vol", "data_type": "Nullable(Float64)", "comment": "总买入成交笔数(万笔)"}, + {"name": "total_sell_amt", "data_type": "Nullable(Float64)", "comment": "总卖出成交金额(亿元)"}, + {"name": "total_sell_vol", "data_type": "Nullable(Float64)", "comment": "总卖出成交笔数(万笔)"} ] } From 311d663f4f83ec486cae674aa6384cde3d678f81 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 15:35:58 +0800 Subject: [PATCH 18/23] Update schema.json --- .../plugins/tushare_ggt_daily/schema.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/stock_datasource/plugins/tushare_ggt_daily/schema.json b/src/stock_datasource/plugins/tushare_ggt_daily/schema.json index 81453c1a..695ba57c 100644 --- a/src/stock_datasource/plugins/tushare_ggt_daily/schema.json +++ b/src/stock_datasource/plugins/tushare_ggt_daily/schema.json @@ -6,10 +6,10 @@ "order_by": ["trade_date"], "comment": "港股通每日成交统计数据", "columns": [ - {"name": "trade_date", "type": "String", "comment": "交易日期"}, - {"name": "buy_amount", "type": "Nullable(Float64)", "comment": "买入成交金额(亿元)"}, - {"name": "buy_volume", "type": "Nullable(Float64)", "comment": "买入成交笔数(万笔)"}, - {"name": "sell_amount", "type": "Nullable(Float64)", "comment": "卖出成交金额(亿元)"}, - {"name": "sell_volume", "type": "Nullable(Float64)", "comment": "卖出成交笔数(万笔)"} + {"name": "trade_date", "data_type": "String", "comment": "交易日期"}, + {"name": "buy_amount", "data_type": "Nullable(Float64)", "comment": "买入成交金额(亿元)"}, + {"name": "buy_volume", "data_type": "Nullable(Float64)", "comment": "买入成交笔数(万笔)"}, + {"name": "sell_amount", "data_type": "Nullable(Float64)", "comment": "卖出成交金额(亿元)"}, + {"name": "sell_volume", "data_type": "Nullable(Float64)", "comment": "卖出成交笔数(万笔)"} ] } From c8d8d31325ef8164dac1d60c099db40ed5cdc2e7 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 16:09:54 +0800 Subject: [PATCH 19/23] Update schema.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除重复列oth_pay_act_inc --- src/stock_datasource/plugins/tushare_cashflow_vip/schema.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/stock_datasource/plugins/tushare_cashflow_vip/schema.json b/src/stock_datasource/plugins/tushare_cashflow_vip/schema.json index 8aeafb69..36726759 100644 --- a/src/stock_datasource/plugins/tushare_cashflow_vip/schema.json +++ b/src/stock_datasource/plugins/tushare_cashflow_vip/schema.json @@ -30,7 +30,6 @@ {"name": "oth_rcv_act_inc", "data_type": "Nullable(Float64)", "nullable": true, "comment": "收到其他与筹资活动有关的现金"}, {"name": "repay_debt_inc", "data_type": "Nullable(Float64)", "nullable": true, "comment": "偿还债务支付的现金"}, {"name": "assign_div_prof_int_cash", "data_type": "Nullable(Float64)", "nullable": true, "comment": "分配股利、利润或偿付利息支付的现金"}, - {"name": "oth_pay_act_inc", "data_type": "Nullable(Float64)", "nullable": true, "comment": "支付其他与筹资活动有关的现金"}, {"name": "net_cash_flow", "data_type": "Nullable(Float64)", "nullable": true, "comment": "现金及现金等价物净增加额"}, {"name": "version", "data_type": "UInt32", "nullable": false, "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, {"name": "_ingested_at", "data_type": "DateTime", "nullable": false, "default": "now()", "comment": "数据入库时间"} From 0a694e77cde519ea59d99a37bef8f6a50d9a39f1 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 16:15:39 +0800 Subject: [PATCH 20/23] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20=5Fingested=5Fat=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=80=BC=EF=BC=88=E6=8F=92=E5=85=A5=E6=97=B6?= =?UTF-8?q?=E7=A1=AE=E5=AE=9A=EF=BC=89=E8=80=8C=E9=9D=9E=20now()=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0=EF=BC=88=E5=8A=A8=E6=80=81=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用 _ingested_at 字段值(插入时确定)而非 now() 函数(动态计算) --- src/stock_datasource/plugins/akshare_hk_stock_list/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stock_datasource/plugins/akshare_hk_stock_list/schema.json b/src/stock_datasource/plugins/akshare_hk_stock_list/schema.json index dabf2766..5af09ba5 100644 --- a/src/stock_datasource/plugins/akshare_hk_stock_list/schema.json +++ b/src/stock_datasource/plugins/akshare_hk_stock_list/schema.json @@ -10,7 +10,7 @@ {"name": "version", "data_type": "UInt32", "nullable": false, "default": "toUInt32(toUnixTimestamp(now()))", "comment": "版本号用于幂等"}, {"name": "_ingested_at", "data_type": "DateTime", "nullable": false, "default": "now()", "comment": "数据入库时间"} ], - "partition_by": "toYYYYMM(now())", + "partition_by": "toYYYYMM(_ingested_at)", "order_by": ["symbol"], "engine": "ReplacingMergeTree", "engine_params": ["version"], From 75a2787dc68a0592ca9dc5f8e533700c3e35a949 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 16:27:57 +0800 Subject: [PATCH 21/23] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20ann=5Fdate=20?= =?UTF-8?q?=E4=B8=BA=E9=9D=9E=E7=A9=BA=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 方案 1:修改 ann_date 为非空类型(推荐) 如果业务上 ann_date 为空的情况极少或可以赋予默认值,直接改为 Date 并给默认值: JSON { "name": "ann_date", "data_type": "Date", "nullable": false, "default": "toDate('1970-01-01')", "comment": "公告日期" } 或者更合理的业务默认值(如与 end_date 相同): JSON "default": "end_date" --- src/stock_datasource/plugins/tushare_fina_audit/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stock_datasource/plugins/tushare_fina_audit/schema.json b/src/stock_datasource/plugins/tushare_fina_audit/schema.json index 73364a4f..da9bf2c8 100644 --- a/src/stock_datasource/plugins/tushare_fina_audit/schema.json +++ b/src/stock_datasource/plugins/tushare_fina_audit/schema.json @@ -3,7 +3,7 @@ "table_type": "ods", "columns": [ {"name": "ts_code", "data_type": "LowCardinality(String)", "nullable": false, "comment": "TS股票代码"}, - {"name": "ann_date", "data_type": "Nullable(Date)", "nullable": true, "comment": "公告日期"}, + {"name": "ann_date", "data_type": "Date", "nullable": false, "default": "end_date", "comment": "公告日期"}, {"name": "end_date", "data_type": "Date", "nullable": false, "comment": "报告期"}, {"name": "audit_result", "data_type": "Nullable(String)", "nullable": true, "comment": "审计结果"}, {"name": "audit_fees", "data_type": "Nullable(Float64)", "nullable": true, "comment": "审计费用(元)"}, From 1b9d205634d3dd6ac60a609680acbd8138e5b936 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 16:29:36 +0800 Subject: [PATCH 22/23] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20ann=5Fdate=20?= =?UTF-8?q?=E4=B8=BA=E9=9D=9E=E7=A9=BA=E7=B1=BB=E5=9E=8B=EF=BC=88=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 方案 1:修改 ann_date 为非空类型(推荐) 如果业务上 ann_date 为空的情况极少或可以赋予默认值,直接改为 Date 并给默认值: JSON { "name": "ann_date", "data_type": "Date", "nullable": false, "default": "toDate('1970-01-01')", "comment": "公告日期" } 或者更合理的业务默认值(如与 end_date 相同): JSON "default": "end_date" --- src/stock_datasource/plugins/tushare_stk_rewards/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stock_datasource/plugins/tushare_stk_rewards/schema.json b/src/stock_datasource/plugins/tushare_stk_rewards/schema.json index 4a025cbd..264029c7 100644 --- a/src/stock_datasource/plugins/tushare_stk_rewards/schema.json +++ b/src/stock_datasource/plugins/tushare_stk_rewards/schema.json @@ -3,7 +3,7 @@ "table_type": "ods", "columns": [ {"name": "ts_code", "data_type": "LowCardinality(String)", "nullable": false, "comment": "股票代码"}, - {"name": "ann_date", "data_type": "Nullable(Date)", "nullable": true, "comment": "公告日期"}, + {"name": "ann_date", "data_type": "Date", "nullable": false, "default": "end_date", "comment": "公告日期"}, {"name": "end_date", "data_type": "Date", "nullable": false, "comment": "报告期"}, {"name": "name", "data_type": "Nullable(String)", "nullable": true, "comment": "姓名"}, {"name": "title", "data_type": "Nullable(String)", "nullable": true, "comment": "职务"}, From f1219dea573c9c5cb64a46e98b993746b92434e8 Mon Sep 17 00:00:00 2001 From: birdxs001 Date: Tue, 2 Jun 2026 16:40:23 +0800 Subject: [PATCH 23/23] Change 'name' field to non-nullable with default --- src/stock_datasource/plugins/tushare_stk_rewards/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stock_datasource/plugins/tushare_stk_rewards/schema.json b/src/stock_datasource/plugins/tushare_stk_rewards/schema.json index 264029c7..0a4b03f8 100644 --- a/src/stock_datasource/plugins/tushare_stk_rewards/schema.json +++ b/src/stock_datasource/plugins/tushare_stk_rewards/schema.json @@ -5,7 +5,7 @@ {"name": "ts_code", "data_type": "LowCardinality(String)", "nullable": false, "comment": "股票代码"}, {"name": "ann_date", "data_type": "Date", "nullable": false, "default": "end_date", "comment": "公告日期"}, {"name": "end_date", "data_type": "Date", "nullable": false, "comment": "报告期"}, - {"name": "name", "data_type": "Nullable(String)", "nullable": true, "comment": "姓名"}, + {"name": "name", "data_type": "String", "nullable": false, "default": "''", "comment": "姓名"}, {"name": "title", "data_type": "Nullable(String)", "nullable": true, "comment": "职务"}, {"name": "reward", "data_type": "Nullable(Float64)", "nullable": true, "comment": "报酬(元)"}, {"name": "hold_vol", "data_type": "Nullable(Float64)", "nullable": true, "comment": "持股数(股)"},