You can use the schema reader to read the schema of your file geodatabase?
Or read your file geodatabase 'as a resource'. Have a look at 'adding a reader as a resource' in FME workbench. In that case, you could use this schema when dynamically writing output data.
Another way would be to use a AttributeValueMapper. In the transformer properties, you can import the value from your lookup table into the transformer. I am assuming this will save you a lot of time.
If anything is unclear, give me more details so I can provide a better answer or give an example.
Hi @lisasays, if you have a chance to create a lookup table that defines how to map the source feature classes to destination feature classes, the SchemaMapper (Feature Type Mapping) transformer may be used effectively.
There are many use cases of the transformer. These articles could be a good starting point to learn about the transformer.
Hi @lisasays and Happy New Year. From what you have described, @takashi 's suggestion to use the SchemaMapper looks like the best approach.
Also, here are a couple of other suggestions you might consider:
- Dynamic Workspace. If you do use the SchemaMapper, then you might be able to use a dynamic workflow. This would result in a much simpler workspace and avoid having all 200 odd feature classes as feature types on your canvas.
- Use a geodatabase or Esri XML Workspace Doc. as the template for your target geodatabase. This will let you create a consistent Geodb
So a combination of SchemaMapper, Dynamic Workflow and Esri XML Template will probably create a simple workflow.
All these might be new concepts to you so don't hesitate to add more comments to this post
Thanks guys, schema mapper is working great and hopefully i can get this done soon.. I had another issue when write the record into my exsisting file geodatabase. i found the fields i created in attribute mapper couldnt get imported into my exiisting file geodatabase..
When i inspect the "mapped" output in schema mapper i can see those fields were created. however cant see those values in the feature classes.
Thanks guys, schema mapper is working great and hopefully i can get this done soon.. I had another issue when write the record into my exsisting file geodatabase. i found the fields i created in attribute mapper couldnt get imported into my exiisting file geodatabase..
When i inspect the "mapped" output in schema mapper i can see those fields were created. however cant see those values in the feature classes.
@lisasays SchemaMapper doesn't expose the attributes you've mapped. For example, if you use schemamapper to rename an attribute MaterialType -> MATERIAL, you won't see MATERIAL in the workbench. But if you view the feature in Data Inspector then you'll see that it is there. This means that on your geodb writer feature type the MATERIAL attribute port will be red, but that's OK - it should still get loaded into your target geodb.
If you do need to use the attribute in workbench, then you need to add an AttributeExposer and then just add MATERIAL. That will make the attribute 'visible' in workbench.
@lisasays SchemaMapper doesn't expose the attributes you've mapped. For example, if you use schemamapper to rename an attribute MaterialType -> MATERIAL, you won't see MATERIAL in the workbench. But if you view the feature in Data Inspector then you'll see that it is there. This means that on your geodb writer feature type the MATERIAL attribute port will be red, but that's OK - it should still get loaded into your target geodb.
If you do need to use the attribute in workbench, then you need to add an AttributeExposer and then just add MATERIAL. That will make the attribute 'visible' in workbench.
Thanks a lot
@MarkAtSafe, my issue is even those values can be seen in the inspector but still they couldn't get written into my existing feature classes on writer - in the existing feature classes it has those fields matching the ones created by schema mapper already
Thanks guys, schema mapper is working great and hopefully i can get this done soon.. I had another issue when write the record into my exsisting file geodatabase. i found the fields i created in attribute mapper couldnt get imported into my exiisting file geodatabase..
When i inspect the "mapped" output in schema mapper i can see those fields were created. however cant see those values in the feature classes.
@lisasays you might have to send an example. But the usual culprit would be an upper/lower case mismatch. Check that the attributes you mapping in the schemamapper have the same case as the you geodb field names.