Welcome to Data Loader > Welcome to Data Loader > Example: Loading from Salesforce to Google BigQuery
  

Example: Loading from Salesforce to Google BigQuery

Your company stores marketing data in Salesforce but wants to move the data to Google BigQuery for warehousing. You want to load the data from Salesforce to Google BigQuery quickly and easily. To do this, create a data loader task and run it.
To get started, click New, as shown in this image:
The New button appears in the upper left corner.
Then create the task:

Step 1. Connect to the source

First, select and configure the source.
  1. 1On the Connect Source page, click New Connection to create a connection to Salesforce.
  2. This image shows the New Connection button on the Connect Source page:
    On the Connect Source page, the New Connection button appears to the right of the Connection field and the Edit button.
  3. 2Select a Salesforce connection and click Continue.
  4. 3Fill in the connection details and add the connection.
  5. This image shows where to enter the connection details:
    The Configure Source Connection dialog box contains the following fields for a standard Salesforce connection: Connection Name, Description, Runtime Environment, Salesforce Connection Type, Username, Password, Security Token, Service URL, and Bypass proxy server settings defined for the Secure Agent.
    The Connect Source page lists the connection. By default, the task reads all objects in the source location.
  6. 4Since you are only interested in the marketing data, under Define Objects, click Include some, and select the appropriate tables.
  7. This image shows the included source objects:
    On the Connect Source page, "Include some" is selected under Define Objects. The following objects are selected: Account, Contact, Customer, Lead, and Opportunity.
    For Salesforce, the task can automatically detect primary keys and watermark fields. Primary keys uniquely identify records. Watermark fields are date/time or numeric fields, like a timestamp, that indicate whether a record is new or changed. Watermark fields are useful if you plan to re-run the task and you only want to load the new and changed data.
  8. 5Accept the defaults.
  9. This image shows the default values for the Define Primary Keys and Define Watermark Fields options:
    On the Connect Source page, the Define Primary Keys and Define Watermark Fields areas are expanded. In both areas, the "Automatically detect from source" option is selected.
  10. 6Click Next.

Step 2. Connect to the target

After you configure the source, select and configure the target.
  1. 1On the Connect Target page, click New Connection to create a connection to Google BigQuery. Fill in the connection details and add the connection in the same way you did for the source.
  2. This image shows the target connection selected:
    On the Connect Target page, a Google BigQuery connection is selected.
  3. 2Optionally, enter "SF_" as the target name prefix. When you do this, the Google BigQuery tables will have the same name as the source objects, except they'll be prefixed with "SF_." For example, data from the Account table in Salesforce will be loaded to the "SF_Account" table in Google BigQuery. If you don't enter a prefix, the Google BigQuery tables will have the same names as the source objects.
  4. 3In the Path field, enter the name of the bucket you want to write to.
  5. 4Accept the default to load to existing tables.
  6. This image shows the target name prefix, the path, and the default Load to existing tables option:
    On the Connect Target page, the Target Name Prefix is "SF_," the Path is "dlt," and the Load to Existing Tables option is set to "Yes."
  7. 5Click Next.

Step 3. Save and run the task

Once you've configured your source and target, you're ready to save and run the task.
  1. 1On the Let's Go page, give the task a name like "Load_from_SF."
  2. This image shows the Let's Go page with the task name configured:
    On the Let's Go page, the Name field is set to "Load_from_SF."
  3. 2Click Save.
  4. 3To run the task, click Run.
That's it! The task loads the Salesforce data to your Google BigQuery cloud data warehouse. If you want to monitor the task's progress, you can see it on the My Jobs page.
If the Salesforce data changes, you can run the task again. Since you chose to automatically detect watermark fields and keep the existing target tables, the task loads only the new and changed data to the target tables each time you re-run it.