Reputation: 283
I wanted to create a task to create a clone table from one database to another and refresh daily.
CREATE TASK TASK_DELETE
WAREHOUSE = TEST
SCHEDULE = 'USING CRON 10 11 * * * America/Los_Angeles'
CREATE OR REPLACE TABLE TEST2."PUBLIC"."DELETE"
CLONE TEST1."PUBLIC"."DELETE";
I'm getting error message: SQL compilation error: syntax error line 4 at position 0 unexpected 'Create'. Does anyone know the issue with the code?
Upvotes: 1
Views: 936
Reputation: 3455
You are missing AS
It should be
CREATE TASK TASK_DELETE
WAREHOUSE = TEST
SCHEDULE = 'USING CRON 10 11 * * * America/Los_Angeles'
AS CREATE OR REPLACE TABLE TEST2."PUBLIC"."DELETE"
CLONE TEST1."PUBLIC"."DELETE";
Upvotes: 3