-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error inserting data with window view: Not found column in block #63575
Comments
Supplementary error information:
|
reproduced it here - https://fiddle.clickhouse.com/ad3c2e1b-0d7e-4ebc-899d-ba422a26c082 cc: @avinzhang |
set allow_experimental_window_view = 1; -- default.tb_tick definition Source data table -- default.kline_test definition Target data table -- default.kline_m1_view View Definition insert into default.tb_tick VALUES('ADAUSD', 0.4655000000, 0.4643000000, '2024-05-10 09:09:09'); Error: |
-- meta_trade_20.tb_tick definition Source data table
CREATE TABLE meta_trade_20.tb_tick
(
symbol
String,ask
Decimal(20,10),bid
Decimal(20,10),ctm
DateTime)
ENGINE = MergeTree
ORDER BY (symbol,ctm);
-- meta_trade_20.kline_test definition Target data table
CREATE TABLE meta_trade_20.kline_test
(
symbol
String,open_price
Decimal(20,10) DEFAULT 0.,high_price
Decimal(20,10) DEFAULT 0.,low_price
Decimal(20,10) DEFAULT 0.,close_price
Decimal(20,10) DEFAULT 0.,trade_time
DateTime)
ENGINE = AggregatingMergeTree
ORDER BY (symbol,trade_time)
SETTINGS index_granularity = 8192;
-- meta_trade_20.kline_m1_view View Definition
CREATE WINDOW VIEW meta_trade_20.kline_m1_view TO meta_trade_20.kline_test
(
symbol
String,open_price
Decimal(20,10),high_price
Decimal(20,10),low_price
Decimal(20,10),close_price
Decimal(20,10),trade_time
DateTime) WATERMARK toIntervalSecond(2) AS
SELECT
symbol,
any(t.bid) AS open_price,
max(t.bid) AS high_price,
min(t.bid) AS low_price,
anyLast(t.bid) AS close_price,
tumbleStart(t_window) AS trade_time
FROM meta_trade_20.tb_tick AS t
GROUP BY
symbol,
tumble(toDateTime(t.ctm),toIntervalMinute(1)) AS t_window
ORDER BY
symbol ASC,
trade_time ASC;
Error message when inserting data into the source data table:
0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000c6d5d7b in /usr/bin/clickhouse
(version 23.12.2.59 (official build))
The text was updated successfully, but these errors were encountered: