mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-10 15:22:56 +00:00
* feat(WIP): flow info table refactor: better err handling&log feat: add flow metadata to info schema provider feat(WIP): info_schema.flows feat: info_schema.flows table * fix: err after rebase * fix: wrong comparsion op * feat: SHOW FLOWS&tests * refactor: per review * chore: unused * refactor: json error * chore: per review * test: sqlness * chore: rm inline error * refactor: per review
33 lines
734 B
SQL
33 lines
734 B
SQL
CREATE TABLE numbers_input (
|
|
number INT,
|
|
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY(number),
|
|
TIME INDEX(ts)
|
|
);
|
|
create table out_num_cnt (
|
|
number INT,
|
|
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP TIME INDEX);
|
|
|
|
|
|
SELECT flow_name, table_catalog, flow_definition FROM INFORMATION_SCHEMA.FLOWS;
|
|
|
|
SHOW FLOWS;
|
|
|
|
CREATE FLOW filter_numbers SINK TO out_num_cnt AS SELECT number FROM numbers_input where number > 10;
|
|
|
|
SHOW CREATE FLOW filter_numbers;
|
|
|
|
SELECT flow_name, table_catalog, flow_definition FROM INFORMATION_SCHEMA.FLOWS;
|
|
|
|
SHOW FLOWS;
|
|
|
|
drop flow filter_numbers;
|
|
|
|
SELECT flow_name, table_catalog, flow_definition FROM INFORMATION_SCHEMA.FLOWS;
|
|
|
|
SHOW FLOWS;
|
|
|
|
drop table out_num_cnt;
|
|
|
|
drop table numbers_input;
|