I regularly make use of a workflow query and group/count the results by:
* Adding Data
* Adding the output column i'm interested in (and select "group" box)
* Adding another output column and using the count(@id) expression.
* On advanced parameters removing duplicate rows and disabling the automatic adding of primary keys of the targeting dimension.
I was looking to do something almost similar, but instead of using a query, I wanted to group by some temp schema data (because i need to make use of other activities to get it how i want before grouping).
When using enrichment, I again add data and select the output columns:
1) field i'm interested in getting counts on (ticking group box)
2) count expression
* On advanced parameters removing duplicate rows
However the option to select "Disable the automatic adding of primary keys of the targeting dimension" option is not available.
The enrichment activity therefore errors.
Can anyone advise if there is a setting i am missing or an alternative approach to group/count temp schema data
(I just saw an answer has been posted but I'll post mine anyway )
The option Disable the automatic adding of primary keys of the targeting dimension is not available in your case because you're on a temporary schema which (may) have no target dimension so no automatic primary keys.
However, if I understand your use case correctly, it should be possible to do what you want to achieve by unchecking the option Keep all additional data from the main set (in enrichment tab on the main screen of the enrichment activity).
Then, you can add your group by expression and the count expression (you could use countAll() function which is actually an COUNT(*) in the SQL way).
I'll forward your question to one of our data management experts. I hope to get a reply soon. I know this kind of actions can be a bit tricky, especially with the enrichment activity. Please let us know if you find a way in the meantime.