Connecting to Salesforce.com
BIRT Designer Professional uses a DataDirect JDBC driver to connect to Salesforce.com. This third-party driver supports access to Salesforce objects through JDBC and SQL. You provide the URL to connect to a Salesforce instance, and your login credentials. You can also set performance-tuning properties to control the data communications between BIRT and Salesforce.com.
The DataDirect JDBC driver maps Salesforce objects and fields to tables and columns the first time it connects to a Salesforce instance. The driver maps both standard and custom objects and includes any relationships defined between objects. The driver uses a local embedded database to instantiate the mapping of the remote data source objects to tables and the metadata associated with the tables. The embedded database is created in the directory from which the application is run and uses the user ID specified for the connection as the name of the database. The driver creates one database per user. Whenever a new Salesforce object is created, the local database must be updated so that the new object is visible.
To force the creation of a new local database, add the parameter CreateDB=forceNew to the connection URL, for example
jdbc:actuate:sforce://login.salesforce.com;CreateDB=forceNew
Alternatively, use the parameter RefreshSchema, for example
jdbc:actuate:sforce://login.salesforce.com;RefreshSchema
Using either of these connection parameters requires additional processing to establish the connection. For more information about these parameters, refer to the DataDirect documentation:
http://media.datadirect.com/download/docs/jdbc/alljdbc/wwhelp/wwhimpl/js/html/wwhelp.htm#href=userguide/rfi1359985908931.html
How to create a Salesforce.com data source
1 In Data Explorer, right-click Data Sources, then choose New Data Source.
2 In New Data Source, specify the following information:
1 Select Actuate JDBC Salesforce.com Data Source from the list of data source types.
2 In Data Source Name, type a name for the data source.
3 Choose Next.
3 In New Actuate JDBC Salesforce.com Data Source Profile, specify the properties to connect to a Salesforce instance, and optionally, change the performance-tuning settings.
1 In Database URL, type the URL to a Salesforce instance.
2 In User Name, type the user name to log in to the system.
3 In Password, type the user password and security token to log in to the system, for example, myPasswordXXXXXXXXX, where myPassword is the password and XXXXXXXXX is the security token. A user’s security token is assigned by a Salesforce.com administrator. A user can change his or her security token in Saleforce.com’s Personal Setup tool.
4 In Database Name, do one of the following:
*Deselect Use default, then type a filename prefix, or a path and a prefix. The driver uses this value to create or locate the set of Salesforce embedded database files. For example, if Database Name is set to AcmeData, the database files that are created or loaded have the format, AcmeData.<file extension>. If you specify a path and a prefix, such as C:\Resources\Data\AcmeData, the driver creates or looks for database files AcmeData.<file extension> in the C:\Resources\Data folder.
*Select Use default. This option uses BIRT’s resource folder as the path and the User Name value as the filename prefix.
5 In Connection Retry Count, specify the number of times to attempt to connect until a successful connection is established.
6 In Connection Retry Delay, specify the number of seconds to wait between each connection attempt.
7 In Fetch Size, specify the number of data rows that the driver processes before returning data to the application. A small fetch size can improve the initial response time of the query. A large fetch size can improve overall fetch times at the cost of additional memory.
8 In Web Service Fetch Size, specify the number of data rows that the driver fetches for each JDBC call.
9 In Web Service Retry Count, specify the number of times the driver retries a SELECT query that has timed out.
10 In Web Service Timeout, specify the number of seconds that the driver waits for a response to a web service request.
Figure 6‑28 shows an example of properties to connect to a Salesforce.com instance.
Figure 6‑28 Connection properties to a Salesforce.com instance