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

1291
1
10-18-2019 09:11 AM
Highlighted
New Contributor II

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)

Reply
0 Kudos
1 Reply
Highlighted
New Contributor II

Does anyone have any advice they can share?

Reply
0 Kudos