Soumak Das
1 min readSep 14, 2023

--

Snowflake has recently introduced an exciting feature that allows SQL commands EXECUTE IMMEDIATE FROM to be triggered directly from files stored in an internal stage. These files can contain SQL statements or scripting blocks.

The EXECUTE IMMEDIATE FROM command is designed to execute SQL statements specified within a file located in a Snowflake stage. This file can comprise both SQL statements and Snowflake Scripting blocks, but it’s imperative that all statements are syntactically correct SQL.

This command offers a versatile means to execute statements from any Snowflake session, granting users control over the deployment and management of Snowflake objects and code. For instance, you can utilize it to run a stored script that establishes a standardized Snowflake environment across multiple accounts. This configuration script may involve tasks such as user and role creation, database setup, and schema creation, ensuring consistency and efficiency in Snowflake environment management.

This addition holds significant value for #Snowflake infrastructure management and administration, including tasks such as :

1.creating users and roles,

2.managing access grants, and

3.handling virtual warehouses.

Moreover, this feature extends its usefulness to deployment scenarios. Snowflake is actively working on native GIT integration, as announced at #SnowflakeSummit. When these capabilities converge, users will have the power of versioned Snowflake infrastructure management with a seamless means of execution.

#InnovationInSnowflake

--

--

Soumak Das

Sr. Data Engineer @EY & Snowflake/Airflow/Databricks/AWS writer