Exporting data from Salesforce

In dataloader.io, before actually exporting the data you must first create an export task. In fact, when creating the task you can save and run it, meaning that this doesn't add any extra steps. The beauty of doing things this way is that the next time you want to export the same kind of data, the task will already be created and it will just take you one click to get it. You can also schedule these tasks to run automatically and forget all about them. If you want to build a new task that is similar to one you've already created, you can easily use an old task as a template and build from there, saving you several steps.

So let's get to it...

Creating an Export Task

  • Click New Task on the top menu bar
  • Select export

 

Follow these steps to create your first Export Task:

Step 1: Select your Connection and Object

  1. Select your connection from the dropdown menu. Your login credentials will be your default connection. If you wish to use a different Salesforce connection than one you’re using, create a new connection using the '+' icon next to the connection drop down.
  2. Select the object you wish to import data into - e.g. Account, Contact, Lead, etc. and click Next.

You can use the Quick find function to search through your objects and the Menu button to quickly filter your Standard/Custom objects and show/hide your object names.

Step 2: Build Your Query

There are several different options to custom build your Query. To understand these better we can split the screen into 4 different sections:

  • On the left you can select the fields you want from the selected object and its related objects too.
  • On the top-right you'll add your query filters to only export the rows that match these criteria.
  • Beneath the filters you can choose how to order your data.
  • On the lower-right DataLoader will be displaying the raw SOQL code that gets built by the options you chose above. If you know how to read this code then you can review it and make sure you're asking your query well. You can even use the SOQL Query editor to write your own custom queries straight there!

There are two ways of building your query:

  1. Using the Query Builder
  2. Writing your own query using the SOQL Query editor.

Using the Query Builder

Select your fields

Select the fields you wish to export by clicking on them. To select all fields, use the Select All checkbox next to the object name.

You can use the Quick find function to search through your fields and the Menu button to Show Selected/All fields and Show/Hide your field names.

Adding filters to your query

To add filters to your query:

  1. Select an Object. By default you'll get the one you previously selected, but you can also choose its related objects.
  2. Select a field.
  3. Select the operator.
  4. Enter the filter value
  5. Click on the + icon to add the filter.

To delete a filter just click on the trash can next to it.

Ordering your data

You can choose a field to sort your data, it can be from your previously selected object or form one of its related objects.

  1. Select the Object where the field you want belongs to
  2. Select a field to be your sorting criteria.
  3. Select your sorting order: Asc (Ascending) or Desc (Descending)

Using SOQL Query

While you were selecting the fields, filters, and ordering options, Dataloader.io was translating this into SOQL code. By opening the SOQL Query section you can see the raw code that will be sent to salesforce.

 

The SOQL Query section also gives you the option to write your own queries with no need to use the Query Builder. You can also Verify your query using the Verify button to make sure it will work properly before running your task.

Set the order of columns in a CSV file by editing the order of selected fields in a SOQL query. The query below produces a table with the columns FirstName, Lastname, Email and Phone in that order.

Once you make changes in the SOQL Query editor you can no longer use the Query Builder.

If you want to go back to selecting fields and filters from the dropdown menus all you need to do is use the Refresh button and the query will be reset to the options previously selected. Be careful, refreshing your SOQL Query will make you lose any changes you may have done to the SOQL Query statement.

Find more about the SOQL Query Language in Salesforce's documentation.

Step 3: Save and Run Your Task

On the last step of the wizard you’ll find a summary screen with the boiled down information of your task. On this step you can review:

  • Task name (or change it).
  • Main object.
  • Operation type.
  • Export row count.
  • Choose between Bulk API or Batch API.

On the lower part you can also get access to the advanced settings.

Finally, choose Save to save your task and run it later or Save and Run to save your task and run it immediately.

Scheduling

You can Schedule your tasks so that they start running regularly. You can choose between Hourly, Daily, Weekly or Monthly schedules and switch to different time zones.

Once you have created your task you can change the schedule for it by either editing the task and coming back to this screen or directly from the Schedule button below the task on the task list page. There's also a Scheduled tab you can use to quickly find your scheduled tasks:

Using Bulk API

Salesforce Bulk API is based on REST principles and is optimized for loading or deleting large sets of data. Records are processed asynchronously by submitting batches which are processed in the background by Salesforce. Bulk API has some restrictions, for example: related objects exports are not supported by this API. On the other hand, Bulk API processes data in larger batches than Batch API, resulting in a lower API calls usage per operation on large volumes of data.

For more information about Bulk API:
http://www.salesforce.com/us/developer/docs/api_asynch/index.htm

Using Batch API

Whenever the Bulk API checkbox is left unchecked, the Batch API is in use.

Salesforce Batch API is based on SOAP principles and is optimized for real-time client applications that update small numbers of records at a time. Although SOAP API can also be used for processing large numbers of records, when the data sets contain hundreds of thousands of records, it becomes less practical, in those cases Bulk API is the best option. Batch API processes data in smaller batches than Bulk API, resulting in a higher API calls usage per operation on large volumes of data. 

Email Notifications

You can set up your task so that an email notification is sent to you whenever it runs. You can add multiple recipients as well as multiple cc to the sent email.

When using the free edition of Dataloader.io, you are only allowed to have one task set up to send email notifications. Dataloader.io Professional and Enterprise Editions allow you to implement these in an unlimited amount of tasks.

Advanced Settings

 

Export Deleted Rows

Only available when using the Batch API, this option allows you to include information from Salesforce's Recycling Bin on your query results.

Row Limit

Use this option to only retrieve a certain amount of rows from your export results. It also comes in handy if you want to use the Batch API with large exports, you can use this limit to retrieve less than 10,000 records enabling the Batch API.

Date Format

Only available with Batch API selected, this option allows you to select the date format of your exports results. Available date formats: mm/dd/yyyy and dd/mm/yyyy.

Serial Mode

Available only with Bulk API, this mode guarantees that batches are processed one at a time in Salesforce (avoiding possible database contention).

Be careful, this option may significantly increase the processing time for a load.

Timeout

Timeout allows you to set a limit to the maximum time a task can keep running. When the task reaches the timeout threshold it will be cancelled automatically. The system's default timeout is set to be 2 hours.

Using filter operators

When creating a filter you have several options available based on the type of field you are using:

Text operators

  • equals
  • non equals
  • starts with
  • ends with
  • contains
  • does not contain
  • is empty
  • is not empty
  • like
  • not like

Note: like / not like are specially useful if you want to use your own wildcards like '%' or '_'.

Date / Datetime / Number operators

  • = : equals to
  • != : non equals to
  • > : greater than
  • >= : equals or greater than
  • < : smaller than
  • <=: equals or smaller than
  • is empy
  • is not empty

Checkbox (boolean) operators

  • = : equals to
  • != : non equals to

ID operators

  • = : equals to
  • != : non equals to
  • is empy
  • is not empty

Export to a Folder

By default, once an export task runs in Dataloader, you can obtain its output by either clicking on the latest run, displayed in the task manager, or by looking at the task's history; you then download the file through your browser. As an alternative, you can also set your task to directly create new files as soon as the process runs, these can be placed in any directory in an FTP server, DropBox or Box account, or in a DataBase.

Customizing Exported File Name

File names on Exports can be customized to fixed values that remain constant over time in case you want the latest export to keep overwriting the old ones. You also have the option of including a timestamp on the file name, in order to keep every export as a separate record.

Stronger Security

DataLoader uses one of the strongest server-side encryption and provides access to result files only to its owners. You can completely remove data from DataLoader's servers by deleting the task from the task menu. In addition, you have a full control over where CSV data is stored. Select Save Result Files Externally under advanced settings to guarantee that no CSV files are stored on dataloader.io servers. This feature is only available when using one of the external storages such as Dropbox, Box, (S)FTP, where result files are saved. Note that with this option selected, resulting files won't be available for download from the main page.

Have more questions? Submit a request

Comments

Article is closed for comments.