Odata source inside ForEach loop

14 Views Asked by At

I am building a SSIS solution on visual studio where the goal is to retrieve all the client numbers from a database table(using a sql task) and loop throught them using a ForEach loop container and a Data Flow Task. Inside the data flow I am using a odata source where the query option uses that client number. But I am getting an error because the variables that I am using to insert on that filter query are allways 0 (Data Flow expressions image).

Here are the variables I have created: BURKS(string) to keep the cliente company KUNNR(int32) to keep cliente number Values(object) to store data from the sql task

Data Flow Task expressions

Table example:

KUNNR BURKS
623254 E001
986 E005

Explaining the steps with a little more detail... The sql task as a full step result with the sql statement : SELECT TOP 2 KUNNR, BURKS FROM dbo.temp_partners; The result set have the variable 'Values' (images bellow)

SQL Task editor 1 SQL Task editor 2

The loop container component is set to a 'ADO Foreach enumerator', using the variable 'Values' and I am mapping the 2 returned column on the 2 variables. (images bellow) Foreach editor 1 Foreach editor 2

I feel that something is not correct on the process, I kinda of new on the technology so any help would be great.

0

There are 0 best solutions below