Hello, I created a dynamic workflow to load geopackages into as many tables of a PostGIS database From a SchemaScanner, I retrieve the source schemas then I build the names of the destination tables and I make some modifications to the data types. For example, boolean attributes are not recognized by FME because the values are not conforming. So I would like to replace all non conforming values of these attributes. In the schema part of the processing, I retrieved all the boolean attributes (in a list or a concatenated string). I would now like to use this as a parameter to define in the features part of the processing the attributes whose boolean values must be corrected (StringReplacer for example). I could manually select these attributes but I would lose the interest of the dynamic workflow. I don't know how to do it automatically. Does anyone know how to do this?
How to use a value/list as parameter in a dynamic workflow?
Best answer by dhaulagiri
Hi,
Thank you.
I finally found a solution.
From a "SchemaScanner":
- in the first Schema branch, a "ListExploder" retrieves all the attributes, an "AttributeManager" modifies the types, a "Tester" extracts the booleans, a "DuplicateFilter" removes the duplicates if an attribute is present in several datasets
- in the second "Output" branch, a "Counter" assigns an id to each entity, a "GeometryExtractor" stores the geometry in a binary and deletes it, an "AttributeExploder" creates attribute-value pairs
Each branch then enters a "FeatureMerger": if the attribute name (_attr_name) of the "Ouput" branch finds a match in the list of boolean attributes (name), then the value of this attribute (_attr_value) is updated in an "AttributeManager" and an "AttributeCreator" creates @Value(_attr_name) = _attr_value. Then, the original entities are reconstituted with an "Aggregator" (Group By on the id of the "Counter") and a "GeometryReplacer".
Ungrouping entities can be very resource intensive: I had to test with a reduced number of entities by activating caching. In production, it is disabled.
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.
Login to the community
No account yet? Create an account
An FME Account is required to contribute
LoginEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.


