Sunday, 19 February 2012

Configuring SSIS package to read a value before executin

Hi,

Is it possible in any ways to Configure a SSIS package in such a way that based on the User Input the package runs. For e.g if there is a table which has say 10 distinct groups. Normal SSIS package would ideally pick all the data from the source to the Destination

I want to know how to configure in Such a way that I should be able to say Group X as the input and data related to GroupX alone should be copied.

Select * from SomeTable where GroupName = @.CongigVar.

how to achieve something like this?

thanks

Hello,

What kind of input are you intrested in getting?

If you have the group name that you want to get information from in a table, you can, in control flow, make a query to a table, and put it on a variable, then on the data flow you can use the variable as a parameter.

To use it on a parameter your query should be

"Select * from SomeTable where GroupName = ?"

Then in the parameter button on the left you choose the variable that will pass tha value to the question mark.

Is that good for you?

Regards,

|||

Hello,

I think that might just be what I need, but when I tried creating one, its failing with the error, 'Parameter Name Unrecognized'. I think am doing it wrongly. Can you post some links that explains how to put a value from a table onto a variable, and then use it as i/p to a Data flow?

thanks

|||

Nfrf wrote:

Hello,

What kind of input are you intrested in getting?

If you have the group name that you want to get information from in a table, you can, in control flow, make a query to a table, and put it on a variable, then on the data flow you can use the variable as a parameter.

To use it on a parameter your query should be

"Select * from SomeTable where GroupName = ?"

Then in the parameter button on the left you choose the variable that will pass tha value to the question mark.

Is that good for you?

Regards,

There's no need to store values in a table. You can parameterize your package by passing it values when you call it. Explore the /SET option of dtexec. All the information you require is in Books Online.

-Jamie

|||

Yes it is true. I just gave him a way.

The thing that i thnik he wanted to know was the parameter on the query.

Even so thanks

No comments:

Post a Comment