Add function to instantiate the BulkConnection in SFDC connector[]
Closes from arekusuri/DSS-23689-add-
bulkconnection-function
@@ -696,7 +696,7 @@ public class SalesforceExtractor extends RestApiExtractor {
config.setRestEndpoint(restEndpoint);
- this.bulkConnection = new BulkConnection(config);
+ this.bulkConnection = getBulkConnection(config);
success = true;
} catch (RuntimeException e) {
throw new RuntimeException("Failed to connect to salesforce bulk api; error - " + e, e);
@@ -704,6 +704,14 @@ public class SalesforceExtractor extends RestApiExtractor {
return success;
}
+ /**
+ * get BulkConnection instance
+ * @return
+ */
+ public BulkConnection getBulkConnection(ConnectorConfig config) throws AsyncApiException {
+ return new BulkConnection(config);
+ }
+
/**
* Get Record set using salesforce specific API(Bulk API)
* @param entity/tablename
