Expand my Community achievements bar.

SOLVED

How can we Pivot/unpivot the data sets in ACM

Avatar

Level 5

for example suppose I have the sample data set as follows:-

   

emailsegmentvalues
email1segment1value1
email1segment2value2
email1segment3value3

I want the result as follows:-

emailSeg1Seg2Seg3
email1value1value2value3

Post this, we will use value1,value2,value3 in the email delivery as customization fields.

What is the better method to achieve this?

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi richac96395021 ,

Yes this can be achieved,

From the above setup, it seems that there are two schemas involved. One which contains email addresses and the other one which contains segment information. There is a one to many link between the two schemas.

  1. Use a query to fetch email and email1 records.
  2. Feed them to an Enrichment and select Data linked to the filtering dimension menu. It will then show you two options, this time select Data linked to the filtering dimension.
  3. Proceed through the wizard, select how many records per email you wish to fetch from segment schema.
  4. The output of this Enrichment will have the data in the format you need.

Hope this helps.

Regards,

Vipul

View solution in original post

3 Replies

Avatar

Correct answer by
Employee

Hi richac96395021 ,

Yes this can be achieved,

From the above setup, it seems that there are two schemas involved. One which contains email addresses and the other one which contains segment information. There is a one to many link between the two schemas.

  1. Use a query to fetch email and email1 records.
  2. Feed them to an Enrichment and select Data linked to the filtering dimension menu. It will then show you two options, this time select Data linked to the filtering dimension.
  3. Proceed through the wizard, select how many records per email you wish to fetch from segment schema.
  4. The output of this Enrichment will have the data in the format you need.

Hope this helps.

Regards,

Vipul

Avatar

Level 5

Thanks !! Vipul for the solution,

can you suggest a solution for unpivot

example suppose I have the sample data set as follows:-

  

emailSeg1Seg2Seg3
email1value1value2

value3

I want the result as follows:-

emailsegmentvalues
email1segment1value1
email1segment2value2
email1segment3value3

Avatar

Employee

You can make use of Change Dimension activity.