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

1868
2
10-18-2019 09:11 AM
deleted-user-yCQnYxIOF9kS
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)

0 Kudos
2 Replies
deleted-user-yCQnYxIOF9kS
New Contributor II

Does anyone have any advice they can share?

0 Kudos
JodyZhengLiu
Esri Contributor
0 Kudos