Select Layer by Location — Intersect (DBMS) — User-defined output database view name

309
1
01-02-2024 10:17 AM
Status: Open
Labels (1)
Bud
by
Esteemed Contributor

ArcGIS Pro 2.6.8; Oracle 18c 10.7.1 EGDB; SDE.ST_Geometry:

In the Select Layer By Location (Data Management) docs, the Relationship Parameter — Intersect (DBMS) section says:

For the Relationship parameter, the Intersect (DBMS) option may provide better performance than the Intersect option when using enterprise geodatabase data; however, this option is only supported under specific conditions. If all conditions are met, the spatial operation will be performed in the enterprise geodatabase database management system (DBMS) rather than on the client.

...The user connecting to the geodatabase must have privileges to create a view in the database where the feature classes are stored.

In other words, the tool automatically creates a database view.

I was able to determine what the view is called by querying the database using SQL to get a list of views and sort by creation date:

Bud_1-1704218870780.png

The view is called SELECTIONOUTPUTNAME.


Idea:

It seems clunky that the tool:

  1. Secretly creates a view.
  2. Uses an odd naming convention (why is the word "NAME" in the name?).
  3. Doesn't tell the user what its name is (not even in the docs).
  4. Doesn't let the user choose the name.

Could that behaviour be improved, such as adding a parameter to the tool that lets us define the name of the output view?

1 Comment
Bud
by

Additional info:


The GP tool settings that I used:

Bud_0-1704219669770.png

(the AGOL_PARKINGLOT layer isn't actually in AGOL; it's in SDE, just like the ACTIVE_TRANSPORTATION layer)

The output database view:

Bud_0-1704218764380.png

select "OBJECTID" from ( SELECT a.OBJECTID FROM INFRASTR.ACTIVE_TRANSPORTATION a,
INFRASTR.AGOL_PARKINGLOT b WHERE SDE.ST_INTERSECTS(a.SHAPE, b.SHAPE) = 1 ) esri_sql