Skip to main content
Question

Can you control attribute filter using an excel list of attributes

  • January 3, 2020
  • 5 replies
  • 53 views

Forum|alt.badge.img

I have a csv file with 55 attributes for each feature, I'd like to join only relevant attributes to various shapefiles (using FeatureJoiner). For example my Farm shapefile may need only 10 of those 55 attributes, my Buildings shapefile could require 20 attributes from the csv. For each shapefile I have an excel list of required attributes. How can I read in the main csv and filter it based on the xls - so only the attributes on the xls are passed to the FeatureJoiner?

Have tried Attribute Filter, importing the xls but I can't see how to filter on this?

Any suggestions?

Thanks

Chris

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • January 3, 2020

Would it also be an option to join all attributes and define the writer to use only the attributes that you need?

This is much easier to accomplish.


Forum|alt.badge.img
  • Author
  • 21 replies
  • January 3, 2020

Hi erik_jan

Thanks for responding. Yes I can do that but I still have to manually select the required attributes within the writer. I'm trying to find something that can do that from the xls.


erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • January 3, 2020

The SchemaMapper transformer has options to filter attributes based on a spreadsheet.


Forum|alt.badge.img+2
  • 1891 replies
  • January 3, 2020

@cbrown You can use the schema feature that is created by the FeatureReader. Modify the list of attributes and then use the EsriShape writer in dynamic mode to create the shape files with the correct attributes. Something like:

I've attached the example workspace (2019.1): dynamicschema.fmwt


takashi
Celebrity
  • 7843 replies
  • January 4, 2020

Since you already have the Excel table that defines attribute sets for each destination Shapefile datasets, I think you can enhance the table to use it as a lookup table to configure destination schema at run-time.

See here to learn more: Destination Schema is Derived from a Lookup Table