How can I make the output of Make Query Layer be feature layer

1552
5
10-03-2019 01:34 AM
Labels (1)
HusseinHammoud
New Contributor II

Hello

I have created a connection to oracle database from ArcGIS Pro,

I have used the tool "Make Query Layer" from the Geoprocessing tools , after I had run the tool the output was standalone table what should I do to get a feature layer instead of standalone table,

knowing that while entering the parameters in Make Query Layer form the parameter shape type disappear, I need to know the reason . (see the attach please)

Thanks in advance

0 Kudos
5 Replies
JoshuaBixby
MVP Esteemed Contributor

From the screenshots, it looks like you are querying a view.  What are the data types involved in the view?

George_Thompson
Esri Frequent Contributor

To add what Josh said, why do you not just bring the view in from Oracle directly?

Are there multiple shape types in the view or source table?

To get something like a feature layer and not a query, you will need to export and create a new feature class with the query data.

--- George T.
Robert_LeClair
Esri Notable Contributor

Here's a link on how to create a Database View in ArcGIS Pro - it acts like a feature class but it's a view of tables with only the attribute columns you want to see in the view.  As an added bonus, it's read-only so no one can edit the data and you can assign privileges on db views too!

MichaelVolz
Esteemed Contributor

Can the database view, from a logical view not a materialized view, be used for feature access capability?  I ask because in ArcMap I tried to publish a mapservice with feature access so there would also be a feature layer, but I received High errors stating that virtual columns are not allowed to be used.  I have no problem using the same data source in a standard mapservice.

Robert_LeClair
Esri Notable Contributor

Michael - I test this using a DB View in AGP and attempted to share as a hosted feature layer using the Share Web Layer command.  If I did not enable editing on the feature layer, it published successfully to AGOL.  However, if I enabled editing on the hosted feature layer, it threw an error saying "editable feature services cannot contain database views.  'riverside.gisadmin.Test1DBV is a database view."  Interesting...