Workforce Migration using Jupyter Notebook in AGOL

682
4
08-31-2021 03:57 PM
AndyGeo
New Contributor III

Hello,

 

I am trying to migrate some large workforce projects to the new version. When running the py script, I get through about 1,500 assignments before I get a connection error. Is there a way to run the workforce project migration or assignment migration scripts in a Jupyter notebook in AGOL to avoid connection lag?

 

Or is there a better way to migrate large assignment datasets into the new Workforce project? My largest project has about 17,000 assignments to migrate.

 

Thanks,

Andy

0 Kudos
4 Replies
by Anonymous User
Not applicable

Hi Andy,

Do you exactly which error you are getting? Do you have any logs?

Depending on what the error is, running it in a notebook may or may not help.

0 Kudos
DanPatterson
MVP Esteemed Contributor

are you using recent versions? from the github site?

workforce-scripts/scripts at master · Esri/workforce-scripts (github.com)


... sort of retired...
0 Kudos
AndyGeo
New Contributor III

I am using the latest from Github. Attached is a screenshot of the py script error. If migrating large qty of assignments isn't possible, what is the best way to keep the old assignments accessible. This is for a City client that needs to keep assignments for reporting and public works planning. Would it be better to export the old assignments and load that feature layer along-side the newer Workforce project assignments layer?

0 Kudos
by Anonymous User
Not applicable

From that error message it appears that in the process of uploading a jpg attachment, the server is closing the connection for some reason.

Does this always happen for the same assignment/attachment? I'm wondering if it's very large.

There is already exception handling in place (on line 442) and should just be reporting the exception to the logs. The script should continue on and try to upload the next attachment. Are you not seeing it continue?

The way the script works is is it migrates all the assignment features then it does all the attachments. So your project should actually have all the assignments it's just the attachments (or at least an attachment) that's causing issues.

0 Kudos