ArcGIS Pro 3.2.1; Mobile Geodatabase (except where noted for the query layer)
Summary:
There seem to be a few different ways SQL expressions and queries are stored in feature layers and Catalog items:
- SQL expression is hidden; not visible in the properties. The .LYRX JSON may or may not include the SQL expression. It depends on the layer type.
- SQL expression is a visible definition query.
- The SQL definition (full-blown SELECT query) is stored in the Query section in the Properties —> Source tab.
- The SQL definition (full-blown SELECT query) is displayed in the Catalog item properties —> Definition tab.
- "Subset" information is stored in a "Selection definition set" in the Properties —> Selection tab. The SQL is not visible.
It's confusing when expressions and queries are stored in so many different ways. And it's not ideal when the SQL expression is hidden. Can anything be done to standardize SQL expressions and queries in layers? For example:
- The SQL expression is hidden in Make Query Table layers. Could that be changed so that the SQL expression is a visible definition query, similar to other tools that make layers?
- Similarly, could the "Selection definition set" of a Selection Layer be stored as a definition query? (i.e. OBJECTID IN (1,2,3...) so that we can see the SQL and use it elsewhere? Such as convert a selection to a definition query.
- Could database views be standardized so that they all have the same Feature Layer Properties —> Source tab —> Query section? (in mobile, file, and enterprise geodatabase views)