POST
|
Hi, I overwrite hosted services in portal with a different approach. I have a project in ArcGIS Pro and have automated python script through task scheduler on the same machine (created generic python function that can be called to update any hosted services in portal by passing required values) which will do the following Get ArcGIS Pro project path Create a sddraft(service file) from that project Stage that service Connect to Portal and search service to be overwritten Publish new service file (with overwrite option true) Here is the function, hope that helps import os import sys import logging import arcpy import pprint from datetime import datetime from arcgis.gis import GIS def overwriteHostedFeatureService(portal_url, user_name, pwd, prj_path, prj_name, mp_name, sd_fs_name, logfile_name): logging.basicConfig(filename=logfile_name, format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p', level=logging.DEBUG) logging.info(' ') logging.info('Service Name - ' + sd_fs_name) logging.info(' ') portal = portal_url user = user_name password = pwd fullPrjPath = os.path.join(prj_path, prj_name) sddraft = os.path.join(prj_path, sd_fs_name + ".sddraft") sd = os.path.join(prj_path, sd_fs_name + ".sd") # Create a new SDDraft file, and stage the draft to the SD file. logging.info("Creating SD file - " + sd) logging.info("Creating SDDraft file - " + sddraft) arcpy.env.overwriteOutput = True prj = arcpy.mp.ArcGISProject(fullPrjPath) maps = prj.listMaps() for map in maps: if map.name == mp_name: mp = map logging.info("Map Name - " + mp.name) arcpy.mp.CreateWebLayerSDDraft(mp, sddraft, sd_fs_name, 'MY_HOSTED_SERVICES', 'FEATURE_ACCESS') arcpy.StageService_server(sddraft, sd) logging.info("Staging SD files Done") # Connect to the specified portal gis = GIS(portal, user, password) # Locate the SD file, update, and overwrite the service on the specified portal sdItem = gis.content.search("{} AND owner:{}".format(sd_fs_name, user), item_type="Service Definition")[0] #enable this loggin for debuging purpose only #logging.info("Found SD: {}, ID: {} n Uploading and overwriting…".format(sdItem.title, sdItem.id)) sdItem.update(data=sd) fs = sdItem.publish(overwrite=True) logging.info("Overwriting existing feature service finish") # Set the desired sharing options. The following code sets the service to be shared with Everyone and organization. shrOrg = True shrEveryone = "" shrGroups = "" if shrOrg or shrEveryone or shrGroups: fs.share(org=shrOrg, everyone=shrEveryone, groups=shrGroups) logging.info("Finished updating: {} – ID: {}".format(fs.title, fs.id)) logging.info("-------------------------------------------------------")
... View more
12-28-2022
06:43 AM
|
0
|
0
|
1267
|
POST
|
by unique id do mean something like a Global id to each table ? - Yes
... View more
08-03-2021
05:01 AM
|
0
|
2
|
1652
|
POST
|
Is the table registered with Geodatabase ? If not, try registering the table with geodatabase before publishing (we have enterprise setup and we need that in enterprise setup)
... View more
07-28-2021
07:48 AM
|
1
|
0
|
1694
|
POST
|
Hi Ashley, Are you using feature/map service from your organization's published services to analysis the data ? I have learned a hard way that only hosted services works the best for insights to analysis data efficiently. Defining a relationship in a workbooks also only works on hosted services. We have more than 600000 parcel data and I have published hosted services with Parcel shapes and CAMA data in simple tables and then make a relationship in insights. This setup works for us to create all type of charts and maps, though I have to refresh the service daily through a python script Predefined filters as suggested here by Laura will also help you get better performance on any object.
... View more
07-20-2021
10:47 AM
|
1
|
1
|
1704
|
POST
|
It turns out to be an Oracle issue. SDO_GEOM.SDO_AREA function raised an exception on Fabric feature classes. Same function worked fine on Non-Fabric feature classes. All cumulative patches were applied to our 19.9 version as suggested by Oracle documentation during installation, on the top of that Oracle gave us a merge patch (snap shot attached) to be applied on 19.9 and everything is back to normal.
... View more
05-03-2021
10:37 AM
|
0
|
0
|
2063
|
POST
|
It turns out to be an Oracle issue. SDO_GEOM.SDO_AREA function raised an exception on Fabric feature classes. Same function worked fine on Non-Fabric feature classes. All cumulative patches were applied to our 19.9 version as suggested by Oracle documentation during installation, on the top of that Oracle gave us a merge patch (snap shot attached) to be applied on 19.9 and everything is back to normal.
... View more
05-03-2021
10:34 AM
|
0
|
0
|
971
|
POST
|
I don't think client is an issue as everything except and issue with fabric trigger on our delta table which started raising error after migrating to oracle 19c, is working fine. Editors are able to edit fabric, reconcile/post and we are also able to create new versions as usual in our automated fashion every night and edits are pushed to base table. Everything worked fine in our Oracle 12c environment and everything remains the same its only we migrated our oracle database to 19c Trigger Error is related to SRID - Invalid SRID in the SDO_Geometry object I would like to know if anyone had any issues on fabric after migrating to oracle 19c
... View more
03-18-2021
08:38 AM
|
0
|
0
|
2135
|
POST
|
AmirBar Trigger on parcel fabric delta table is working fine on our current environment of oracle 12c, it started raising error in the environment we migrated to 19c I see that you already realized that and posted another post. - I am not sure what you mean by this, I posted an issue in ArcMap section also to target different audience and post you are referring is that post. Send me your email address so I can send you the email from Support saying 19.9 oracle is not supported with ArcMap 10.8.1 Support is trying to reproduce the issue with our Fabric Triggers on 19.9 Error is related to SRID (Snap shot attached) If you need more information, let me know - Thanks
... View more
03-03-2021
08:26 AM
|
0
|
0
|
1069
|
POST
|
I think for ArcMap we need 32 bit client and that is installed.
... View more
03-02-2021
12:48 PM
|
0
|
1
|
2197
|
POST
|
Support is telling me ArcMap 10.8.1 is not supported on oracle version above 19.3. Oracle database requirements for ArcGIS 10.8.x and ArcGIS Pro 2.5, 2.6, and 2.7—System Requirements | Documentation We are on oracle 19.9 and have issues with Triggers on Parcel Fabric. We don't have any issues with non parcel fabric triggers or editing fabric. Has anyone faced any issues with ArcMap 10.8.1, parcel fabric and oracle version above 19.3 ? Thanks
... View more
03-02-2021
10:51 AM
|
0
|
5
|
1134
|
POST
|
Support is telling me ArcMap 10.8.1 is not supported on oracle version above 19.3. Oracle database requirements for ArcGIS 10.8.x and ArcGIS Pro 2.5, 2.6, and 2.7—System Requirements | Documentation We are on oracle 19.9 and have issues with Triggers on Parcel Fabric. We don't have any issues with non parcel fabric triggers or editing fabric. Has anyone faced any issues with ArcMap 10.8.1, parcel fabric and oracle version above 19.3 ? Thanks
... View more
03-02-2021
10:46 AM
|
0
|
5
|
2257
|
POST
|
Hosted Layer's data is stored in Datastore There are tools to register and unregister datastore. Tools are located on portal machine in following directory - \Program Files\ArcGIS\DataStore\tools I would try to unregister and register datastore again.
... View more
02-19-2021
06:24 AM
|
0
|
1
|
1003
|
POST
|
I am having an issue - when data is exported as CSV from PublicNotification widget, string data is exported as float data type We have 17 digit Parcel ID which is a string data type, but when exported to CSV it is interpreted as float I am aware of adding an apostrophe at the end or the start to avoid interpretation as float, but if i do that apostrophe shows up in exported data as well as on PDF labels and i don't want that to show up that way. I have checked the layer that has the PARID data and it is showing PARID as String Type Any help will be appreciated.
... View more
10-21-2019
12:41 PM
|
0
|
1
|
291
|
Title | Kudos | Posted |
---|---|---|
1 | 07-28-2021 07:48 AM | |
1 | 07-20-2021 10:47 AM |
Online Status |
Offline
|
Date Last Visited |
10-11-2023
07:15 PM
|