Question

Can I create a dynamic workbench that would go through an SDE database (that contains multiple layers) and get a list of layers and also extract data?

  • 27 April 2021
  • 2 replies
  • 3 views

Badge

Is there a way to set up a workbench that would loop through an Enterprise SDE database & provide me with a list of layers without adding multiple readers? And also allow me to extract data from at least one of the attribute fields in each layer? How about using python? Thank you in advance.


2 replies

Badge +2

@yonasfme​  You shouldn't need to loop. You should be able to use the FeatureReader to get the schema of your SDE (which would include the list of all the feature classes). Then you can pass that list to a second FeatureReader to read the data. If it's a lot of data, you might want to use WorkspaceRunner. So pass list of feature classes one at a time to read the data form each feature class separately.

Badge

@yonasfme​  You shouldn't need to loop. You should be able to use the FeatureReader to get the schema of your SDE (which would include the list of all the feature classes). Then you can pass that list to a second FeatureReader to read the data. If it's a lot of data, you might want to use WorkspaceRunner. So pass list of feature classes one at a time to read the data form each feature class separately.

@mark2atsafe​ Thank you for your suggestion. I was able to generate a list of layers from the SDE using a FeatureReader by choosing the workflow Option to be 'Single Merged Feature Type', and then extract data by passing the list to a second FeatureReader.

Reply