Datamanager records and exported records differ

Yesterday a customer asked me: Why is the number of records in the datamanager (269) different to the exported records (267).

After some testing we found out, that duplicate records are not exported twice. Looks like the export has some DISTINCT in there.

We took it to the top and exported just a boolean field and indeed the export result was just two records: TRUE and FALSE.

On the one hand this behaviour seems legit, on the other hand, the customer wanted to know the profession of his attendees to do some diagrams in excel and the result differs depending on the selected export fields.

Is the distinct intended? If yes I’d need to tell my customer to always include the ID field as unique key to get the full number of records.

This is a bit similar to a recent change we made to the Data API, which now always includes the record ID.

Maybe we should always include the ID in the original record query (with an alias), but ignore it when generating the data output.

For now, always include the ID.