Hi All- n00b here.
I have a python script that works in ArcMap. It traces a geometric network, references feature classes (flags/barriers), tables for calculations, etc.
I'm wondering how to reference these things (feature classes, tables, etc) in the python script so that I can use in AGOL?
Here are some code snippets. As you can see I'm referencing data on SDE. My guess is I need to reference the REST URL? i.e. server/name/rest/services/webapp/geometricnetwork/MapServer
- ElecGeomNetwork = "C:\\blahblahblah\\asdf.sde\\asdf.GDBO.ElectricDataset\\asdf.GDBO.ElectricGeom_Net"
- ElecGeomNetwork__2_ = "ElecGeomNetwork"
- ServicePoint = "ServiceLocation"
- Table = "asdf.GDBO.TableTest"
- Transformer = "Transformer Bank"
- arcpy.TraceGeometricNetwork_management(ElecGeomNetwork, ElecGeomNetwork__2_, Transformer, "FIND_CONNECTED", "", "", "", "", "asdf.GDBO.PrimaryOHLineSection;asdf.GDBO.PrimaryUGLineSection", "NO_TRACE_ENDS", "NO_TRACE_INDETERMINATE_FLOW", "", "", "AS_IS", "", "", "", "AS_IS")
Eddy,
You would run the model and then from the results tab in ArcMap publish a GPService from that then you would have a rest url to the GP Service that you could use in the GP Widget.
Hi Eddy,
Just to add onto Robert's reply, please review this help doc
A quick tour of authoring and sharing geoprocessing services—Documentation | ArcGIS Enterprise
Hope this helps,