Native App limitations

2025-10-22

Templates with EXECUTE IMMEDIATE statements

Snowflake has EXECUTE IMMEDIATE and EXECUTE IMMEDIATE FROM statement which can be used with variables. Unfortunately, you can’t used them in a Native App setup.sql script.

For instance, if you try to do:

EXECUTE IMMEDIATE FROM 'david-test.sql' USING (schema_name => 'david_test');

Where david-test.sql contains:

--!jinja

CREATE SCHEMA IF NOT EXISTS {{ schema_name }};

You’ll be granted with the following error on install:

Error:

╭─ Error ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Failed to upgrade application APP_NAME with the following error message:                                                 │
│ 093082 (42601): 01bfe41a-0206-bc22-0042-d50726350a42: Failed to execute setup script:                                    │
│ Uncaught exception of type 'STATEMENT_ERROR' on line 28 at position 0 : Unsupported feature 'Jinja templating in owner's │
│ rights stored procedure'.                                                                                                │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯