SQL Script Failing - stored procedure call from redshift

stainlessteelra
stainlessteelra Registered Posts: 17 ✭✭✭✭

ERROR: COMMIT cannot be invoked from a procedure that is executing in an atomic context. Hint: Try calling the procedure as a top-level call i.e. not from within an explicit transaction block. Or, if this procedure (or one of its ancestors in the call chain) was created with SET config

It seems as though Dataiku is executing SQL scripts within a JDBC session which is causing the above error in Redshift as stored procedure works when calling directly in database.

Any work arounds while still leaving the stored procedure in the database?

Dataiku version used: 13.4

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023, Circle Member Posts: 2,712 Neuron

    This sounds like a problem in your stored procedure which is using a COMMIT statement while running in a transaction. Review the stored procedure code and remove any commits.

  • stainlessteelra
    stainlessteelra Registered Posts: 17 ✭✭✭✭

    Thanks for the reply.

    The Stored procedure works when running directly in the database using, CALL xxx.sp1();

    but when using the same command from dataiku, sql script it does not work.

Setup Info
    Tags
      Help me…