Question

Changing Attribute Name

  • 9 February 2022
  • 4 replies
  • 3 views

Badge +1

Hello,

 

I'm an FME novice. This is my first workspace of any complexity at all, and it is based off of https://community.safe.com/s/article/how-to-read-all-feature-classes-from-multiple-esri.

 

I've inserted a couple testers, a reprojector, and an Attribute renamer to the wakthrough above. (The field name "CURRENT" causes and error in the SQL Insertion; likely because it is a SQL keyword). It MOSTLY works, and the process finishes successfully, however the Attribute rename doesn't work as expected. Instead of renaming "CURRENT" to "ECURRENT" as configured, it drops every field starting at "CURRENT" all the way up to the last field in the table.

 

This is obviously some sort of parameter/configuration issue that I'm overlooking. Can someone help me? I've attached the workspace.

 


4 replies

Badge +2

@lancec​ Welcome to the FME family. I think you're on the right track. Without being able to run your workspace I can't tie down the issue precisely but a couple of suggestions:

  • keep the schema and data pipeline separate.
  • you might also have to rename the CURRENT on all the data features as well - use BulkAttributeRenamer
    • to do that expose CURRENT on the FeatureReader as you have for fme_feature_type
  • you can drop the Reprojector and just add EPSG:3857 as the ArcSDE writer Coordinate System (separate issue)

image

Badge +1

Hi Mark,

 

Thank you for your answer. I have modified it following your instructions, but the result is the same. All of the feature classes except one in the input geodatbases are properly transformed with all of the attributes intact. It's the one featureclass that has an attribute name of "CURRENT" in its table that doesn't. Initially, this was causing an error, but introducing the test and attribute renamer solved that. However, it didn't actually rename that attribute in the feature class. Instead, it dropped a handful of the attributes from the table, starting at the "CURRENT" field.

 

Attached is a screenshot of the modification I made based on your suggestion. I may have configured the BulkAttributeRenamer wrong. Speaking of, I'm a little confused as to why the BulkAttributeRenamer is needed since there is only one feature class with an attribute that needs changing, but perhaps I'm misunderstanding the pipeline there.

 

If need be, I can send a culled version of the GDB file that contains the troublesome feature class. Know that it would probably only cause an error if being transformed to SQL though, since it's the SQL keyword "CURRENT" that is making things challenging.

 

fme

Badge +2

Hi Mark,

 

Thank you for your answer. I have modified it following your instructions, but the result is the same. All of the feature classes except one in the input geodatbases are properly transformed with all of the attributes intact. It's the one featureclass that has an attribute name of "CURRENT" in its table that doesn't. Initially, this was causing an error, but introducing the test and attribute renamer solved that. However, it didn't actually rename that attribute in the feature class. Instead, it dropped a handful of the attributes from the table, starting at the "CURRENT" field.

 

Attached is a screenshot of the modification I made based on your suggestion. I may have configured the BulkAttributeRenamer wrong. Speaking of, I'm a little confused as to why the BulkAttributeRenamer is needed since there is only one feature class with an attribute that needs changing, but perhaps I'm misunderstanding the pipeline there.

 

If need be, I can send a culled version of the GDB file that contains the troublesome feature class. Know that it would probably only cause an error if being transformed to SQL though, since it's the SQL keyword "CURRENT" that is making things challenging.

 

fme

@lancec​ If you can include a small test dataset (probably as a File Geodb) and your workspace I can take a closer look. If it's sensitive data you can send it to me: mark at safe dot com

Badge +1

@lancec​ If you can include a small test dataset (probably as a File Geodb) and your workspace I can take a closer look. If it's sensitive data you can send it to me: mark at safe dot com

Thanks @Mark Stoakes​. I will be sending an email shortly.

Reply