Last week a colleague asked me to help him to help him change his dependency of an Esri licence for his workspace, which in this case meant changing from an Esri GDB reader to an OpenAPI GDB reader.
In his initial implementation, an Esri GDB FeatureReader was used, in combination with a Where Clause (constructed from incoming attributes), to only read in a portion of the GDB. So for example:
However, when we switched from Esri GDB to OpenAPI GDB in the FeatureReader, I noticed that the Where Clause of the FeatureReader was greyed out, so unfortunately using a where clause directly at the FeatureReader was not possible. e.g.:
So from there I assumed that a Where Clause would unfortunately not be possible for the OpenAPI GDB Reader, and when using the OpenAPI GDB reader, we should just read in the whole GDB, and then filter out only the relevant features later on.
This week however I am attending the FME Server Authoring course of Safe (based on the corresponding trail in the FME Academy), and to my surprise there was an example that discussed using a Where Clause for reading a GDB, in which a 'regular' OpenAPI GDB reader was used:
Example from FME Server Authoring > Build Versatile Self-Serve Workflows > Let Users Choose a Geographic Area of Interest
I then checked it out myself, and found out that indeed it was possible to use a Where Clause with a 'regular' OpenAPI GDB Reader.
However, I also noticed that the Where Clause couldn't be set while adding the reader. Only when the reader was already added, by clicking on the orange reader feature type in the canvas, it was possible to access the Where Clause from the Table Settings section:
For the Esri GDB reader, I noticed that it is possible to set a Where Clause while adding the reader. Reading in just that feature type would also show that the Where Clause indeed worked. However, when I click on the orange reader feature type in the canvas, I noticed that although I specified a Where Clause while adding the reader, it was not shown from within the Table Settings section:
This all was a bit of a confusing experience for me. If I now look back at it, I might have a clue about what is happening.
My hypothesis is that for the Esri GDB Reader there is a Where Clause parameter that applies to the entire GDB dataset (all feature classes), and that this ~'dataset Where Clause' is linked to the Where Clause that is used in the FeatureReader.
On the other hand it seems to me that there is also a second ~'feature type Where Clause', which allows you to set specific where clauses for specific feature classes in the GDB. However, it seems that these 'feature type Where Clauses' are not accessible through the FeatureReader (also not when inspecting the parameters of the FeatureReader in the Navigator window).
So maybe there are good reasons for two distinct type of where clauses in one reader. Nevertheless I think it would be good if it could also be possible to add a 'dataset Where Clause' parameter to the OpenAPI GDB reader, so that it is also possible to use a Where Clause in an OpenAPI GDB FeatureReader.
Curious to hear the thoughts and ideas from others about this.
Kind regards,
Thijs
ps. see below screenshot for an overview of the workspace canvas. I also added the workspace template (which also contains the GDB).