Skip to main content

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:

imageHowever, 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.:

imageSo 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:

imageExample 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:

image 

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:

imageThis 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).

image

Hello Thijs, thanks for bringing this question to the Community. I'm sure you're not the only one who has encountered this situation.

 

I haven't read the specifics of your case, but I did ask about the difference between format capabilities internally and received this helpful summary:

 

Our File Geodb format (GEODATABASE_FILE, the one that needs an ArcGIS license and has the most support) has:

  • (a) a reader-level where clause
  • (b) a feature-type-level where clause
  • (c) support for where clauses in the FeatureReader

 

The Open API format (FILEGDB, without a dependency on any other software, with higher performance, and support for only basic data types) has:

  • (a) NO reader-level where clause
  • (b) a feature-type-level where clause
  • (c) NO support for where clauses in the FeatureReader

 

We can definitely see that this difference in format capabilities could lead to some confusion. I've filed an issue internally to have the team consider adding such capabilities to the FILEGDB format.

 

Thanks again for the question. If you have further questions about how to tackle this specific workspace modification, I'm hopeful other Community users might be able to chime in.


Hello Thijs, thanks for bringing this question to the Community. I'm sure you're not the only one who has encountered this situation.

 

I haven't read the specifics of your case, but I did ask about the difference between format capabilities internally and received this helpful summary:

 

Our File Geodb format (GEODATABASE_FILE, the one that needs an ArcGIS license and has the most support) has:

  • (a) a reader-level where clause
  • (b) a feature-type-level where clause
  • (c) support for where clauses in the FeatureReader

 

The Open API format (FILEGDB, without a dependency on any other software, with higher performance, and support for only basic data types) has:

  • (a) NO reader-level where clause
  • (b) a feature-type-level where clause
  • (c) NO support for where clauses in the FeatureReader

 

We can definitely see that this difference in format capabilities could lead to some confusion. I've filed an issue internally to have the team consider adding such capabilities to the FILEGDB format.

 

Thanks again for the question. If you have further questions about how to tackle this specific workspace modification, I'm hopeful other Community users might be able to chime in.

Hi @samatsafe​ ,

 

Thanks for the recap. That nicely seems to summarize my findings.

 

Just two additional comments/notes:

1. It seems to me that currently the reader level where clause (a), and the FeatureReader where clause (c) are in some way functionally tied/related to each other. So I guess that adding support for a reader level where clause in the Open API GDB reader (FILEGDB), may directly 'functionally allow' to implement the support for a where clause in a FILEGDB FeatureReader

 

2. When using a FeatureReader for these formats, for both the Esri GDB reader (GEODATABASE_FILE), as well as the Open API GDB reader (FILEGDB), it doesn't seem to be possible to set/access the feature-type level where clause. Specifically, these can't be found in the reader parameters when configuring the FeatureReader, and after the FeatureReader is added to the canvas, there doesn't seem to be a way to set/access the feature type level where clause.

 

For a regular Esri/OpenAPI GDB reader you can access the feature type where clause by opening the orange reader feature type (double clicking on these), but for a FeatureReader the FT's of the GDB are 'embedded' in the transformer (as output ports) and can't be accesses/clicked on.

Also, when browsing to Navigator > Transformers and ~'expand' the parameters for the associated GDB FeatureReader, there seems to be no option c.q. corresponding parameter to set/control the feature-type where clauses from there either. See also:

 

Open API GDB reader (FILEGDB):

imageEsri GDB reader (GEODATABASE_FILE):

imageIt would be nice if functionality could be added to these two GDB FeatureReaders, so that these feature-level where clauses for the Open API GDB reader (FILEGDB) and the Esri GDB reader (GEODATABASE_FILE) can also be set/controlled when using a FeatureReader.

 

I understand that that might require some thinking on how this can conveniently be implemented (as it's not a single value parameter, but it can be different for each feature type, and furthermore each GDB can have distinct feature type names), but I hope you guys/girls from Safe have some ideas for a good way to implement this.

Maybe it is possible to add a 'feature-type where clause' in the way of a Lookup Table, in the way that when you click on the parameter, a 2 column table appears, where on the left you can enter the feature-type-name, and on the right you can enter the where clause to be used for that feature type? Kind of similar to 'Lookup Table Name' parameter from an AttributeValueMapper transformer. So for the used sample GDB (which contains multiple feature types), that could look something like this:

image


Reply