I have a lambda function which is running this query on snowflake
CREATE OR REPLACE TABLE "foobar_table" AS (
SELECT * FROM "foobar_view"
)
What I am wondering about is what happenes when aws lambda timesout after 15min when still running this query. Lambda connects to snowflake using autocommit feature, which commits all changes after connection is closed.
What I have observed so far is confusing me and I am wondering if this is some UB or if this case is described somewhere in the documentation.
Lambda function timesout when it is still running CREATE OR REPLACE
sql and I am sure it hasn't finished but for some reason table got created and I can use it normally in snowflake. I assumed that it has created table with partial data but that's not true also because table has all the data. I don't understand how this table exists in snwoflake at all if lambda has timedout before finishing the query
Per the Snowflake docs, there is a parameter named ABORT_DETACHED_QUERY that has the following description:
Specifies the action that Snowflake performs for in-progress queries if connectivity is lost due to abrupt termination of a session (e.g. network outage, browser termination, service interruption).
It is a BOOLEAN that has a default value of FALSE, which causes in-progress queries to continue execution even if the client (Lambda, in your case) aborts.