My variable values are not passed into Data flow task

  • I created a package something like below attached picture.

    1) execute task: sets the maxdays ( diff between startdate(getting from table) and getdate()) and sets to a variable in result set

    2) second execute task sets start and endate to a variable

    3) for loop counter : takes something like this:

    count=0 , count<@maxdays (getting from first execute task) , count++

    4) Dataflow task : gets the start date and end date from second execute task and runs query and loads data.

    My question is when i run the pacakge it just runs , does not load any data? Can anyone please help to figure out why it is not loading data?

  • komal145 (6/3/2016)


    I created a package something like below attached picture.

    1) execute task: sets the maxdays ( diff between startdate(getting from table) and getdate()) and sets to a variable in result set

    2) second execute task sets start and endate to a variable

    3) for loop counter : takes something like this:

    count=0 , count<@maxdays (getting from first execute task) , count++

    4) Dataflow task : gets the start date and end date from second execute task and runs query and loads data.

    My question is when i run the package it just runs , does not load any data? Can anyone please help to figure out why it is not loading data?

    So to generalize you set some variables then want to use those in a data flow. I assume the expression you have on that data flow is the for the source query SQL statement?

    first i would confirm the values i'm getting out of the Exec SQL Tasks. Then manually set the variables to those values . Then from the expression builder evaluate the expression used in the data flow task. Look at it and make sure the where clause isn't excluding all data. Maybe test run it against your source data.

    Then run the package with the data flow outside the loop to verify you get data.

    if you do then your loop logic is incorrect.

    hth

    Tom

  • Thanks. I have to recreate this entire project again , as it took a while to figure out the correct logic and also something to do with date datatypes conversions.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply