Skip to main content

Hi,

I have different councils Pipe material list with a specific example of say Copper – which different council has a different way to define it.. say for example one council called it “CU”, other council calls it “COP” and some other councils call it with some other name…however, the material is the same…and in general we want to define a common name for it..... say "Copper"? Can we create a data dictionary in FME?...which can identify and recognize the correct name and replace it with a generic name?

 

 

I’m not sure about a dictionary but you can use conditional statements in the attributecreator transformer to assign a common name to all features that match your search criteria.


Hi @ppp19, if all the possible aliases of "Copper" are known, the StringPairReplacer would be available to convert every alias to "Copper".


I would probably do this as a mapping table.

 

Have an excel or csv file with two columns the OriginalName and the CommonName and then use a DatabaseJoiner to attach the common name as an attribute.

 

 

This way the "dictionary" can be maintained without any edits to the FME workspace.

 

Ex.OriginalNameCommonNameCUCopperCOPCopperFEIronIRIron

 

You would also be able to handle any unjoined features, where the council name is not in the dictionary. Whereas the StringPairReplacer option would just pass those features through untouched.


I would probably do this as a mapping table.

 

Have an excel or csv file with two columns the OriginalName and the CommonName and then use a DatabaseJoiner to attach the common name as an attribute.

 

 

This way the "dictionary" can be maintained without any edits to the FME workspace.

 

Ex.OriginalNameCommonNameCUCopperCOPCopperFEIronIRIron

 

You would also be able to handle any unjoined features, where the council name is not in the dictionary. Whereas the StringPairReplacer option would just pass those features through untouched.

I agree with this approach. Preserves the original data and creates the alias field.


I would probably do this as a mapping table.

 

Have an excel or csv file with two columns the OriginalName and the CommonName and then use a DatabaseJoiner to attach the common name as an attribute.

 

 

This way the "dictionary" can be maintained without any edits to the FME workspace.

 

Ex.OriginalNameCommonNameCUCopperCOPCopperFEIronIRIron

 

You would also be able to handle any unjoined features, where the council name is not in the dictionary. Whereas the StringPairReplacer option would just pass those features through untouched.

Hi @jdh, this DatabaseJoiner worked well for me...However, I have few raws in my csv file which is blank (having no material name in OriginalName column as you described)...and don't know how to map those rows with common name...because those raws showing unjoined in Databasejoiner.

Regards,

 


Hi @jdh, this DatabaseJoiner worked well for me...However, I have few raws in my csv file which is blank (having no material name in OriginalName column as you described)...and don't know how to map those rows with common name...because those raws showing unjoined in Databasejoiner.

Regards,

 

Hi @jdh, please ignore my previous reply...I have now figured out my blank raw issue.

Regards,


Hi @ppp19, if all the possible aliases of "Copper" are known, the StringPairReplacer would be available to convert every alias to "Copper".

Hi @takashi, the above idea of databasejoiner worked for me..thanks for your time to reply me on this issue.

Regards,


I’m not sure about a dictionary but you can use conditional statements in the attributecreator transformer to assign a common name to all features that match your search criteria.

Hi @umapper1, the below idea of databasejoiner worked for me.. thanks for your time to reply me on this issue.

Regards,


Hi @jdh, please ignore my previous reply...I have now figured out my blank raw issue.

Regards,

Hi@jdh,

Hi I have created an excel sheet with adding attribute values for Material and used the DatbaseJoiner function of FME to Map column A with Column B and C as per our previous discussion. Well, it works good for all other material but it is showing unjoined only for MDPE, AK and mPVC. I did everything to rejoin this mapping but it is not taking only these 3 material names in consideration and shows unjoined in FME.... :(

Any reason you can see here?

Regards,

 


Hi@jdh,

Hi I have created an excel sheet with adding attribute values for Material and used the DatbaseJoiner function of FME to Map column A with Column B and C as per our previous discussion. Well, it works good for all other material but it is showing unjoined only for MDPE, AK and mPVC. I did everything to rejoin this mapping but it is not taking only these 3 material names in consideration and shows unjoined in FME.... :(

Any reason you can see here?

Regards,

 

The first thing to do is check of there are any white spaces in either the csv or the actual council data. 'MDPE ' is not the same as 'MDPE'. If it's in the data an AttributeTrimmer can strip the extraneous white space.


The first thing to do is check of there are any white spaces in either the csv or the actual council data. 'MDPE ' is not the same as 'MDPE'. If it's in the data an AttributeTrimmer can strip the extraneous white space.

Hi @jdh...it worked well!!!...Thanks for your help... :)

Regards

 


Reply