Skip to main content
Question

Hi everyone. I am very new to FME. I am trying to copy data from one excel file to another but the new file is formatted differently


Below is the example file where I am getting all my data from. As you can see, each row has a unique ID and there are 4 sets of product information.Example1What I am trying to do is create a single row for each set of product and ensure that the ID and User ID matches. Example below Example 2Any help will be greatly appreciated. Thank you

3 replies

Forum|alt.badge.img+2
  • November 9, 2020

@francoconv​ Welcome to the FME community.

Possibly the easiest approach is to attached 4 AttributeManager transformers (in parallel not in series) to your Excel reader Feature Type, and then rename each of the attributes. i.e.

Product Item 1 -> Product Item

Product Description 1 -> Product Description .

There is also a BulkAttributeRenamer that will let you remove a Suffix. So again, attach four BulkAttributeRenamer transformers )in parallel) and remove the suffix " 1" etc.


  • Author
  • November 9, 2020
markatsafe wrote:

@francoconv​ Welcome to the FME community.

Possibly the easiest approach is to attached 4 AttributeManager transformers (in parallel not in series) to your Excel reader Feature Type, and then rename each of the attributes. i.e.

Product Item 1 -> Product Item

Product Description 1 -> Product Description .

There is also a BulkAttributeRenamer that will let you remove a Suffix. So again, attach four BulkAttributeRenamer transformers )in parallel) and remove the suffix " 1" etc.

Thanks so much for this. Will give it a go and report back.

The excel file that I will end up using has 51 sets of product information. Is there another option other than then using 51 AttributeManager transformers?


Forum|alt.badge.img+2
  • November 10, 2020

@francoconv​ It's easier to explain these things if you can include sample data. But if you know how many products you have, then you can use the Cloner to create a separate feature for each 'product' and then feed all of those into a BulkAttributeRenamer, and parameterize the suffix to remove (i.e the value of the suffix can come from an attribute.


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