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"], 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": "数据入库时间"} 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": "审计费用(元)"}, 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": "卖出成交笔数(万笔)"} ] } 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": "总卖出成交笔数(万笔)"} ] } 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": "深市卖出金额(元)"} ] } 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)", 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)", 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)", 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": "数据入库时间"} ] } 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)", 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": "版本号(毫秒)"} ] } 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": "数据入库时间"} ] } 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": "版本号(毫秒)"} ] } 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": "版本号(毫秒)"} ] } 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": "数据入库时间"} ] } 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": "数据入库时间"} ] } 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": "数据入库时间"} ] } diff --git a/src/stock_datasource/plugins/tushare_stk_rewards/schema.json b/src/stock_datasource/plugins/tushare_stk_rewards/schema.json index 4a025cbd..0a4b03f8 100644 --- a/src/stock_datasource/plugins/tushare_stk_rewards/schema.json +++ b/src/stock_datasource/plugins/tushare_stk_rewards/schema.json @@ -3,9 +3,9 @@ "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": "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": "持股数(股)"}, 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": "数据入库时间"} ] } 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)", 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)",