Solved

Directory and File Pathnames read gdb

  • 30 July 2019
  • 4 replies
  • 40 views

Hi, I tried to use Directory and File Pathnames and FeatureReader to control workflow, I used Directory and File Pathnames linked to a gdb file, then put a Tester after it, connected passed port to FeatureReader. But it seems that gdb was treated as folder, every file in picture below was passed to FeatureReader, as result all feature were read muti-times instead of one, how can I set parameters right to get what I want? Or else, how can I control workflow if I don't want some gdbs to be read in fmt?

icon

Best answer by takashi 30 July 2019, 17:08

View original

4 replies

Userlevel 3
Badge +17

Hi @bobo, actually a File Geodatabase dataset is a set of files contained by a folder whose name ends with ".gdb". You can confiture the PATH reader to read only "*.gdb" by setting its parameters, as in:

Hi @bobo, actually a File Geodatabase dataset is a set of files contained by a folder whose name ends with ".gdb". You can confiture the PATH reader to read only "*.gdb" by setting its parameters, as in:

Got it worked, but still, there's a problem with featurereader, I use directory and file pathnames to read 17 gdbs, and then connected output to featurereader which also I set to read same 17 gdbs. It seems that feature will output all data 17 times through generic port, but I only need all data to be read one time. I think maybe I understand one of transformers incorrectly.

Userlevel 3
Badge +17

Hi @bobo, actually a File Geodatabase dataset is a set of files contained by a folder whose name ends with ".gdb". You can confiture the PATH reader to read only "*.gdb" by setting its parameters, as in:

Since the PATH reader outputs features each of which has an attribute called "path_windows" that stores a *.gdb folder path (i.e. a File Geodatabase dataset location), you can set it to the Dataset parameter in the FeatureReader to read the datasets one by one.

In the case where you can set all the *.gdb paths to the Dataset parameter statically, you don't need to use the PATH reader. Just use a regular File Geodatabase reader simply.

Since the PATH reader outputs features each of which has an attribute called "path_windows" that stores a *.gdb folder path (i.e. a File Geodatabase dataset location), you can set it to the Dataset parameter in the FeatureReader to read the datasets one by one.

In the case where you can set all the *.gdb paths to the Dataset parameter statically, you don't need to use the PATH reader. Just use a regular File Geodatabase reader simply.

Problem solved, thank you! Liked I said, I put a Tester between Directory and File Pathname and FeatureReader, and I created a published parameter to control workflow, Tester passed to continue. Regular FGDB reader will have to read every feature from gdb and each gdb has over 1 million feature. It will take too much time if I save workbench in fme extension. Directory and File Pathname and FeatureReader give me control of which gdb to be read. BTW, is there a easier way to do so?

Reply