How to use field pivoter with multiple fields?

asked 2018-09-06 15:15:41 -0600

crarch6 gravatar image

I have an input file that has string columns with single values such as

color: "purple"

and other columns with delimited strings such as

shade: "light|dark|pale"

With a single delimited string column, I can use data parser to create a list from the delimited fields and then use field pivoter to create rows of:

color: "purple", shade: "light"

color: "purple", shade: "dark"

color: "purple", shade: "pale"

but what if I have multiple delimited string columns that I need to parse and then pivot by at the same time. For instance, if I have a third column such as:

usage: "common|very frequent|rare"

how do I pivot based on two columns, the shade and usage column to give me the following result:

color: "purple", shade: "light", usage: "common"

color: "purple", shade: "dark", usage: "very frequent"

color: "purple", shade: "pale", usage: "rare"

edit retag flag offensive close merge delete