AnsweredAssumed Answered

Is there a Workaround for Cloning Content with >1,000 Records from AGOL to Portal Using  "Clone_Items" API Module?

Question asked by Hans.Frederiksen@dtsc.ca.gov_DTSC on Oct 18, 2019
Latest reply on Oct 25, 2019 by Hans.Frederiksen@dtsc.ca.gov_DTSC

I have been successful migrating content with <1,000 Records using the 4-liner mentioned here

 

I get the "_ItemCreateException: ('Failed to create Feature Service..." error when attempting to "clone_content" for a layer with ~13,000 records. When I set copy_data=False I get it to Portal with no records, so I'm assuming its the record count? I am using the "content.clone_items" api module..

 

Here is a snippet of my code (successful):

source_Hazs = GIS("https://dtsc.maps.arcgis.com",os.environ['AGOL_Username'],os.environ['AGOL_Password'])
target_Hazs = GIS("https://maps.dtsc.ca.gov/dtscportal/home/",os.environ['Portal_Username'],os.environ['Portal_Password'],copy_data=True)
item = source_Hazs.content.get("e4a9000d007d4e4c8963bb77ab03f1ff")
target_Hazs.content.clone_items([item],folder=None, item_extent=None, use_org_basemap=True, copy_data=True, search_existing_items=True, item_mapping=None, group_mapping=None, owner=None)

Outcomes