Repository navigation
Issue #2838 : Add experimental Salesforce Bulk API 2.0 transforms - #9410
mattcasters wants to merge 1 commit into
Conversation
The SOAP transforms stay synchronous. Bulk load and bulk input use the job API, and the integration test talks to a local stub instead of a Salesforce org.
|
Thanks @mattcasters, nice to have Bulk API 2.0 without pulling in another SDK. The reversed-results matching test is a good touch. What I ran: built the PR and ran the 15 Blocker Date values move by a day depending on the JVM time zone.
Suggested fix: on load, keep the wall-clock time the way Question Has this been run against a real Salesforce org at least once, for example a free Developer Edition org? The ITs and WireMock tests use a stub built from the docs. Row matching depends on Salesforce echoing the uploaded values unchanged in the result files, which a stub can't confirm. A short note in the PR on what was run against a real org (operations and field types) would be enough. |
|
I can't test it myself against SalesForce hence:
At the risk of stating the obvious: this was done to de-block the issue from being stuck for another 3 years ;-) |
Summary
Adds two experimental transforms to the existing Salesforce plugin for Bulk API 2.0. The SOAP Input, Insert, Update, Upsert, and Delete transforms are unchanged.
SalesforceBulkLoad) inserts, updates, upserts, deletes, or hard-deletes one object through an ingest job.SalesforceBulkInput) runsqueryorqueryAlland reads the CSV result pages.Bulk API 2.0 is a different lifecycle from the partner API: create a job, upload one CSV, close it, poll, then download result files that are not in input order. A flag on the existing transforms would mix that with the synchronous
SaveResultpath, so these are separate transforms. Both reuse thesalesforce-connectionmetadata. An OAuth token is sent as a bearer token. A username/password connection uses the SOAP session id the same way. There is no new Salesforce SDK.The transforms are local-engine only. Beam and Spark refuse them by plugin id.
Fixes #2838.
Testing
plugins/tech/salesforceunit tests, including CSV rules, reversed result matching, the session id used as a bearer token, and the REST job flow against WireMock.BeamPipelineEngineSupportsTestand SparkHopPipelineMetaToSparkConverterTestfor the engine bans.docker/integration-tests/salesforce-mock/bulk_api.pywas exercised directly: insert with a failed row, reversed success rows, two query pages, and HTTP 401.The
integration-tests/salesforceproject runs those same cases through Hop against the stub (docker/integration-tests/integration-tests-salesforce.yaml). That compose project was not executed inside the Hop integration image.