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
3
votes
1 answer

SSIS Package with User Variable in Where Clause

Simply put, I'm trying to take user input, store it in a variable, and then use that variable in a query. First, I have a Script Task that opens a window with a simple input text box and a button. On click, the text gets put into a user variable and…
Mark Griggs
  • 317
  • 1
  • 3
  • 13
3
votes
1 answer

How to reset object variable from script task in SSIS?

I am quiet a bit new in SSIS package writing and I have nested loop in my SSIS Package, one is looping for all the folders into a location and inner loop is looping through all the files in each folder. In folder level loop my first task is script…
Naim Halai
  • 355
  • 1
  • 8
  • 27
3
votes
1 answer

Activate specific Excel sheet in SSIS Script Task

I have a script task which opens an excel file and saves it as a .csv but it saves the sheet that opens with the file whereas I want to choose which sheet to save as a .csv, this is the script I'm currently using: Public Sub Main() Dim…
3
votes
0 answers

SSIS Invalid character "." in filename error in script task

I have a task to split a single file into two separate files which I have done. However, afterward I need to move the source file from the source directory into an Archive folder so it does not get picked up again the next day. The file name is…
3
votes
1 answer

How to process SSAS 2012 Cube with SSIS 2014 and script task

I also posted this question here: https://social.msdn.microsoft.com/Forums/en-US/5aca721a-1148-451f-bac6-d1bee6b2aad7/how-to-process-ssas-2012-cube-with-ssis-2014-and-script-task?forum=sqlintegrationservices For processing different SSAS databases…
Andrea K
  • 31
  • 2
3
votes
4 answers

How to pass a List of custom objects in a SSIS Script Task?

I have a Script Task that creates a list of custom objects and sets them to an SSIS object variable. Custom class: public class Dog { public string Name { get; set; } } Code to populate the List and set to an SSIS object variable…
Bert Wagner
  • 851
  • 1
  • 11
  • 23
3
votes
3 answers

SSIS is executing successfully, but it doesn't seem to be running the script task portion

I have an SSIS package that runs an SQL query and exports it to a csv file via a Data Flow Task. After the csv is created, I have a "Script Task" set to connect to an SMTP server and send the csv file as an attachment. On my local machine the…
aufty
  • 407
  • 2
  • 9
  • 26
2
votes
1 answer

Capture stored proc's print messages from C# SSIS Script task (2016) when completed successfully

I am trying to output the print messages from a stored proc that is being execute from SSIS script task. Here is what I have so far: public event SqlInfoMessageEventHandler InfoMessage; void myConnection_InfoMessage(object sender,…
MChalut
  • 57
  • 6
2
votes
1 answer

Format Excel Columns in SSIS .net Script Task

I have a script task that builds an Excel file. The business needs certain columns formatted in certain ways. The code is below, and I am curious if there is a way to use the existing process to format the columns, or if once it is created and…
Synphony32
  • 43
  • 7
2
votes
2 answers

Could not load file or assembly SSIS Script Task

I have a DTSx with a Script Task that will replace some labels in a Word Document and then save it as PDF but it constantly shows error : "Could not load file or assembly '' or one of its dependencies. The system cannot find the file…
Filipe Vilhena
  • 55
  • 1
  • 3
  • 11
2
votes
2 answers

Importing a Json file using script task in SSIS

I am new to importing API's using script task in SSIS. I have to manage the import of a straightforward API JSON file but this second API JSON file is a bit tricky. I have been looking at the code and just don't know what I'm doing wrong. My JSON…
2
votes
2 answers

USE SSIS package parameter inside script task

I have a script task inside a SSIS package, like this, public ReadListItemsSPOnline(string siteUrl, string email, string password, int requestTimeout) { _clientContext = new ClientContext(siteUrl); var securePassword…
Vlogs Bengali
  • 85
  • 1
  • 13
2
votes
1 answer

SqlConnectionStringBuilder Failing within SSIS package

I have a couple of SSIS packages in Production that are using the SqlConnectionStringBuilder to connect to the SQL Server database. These packages were working fine till about 10 days ago and we did not change anything on Prod. Then, all of a…
rvphx
  • 2,324
  • 6
  • 40
  • 69
2
votes
2 answers

SSIS Package Script task output file to new folder

I'm using SSIS and a script task in C#. I have a FOR EACH Loop that looks into a folder and assigns the full path and file name of each file found to a variable called FileNameFound which in turn is then assigned to a variable called filepath within…
Michael
  • 2,507
  • 8
  • 35
  • 71
2
votes
1 answer

SSIS Script Task - Save A Copy of Excel Template Using ReadOnly variable name

I want to be able to save a copy of an Excel workbook (after adding some data in some cells) as the name of the variable ClientName within a ForEachLoop container using the Script Task code below. I have some code lifted from Stack OVerflow which…
Shaye
  • 179
  • 13