Skip to main content

Right now, I have it set up so that I have a Reader set to read our entire SDE database (set as single merged feature), which takes a really long time to go through, and then from that, a FeatureTypeExctractor to get the feature name. I also have Reader for an excel spreadsheet with all of the feature names that I want the rest of the script to process. I've I've used a FeatureMerger to join the output of the FeatureTypeExtractor (from SDE) and the Excel spreadsheet and to keep only those feature names that are the same (join). That output then goes through the rest of my script.

 

Is there a better way? The downside of the way I have it set up is it will take a really long time to go through our entire SDE. We will likely add a few new feature classes to our SDE each year and I would love to just update a spreadsheet with those new feature names and hit RUN.

 

Any ideas are greatly appreciated! Thanks :)

Hi @andrea​ ,

You should be able to accomplish this using the FeatureReader transformer. Essentially this transformer allows you to read in data mid-stream. Going with this method should save you some time as it won't read in unneccesary feature classes as well!

imageYou can simply add an Excel Reader, connect it to the FeatureReader Transformer, and set the Feature Types to Read parameter to the attribute containing the feature class names (FT Name in the screenshot above).

 

Note: if you want everything coming out of a single general output port, the attributes will not be exposed by default. You can either expose the attributes in the FeatureReader or using an AttributeExposer/Manager using the import option. This is only needed if you plan on modifying attributes though. There are a lot of other great tips in the Dynamic Workflows tutorial series.


Hi @andrea​ ,

You should be able to accomplish this using the FeatureReader transformer. Essentially this transformer allows you to read in data mid-stream. Going with this method should save you some time as it won't read in unneccesary feature classes as well!

imageYou can simply add an Excel Reader, connect it to the FeatureReader Transformer, and set the Feature Types to Read parameter to the attribute containing the feature class names (FT Name in the screenshot above).

 

Note: if you want everything coming out of a single general output port, the attributes will not be exposed by default. You can either expose the attributes in the FeatureReader or using an AttributeExposer/Manager using the import option. This is only needed if you plan on modifying attributes though. There are a lot of other great tips in the Dynamic Workflows tutorial series.

Also note, the FeatureReader will run once for every feature that is sent into it. So in this case, since I have 16 rows in my Excel sheet, each containing an attribute with a table name, the FeatureReader ran 16 times (reading in 16 tables). If I added/removed rows in the Excel sheet and re-run the entire workspace (this is important if you use feature caching), the FeatureReader would read in (x number of tables) whatever was last saved in that Excel sheet.


Hi @andrea​ ,

You should be able to accomplish this using the FeatureReader transformer. Essentially this transformer allows you to read in data mid-stream. Going with this method should save you some time as it won't read in unneccesary feature classes as well!

imageYou can simply add an Excel Reader, connect it to the FeatureReader Transformer, and set the Feature Types to Read parameter to the attribute containing the feature class names (FT Name in the screenshot above).

 

Note: if you want everything coming out of a single general output port, the attributes will not be exposed by default. You can either expose the attributes in the FeatureReader or using an AttributeExposer/Manager using the import option. This is only needed if you plan on modifying attributes though. There are a lot of other great tips in the Dynamic Workflows tutorial series.

Thank you so much! I'll give it a try.


Thank you so much! I'll give it a try.

Hope that helps!

 

There are potentially ways to make it even faster as well (i.e. aggregate the values into a single space-delimited feature) so the FeatureReader only needs to be triggered once. imageAlthough this method would likely only be suitable if you are using the generic/single output port on the FeatureReader.


Thanks so much for your help! That worked perfectly :)


Reply