Skip to main content
Solved

How to use "SQL To Run Before Read"

  • January 27, 2023
  • 4 replies
  • 292 views

Forum|alt.badge.img+1

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.

Best answer by nielsgerrits

akozielec wrote:

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.

View original
Did this help you find an answer to your question?

4 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

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.


Forum|alt.badge.img+1
  • Author
  • January 29, 2023
redgeographics wrote:

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.


nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • January 30, 2023
akozielec wrote:

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.


Forum|alt.badge.img+1
  • Author
  • January 30, 2023
akozielec wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings