Friday, July 28, 2017

Apex Data Loader

  • Data Loader is a client application for the bulk import or export of data. (Up to 5 million records)
  • Use it to insert, update, delete, or export Salesforce records.
  • When importing data, Data Loader reads, extracts, and loads data from comma separated values (CSV) files or from a database connection.
  • When exporting data, it outputs CSV files.

Note: If commas are not appropriate for our locale, use a tab or other delimiter.

We can use Data Loader in two different ways:

User interface—When we use the user interface, we work interactively to specify the configuration parameters, CSV files used for import and export, and the field mappings that map the field names in your import file with the field names in Salesforce.

Command line—When you use the command line, you specify the configuration, data sources, mappings, and actions in files. This enables you to set up Data Loader for automated processing.

Data Loader offers the following key features:
• An easy-to-use wizard interface for interactive use
• An alternate command line interface for automated batch operations
• Support for large files with up to 5 million records
• Drag-and-drop field mapping
• Support for all objects, including custom objects
• Can be used to process data in both Salesforce and
• Detailed success and error log files in CSV format
• A built-in CSV file viewer
• Support for Windows 7

Use Data Loader when:
* You need to load 50,000 to 5 million records.
* Data Loader is supported for loads of up to 5 million records.
* If you need to load more than 5 million records, we recommend you work with a partner or visit the App Exchange for a suitable partner product.
* You need to load into an object that is not yet supported by the import wizards.
* You want to schedule regular data loads, such as nightly imports.
* You want to export your data for backup purposes.

Use the import wizards when:
• You are loading less than 50,000 records.
• The object you need to import is supported by import wizards.
* To see import wizards click Your Name > Setup > Data Management.
• You want to prevent duplicates by uploading records according to account name and site, contact email address, or lead email address.

Login Considerations
* If your organization restricts IP addresses, logins from untrusted IPs are blocked until they’re activated.
* Salesforce automatically sends you an activation email that you can use to log in. The email contains a security token that you must add to the end of your password.
* For example, if your password is mypassword, and your security token is XXXXXXXXXX, you must enter mypasswordXXXXXXXXXX to log in.

Configuring Data Loader
Use the Settings menu to change the default operation settings of Data Loader.
1. Start Data Loader by choosing Start > Programs > > Data Loader > Data Loader.
2. Choose Settings > Settings.
3. Edit the fields as desired:

Batch size
* In a single insert, update, upsert, or delete operation, records moving to or from Salesforce are processed in increments of this size.
*The maximum value is 200. We recommend a value between 50 and 100.
*The maximum value is 10,000 if the Use Bulk API option is selected.
Insert null values
*Select this option to insert blank mapped values as null values during data operations.
* Note that when you are updating records, this option instructs Data Loader to overwrite any existing data in mapped fields.
*This option is not available if the Use Bulk API option is selected.
*Empty field values are ignored when you update records using the Bulk API.
* To set a field value to null when the Use Bulk API option is selected, use a field value of #N/A.
Assignment rule
*Specify the ID of the assignment rule to use for inserts, updates, and upserts.
* This option applies to inserts, updates and upserts on cases and leads.
* It also applies to updates on accounts if your organization has territory assignment rules on accounts.
*The assignment rule overrides Owner values in your CSV file.
Server host
*Enter the URL of the Salesforce server with which you want to communicate.
* For example, if you are loading data into a sandbox, change the URL to
Specify how many seconds Data Loader waits to receive a response back from the server before returning an error for the request.
Query request size
*In a single export or query operation, records are returned from Salesforce in increments of this size.
*The maximum value is 2,000 records. Larger values may improve
performance but use more memory on the client.
Allow field truncation
*Select this option to truncate data in the following types of fields when loading that data into Salesforce: Email, Multi-select Picklist, Phone, Picklist, Text, and Text(Encrypted).
*This option is not available if the Use Bulk API option is selected. In that case, the load operation fails for the row if a value is specified that is too large for the field.

Use Bulk API
*Select this option to use the Bulk API to insert, update, upsert, delete, and hard delete records.
*The Bulk API is optimized to load or delete a large number of records asynchronously.
*It’s faster than the default SOAP-based  API due to parallel processing and fewer network round-trips.
*When you select the Hard Delete operation, the deleted records are not stored in the Recycle Bin.
*Instead, they become immediately eligible for deletion.
*The permission for this operation, “Bulk API Hard Delete,” is disabled by
default and must be enabled by an administrator.
*A Salesforce user license is required for hard delete.
Enable serial mode for Bulk API
*Select this option to use serial instead of parallel processing for Bulk API. *Processing in parallel can cause database contention. When this is severe, the load may fail.
* Using serial mode guarantees that batches are processed one at a time.  
* Note that using this option may significantly increase the processing time for a load.
*This option is only available if the Use Bulk API option is selected.
Upload Bulk API Batch as Zip File
*Select this option to use Bulk API to upload zip files containing binary attachments, such as Attachment records or Salesforce CRM Content.
*This option is only available if the Use Bulk API option is selected.

To configure Data Loader to use the Bulk API for inserting, updating, upserting, deleting, and hard deleting records:
1. Start Data Loader by choosing Start > Programs > > Data Loader > Data Loader.
2. Choose Settings > Settings.
3. Select the Use Bulk API option.
4. Click OK.


  1. Great blog thanks for sharing Looking for the best creative agency to fuel new brand ideas? Adhuntt Media is not just a digital marketing company in chennai. We specialize in revamping your brand identity to drive in best traffic that converts.

  2. Nice blog thanks for sharing Is this a special day for you? Beautiful and fragrant flowers are sure to make it even more amazing of a day no doubt. This is why Karuna Nursery Gardens offers you the best rental plants in Chennai that too at drop dead prices.

  3. Excellent blog thanks for sharing Pixies Beauty Shop is unlike any of the other cosmetic shops in Chennai. With tons of exclusive imported brands to choose from and the best value, this is the best shopping destination for your personal and salon needs.

  4. Very useful blog thanks for sharing While choosing your perfect ride for driving, Accord Cars comes with and the best packages for you to pick from. Self drive cars in Chennai are done the easier. Just pick out your plan from hourly, daily, weekly and even monthly plans available.

  5. Interesting blog thanks for sharing At Pearl’s - The best Bridal Makeup Parlour in Chennai, we take personal responsibility in making sure that you look as flawless and beautiful and the marriage that you have been dreaming of. With around 16,000 successful brides in our books, you can be confident that we know our art intimately and deep.

  6. Awesome blog thankks for sharing 100% virgin Remy Hair Extension in USA, importing from India. Premium and original human hair without joints and bondings. Available in Wigs, Frontal, Wavy, Closure, Bundle, Curly, straight and customized color hairstyles Extensions.

  7. Very useful blog thanks for sharing IndPac India the German technology Packaging and sealing machines in India is the leading manufacturer and exporter of Packing Machines in India.

  8. You must be 100% dedicated to training and developing your staff and raising their performance from regular employees into high performing leaders who are energized, alive and connected with your customers. Salesforce interview questions

  9. Thanks for sharing We are the best product photography company in Chennai. We have latest equipment and well-experienced team with us, we ensure that all your product photography services requirements are met to excellence.