Skip to main content
Solved

Reading feature attributes from varying Excel with FeatureReader


lifalin2016
Contributor
Forum|alt.badge.img+29

Hi list.

This issue has been touched on several times, but I don't see a solution for me in any of the answers.

I have to read a number of Excel spreadsheets, and being spreadsheets, they vary very much in both content and structure.

I can read the spreadsheets with FeatureReader just fine, and I get both schema features with an attributes{} list of attributes, and generic data features with attributes in an unexposed state.

How do I utilize the schema features to dynamically expose whatever attributes are present in the data ?

Exposing attributes seems to be a design time issue only, and I haven't found any way to expose attributes dynamically.

Alternatively, can a (MS/SQL) writer accept a list of name/value items, and output these to the database as fields with values ?

I also need to merge several fme_feature_type's (i.e. multiple Excel sheets/tabs), so Dynamic Schema Definition won't work for me, I think.

Cheers.

Best answer by lifalin2016

I'm closing this question. I found that the better approach is to handle it using schema features.

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

5 replies

pratap
Contributor
Forum|alt.badge.img+11
  • Contributor
  • March 3, 2021

Hi,

When you know that attribute name, why do you want to expose dynamically instead of using attribute exposer?


lifalin2016
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • March 3, 2021
pratap wrote:

Hi,

When you know that attribute name, why do you want to expose dynamically instead of using attribute exposer?

Please read it again. I do _not_ know the attribute names on design time, and thus cannot use AttributeExposer.


nielsgerrits
VIP

I'm also not sure what you need exactly. Yes you can read excel files in a dynamic way. What do you want to do with the data after reading?


lifalin2016
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • March 4, 2021
nielsgerrits wrote:

I'm also not sure what you need exactly. Yes you can read excel files in a dynamic way. What do you want to do with the data after reading?

It quite simple: I want to read any Excel spreadsheet, and store whatever fields are embedded in them to a MS/SQL database table.

This requires exposing of the dynamic attributes, afaik. This is not done automatically by FeatureReader, and I can't do it design time, as the attributes are unknown at that time.

The thing about multiple tabs are, that sometime the attribute data is divided into multiple tabs with the row id being the key to stitching them together.

Maybe it cannot be done?


lifalin2016
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • Best Answer
  • June 24, 2021

I'm closing this question. I found that the better approach is to handle it using schema features.


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