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
0
votes
0 answers

Write a SSIS script task to get oauth2.0 bearer token from a Web API

I am trying to figure out a way to get oauth2.0 bearer token from the rest API. So from Postman I can do a POST method for "https://helloworld.org:443/xyz/oauth2/token" And in the body, I choose x-www-form-urlencoded and put grant_type as "password"…
Lazytitan
  • 47
  • 1
  • 11
0
votes
1 answer

SSIS Data Flow Task indicates it wrote x rows, and reported no errors, but none of the rows appear in destination

This package had worked in the past but, for whatever reason, hasn't been working as intended recently. The package has a script task that sets a file path variable to the file path for the most recent csv file in a folder and then uses this file…
user3799279
  • 143
  • 1
  • 11
0
votes
0 answers

Incorrect authentication data C# SSIS

I'm trying to send a list of missing products from a table through the mail. For that, I'm using a Script task in SSIS. I don't have any experience in C# as I'm an SQL developer. I don't know what's happening with this code. Sometimes it is…
0
votes
0 answers

Why SSIS Script is losing NuGet package and references after I close and reopen the script?

I have written a script in SSIS script task editor to read csv files using CsvHelper. While executing the package it is throwing the following error: 'Could not load file or assembly 'Microsoft.Bcl.HashCode, Version=1.0.0.0, Culture=neutral,…
0
votes
0 answers

SSIS - How to write line by line into flat file using ForEach Loop Container

I need to get data from table and write it into flat file line-by-line. Example File 1: Alice ID ST-01 Alice Gender F Alice Subject English 69 Alice Grade C Alice Subject Mathematics 85 Alice Grade A Alice Subject Biology…
0
votes
0 answers

SSIS data load - How do I load data from csv file which has first few rows that have to be transposed to columns and load remaining data as is

I need to load data from a csv file to SQL via SSIS. The data in the csv file is as follows: I need the data to be loaded into SQL in the below format. how can I achieve this through SSIS?
Tara
  • 73
  • 2
  • 9
0
votes
0 answers

SSIS script task SMO call fails when running from Windows 2016 Server (sql server agent) but succeeds when run from Visual Studio or Windows 2012

This SSIS package is part of the scheduled process that worked fine for years. It started failing after we upgraded OS of SSIS SQL Server (application server) from Windows Server 2012 to Windows Server 2016. Note that this SSIS package (contentious…
0
votes
0 answers

SSIS Package executing successfully when user logged in but failing when user logged out, Facing this strange issue on Azure VM but not on Local VM

I have schedule to run SSIS package which contains multiple script tasks using a console application and task scheduler. Task scheduler hits ssis package and packages executing successfully when user logged in azure VM where everything setup. When…
0
votes
0 answers

Script task component is not working without Visual studio

I have the packages in SSISDB catalog which is having script task component with C# code in it & I’m not having visual studio in that server.I’m trying to run the packages through Job but the script task is not validated during execution & it is not…
0
votes
0 answers

jBPM data assignment is unclear

In jBPM Business Central if I was to make a Business Process that had one Data Object called FinalValue with one Integer variable called endValue and then in the Process I made a human task where the user picks an Integer value and it gets…
0
votes
1 answer

Visual Studio Will Not Edit Script Task

I've had trouble trying to get an Excel file to connect to this SSIS package so I've uninstalled and reinstalled VS2019, Integration Services, and Access Server 64bit a half dozen times. This most recent time I opened the SSIS package I created that…
Dizzy49
  • 1,360
  • 24
  • 35
0
votes
1 answer

SSIS Script Component Does Not Recognize Dts.Variables Namespace

I want to read the rows inside a user object, but when I try to fill it to a DataTable, Dts.Variables is not a recognized namespace. public override void PreExecute() { base.PreExecute(); DataTable dt = new DataTable(); OleDbDataAdapter…
gymcode
  • 4,431
  • 15
  • 72
  • 128
0
votes
1 answer

SSIS Script Task - Count Number of Unique Rows in Output Object

My SSIS script task generates 5 rows of records into an Output script component. if (conditionMeets) { WOProductBuffer.AddRow(); WOProductBuffer.WorkOrderId = workOrderId; WOProductBuffer.WorkOrderProductId = workOrderProductId; …
gymcode
  • 4,431
  • 15
  • 72
  • 128
0
votes
0 answers

SSIS c# Script Task - ParameterValue object - need to pass in null as the value

I have an SSIS c# script task that is downloading a SSRS report using an API, in order to pass in parameters, it uses an object called ParamterValue that has a Value property of type string how would you pass in NULL as the value. I was thinking if…
Glen
  • 802
  • 1
  • 11
  • 27
0
votes
1 answer

How to add values to System.Object Variable inside a foreach loop container with script task in SSIS?

I'm trying to add new values to a variable (System.Object) inside a foreach loop container that is using that variable. How can i do that ? To understand my flow : first script i'm adding a value to that variable and its working fine. But inside…
vani
  • 13
  • 3