Adding data table into queue

Hi Team,

Can someone tell me how to add complete data table into queue as a single transaction item?

Thanks

The ItemInformationCollection attribute of Add Que allows you to add Dictionary Items . It may be possible to add a Dictionary<String,DataTable> using which you may be able to do this.

I haven’t tried it, but it might work.

you can use “Output Datatable” activity to convert your datatable to a string which you can simply add to the queue, the string will be something like this
image

You can convert it back to a datatable by using “generate datatable activity”, you must tick the “CSV Parsing” property

3 Likes

Thankyou so much for your reply!!

1 Like

Hi @Hitesh,

Adding to the answer from @jack.chan

There is an alternative way to achieve it using an assign activity and using YourDataTable.

YourQueueString = Newtonsoft.Json.JsonConvert.SerializeObject(YourDataTable)

This way you can send YourQueueString along with other data strings or datatable if you wish by building a overall ItemDataTable and add rows with YourQueueString and pass it to Add to Queue or Bulk Add Queue Items.

Summary
Dispacher: Datatable —> String —> Orchestrator
YourQueueString = Newtonsoft.Json.JsonConvert.SerializeObject(YourDataTable)

Performer: Orchestrator —> String —> Datatable
QueueItemData = Newtonsoft.Json.JsonConvert.DeserializeObject(Of DataTable)(out_TransactionItem.SpecificContent("YourQueueString").ToString)´

QueueItemData will result as a Datatable.

10 Likes

You can do this by serializing and deserializing.
As @jeevith suggested way is the best way to make that happen.

2 Likes

This looks good , i will try this out,. thank you !!

@jeevith - it worked for me ,Thanks

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