Which statement is true about running tasks in Snowflake?
Which statement is true about running tasks in Snowflake?
A task in Snowflake allows a user to execute a set of SQL commands on a predefined schedule. This means that tasks can be used to automate a series of SQL statements that need to be run at specific intervals or times, making it easier to manage repetitive operations and maintenance tasks within the Snowflake environment.
A task can execute any one of the following types of SQL code: Single SQL statement Call to a stored procedure Procedural logic using Snowflake Scripting Developer Guide https://docs.snowflake.com/en/user-guide/tasks-intro.html
A task can execute any one of the following types of SQL code: Single SQL statement Call to a stored procedure Procedural logic using Snowflake Scripting Developer Guide https://docs.snowflake.com/en/user-guide/tasks-intro
B is the answer
https://docs.snowflake.com/en/user-guide/tasks-intro.html
A task can execute any one of the following types of SQL code: Single SQL statement
Most probably B as task can run a single SQL statement
B is correct answer
agree b
Multiple SQL statements using SnowSQL Create task executes multiple SQL statements. Example, task modifies the TIMESTAMP_OUTPUT_FORMAT for the session and then queries the CURRENT_TIMESTAMP function. The SQL code in the task definition includes multiple statements. To execute the CREATE TASK statement, you must temporarily set a character other than a semicolon as the delimiter for SQL statements; otherwise, the CREATE TASK statement would return a user error. The command to change the SQL delimiter in SnowSQL is !set sql_delimiter = <character>. https://docs.snowflake.com/en/sql-reference/sql/create-task Now Decide B or C, As per my understanding, may be now they have add this feature, so as per old snowflake its B but for now its C
https://docs.snowflake.com/en/sql-reference/sql/create-task Multiple SQL statements using SnowSQL !set sql_delimiter=/ CREATE OR REPLACE TASK test_logging USER_TASK_MANAGED_INITIAL_WAREHOUSE_SIZE = 'XSMALL' SCHEDULE = 'USING CRON 0 * * * * America/Los_Angeles' AS BEGIN ALTER SESSION SET TIMESTAMP_OUTPUT_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF'; SELECT CURRENT_TIMESTAMP; END;/ !set sql_delimiter=";"
B. A task allows a user to execute a single SQL statement/command using a predefined schedule.
https://docs.snowflake.com/en/user-guide/tasks-intro
Agree - B