Skip to main content
Solved

Transposing a file


lmorris2019
Participant

I need to transform a CSV file where all the values for a given date\\time are in a single row:Image#1to multiple rows for a given date\\time:

Image#2I tried to follow the example at https://community.safe.com/s/article/transpose-a-table-using-fme, but could never figure out how to get data combined the way it is needed.

Any help you can provide is greatly appreciated!

Lowell

Best answer by ebygomm

lmorris2019 wrote:

A more elegant solution than the one I was envisioning - thank you!

 

One final question - What transformer can I use to update the values of TagName in the file? For example, I need to change spCond to LLSCADA.LL_EX02_SPCOND_US_CM.F_CV, PH to LLSCADA.LL_EX02_PH.F_CV, etc...

You could use an attribute value mapper to change these values. If you have an excel or csv file with the existing value and the one you want to transform to you should be able to import into the transformer

View original
Did this help you find an answer to your question?

5 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • May 7, 2021

You should be able to use an AttributeExploder here. If you can upload the 4 lines of the csv file you have posted i can create an example


lmorris2019
Participant
  • Author
  • Participant
  • May 7, 2021

Hi ebygomm,

Attached is the incoming CSV file.

Thanks for your quick reply.

Lowell


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • May 7, 2021

This should get you most of the way there

Capture


lmorris2019
Participant
  • Author
  • Participant
  • May 7, 2021

A more elegant solution than the one I was envisioning - thank you!

 

One final question - What transformer can I use to update the values of TagName in the file? For example, I need to change spCond to LLSCADA.LL_EX02_SPCOND_US_CM.F_CV, PH to LLSCADA.LL_EX02_PH.F_CV, etc...


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • Best Answer
  • May 7, 2021
lmorris2019 wrote:

A more elegant solution than the one I was envisioning - thank you!

 

One final question - What transformer can I use to update the values of TagName in the file? For example, I need to change spCond to LLSCADA.LL_EX02_SPCOND_US_CM.F_CV, PH to LLSCADA.LL_EX02_PH.F_CV, etc...

You could use an attribute value mapper to change these values. If you have an excel or csv file with the existing value and the one you want to transform to you should be able to import into the transformer


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings