Skip to main content
Solved

Combine 2 lines of header into 1 attribute name from Excel


mapixse
Contributor

I'd like to combine headers from 2 lines in Excel to form 1 attribute name.

excelShould result in feature with attributes ID, AAA_XXX and BBB_YYY

I've looked at debbiatsafe solution at Bulk Rename Attributes with Original Name plus the First Row (safe.com) but that doesn't do it all the way.

Need to have the features with the attribute names to continue working with in the workspace.

Any hints on how to proceed?

 

Best answer by hkingsbury

I've attached an example which is basically the solution you linked.

The thing to note in this scenario, is that FME only know the schema of the data as you specified in the reader and when you explicitly set known attribute values. When creating a new attribute using attribute values you are using an unknown value so FME doesn't know what this new attribute is called until you run the process.

 

The table in the data inspector will only show exposed values. However if you look at the Feature Information panel, you will see many more attributes, including the ones that were made at runtimeimage 

To use these new attributes, you need to create a schema with them in it. This can then be passed to you're writing and written out

View original
Did this help you find an answer to your question?

2 replies

hkingsbury
Celebrity
Forum|alt.badge.img+53
  • Celebrity
  • Best Answer
  • March 27, 2022

I've attached an example which is basically the solution you linked.

The thing to note in this scenario, is that FME only know the schema of the data as you specified in the reader and when you explicitly set known attribute values. When creating a new attribute using attribute values you are using an unknown value so FME doesn't know what this new attribute is called until you run the process.

 

The table in the data inspector will only show exposed values. However if you look at the Feature Information panel, you will see many more attributes, including the ones that were made at runtimeimage 

To use these new attributes, you need to create a schema with them in it. This can then be passed to you're writing and written out


mapixse
Contributor
  • Author
  • Contributor
  • March 29, 2022

Thank you, that seems to solve it.


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