lava-oushudb-dt-sql-parser/test/parser/hive/syntax/fixtures/createScheduledQuery.sql
2023-07-07 14:48:44 +08:00

21 lines
465 B
SQL

CREATE SCHEDULED QUERY sc1
CRON '0 */10 * * * ? *'
AS INSERT INTO t VALUES (1);
CREATE SCHEDULED QUERY t_analyze
CRON '0 */1 * * * ? *'
AS ANALYZE TABLE t
COMPUTE STATISTICS FOR COLUMNS;
CREATE SCHEDULED QUERY s_day
EVERY 2 DAY OFFSET BY 'offsetTs'
EXECUTED AS 'SELECT * FROM aa'
ENABLE
DEFINED AS INSERT INTO t VALUES (1);
CREATE SCHEDULED QUERY s_hour
EVERY HOUR AT '0:07:30'
EXECUTED AS 'SELECT * FROM aa'
DISABLE
DEFINED AS INSERT INTO t VALUES (1);