Mobile geodatabase query layers

1178
7
12-03-2022 12:58 AM
Status: Open
Labels (1)
Bud
by
Esteemed Contributor

It would be helpful if we could create query layers on mobile geodatabase data.

For example, create a query layer to roll up features using GROUP BY. And loads of other functionality that's only available in full-blown SQL queries.

 

Related post: Support query layers for file geodatabases

7 Comments
BruceHarold

Hi Bud, the Create Database View geoprocessing tool will do the equivalent for you, make a view and add it to your map.

JoshuaBixby

Although a Query Layer and Database View could give the same result within a map, the implementation is different.  I think the difference is enough to warrant keeping this idea.

Bud
by

Query layers are useful for temporary or one-off cases where you don’t want to create an object in the database.

Bud
by
Bud
by

ArcGIS Pro 3.2.1

It seems like mobile geodatabase views have something that is close to a query layer.

Bud_12-1704432727637.png

If I drag the mobile geodatabase view from Catalog to the map, then the Contents feature layer properties has a section called Query:

Bud_13-1704432983451.png

That's similar to a query layer in an enterprise geodatabase: (different environment; ArcGIS Pro 2.6.8; Oracle 18c 10.7.1 EGDB)

Bud_10-1704432468585.png

 

It's almost as if we have a query layer-like mechanism for mobile database views. Except the Query section isn't editable (it brings up the edit query layer dialog, which seems like a bug). And we aren't able to create query layers from scratch that are based on a feature class or table, not a view.

 

It's strange. I saved the Contents feature layer as a .lyrx layer file. But the layer file doesn't contain the SQL from the Query section from the feature layer properties. I was expecting to find a Query entry in the JSON with the value being something like this:

select OBJECTID, Shape, type from main.a_test_vw

But the word "query" isn't anywhere to be found in the JSON. Neither is the SQL query above.


So I guess the Query section in the Contents feature layer properties is sort of fake, for lack of a better word. Maybe it's generated on the fly/dyamically.


For what it's worth, file geodatabase views don't have the Query section in the Properties —> Source tab:

Bud_0-1704439092244.png

 

Bud
by
Esri Case #03521080 - Mobile GDB database view: Feature Layer properties — Source tab — Query section

Support logged an enhancement for this issue, the current status for the enhancement is In Review.
 
ENH-000164223 - Needs more clarification on mobile geodatabase view layer properties > tab Source > Query section 
 
As mentioned in the enhancement, mobile geodatabase view layer Properties > tab Source > Query section offers the ability to edit query layer, however the SQL query isn't actually editable, we need clarification on whether the Query section / Edit Query Layer should be removed from the Source tab, or the query editing functionality should be added to both mobile and file gdbs.
Bud
by

A use case for query layers: Control schema locking behavior in ArcGIS Pro