| CODE |
One of our frequent tasks at CloudSpokes is to spin up Force.com Developer orgs for challenge participants to use during a specific challenge. We typically use ANT to install code and configurations but importing data is always a chore. We want to build a tool that runs on a local machine or in the cloud that takes data from a source salesforce.com org and dumps it into target salesforce org.
The tool will allow you to specify multiple objects, the fields to query for each object and the credentials for both the source and target orgs. The records would always be upserted in the target org. We also want to have the ability to obfuscate specific field data. For instance, when dumping data from production to a developer org, we typically change email addresses to something like “noemail@cloudspokes.com”.
We currently use roughly the same process to move data from SQL Server to our database.com org on a nightly basis. The code is in Java and you can find it on this GitHub repo. It should make a great starter app.
Use the Force.com Web Services API or Bulk API to transfer data (see Additional Info section for relevant docs). We this this is a great job for the Bulk API.
Use any language that you’d like to build this tool however there is a lot of sample code in Java. The tool does not need to have any sort of UI; we’d prefer to run it from the command line. The tool will read a config/xml file which contains all data for a particular job including but not limited to:
- source connection info
- target connection info
- object/table with data -- must support multiple objects
- fields (or query)
- where clause
- external id
- n number of fields to be obfuscated and the value (email__c => ‘noemail@cloudspokes.com’, phone => ‘111-222-3333’)
When the process runs it will read the config/xml file, query the source org for data and push the data into the target org. You will need to allow data to be upserted using externalIds. Assume that both the source and target orgs have the same data structure for the objects. All records will always be upserted into the target org.
Submission
Upload all your source code as a zip and provide any documentation and/or instructions that are needed. Please be clear and concise with any setup instructions.
An SWF video of your application using Jing would also be helpful but not required.
Upload all your source code as a zip and provide any documentation and/or instructions that are needed. Please be clear and concise with any setup instructions.
An SWF video of your application using Jing would also be helpful but not required.
Your submission will be judged by a panel of peers based upon this criteria. If you would like to request an extension, please read Can challenge deadlines be extended for more time? on our FAQ. We do not want to grant extensions unless there is a valid reason.
Salesforce Web Services API Developer's Guide
Salesforce Bulk API Developer's Guide
Article: Loading Large Data Sets with the Force.com Bulk API
Sample code for a Java application using the Bulk API
Force.com Web Service Connector (WSC)
Java Command Line App Using the Salesforce WSC
16 members participating with 16 registered
Ended Nov 13, 2011 at 4:00 AM
Winner Announced on November 18, 2011
View the challenge results
Give us your feedback about this challenge.
Total: $3,500
1st $2500
2nd $1000
Install the CloudSpokes Chrome Extension for quick and easy access to the latest CloudSpokes challenges, your payments, leaderboards and more!