I am uploading a simple excel sheet with one column having integer values.
I am running a dispatcher process where I am fetching excel data and storing it in a datatable and using Bulk Add Queue Items to upload the datatable on orchestrator.
A lot of extra transactions are getting added with null values in the one column present e.g. while uploading 7500 rows, extra 2500 rows got uploaded with null values in content.
It is random in many dispatchers execution.
@Ayush_Raj
1.Ensure that there are no empty rows at the end of your Excel sheet. If there are empty rows, the Read Range activity might be reading these rows, resulting in null values in your DataTable. Make sure that you limit the range to only the rows that contain data.
2.Before using the Bulk Add Queue Items activity, you should filter out or handle null values in your DataTable. You can use LINQ or other methods to remove or handle rows with null values before adding them to the queue.
A Cleansing LINQ, checking a paticular datatable column and removing blanks could look like this:
Assign Activity:
dtCleansed =
(From d in dtData.AsEnumerable
Where not isNothing(d("YourColName"))
Let cv = d("YourColName").toString.Trim
Where not String.IsNullOrEmpty(cv)
Select r = d).CopyToDataTable