lava-oushudb-dt-sql-parser/test/parser/hive/syntax/fixtures/createScheduledQuery.sql

21 lines
465 B
MySQL
Raw Normal View History

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);