cURL command in SSIS package

Viewed 3437

I am trying to run a cURL command as an Execute Process Task in SSIS but keep getting the following error message:

The process exit code was "1" while the expected was "0"

When I run the cURL command manually in a command line, it works. When I schedule the cURL command as a CmdExec step in a SQL Server Job, it works. I'm so confused as to why the task in an SSIS package keeps failing. Please help!

I've attached an image of the Execute Process Task in the package.

cURL Execute Process Task:

image

2 Answers

A simple script task so do the trick using webclient.

You need access to the site from where you run the package.

        System.Net.WebClient wc = new System.Net.WebClient();

        wc.DownloadFile("https://home-c29.incontact.com/ReportService/DataDownloadHandler.ashx?&Format=CSV&IncludeHeaders=True@AppendDate=False"
                        ,@"C:\xxx\forImport\Report\DataDetail.csv");

I've just had exactly the same situation (it works from the cmd prompt but not in SSIS).

I got it working with this on the Process tab FailTaskIfReturnCodeIsNotSuccessValue = False

I'm assuming Curl is returning a non-zero status message, even when successful.

Related