Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting a transaction in a task is not possible #253

Open
buseynehannes opened this issue May 24, 2024 · 0 comments
Open

Starting a transaction in a task is not possible #253

buseynehannes opened this issue May 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@buseynehannes
Copy link

Describe the bug
I'm trying to start a transaction in a task to execute multiple statements

To Reproduce
Steps to reproduce the behavior:

  1. Create an example migration with the following task
CREATE OR REPLACE TASK EXAMPLE_TASK
    WAREHOUSE = EXPLORATION
    SCHEDULE = '5 minutes'
AS
    BEGIN
    START TRANSACTION;
    SELECT * FROM SOME_TABLE;
    SELECT * FROM SOME_TABLE;
    COMMIT;
END;
  1. execute the migration -> fails on EOF error
  2. render and execute in snowflake worksheet -> works perfectly

Expected behavior
Since the rendered template works in a snowflake worksheet, I'd expect this to work in a migration too

Schemachange (please complete the following information):

  • Version (e.g. 3.5.3): 3.6.1

Additional context
I'm using Repeatable read isolation in my task, so I need the transaction, tried using BEGIN TRANSACTION too, same issue.

@buseynehannes buseynehannes added the bug Something isn't working label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant