Solved

How to use "SQL To Run Before Read"

  • 28 January 2023
  • 4 replies
  • 47 views

I have a file geodatabase and a feature class called "Boundaries".

I am using the Esri Geodatabase (File Geodb Open API) reader and I would like to apply this WHERE Clause, but the WHERE Clause is disabled.

"COUNTY" = 'Will County, IL'

 

Is this a way to use the "SQL To Run Before Read" to achieve this? It can be found when you click on 'Parameters' and in the 'Advanced' section of the Esri Geodatabase (File Geodb Open API) reader.

icon

Best answer by nielsgerrits 30 January 2023, 05:35

View original

4 replies

Userlevel 5
Badge +25

The SQL To Run Before Read is not for that, but your Reader feature type(s) will have a WHERE clause option which you can use.

 

The SQL To Run Before Read is for any other queries you'd like to run before the workspace starts reading from that database.

The SQL To Run Before Read is not for that, but your Reader feature type(s) will have a WHERE clause option which you can use.

 

The SQL To Run Before Read is for any other queries you'd like to run before the workspace starts reading from that database.

The "Esri Geodatabase (File Geodb)" reader requires the ArcGIS license and I do not have the ArcGIS license. I am using "Esri Geodatabase (File Geodb Open API)" reader and the WHERE clause is disabled. I was hoping the "SQL To Run Before Read" would be a workaround, that seems not to be the case.

Userlevel 6
Badge +32

The "Esri Geodatabase (File Geodb)" reader requires the ArcGIS license and I do not have the ArcGIS license. I am using "Esri Geodatabase (File Geodb Open API)" reader and the WHERE clause is disabled. I was hoping the "SQL To Run Before Read" would be a workaround, that seems not to be the case.

The WHERE clause is only disabled in the FeatureReader. When I add a classic Esri Geodatabase (File Geodb Open API) it just works as expected.

In the Navigator window, go to Feature Types, select feature type, parameters, format, WHERE Clause.

 

Copied from another question:

 

The Esri Geodatabase (File Geodb Open API) reader only supports WHERE on Feature Types, not at the reader level. Most other database readers (including Esri Geodatabase (File Geodb)) support a WHERE at both the reader level (not that useful) and on the Feature Types.

The FeatureReader currently only supports the WHERE at the reader level, not on individual feature types. Hence WHERE isn't available for the Esri Geodatabase (File Geodb Open API) reader in the FeatureReader but it is for Esri Geodatabase (File Geodb) reader. For most other databases the FeatureReader WHERE applies to all feature types that are read (which isn't that useful).

The plan is to update the FeatureReader to support all the reader feature type parameters.

The "Esri Geodatabase (File Geodb)" reader requires the ArcGIS license and I do not have the ArcGIS license. I am using "Esri Geodatabase (File Geodb Open API)" reader and the WHERE clause is disabled. I was hoping the "SQL To Run Before Read" would be a workaround, that seems not to be the case.

That worked! Thank you

Reply