Field name changes to lower case when cloning a service

442
3
Jump to solution
06-07-2019 04:17 AM
Haider_Ali
Occasional Contributor

I am cloning a service from AGOL to my portal using the code provided below but due to some reason all the field name of newly created hosted service are lower case is there any workaround for that? 

from arcgis import gis

def clone_servcie():

source = gis.GIS('http://www.arcgis.com/')
target = gis.GIS('my portal url')

itemsIds = ['0fa1ed423c8c46f68e39a15dc7433f53']

created_items = []

for item_id in itemsIds:
item = source.content.get(item_id)
print('Cloning {0}'.format(item['title']))
created_items += target.content.clone_items([item],copy_data=False )

print(len(created_items))

clone_servcie()

Tags (1)
1 Solution

Accepted Solutions
AaronPulver
Esri Regular Contributor

This is due to the differences in the databases used for hosted services on ArcGIS Online and hosted services on Enterprise. As far as I know there is nothing that can be done. 

View solution in original post

3 Replies
AaronPulver
Esri Regular Contributor

This is due to the differences in the databases used for hosted services on ArcGIS Online and hosted services on Enterprise. As far as I know there is nothing that can be done. 

RyanLingoFAA
New Contributor

Is there still no work around for this? I am currently dealing with this.

I am updating an event every couple of minutes. An event, x1, is ingested. It holds x1 for an approximate time. Another event happens. It ingests event 2, x2.  It (x2) compares itself to x1, though, to see if it is the same event. It runs into some issues because it uses certain fields to do this. The problem is the fields are now being changed.

 

This is happening even though there are 2 data frames managing these fields that whole time. The problem begins with the portal altering the field names, for example from AllUpperCase to all_lower_case.

If I figure anything out, I will share.  

0 Kudos
LouieRodriguez
New Contributor III

Were you ever able to find anything out with this issue?

0 Kudos