The snowflake statement:
select system$abort_transaction(id) from values (10) as transactions(id);
Throws an SQL compilation error:
SQL compilation error: argument 1 to function SYSTEM$ABORT_TRANSACTION needs to be constant, found 'TRANSACTIONS.ID'
Is there a workaround or it should be fixed by snowflake devs?
UPD: I should have provided more context earlier. What I want to do to abort all active transactions. Something like that:
show transactions;
select system$abort_transaction("id"::int) from table(RESULT_SCAN (LAST_QUERY_ID()));
UPD2:
The following queries are executed just fine:
show transactions;
select dateadd(millisecond, "id"::int, current_date()) from table(RESULT_SCAN (LAST_QUERY_ID()));