Intermittent occurrence of random duplicates in excel report

Certified Senior Developer

We recently noticed a issue in production that the excel is populated with random duplicates for any record intermittently. User is filtering out the data on SAIL and clicks on EXPORT button. We can see the filtered data in the excel but few records are duplicated in excel which does not exist in view or SAIL. We ran the query entity explicitly to determine the data and it is correctly retrieved as per the filters applied.

So there is no pattern as such to figure out why this issue is occurring. And this is only observed in Production and not in lower environments. As we are not manipulating the data anywhere, I am guessing the issue must be with the view, especially with primary key. We are currently guessing that the issue might be with the way smart service is sorting out the data based on filters applied in excel report.

We are using Export DSE to Excel smart service. We are using a view with SELECT ROWNUM ID and mapping this ID as Primary Key with @ID annotation on CDT. But we are not using this CDT in the smart service, we are directly passing a constant for that view in this smart service and populating the excel.

Appian recommends to use a table or materialized view because it has primary key specified with a constraint which is used by this smart service for sorting the data. 

So my understanding is the Export DSE to Excel smart service requires PRIMARY KEY CONSTRAINT on DB level for sorting the data properly and ROWNUM ID wouldn't work in sorting the data properly for this smart service. 

Is there another possibility as to why this issue might be occurring? Also, how does this Export DSE to Excel smart service works when we are using a view with ROWNUM ID?

  Discussion posts and replies are publicly visible