Bulk Add Queue Items with datatable that has over 80k rows

Hello everyone, I need a little bit of a help since I got a solution in mind but maybe you guys have more elegant way.

I have a final datatable that I want to add to the orch queue, I also want it to be FIFO therefore I know that It’s not possible to get it done instantly with so much rows. so I want to do for each loop that takes 100 rows each times places them in a datatable that will be used on the add queue items and continue the loop till I get all the rows.

Anyone can help?

@itaim

You can do upto 15K items in bulk queue

so to get items as chunks use for loop with list items as dt.AsEnumerable.Chunks(10000) …for safety using 10k

inside loop use add bulk queue item with currentitem.CopyToDatatable as the datatable input

cheers

I don’t have the Chunk method.

Also when it’s a big group like 10k it messes the order it goes to the orchestrator, and I want it FIFO

@itaim

then you can use take and skip…You can do it in 100 as well …

check this

cheers

1 Like

You dont have due the project is set to Legacy?

Then do the following modelling

Assign Activity
SegmentCount | int32 = CInt(Math.Ceiling(yourDT.Row.Count / 1000))

For Each Activity | item in SegmentCount

  • Assign Activity: tmpDataTable | DataType: DataTable =
yourDT.AsEnumerable().Skip(item*1000).Take(1000).CopyToDataTable
1 Like

Find some Visualizations here:

For LINQ Introductions have a look here:

I appreciate all the answers, you guys helped a lot :), I did segments of 100 in order to keep it FIFO in orchestrator if anyone will encounter this.

Thank you!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.