Select to view content in your preferred language

Bulk Inserting of Assignments

5181
12
Jump to solution
07-21-2016 06:45 PM
PeterTimmers
Frequent Contributor

Do you think there will be the ability to import Assignments from a CSV or similar in a future version?

Or does it exist already?  I couldn't see it anywhere.

1 Solution

Accepted Solutions
CraigGillgrass
Esri Regular Contributor

Hi Peter, thanks for your question on Workforce.

Our recommendation for bulk importing assignments from a csv file or similar file is to use one of the Python scripts we've written and published in our git repo:

GitHub - Esri/workforce-scripts: A set of scripts to help administer Workforce projects.

Alternatively, since Workforce is driven by feature services, you can use any of the tools you would use in ArcGIS Pro to load data from a csv file into the Assignments feature service.  We'll have a doc topic available within the week that describes how to do this or you can log in to the Beta site and review this topic

Craig

View solution in original post

12 Replies
CraigGillgrass
Esri Regular Contributor

Hi Peter, thanks for your question on Workforce.

Our recommendation for bulk importing assignments from a csv file or similar file is to use one of the Python scripts we've written and published in our git repo:

GitHub - Esri/workforce-scripts: A set of scripts to help administer Workforce projects.

Alternatively, since Workforce is driven by feature services, you can use any of the tools you would use in ArcGIS Pro to load data from a csv file into the Assignments feature service.  We'll have a doc topic available within the week that describes how to do this or you can log in to the Beta site and review this topic

Craig

RaulLeos
Emerging Contributor

Craig,

you mention that you can use any of the tools in ArcGIS Pro to load data from a csv file into the Assignments feature service for workforce. Please explain I am in deadline and need your help as soon as possible.

0 Kudos
CraigGillgrass
Esri Regular Contributor

Raul, yes, you can use ArcGIS Pro to load data from a csv file (or other format) into any feature service.  Without knowing what format the location/address is for the csv, I'll provide a rough overview:

- Create a feature class for the csv file

- Using any of the data loading tools; you could use the Append GP tool for example, load the contents of the feature class into the Assignments feature service.

- You'll need to properly field map your feature class to the Assignments feature service; here's a link to our doc which explains the Workforce schema --> Workforce schema—Workforce for ArcGIS | ArcGIS 

- You'll want to focus on the section "Create an assignment through the REST API"; this explains the fields that must be populated for assignment to be created properly.

I'd suggest testing it out with a subset of your csv first to work through any issues.

If you have questions on this, feel free to post them.

Craig

0 Kudos
RaulLeos
Emerging Contributor

Craig,

Thank you so much I was able to add the 50,000 assignments to workforce by following the steps you provided. You saved us alot of time. Have a great day!

0 Kudos
AngelAvila
Emerging Contributor

como lo hiciste Raul, podris ser mas descriptivo que yo todavia no puedo,

hi Raul can you give more details because i cant to load this using arcgis pro

0 Kudos
PeterTimmers
Frequent Contributor

Thanks Craig.   Still lots to learn here on Workforce.   Look forward to the doco. 

0 Kudos
RaulLeos
Emerging Contributor

Good day Craig, I currently working on a project that I am trying to implement workforce and I found on that there is a script to help on loading any existing assignments but what I would like to know since I have very little knowledge on python. Is there any tutorials how to run this assignment scripting for workforce.

0 Kudos
RaulLeos
Emerging Contributor

apologies wrong person

0 Kudos
RaulLeos
Emerging Contributor

Peter,

Need help on how to run the python script in GITHUB for workforce for ArcGIS. I have 54,000 assignments in a csv and need to upload to workforce so that I can . Please help...

0 Kudos