Question

Read/Update Enterprise Geodatabase Metadata for Each Table in Database

  • 8 December 2022
  • 7 replies
  • 66 views

Badge

I've created a workbench in FME Database Edition 2022.1.3 that reads the existing metadata of a feature class in an ArcGIS Enterprise Geodatabase (SQL Server), and updates certain components of the metadata based on a table in another database where the feature class name matches the "Name" field in that table. This works for one feature class in the GDB at a time. Is there a way to iterate over all feature classes in the GDB and run the workbench against each one, one at a time? I've tried adding multiple feature classes as a Single merged feature type, and as individual feature types, and it is not updating the metadata as expected. It seems to update the metadata to the same values for all feature classes.

 

thanks


7 replies

Userlevel 3
Badge +26

This sounds like a case for the WorkspaceRunner transformer. I'm not sure the details of how you are initiating the metadata update process, but for each feature that is input into a WorkspaceRunner, it will execute the workspace called in the transformer. So, if you separate the section of your workspace that is actually doing the updating into its own workspace, I think it will work for you.

Badge

This sounds like a case for the WorkspaceRunner transformer. I'm not sure the details of how you are initiating the metadata update process, but for each feature that is input into a WorkspaceRunner, it will execute the workspace called in the transformer. So, if you separate the section of your workspace that is actually doing the updating into its own workspace, I think it will work for you.

Thanks for this, it sounds like the way to go. Having not used the WorkspaceRunner, I'm not sure how to set the parameters. How do you "assign" the tables being read in the WorkspaceRunner workbench, to the right reader in the metadata update workbench? In the image below, I need the tables being read by the WorkspaceRunner to "enter" the workbench at this location:

imagei.e. that reader should be replaced by each table read in the WorkspaceRunner.

 

thanks

Userlevel 3
Badge +26

Thanks for this, it sounds like the way to go. Having not used the WorkspaceRunner, I'm not sure how to set the parameters. How do you "assign" the tables being read in the WorkspaceRunner workbench, to the right reader in the metadata update workbench? In the image below, I need the tables being read by the WorkspaceRunner to "enter" the workbench at this location:

imagei.e. that reader should be replaced by each table read in the WorkspaceRunner.

 

thanks

The fme_feature_type format attribute will store the name of the feature class. So, you should be able to call that as one of the inputs in the WorkspaceRunner.

Badge

Thanks for this, it sounds like the way to go. Having not used the WorkspaceRunner, I'm not sure how to set the parameters. How do you "assign" the tables being read in the WorkspaceRunner workbench, to the right reader in the metadata update workbench? In the image below, I need the tables being read by the WorkspaceRunner to "enter" the workbench at this location:

imagei.e. that reader should be replaced by each table read in the WorkspaceRunner.

 

thanks

Hmm... it did not seem to work. So I added readers to the WorkspaceRunner workbench for all of the tables I want the metadata update workbench to run on, then in the WorkspaceRunner parameters selected the metadata workspace, selected the database connection, and the fme_feature_type attribute in the Feature Types to Read field. It runs with no errors and shows 8 succeeded, but only the metadata was updated for the feature class in the metadata workbench that is being read.

image

Userlevel 3
Badge +26

Thanks for this, it sounds like the way to go. Having not used the WorkspaceRunner, I'm not sure how to set the parameters. How do you "assign" the tables being read in the WorkspaceRunner workbench, to the right reader in the metadata update workbench? In the image below, I need the tables being read by the WorkspaceRunner to "enter" the workbench at this location:

imagei.e. that reader should be replaced by each table read in the WorkspaceRunner.

 

thanks

Could you post your workspaces?

Badge

Thanks for this, it sounds like the way to go. Having not used the WorkspaceRunner, I'm not sure how to set the parameters. How do you "assign" the tables being read in the WorkspaceRunner workbench, to the right reader in the metadata update workbench? In the image below, I need the tables being read by the WorkspaceRunner to "enter" the workbench at this location:

imagei.e. that reader should be replaced by each table read in the WorkspaceRunner.

 

thanks

I've got enterprise database connections in the workspaces, not sure I can post those?

Badge

Thanks for this, it sounds like the way to go. Having not used the WorkspaceRunner, I'm not sure how to set the parameters. How do you "assign" the tables being read in the WorkspaceRunner workbench, to the right reader in the metadata update workbench? In the image below, I need the tables being read by the WorkspaceRunner to "enter" the workbench at this location:

imagei.e. that reader should be replaced by each table read in the WorkspaceRunner.

 

thanks

I think I've got this figured out. In the child workspace that actually writes the metadata, I added the Esri geodatabase SDE reader, selected one feature type, and set the workflow options to be "Single merged feature type". This automatically creates a user parameter called FEATURE TYPES. In the Navigator pane, I expanded the Features to Read section under the Parameters section for the GDB reader. For the features to read parameter, I set the value to be the user parameter FEATURE TYPES. In the parent workspace, I added readers for each feature type that I wanted to update metadata for as individual feature types, with the fme_feature_type attribute exposed. I then have a workspace runner that sets the Workspace parameter "Feature types to read" in the child workspace to fme_feature_type.

Reply