"Group By" Temp Schema Data - Workflow

davidh2892249

06-09-2017

Hi

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

Thanks in advance

David

Accepted Solutions (1)

Accepted Solutions (1)

Amit_Kumar

MVP

18-09-2017

Hi David,

Alas!! This option is not possible in enrichment although there is a workaround.

Feed enrichment or any temp results to a query activity and use group By like a standard query in there. Refer to this screen for reference. It's simple and easy to implement.

1301212_pastedImage_0.png

If you need more details let me know.

Regards,

Amit

Answers (6)

Answers (6)

julienf3843431

Employee

18-09-2017

Hi David,

(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).

Hope it helps.

Regards,

Julien

cbeattie1992

15-11-2018

Hi Julien,

I think this is more along the lings of what i am looking for.

I will to count the ID's grouped by the Values and Name of the field.

There are several different fields which i am try to count here.

I have unchecked the 'Keep all additional data from the mail set' and it is not giving me an error. However i only have a count of 0.

Am i doing anything wrong?

Thanks so much

Connor

1622296_pastedImage_0.png

cbeattie1992

15-11-2018

Hi Amit,

I am really interested to know more about this solution.

Can you please go into more details as i am not sure how this works?

Thanks a lot

Connor

florentlb

15-09-2017

Hi David,

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.

Florent