Contents
1
2.2
3.2
3.3
4.2
4.3
Note: When loading data (sending a query to Salesforce.com), you cannot send more
than one query at a time in the same user account. The first query to finish loading
closes the Salesforce session and then the remaining queries cannot be completed.
2.
3.
2.
Click Edit Script... on the File menu in the main QlikView window.
3.
Select QvSalesforceConnector.exe from the drop-down list next to Connect... on the Data tab in
the lower part of the Edit Script dialog.
4.
5.
Enter the user name and password for the Salesforce account.
Salesforce user names are email addresses. If you intend to connect to a sandbox (Step 7), you
must append the name of the sandbox to your user name. For example,
john.smith@XYZ.com.mysandbox.
6.
7.
Enter the URL for an alternative Salesforce.com environment you want to connect to.
By default, the Salesforce Connector connects to your accounts production organization.
Depending on the type of account you have (for example, Enterprise, Performance or Unlimited
Edition), there may also be a sandbox, which is a testing environment you can work in while
preserving the stability of the production organization. The sandbox URL can be entered,
optionally, in the URL text box to direct the Salesforce Connector to open the sandbox instead of
the default production organization.
To access your sandbox, use the following URL:
https://test.salesforce.com/services/Soap/u/29.0
The Salesforce Connector supports the SOAP API version 29.0. You might encounter problems
using another version of the SOAP API.
8.
Click Test Connection to verify that a connection can be made with the account properties
entered.
Select the type of interface to use with the connection: SOAP API Query, SOAP API QueryAll, or
Bulk API.
If you use the SOAP API to connect to Salesforce, you can read all records in the Salesforce object
that have not been marked as deleted (Query). Or you can read all records in the Salesforce
object including those that have been marked as deleted (QueryAll).
Note: When choosing between SOAP and Bulk APIs, you must know whether or not you
need to load multiple Salesforce objects with a relationship query (see Load Salesforce
objects with relationship queries below.) The SOAP API is required when loading data
with relationship queries.
The Bulk API provides faster transmission than the SOAP API. It is particularly useful when you
load entire tables.
Note: The Bulk API does not support aggregation functions or grouping.
Note: If you use Bulk API, the Salesforce Bulk API must be enabled for the account that is
reading the data on Salesforce.com.
2.
Specify the timeout period in seconds for connections that use the SOAP API.
The timeout value sets a limit on the amount of time the connector waits for a response from
Salesforce.com when it requests a batch of data. The timeout applies to loading each batch of
data. It does not apply to the time it takes to parse, convert and write the data to QlikView.
This is used only for connections that use the SOAP API. When Bulk API is selected (Step 1), the
Timeout field does not appear.
3.
Specify the batch size, which is the maximum number of rows written to the data target in one
batch.
The batch size can be used to control the speed at which QlikView and Salesforce.com
communicate. If a batch size is not specified or Salesforce.com does not accept the set batch size,
the Connector tries to use the maximum allowed batch size of 2000 and then increments down in
steps using the following predefined batch sizes:
2000, 1000, 500, 200, 100, 50, 20, 10, 5, 2, 1
Bulk API is selected (Step 1), the Batch size field does not appear.
4.
Select Convert SQL dates to convert dates entered in the format YYYY-MM-DD hh:mm:ss to the
SOQL format.
The SQL date-time data type is often used in WHERE clauses, but that data type format does not
match date-times in a Salesforce object. If the Convert SQL dates box is selected, date-time
values entered in the YYYY-MM-DD hh:mm:ss format are automatically converted to the SOQL
format used for the date-time data type.
If Convert SQL dates is not selected, date-time values submitted to Salesforce.com in SQL
format would not match any date-time values in the Salesforce.com object database. See the
discussion of the WHERE clause in the section below on creating a load statement.
5.
6.
Select Convert UTC to local time to convert date-time values returned by the Connector to the
local time of the computer the Connector is running on.
If Convert UTC to local time is not selected, the Connector returns date-time values from
Salesforce.com in Coordinated Universal Time (UTC).
Specify the name or IP address of a proxy host in Proxy section of the Salesforce Connection
dialog.
2.
Specify the port number for the Proxy on the machine running the host.
3.
Select the authentication required by the Proxy host from the Enable authentication dropdown menu.
The Enable authentication drop-down menu does not appear until you start to enter a name
or IP address in the Proxy host field.
4.
If Enable authentication is set to Yes, enter the user name and password for the Proxy host.
The User name and Password fields do not appear until you select Yes from the Enable
authentication drop-down menu.
After the account credentials have been entered and the connection tested, the data load properties set,
and the proxy settings changed if necessary:
Click OK to create the connection string used when sending the load statement to
Salesforce.com.
The Salesforce Connection dialog closes and the connection string is inserted in the Edit Script
dialog.
Click the enabled Select... on the Data tab in the lower part of the Edit Script dialog.
The Edit Script dialog has two Select buttons when the Salesforce Connector has been
connected but only the bottom button is enabled.
2.
Select a database table from the Objects list in the Create Select Statement dialog.
3.
SELECT * statement: The Salesforce Connector allows you to use the SELECT *
statement to select all fields in the table. You add the SELECT * statement manually in
the text box under the Script tab.
The SOQL query language does not support the SELECT* statement, but the Salesforce
Connector has been enhanced to recognize that syntax. Only asterisks (*) and simple
field names can be used in the SELECT * statement.
The SELECT * statement can only be used when Bulk API is selected in the Salesforce
Connection dialog. See Bulk API.
String escape characters: The Salesforce Connector uses the single quotation mark
character as an escape character instead of the back slash (\) used by SOQL. To include
a single quotation mark in a query string, it must be prefaced by another single
quotation mark. For example, the following string encloses Captain Awesome in single
quotation marks.
Devon Captain Awesome Woodcomb
The SELECT statement for the Salesforce Connector does not support:
Qualified field names: Field names cannot be prefixed by table table names. For
example, Contact.FirstName is not permitted.
Salesforce prefix: It is not permissible to prefix the table name with the string
Salesforce. For example, Salesforce.Contact is not allowed.
Bracketed names: Table and field names cannot be put in brackets. For example, the
following SELECT statement is not valid:
SELECT [FirstName] FROM [Contact]
SOQL aliases: The syntax for creating aliases in SOQL cannot be used. For example, the
following SOQL syntax is not valid for the Salesforce Connector:
SELECT Id BusinessID FROM Contact
Note: Changes entered manually in the text box under the Script tab will be lost if new
selections are made in Objects or Fields. Changes entered manually are also lost when you
select Preceding load Select all tables and fields as well as Preceding load before editing
the script manually.
4.
Select Preceding load to create a LOAD statement before the SELECT statement.
This step is optional.
Note: The Preceding load check box is not available when the connection is made with
SOAP mode. See Setting data load properties.
The preceding load feature allows the LOAD statement to use the SELECT statements as input.
Basically, it is a LOAD statement that loads from the LOAD or SELECT statement below, without
specifying a source qualifier, such as From or Resident, as you would normally. You can stack any
number of LOAD statements this way. The statement at the bottom will be evaluated first, then
the statement above, and so on until the top statement has been evaluated.
Another advantage of preceding load is that you can keep a calculation in one place and reuse it
in LOAD statements placed above. For example, when you load data from a database using a
SELECT statement, you cannot use QlikView functions to interpret data in the SELECT statement.
The solution is to add a LOAD statement and perform data transformations above the SELECT
10
statement. In this example, string data is interpreted with the QlikView Date# interpretation
function in a LOAD statement, using the SELECT statement as source:
LOAD Date#(orderDate, YYYYMMDD) as OrderDate;
SELECT OrderDate FROM _;
The preceding LOAD statement created under the Script tab is the simple version illustrated in
the screen above. To create the LOAD statement in this example, you would edit the script in the
text box under the Script tab.
5.
6.
Click the Preview tab to see data that will be loaded with the SELECT statement displayed under
the Script tab.
Previewing the data is optional. By default, 25 rows are displayed. More rows can be displayed by
selecting a higher number from the Maximum rows drop-down menu.
Note: You cannot preview data if the load script contains more than one SELECT statement.
7.
Note: When loading data (sending a query to Salesforce.com), you cannot send more
than one query at a time in the same user account. The first query to finish loading
closes the Salesforce session and then the remaining queries cannot be completed.
When using Bulk mode with Preceding load, you can create the alias in the text box under the Script tab.
SOAP mode does not allow Preceding load, so the LOAD statement does not appear in the text box under
the Script tab. In SOAP mode, renaming must be done in the Edit Script dialog.
11
Note: When loading multiple objects in a relationship query, you must use a relationship name
instead of a table name. For standard tables the relationship name is the plural of the table object
name. In the illustration above, Contacts and Cases are used instead of Contact and Case,
which are the object names.
From this SELECT statement, the Connector creates separate load statements for each of the related
tables.
12
Lookup Relationship
Text Area
Checkbox
Number
Currency
Percent
Date
Phone
Text (Encrypted)
Date/Time
Picklist
URL
Picklist (Multi-Select)
Formula
Text
13