Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "数据入库时间"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "审计费用(元)"},
Expand Down
10 changes: 5 additions & 5 deletions src/stock_datasource/plugins/tushare_ggt_daily/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "卖出成交笔数(万笔)"}
]
}
18 changes: 9 additions & 9 deletions src/stock_datasource/plugins/tushare_ggt_monthly/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "总卖出成交笔数(万笔)"}
]
}
34 changes: 17 additions & 17 deletions src/stock_datasource/plugins/tushare_ggt_top10/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "深市卖出金额(元)"}
]
}
12 changes: 6 additions & 6 deletions src/stock_datasource/plugins/tushare_hk_adjfactor/schema.json
Original file line number Diff line number Diff line change
@@ -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)",
Expand Down
40 changes: 20 additions & 20 deletions src/stock_datasource/plugins/tushare_hk_daily_adj/schema.json
Original file line number Diff line number Diff line change
@@ -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)",
Expand Down
22 changes: 11 additions & 11 deletions src/stock_datasource/plugins/tushare_hsgt_top10/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
22 changes: 11 additions & 11 deletions src/stock_datasource/plugins/tushare_idx_mins/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "数据入库时间"}
]
}
22 changes: 11 additions & 11 deletions src/stock_datasource/plugins/tushare_monthly/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
Loading
Loading