Questions tagged [script-task]

The Script task provides code to perform functions that are not available in the built-in tasks and transformations that SQL Server Integration Services provides. The Script task can also combine functions in one script instead of using multiple tasks and transformations. You use the Script task for work that must be done once in a package (or once per enumerated object), instead than once per data row.

Do not use this tag for the SSIS Script Component, instead use .

Check the following article for more information: SSIS Script task vs. Script Component


Based on the official SSIS documentation, SSIS tasks are categorized as the following: Data Flow Task, data preparation tasks, workflow tasks, SQL Server tasks, Analysis Services tasks, maintenance tasks, custom tasks, and scripting tasks.

The SSIS Script Task extends the package functionality by using scripts. It performs functions that are not provided by the standard Integration services tasks.

363 questions
2
votes
1 answer

SSIS Script task base result on path

I have a SSIS Package and the first task I have is a script task. it checks to see if a file exists if it does (=1) then it continues to next tasks how to I get it to go down a different route if file does not exist(=0)? I have tried adding a…
sql2015
  • 591
  • 3
  • 13
  • 34
2
votes
2 answers

Dts.Transaction is null in my SSIS Script task

I have tried existing post and none of the answers helped me solve the issue. Adding the piece of code.In the below code Dts.Transaction is null and hence sqlConn. SqlConnection sqlConn; sqlConn =…
HappyDeveloper
  • 143
  • 1
  • 14
2
votes
1 answer

Connecting to Azure Service Bus from SSIS

I need to put a message into an Azure ServiceBus queue from an SSIS package running under SQL Server 2014. As suggested in this post: connecting to azure service bus queue from ssis, I wrote a Script Task that references the "Azure SDK 2.9". This…
Scott Duncan
  • 1,041
  • 1
  • 12
  • 22
2
votes
1 answer

How to replace or ignore the Accented characters in SSIS

I have a SSIS package which reads the input file first & then validate it and then process the same. The validation is being carried through Script Task. When the file is processed i am getting an error "invalid character in the given encoding".…
2
votes
2 answers

Adding Case statement to REPLACE function in C#

First off, I am not a c# person, so please bear with me on this one. I need to replace the occurrences of "D:" with "d$" on a script task within SSIS. I sure use the replace function to do this, but the problem is, that this is having unintended…
rvphx
  • 2,324
  • 6
  • 40
  • 69
2
votes
3 answers

Cannot get SSIS Script Task to work

I feel like I am missing some configuration or something, because I have followed tons of tutorials online, but cannot get any examples of a script task to work. I cannot debug the error either because I am not a C# developer. Currently, I am…
Pablo Boswell
  • 805
  • 3
  • 13
  • 30
2
votes
2 answers

Why does the BIML ScriptTask fail until I open the script in VS and save the package

I have this BIML Script, which creates a Master and child package. The child package has a ScriptTask in it that maps the value of a parent package variable to a child package variable. When I Generate the packages in SSIS (Visual Studio 2015,…
Simon Kingaby
  • 101
  • 1
  • 8
2
votes
0 answers

How do you configure visual studio 2012 to use a different editor for editing script tasks is integration services (SSIS)

Is it possible to configure visual studio 2012 to use a different editor for editing script tasks is integration services (SSIS)? If so how? I have looked in Tools > Options > Business Intelligence designers > Integration Services Designers - which…
Dib
  • 2,001
  • 2
  • 29
  • 45
2
votes
1 answer

SSIS Script task `Invalid cast exception` at retrieving complex object from variables

Prerequisites: I want to connect to MS Dynamics CRM web services at the beginning of package execution and reuse the connection all over the package, but I failed to do that via SSIS Variables. I can't use Connection manager because i use…
Quodnon
  • 43
  • 5
2
votes
1 answer

C# Excel Worksheet Object reference not set to an instance of an object

When I run a SSIS package Interactively I am getting the error Object reference not set to an instance of an object on a Script task during run time. So I debugged the code by using break points and after going step by step the code fails at this…
user4410715
2
votes
1 answer

Debugging a Javascript within Camunda's Script-Task

I'm trying to merge two arrays in a Script Task of type Javascript within a Process in Camunda. Here's my script: var arr1 = execution.getVariableTyped("arr1", true); var arr2 = execution.getVariableTyped("arr2", true); var merged = []; for (var…
Mehran
  • 15,593
  • 27
  • 122
  • 221
1
vote
0 answers

Service Principal Authentication method to connect to SQL MI server using SSIS - Script task - C# code

From last few days I am looking for solution- I need to connect to Azure SQL MI server using service principal authentication through SSIS script task - C# code. I am using Microsoft.Data.SqlClient.dll v5.0.0, .net framework (by default) v4.7,…
1
vote
1 answer

Expression to check if a given string exist in a output of a script task in ADF

I get following result from my script task, How should I build expression to check if the result contains 'exceed' { "resultSetCount": 1, "recordsAffected": 0, "resultSets": [ { "rowCount": 2, "rows": [ { "status": "exceed" }, { "status":…
Equator
  • 77
  • 8
1
vote
1 answer

Insert the response from the API in to SQL server table through SSIS script task

I am trying to create a SSIS package that makes a call to the REST API and insert the responses into the Azure SQL server table. For this I am using the script task and ADO.NET connection manager. The API response is in the JSON format like…
user4912134
  • 1,003
  • 5
  • 18
  • 47
1
vote
1 answer

Flat file formatting issue in SSIS

We receive a flat file that is delimited from our third-party client. Row Delimiter = LF; Column Delimiter = Tab The file has 8 columns. The delimited formatting in the file is correct for the most part except for three records where the 6th…
maljee
  • 21
  • 4