Skip to main content
Question

FeatureReader Excel keeps old Column Names

  • January 27, 2022
  • 3 replies
  • 71 views

Hello i have Columnname A and B.

I read the Excelfile with a FeatureReader. Get Columns A and B.

Now i close FME. Rename Columname A to C in the Excelfile.

Open FME. Read the Excelfile. Get Columns A and B instead of C and B.

Why does FME cant see my renamed Column C and still sees Column A wich doesnt exist anymore?

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • January 27, 2022

Those kinds of changes will require you to redo the FeatureReader, there doesn't seem to be a way to update it (like you would have with a regular reader). Also any subsequent transformers that rely on the column that you have renamed will need to be updated.


  • Author
  • 14 replies
  • January 27, 2022

Those kinds of changes will require you to redo the FeatureReader, there doesn't seem to be a way to update it (like you would have with a regular reader). Also any subsequent transformers that rely on the column that you have renamed will need to be updated.

If i have 2 Excel Files in a directory.

Excel File 1 has the following columns:

A B

Excel File 2 is the same Excel but the renamed column A so:

C B

 

If i have a directory and filepathnames reader and read both path_windows and then i use a testfilter to only get Excel File 1.

Then i use the FeatureReader with the path_windows Attribute as Source.

As "to reading Featuretypes" i set it to a whitespace. So in the cache i get "no shema" but the attributes are hidden. A and B. so i could expose them.

If i change my testfilter to get Excel File 2 and read it with the FeatureReader then i get "no shema" again and now there are C and B hidden.

So is there a way to make all hidden columns visible without specifically naming the columns that needs to get visible?


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • January 27, 2022

If i have 2 Excel Files in a directory.

Excel File 1 has the following columns:

A B

Excel File 2 is the same Excel but the renamed column A so:

C B

 

If i have a directory and filepathnames reader and read both path_windows and then i use a testfilter to only get Excel File 1.

Then i use the FeatureReader with the path_windows Attribute as Source.

As "to reading Featuretypes" i set it to a whitespace. So in the cache i get "no shema" but the attributes are hidden. A and B. so i could expose them.

If i change my testfilter to get Excel File 2 and read it with the FeatureReader then i get "no shema" again and now there are C and B hidden.

So is there a way to make all hidden columns visible without specifically naming the columns that needs to get visible?

You'd want to look into a dynamic workflow but you still would have to know what the attributes are called if you want to do something with them.

There's a section in the 2019 Advanced training material about Dynamic translations that could be helpful.