Sei sulla pagina 1di 6

Select p.Id, p.PSP_CORE_Patients__c, p.PSP_CORE_Patients__r.

APS_Patient_ID__c From
PSP_CORE_Program_Affiliation__c p where PSP_CORE_Program_Name__r.Name = '#P_NAME_r#'
and PSP_CORE_Program_Name__r.PSP_CORE_Country__c = '#P_COUNTRY_c#' and
PSP_CORE_Program_Status__c = '#P_STATUS_c#'

Select p.Id, p.PSP_CORE_Patients__c, p.PSP_CORE_Patients__r.APS_Patient_ID__c From


PSP_CORE_Program_Affiliation__c p where PSP_CORE_Program_Name__r.Name = '#P_NAME_r#'
and PSP_CORE_Program_Name__r.PSP_CORE_Country__c = '#P_COUNTRY_c#' and
PSP_CORE_Program_Status__c = '#P_STATUS_c#'
P_SRC_SF_CRM_USR=patientportal@data.com.core
P_SRC_SF_CRM_PWD=********
P_SRC_SF_CRM_URL=https://login.salesforce.com/
Real-time load
This type of load depends on the web service interfaces and is designed for
jobs that load a small or moderate number of data records. With this
approach, the Pack bundles the data records into multiple batches (up to 200
rows per batch). The Pack sends one batch at a time to Salesforce.com by
using a web service call and then waits for the status of the operation before
sending the next batch.
Bulk load
This type of load uses the asynchronous bulk API and is suited for jobs that
load or update a large number of data records. With this approach, the Pack
organizes the data into a comma-separated values (.csv) file format, and
then uses the HTTPS Post method to send the comma-separated values files
to Salesforce.com. Each HTTPS post can send up to 10,000 rows or 10 MB
as a maximum. When you have hundreds of thousands or millions of input
records, you can use a bulk load to improve load performance by reducing the
number of round trips between InfoSphere DataStage and Salesforce.com.
https://www.ibm.com/support/knowledgecenter/en/SSZJPZ_11.7.0/com.ibm.swg.im.iis.ds.entpak.s
alesf.doc/topics/SFBeforeYouBegin.TaskContainer.html

To support delta extraction (getUpdated or getDeleted operations), create a custom


object called DataStage in your Salesforce.com organization. Include the following
fields in the DataStage object:
extractId
This field identifies a particular job that performs a delta extraction. The Pack
for Salesforce.com uses this field to track the last time this ID performed a
delta extraction. The time of the last delta extraction determines which data
the query returns to a particular ID.
For example, a Salesforce.com organization might have an AccountManager
user who runs an extraction job weekly and a SalesRep user who runs
another job daily. Both jobs might extract data from the same Salesforce
object. Setting up a unique extractId for each job lets the Pack for
Salesforce.com return the data that has changed in the last week to the
AccountManager user, and the data that has changed in the last day to the
SalesRep.
The extractId can be any text string. The field is limited to 80 characters. You
enter the extractId at design time. Optionally, you can save the extractId as a
job parameter. This field has the type of Text. This field is Unique Case
Insensitive, and it is an External ID field.
lastextracttime
This field stores the date and time when a user, identified by a unique
extractId, last ran a particular delta extraction job. This field has the type of
datetime.
object
This field stores the name of the Salesforce object for the delta extraction. It
has the type of Text Field with 40 characters
Procedure
To design a job to extract data from Salesforce.com:
Procedure
1. Create a Pack for Salesforce.com extraction job:
a. In the IBM® InfoSphere® DataStage® and QualityStage® Designer client,
create a new parallel job.
b. In the Designer client palette, click Packs and drag the Pack for Salesforce.com
icon to the parallel canvas.
c. In the Designer client palette, click File and drag a sequential file to the parallel
canvas.
d. To define the job as an extraction job, draw an output link from the
Salesforce.com icon to the sequential file. Right-click and drag the cursor to
draw the link.
2. Double-click on the Pack for Salesforce.com stage to open the link properties.
3. Specify your Salesforce.com login credentials and URL, or load them from a saved
connection file.
4. In the Read Operation field, select a read operation.
5. Click Browse Objects to select a business object for a delta extraction or to
generate an SOQL SELECT statement for a query.
6. Specify the job details:
o For delta extractions, specify an extract ID. Enter the delta start and end times,
or accept the default values.
o For queries, optionally edit the SOQL SELECT statement to add a condition
expression (WHERE clause) and sorting (ORDER BY statement).
7. Configure the job to run sequentially.
Extraction jobs must run sequentially to avoid duplicate data.
. Click the Advanced tab.
a. In the Execution mode field, click Sequential.
8. Optional: To extract Unicode data:
. Click the Columns tab.
a. To specify that a field contains Unicode data, click the input field under the
Extended column and select Unicode.
9. Optional: To save any value as a job parameter, double-click the Use Job
Parameters column to the right of the input field.
At design time, you use an Internet connection to Salesforce.com to browse for and
select the metadata from your Salesforce.com organization to be used in your job. At
run time, you use the Internet connection to Salesforce.com to load data into or
extract data from your Salesforce.com organization.
Before you begin
You need to obtain a user name and password from Salesforce.com. To gain access to
Salesforce.com by using the Pack, you might also need to add a security token to the end of
your password. The security token is an automatically generated key from Salesforce. For
example, if your password is “mypass” and your security token is “xxxx”, then use
“mypassxxxx” as your password to gain access to Salesforce.com by using the Pack.
Salesforce enforces security controls based on several mechanisms, including user profiles,
IP address restrictions, and security tokens. You need to contact your Salesforce
administrator to understand these security mechanisms and have the security tokens ready
before connecting to Salesforce.com.
About this task
You define the Internet connection to Salesforce.com in the job Properties tab at job design
time.
Procedure
To set up your connection to Salesforce.com:
Procedure
1. Create a Pack for Salesforce.com extraction job or load job and double-click the
stage to display the stage properties.
2. Enter your Salesforce.com user name in the Username field.
The format of the user name is username@domainname.
3. Enter your Salesforce.com password in the Password field.
4. Enter the Salesforce.com URL, for
example, https://www.salesforce.com/services/Soap/u/18.0, in the URL field.
The Pack supports the Salesforce API version 18.0.
5. Optional: To use a proxy server to connect to Salesforce.com, in the Proxy
Server field, click Yes, and enter the proxy server host name, port, user name, and
password.
6. Press Enter to set your credentials.
NotePress Enter after making any change to your login credentials or to the URL to
reset the connection options.
7. To start the connection to Salesforce.com:
a. At design time, click Browse Objects to connect to Salesforce.com.
b. At run time, the Pack for Saleforce.com connects to Salesforce.com
automatically.
You can add conditions and sorting to the Sforce Object Query Language (SOQL)
SELECT statement of a query. Conditions filter the rows and values that are returned
by the query. Sorting controls the order in which the query results are returned.
Before you begin
For details about SOQL and the SELECT statement, go
to http://www.salesforce.com/us/developer/docs/api/index.htm.
About this task
Add conditions and sorting to the SELECT statement in the SOQL Query to
Salesforce field. Use the SOQL WHERE clause to add conditions that filter the data returned
by the query. Use the SOQL ORDER BY clause to sort the data returned by the query.
Procedure
To edit the SELECT statement of a query:
Procedure
1. Connect to Salesforce.com and select the metadata objects for the query.
2. Click the SELECT statement in the SOQL Query to Salesforce field to display the
browse button.
3. Click the browse button to open the window in which to edit the query.
4. Add any conditions and sorting to the SELECT statement, and click OK to save your
changes.
The Pack for Salesforce.com does not parse the statements in the field. Ensure that
your changes are syntactically valid.
Results
When you run the job, the Pack for Salesforce.com sends the SELECT statement in
the SOQL Query to Salesforce field to Salesforce.com. The Program Generated
Reference SOQL Query field is intended for your reference during design time, and is not
sent to Salesforce.com.
Bulk API support for Query operation is now included into Salesforce connector.
The Bulk API support for Query Operation is now added to extract the data in Bulk
mode. Salesforce API version now supports API Version 44.
A new stage GUI category by name Bulk Mode is provided for the Access Method
Job Property. This will be enabled only for the Query or QueryALL extract operation.
When the “Bulk Mode” is selected, you can save the bulk job id in a file. If you
selects the Job Property Job ID in File as Yes, then a different job property named
Job ID file name is enabled in which the you must specify the name of the file where
the job id will be saved. If you not wish to save the bulk job id in a file, then select the
property “Job ID in File” as “No”. The bulk job id will be displayed in the Director Log.
It is always recommended to use the Data Batch Size as 10000 for the Bulk mode.
The extract operations are run in parallel. Hence higher the number of node
configurations, better the performance of the Bulk API. However, if there is very high
amount of node then the performance can degrade. Bulk Mode performance is
observed to be better than the Real-Time Mode for higher records.
As the Salesforce data is extracted in parallel, the records that are extracted from
Salesforce might or night not arrive in the same sequence in the target stage.
NoteSalesforce API version now supports API Version 44.
GUI Properties
Access Method
 Job ID in File: Specify Yes if the Bulk Query Job Id needs to be saved in a file.
If it is selected as No the Bulk Query Job Id will be displayed in the Director
Log of the job.
 Job ID file name: If Job ID in File is selected as Yes, specify the file name in
which the Bulk Query Job Id needs to be saved.
Enable PK Chunking - This job property is enabled when the Access method
is "Bulk Mode" and the Read Operation is "Query or QueryALL"
 This Property by default is True, which states that the Bulk Query Job will use
the PK Chunking feature of Salesforce for the extract operation.
 This property when set as False, states that the Bulk Query jobs will not use
the PK Chunking feature of Salesforce for the extract operation.
Empty Recycle Bin - This job property is enabled when the Delete Operation
is selected in the Bulk Mode.
 Specify True to delete the record permanently, so that the record is not stored
in Recycle Bin on the Server.
NoteYou can use the job property Empty Recycle Bin, to empty the recycle
bin in Bulk Delete.
Note
 Bulk Extract is supported for Query operations.
 The recommended batch size is 10000 records per batch.
 Extract of Binary objects is not supported in Bulk API and it's usage is subject to the
standard API usage limits. Bulk API transfers data in parallel hence it is advisable to
run the job in multi node configuration to see the performance improvement.
Environment variables
CC_SALESFORCE_BULK_MODE_PARENT_BATCH_WAIT_TIME
Set this environment variable to change the default wait time of the Parent Batch in
the Bulk Mode when PK Churning feature is enabled. The value is in seconds. For
example, the value 1800 signifies 30 minutes. The default wait time of the Parent
Batch in the Bulk Mode to wait for all the batches to finish processing is 20 minutes.

Potrebbero piacerti anche