Publish ArcMap Geoprocessing service with ArcGIS Pro

162
1
2 weeks ago
Labels (2)
DamianoMontrasio
New Contributor III

Hi,

I’m trying to publish an ArcMap Geoprocessing with ArcGIS Pro.

In brief, the geoprocessing service reads the name of a Shapefile that resides in a specific folder on the server and returns a 'Layer' as the output data type

In ArcMap, the script published as a geoprocessing service works well, with these properties:

DamianoMontrasio_0-1714989619206.png

In fact, the Output Layer Parameter is clearly visible in the resulting MapService.

DamianoMontrasio_1-1714989619208.png

 

DamianoMontrasio_2-1714989619208.png

The same script published with ArcGIS Pro with these parameters

DamianoMontrasio_3-1714989619210.png

results in these output parameters in the geoprocessing service.

DamianoMontrasio_4-1714989619213.png

This is a problem because it forces the output to have the exact schema of the shapefile used in the publishing process.

Output parameters is created by this row in the script:

output = arcpy.MakeFeatureLayer_management(fcDerived, 'MyContents')

where fcDerived is a feature Class created from Shapefile in a arcpy.env.scratchGDB.

Why ArcGIS Pro do this?

Have you a solution?

Thanks

Damiano

0 Kudos
1 Reply
DamianoMontrasio
New Contributor III

Hi,

I've partially resolved removing the layer added to a current map by scrypt, before pubblishing.

This produce output parameter without default schema:

DamianoMontrasio_0-1715078661121.png

But: layer in Mapservice don't have Query Capabilities...

this cause that is not possible to open attribute table in Map viewer and manager logs this error

DamianoMontrasio_1-1715078753984.png

Have you an idea?

Thanks...

0 Kudos