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
1
vote
2 answers

SSIS - Script Task find a string value in a file name

I have to build a job in SSIS to check if file with today's date exist then load data into targeted table. My problem is I have different files stored with different dates in this folder with the format FileName_yyyyMMddhhmmss.csv and am not able to…
1
vote
0 answers

Script Task gives error 'One or more errors occurred.'

Whenever I try to create a Script Task in SSIS, it gives me the following error: One or more errors occurred. Even though I haven't done any changes in the script task and added no line of code. I use a Visual Studio 2019 community version. This…
Arpit Chinmay
  • 313
  • 5
  • 16
1
vote
1 answer

OleDbException when reading Excel Cell Value in SSIS Script Task

I have an SSIS package where I am reading Excel files and loading the data to SQL tables. Part of reading the Excel file is to check the value in a specific cell in each sheet and make sure that the value matches the sheet name. I have the…
1
vote
2 answers

How to get the Excel file last saved user's information using C# code in SSIS

How to get the Excel file last saved user's information using C# code in SSIS to insert into a SQL table I need to add the information about excel file to a SQL table. I have already included other parameters like Excel file's location, file name,…
Tejaswini
  • 35
  • 2
1
vote
1 answer

Azure SDK with SSIS

I am looking at different options to connect to an Azure data lake storage using SSIS 2019 script task and one of the options would be to use the Azure .NET SDK. But, I am having a hard time to use this in the script task. I'm trying to make it work…
1
vote
1 answer

SSIS editing a script task and saving it doesn't work

Note: I am not an SSIS developer and have a very limited knowledge on it, so may be missing on very small details, please read carefully. I have an existing SSIS package which has script task in one of the steps. I had to update one single value in…
Duke
  • 21
  • 1
  • 5
1
vote
1 answer

Using C # to make 2nd row start on same line regardless of length of 1st row (within same string)

I am trying to send an email of a SQL table out in email using a script task in SSIS. I got everything working but the rows are not aligned properly when the email succeeds. I see that "\t" creates a tab in C # but this is relative to where the last…
Centuori
  • 11
  • 1
1
vote
0 answers

SSIS Google Analytics api call

I've got some code that I have used to pull Google Analytics data with a c# console application and it works great. Whenever I try to use that same code in an SSIS script task I get the error "Error deserializing JSON credential data.". I get the…
1
vote
2 answers

SSIS WinSCP C# script task running but not doing anything

My code is not throwing any error but it is not doing anything at all. I'm trying to connect to a SFTP server, the task itself is not showing any error but it is not accessing/getting the file stored in a specific directory. Images: This is my…
JustToKnow
  • 785
  • 6
  • 23
1
vote
1 answer

SSIS script task - send different results to multiple recipients

I am struggling to send a different body to multiple recepients. Here's what I'm trying to do: I have a SQL query that I am executing and getting the results in the "Execute SQL Task". The result example: The script looks like this: public void…
Ruslan
  • 351
  • 1
  • 4
  • 13
1
vote
0 answers

Dynamic SSIS package creation not working

We are creating SSIS package dynamically using Microsoft.SqlServer.Dts.RuntimeMSDN Link. For the tables to load, we are dynamically create package and execute them. It was working fine till SQL 2014. But, Once we deployed the packages to SQL Server…
Venkataraman R
  • 12,181
  • 2
  • 31
  • 58
1
vote
0 answers

How to Rename the Excel Sheet Name in C# using oledb

I want to rename excel sheetname without using Microsoft.Office.Interop.Excel bec Ms Office is not installed on my server . public void Main() { // TODO: Add your code here var path =…
1
vote
1 answer

How do you change the value of the a SSIS variable within the package using Script Component in Data Flow

I am downloading a json file and successfully putting it in a table using data flow and script component object. Within my json file there is a count of numbers row I should import and how many pages it would take to import the data. e.g. "count":…
1
vote
0 answers

SSIS Script to delete files based on the timestamp in the file by passing retention period

Currently, I have an SSIS process set up to load the data from a zip file every day. These zip files have a timestamp in the file name. Example: *data_20201220.gz & *data_20201221.gz I want to write a script using for loop to delete the files based…
mickey
  • 11
  • 2
1
vote
2 answers

Alternative way to performing rollback or commit transaction

I Have a task which begins with truncating the destination table and then goes into the data flow task. Inside the data flow task I have a source file which is then loaded to the target table through an OLE db destination and if it is successful it…
an1234
  • 165
  • 1
  • 12