Skip to main content
Solved

How to save the Attribute definition in a csv ?


Hi ! I wanted to know if there was a way to save the attributes definition (Name, type and width) in to a CSV.

Thanks for the help !

Best answer by markatsafe

fmenewbie_jr wrote:

Thanks for the answer ! that's a very straight forward transformer to do what i want, but I only have access to the 2020 version of FME and I can't find the transformer so I guess it's only for the newer versions of the software ?

You can use the Schema (any format) instead, or the FeatureReader <schema> port

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

4 replies

chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • February 9, 2022

Hi @fmenewbie_jr​ ,

 

Check out the new SchemaScanner transformer - it'll tell you everything you need. Here is an example with an Excel file where it provides the name, data type (<width>, <precision if applicable>). A schema feature will store all of this in a list which you can explode with a ListExploder. Then you can parse/format as needed for your desired output.

imageIf you are using an older release of FME, you can still get this information with a schema feature using either the Schema Reader or a schema feature from the FeatureReader.


chrisatsafe wrote:

Hi @fmenewbie_jr​ ,

 

Check out the new SchemaScanner transformer - it'll tell you everything you need. Here is an example with an Excel file where it provides the name, data type (<width>, <precision if applicable>). A schema feature will store all of this in a list which you can explode with a ListExploder. Then you can parse/format as needed for your desired output.

imageIf you are using an older release of FME, you can still get this information with a schema feature using either the Schema Reader or a schema feature from the FeatureReader.

Thanks for the answer ! that's a very straight forward transformer to do what i want, but I only have access to the 2020 version of FME and I can't find the transformer so I guess it's only for the newer versions of the software ?


Forum|alt.badge.img+2
  • Best Answer
  • February 9, 2022
fmenewbie_jr wrote:

Thanks for the answer ! that's a very straight forward transformer to do what i want, but I only have access to the 2020 version of FME and I can't find the transformer so I guess it's only for the newer versions of the software ?

You can use the Schema (any format) instead, or the FeatureReader <schema> port


fmenewbie_jr wrote:

Thanks for the answer ! that's a very straight forward transformer to do what i want, but I only have access to the 2020 version of FME and I can't find the transformer so I guess it's only for the newer versions of the software ?

I combined the two answers and used the FeatureReader with a ListExploder and it worked ! thanks for the help !!


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