Skip to main content
Question

SchemaMapper Vs AttributeRenamer - Best Practices


johnehlen
Forum|alt.badge.img

CaptureBoth transformers allow using schema mapping defined in an external file (csv, etc). The AttributeRenamers output gives me the desired results, the original values in a new schema. The SchemaMapper, however, requires the addition of an attribute exposer to show the new attributes, and an attribute renamed to remove the old attributes. I assumed the SchemaMapper would be easier to use than the AttributeRenamer but it seems much more cumbersome, especially having to manually expose and remove the old schema attributes. Is it possible I am doing something incorrectly? Is there a benefit to the SchemaMapper I am overlooking?

 

5 replies

jkr_wrk
Influencer
Forum|alt.badge.img+29
  • July 24, 2021

For your purpose an AttributeRenamer would be the way to work I think. The SchemaMapper is very complicated, but has usecases other than yours. But I have to admit I ones tried the SchemaMapper but don't remember if I got it to work like I wanted.


virtualcitymatt
Celebrity
Forum|alt.badge.img+35

Disclaimer, this is only based on my opinion and experience:

I think with more recent releases of FME attribute handling has been improved in a way that has made the SchemaMapper less helpful. Now it's easy to import new attributes easily (as you have found with the AttributeRenamer)

The SchemaMapper is now really only helpful for dynamic workflows in a situation where the file referenced in the SchemaMapper might change. This require more of a dynamic workspace design. I find that I very rarely need to use the SchemaMapper myself.


johnehlen
Forum|alt.badge.img
  • Author
  • July 26, 2021
jkr_da wrote:

For your purpose an AttributeRenamer would be the way to work I think. The SchemaMapper is very complicated, but has usecases other than yours. But I have to admit I ones tried the SchemaMapper but don't remember if I got it to work like I wanted.

Hello,

 

The end goal of our process is to have an automated schema mapping process between the origin schema (which will change) and the destination schema (which will be static). Because the AttributeRenamer is a manual operation to load the fields from file, this transformer doesn't allow us to automate the process.


johnehlen
Forum|alt.badge.img
  • Author
  • July 26, 2021
virtualcitymatt wrote:

Disclaimer, this is only based on my opinion and experience:

I think with more recent releases of FME attribute handling has been improved in a way that has made the SchemaMapper less helpful. Now it's easy to import new attributes easily (as you have found with the AttributeRenamer)

The SchemaMapper is now really only helpful for dynamic workflows in a situation where the file referenced in the SchemaMapper might change. This require more of a dynamic workspace design. I find that I very rarely need to use the SchemaMapper myself.

Hello,

 

The end goal of our process is to have an automated schema mapping process between the origin schema (which will change) and the destination schema (which will be static). Because the AttributeRenamer is a manual operation to load the fields from file, this transformer doesn't allow us to automate the process.


jkr_wrk
Influencer
Forum|alt.badge.img+29
  • August 10, 2021
johnehlen wrote:

Hello,

 

The end goal of our process is to have an automated schema mapping process between the origin schema (which will change) and the destination schema (which will be static). Because the AttributeRenamer is a manual operation to load the fields from file, this transformer doesn't allow us to automate the process.

According to your example you need the BulkAttributeRenamer set to Add String Prefix, Rename, NENA_

 

Then a NullAttributeMapper with selected Attributes NENA_Field1 NENA_Field2 and If Attribute is empty Map to Missing.

 

And maybe a BulkAttributeRemover to remove all attributes that don't start with NENA_Field.

 


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