Skip to main content
Solved

How to use "SQL To Run Before Read"

  • January 27, 2023
  • 4 replies
  • 388 views

Forum|alt.badge.img+2

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

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.

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

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • January 29, 2023

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+2
  • Author
  • 11 replies
  • January 29, 2023

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+60
  • 2938 replies
  • Best Answer
  • January 30, 2023

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+2
  • Author
  • 11 replies
  • January 30, 2023

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