Skip to main content

Hello,

 

I’m struggling with the logic/approach on this one.

 

I have a spreadsheet of fuel filters.

 

So in the spreadsheet, it looks kind of like this:

 

Unit#/Fuel 1/Fuel2/Air 1/Air2

12/abc123/abc223/airf123/airf124

13/abc123/abc212/airf123/airf124

 

I want to create output data that looks something like this:

 

Unit/Filter Class/Filter Number

12/Fuel Filter/abc123

12/Fuel Filter/abc223

12/Air Filter/airf123

13/Fuel Filter/abc123

13/Fuel Filter/abc212

 

Hopefully this makes sense.


Any thoughts on an approach, or some transformers I should work with?

 

Cheers!​​​​​

Interesting question, I can’t really answer it so I’m also curious what the ideas of more FME experienced people will be.

One thought I had was using the Test filter.
One feature would arrive in the Test filter -  ex 12/abc123/abc223/airf123/airf124
You would set up the test filter to create features based on the presence of values like ex /Fuel 1/Fuel2/Air 1/Air2.

So essentially one input feature would be ‘exploded’ into several output ports, you would then combine them in a downstream transformer or writer.

I wonder if there is a more elegant solution, like an ‘exploder’ that uses attribute logic


Tester might actually work, I will test with that.  I was thinking about using Lists somehow, but didn’t have luck with that...


Lists are a good idea too, check out this post.

 

 


This may work with the Tester, just going to confirm:

 

 

 

Just creating brand new Attributes on the Features to hold the values then nothing gets overwritten, then can remove all the extraneous attributes at the end.

 

Curious still if there is anything more elegant, but thanks ​@arenscott !

 

Cheers!

 

bret


That looks pretty nice, good job! The Test filter might allow you to go from 3 Testers to one transformer.
I’m also curious if someone has a more elegant solution; I also have a similar work issue to yours!


An attribute exploder with an attribute manager to tidy things up should work here

 

 


I really like this option, thanks ​@ebygomm 

I will build out the workspace using this method.

Cheers!