SSIS Use a DataFlow Task with Variables Instead of the Source Database

I have a task that I'm working on, and it puzzled me. I hope you can help me. I am using a data flow task that basically inserts a row into a sqlite table. I did this with SQL Tasks, but unfortunately the only way to successfully insert the manual into the sqlite table is to convert it to a byte stream using the data stream task. I do not want to use the original database because my data does not flow from one table to another. I just want to take my filled variables and convert them to a byte stream, which can then be inserted into the sqlite database. The problem is that I cannot use the data stream task without the source database.

So far, my job has been to declare the source database / table and only one column (but never use it in a data stream). This works fine, and I cannot insert a row into sqlite using my predefined variables, but I leave a somewhat annoying message in the output log every time I do this:

Warning: 0x80047076 at, SSIS.Pipeline: output column "(117) at the output" OLE DB Source Output "(11) and the component" OLE DB Source "(1) is not subsequently used in the Data Stream task, Removing this unused column output can improve data flow task performance.

Does anyone know a good way to get this warning so as not to appear?

+4
source share
2 answers

In your data stream, select the Script component.

When prompted to select a source, destination, or conversion, select the source.

Add your pre-populated variables to the CustomProperties.ReadOnlyVariables section of the Script tab.

Go to the "Inputs and outputs" section.

Add a column to the default output for each of your variables.

In your Script (if using C #) in the CreateNewOutputRows () section, put something similar to the following:

Output0Buffer.AddRow(); Output0Buffer.ContainerName = Variables.ContainerName; Output0Buffer.TaskName = Variables.TaskName; Output0Buffer.TaskStartDate = Variables.ContainerStartTime; 

Save the script.

Connect your Script component to the target.

+8
source

If this causes the package to fail, you have the option to ignore these warnings / errors.

Just double-click the source block in the data stream and go to the last tab ("OUtput Error") in the left pane, and you need to select the option to ignore errors. (I do not know what phrase in this option will do)

-1
source

Source: https://habr.com/ru/post/1432123/


All Articles