Using a DDBulkLoad Object
- Last Updated: June 13, 2020
- 2 minute read
- DataDirect Connectors
- JDBC
- Salesforce 6.0
- Documentation
The first step in performing a bulk load operation using a
DDBulkLoad object is to create a DDBulkLoad object. A
DDBulkLoad must be created with the getInstance method
using the DDBulkLoadFactory class as shown in the following example.
import com.ddtek.jdbc.extensions.*
// Get Salesforce Connection
Connection con = DriverManager.getConnection(
"jdbc:datadirect:sforce://login.salesforce.com;User=abc@defcorp.com;
Password=secret;SecurityToken=XaBARTsLZReM4Px47qPLOS");
// Get a DDBulkLoad object
DDBulkLoad bulkLoad = com.ddtek.jdbc.extensions.DDBulkLoadFactory.getInstance(con);
Once the DDBulkLoad object has been created,
DDBulkLoad methods can be used to instruct the driver to obtain data from
one location and load it to another location. The driver can obtain data either from a
ResultSet object or from a CSV file.
Migrating Data Using a ResultSet Object
The following steps would need to be taken to migrate data from Oracle to
Salesforce using a ResultSet object.
- The application creates a
DDBulkLoadobject. - The application executes a standard query on the Oracle database, and
the Oracle driver retrieves the results as a
ResultSetobject. - The application instructs the Salesforce driver to load the data from
the
ResultSetobject into Salesforce. (See "Loading Data From a ResultSet Object".)
Migrating Data Using a CSV File
The following steps would need to be taken to migrate data from Oracle to Salesforce using a CSV file.
- The application creates a
DDBulkLoadobject. - The application instructs the Oracle driver to export the data from the Oracle database into a CSV file. (See "Exporting Data to a CSV File.")
- The application instructs the Salesforce driver to load data from the CSV file into Salesforce. (See "Loading Data From a CSV File.")
See also
-
Refer to JDBC extensions in the Progress DataDirect for JDBC Drivers Reference for more information about bulk load methods.
- CSV files
- Permissions for bulk load from a CSV file