Multiple input rows in single queue item

I am running a SQL query which will result in multiple rows as output.

Now, as you can see the column ID has id=2 and id=4 repeated. Instead of uploading this as 7 separate transactions to the queues, the id values which are repeated should be uploaded as one single transaction. So the rows containing ID=2 and 4 should be uploaded as a single queue item(maybe comma separated values for the column containing different data).

Is this even possible to achieve? How can we do this?

@ashwin.ashok @Angel_Llull @lakshman

HI @Sunny_Jha

Yes you can

You need to identify the similar rows then you can do row.itemarray to get the values of that row as array and then use string.join(“,”,array) to join the values with comma separation

then all the identified rows needs to be appended again using any other separator and then add it to the queue


Hi @Anil_G ,
Can you please elaborate your idea? Maybe can you create and share a small xaml of your explanation?

we can do it by grouping the data

Assign Activity:

TableList | List(Of DataTable) =
(From d in YourDataTableVar.AsEnumerable()
Group d by k=d("ID").toString.Trim into grp=Group
Select t = grp.CopyToDataTable).toList

Then loop with a for each (not for each row) over TableList

  • e.g. create csv data or any other represenation for the current looped datatable and use it for the WorkQueueItem creation

Hi @Sunny_J

Please see the xaml as well

so I used this as input

this is the output

And I have used group and String.Join to get the items joined together

SampleLoadqueue.xaml (8.5 KB)

Hope this helps