Hi,
I am reading an excel file into a datatable. Using Bulk Add queue items activity to add datatable to the queue. I created queue in my default workspace in orchestrator.
When I run it, I get an error saying that bad request. I am providing the queue name and the data table name to bulk add queue items. What is missing or going wrong?
Anil_G
(Anil Gorthi)
2 Febrero, 2024 15:30
2
@A_Learner
Are the column names proper?
If they are wrong then it would not work…
Try to open the locals panel and check the exception details from there
Cheers
Thank you, @Anil_G
What would be a proper column name?
Anil_G
(Anil Gorthi)
2 Febrero, 2024 15:34
4
@A_Learner
If you have unique reference then reference should be in small…check here for all names that you need to give
The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...
Cheers
Hi @A_Learner Along with the above tutorial, please find this video tutorial which will further help you in designing - Add Items - CSV,XLS
Thanks
rlgandu
(Rajyalakshmi Gandu)
2 Febrero, 2024 15:39
6
@A_Learner
Check the queue in the bulk add queue items exists in your orchestrator and it is accessable from your project.Check any differences in the queue name
I’ve experimented with this, and I haven’t seen this before. Apparently Bulk Queue Items doesn’t like your header “S.No” because it has a period in it. You can either remove the periods or pull the data without headers, delete the first row, and rename the headers.
vrdabberu
(Varunraj Dabberu)
2 Febrero, 2024 15:44
7
Hi @A_Learner
Check out the below thread
Hi @Sawaira_Nawaz
If you have set the “Unique Reference” to True while creating the Queue, then the datatable that you provide as input to the activity must contain the column Reference in it. Else, the activity will return Bad Request exception.
Regards
Unique Reference set to no. Column names are good - words with spaces. Q name matches. But still getting the error.
vrdabberu
(Varunraj Dabberu)
2 Febrero, 2024 15:59
9
@A_Learner
Check out the below thread. This should help you. Does your excel have large amount of data?
@Deep_HML
To confirm…did you try with only onw row of data? …first try with it…it might be that the columns names are not exactly matching or so…check those…
And yes the limit is 15k or so…
We can break the table into rows of 10k and add in 3 loops
So use for loop with Enumerable.Range(0,Cint(Math.Ceiling(dt.RowCount/10000))).ToArray and change type argument to integer
And inside loop to get each chunk use dt.AsEnumerable.Skip(currentitem*10000).Take(10000).CopyToDataTable
And use the chun…
Regards
I am trying with just two rows of data. Still the same error. Thanks every one.
vrdabberu
(Varunraj Dabberu)
2 Febrero, 2024 16:13
11
@A_Learner
Can you share the error screenshot and Bulk Add queue items activity?
Regards
postwick
(Paul Ostwick)
2 Febrero, 2024 16:17
12
Do any of the column names have a period in them?
Anil_G
(Anil Gorthi)
2 Febrero, 2024 16:37
13
@A_Learner
Thw
At is the problem…the column names should be with numbers,alphabets,underscores…no spaces are allowed
Cheers
postwick
(Paul Ostwick)
2 Febrero, 2024 17:07
14
You can have spaces in column names (which become the SpecificContent keys). Your example literally shows it with a space:
Anil_G
(Anil Gorthi)
2 Febrero, 2024 17:28
15
@postwick
Left side it says only characters and underscores so went on with it
I just tried and it works with spaces and also few special characters as well…Thanks for pointing it out
@A_Learner
Can you share the sample you are using
I tried with this and it worked
Cheers
Thank you @Anil_G @rlgand @vrdabberu @shantanu_chande @postwick
All of your answers educated me and made corrections. Much appreciated.