Skip to main content
Solved

Directory and File Pathnames read gdb

  • July 30, 2019
  • 4 replies
  • 191 views

bobo
Contributor
Forum|alt.badge.img+3

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?

Best answer by takashi

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:

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

takashi
Celebrity
  • Best Answer
  • July 30, 2019

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:


bobo
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • July 31, 2019

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.


takashi
Celebrity
  • July 31, 2019

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.


bobo
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • August 1, 2019

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?