We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Running a Post SQL procedure and when it fails Alteryx gives and error and executes it 2x

nbreyes89
5 - Atom

Hi- I am trying to figure out why Alteryx is running my postsql twice when it gives me an error.  I see it gives me 4 Errors. One Executing the PostSQL

then the Error

then Executes the same POSTSQL 

then the Error again. 

 

 

Is there a way to stop this from happening? 

 

I am purposely trying to make it error to see why this is happening. If it Errors out I just want it to fail and not reexcute the procedure. 

 

Thank you!

2 REPLIES 2
bbak91
Alteryx
Alteryx

What are you attempting to do in your PostSQL? Do you know if your main query is executing correctly or if that is having issues as well? Maybe first try removing the PostSQL to confirm that your main query runs properly and then add the PostSQL after that is confirmed. Alteryx does not run PostSQL twice if it fails the first time. 

Koziolek
5 - Atom

yes, it does. When the execution of stored procedure in postSQL falls then Alteryx try to run it twice

 

create or alter procedure dbo.proc_dummy_cloud
as
begin
    SET NOCOUNT ON
    SET XACT_ABORT ON
 
    begin try
 
        insert into import.CLOUD(apptio_id,application_name)
        select 'uk101010101','1'
 
        RAISERROR('error 1',16,1)
        RETURN
 
        insert into import.CLOUD(apptio_id,application_name)
        select 'uk101010101','2'
 
        RAISERROR('error 2',16,1)
        RETURN
 
        insert into import.CLOUD(apptio_id,application_name)
        select 'uk101010101','3'
 
    end try
    begin catch
 
        declare @aaa varchar(max) = ERROR_MESSAGE()
 
        RAISERROR(@aaa,16,1)
        RETURN
    end catch
 
end
 
then I see that alteryx tried twice execute procedure and I see two record in table so for sure alteryx runs twice stored procedure when it falls
Labels
Top Solution Authors