Ask Your Question
1

Retrieve all Salesforce object data in a single SOQL query

asked 2018-08-03 11:52:33 -0500

Mehul gravatar image

While using Streamsets Salesforce Origin, I noticed that it requires SOQL query. Is there a way I can get all object data including custom object data using Streamsets.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2019-09-27 14:18:43 -0500

metadaddy gravatar image

updated 2019-09-27 14:19:03 -0500

You might be interested to know that we are working on a Multi-object Salesforce origin that would let you consume data from multiple Salesforce objects in a single pipeline. Please watch/vote/comment on SDC-10138.

edit flag offensive delete link more
1

answered 2019-09-27 14:08:07 -0500

avdsa gravatar image

The query is per object. Example:

SELECT Id FROM Accounts ...

However, if you want ALL fields from objects, then you should enable "Use Bulk API" and "Use PK Chunking". This will allow you to query Salesforce as such:

SELECT * FROM <ObjectName>

If you have multiple objects you are looking to query and bring in, then you should parametize the pipeline and generate a job template from it. Here is how I have parametized my Salesforce bulk uploads:

SELECT * FROM ${OBJECT}

Then create the pipeline parameter OBJECT with one of my Salesforce objects. Once you are done with the pipeline, create a job from it and make sure to check the "Enable Job Template" box and select "Get Default Parameters" at the bottom. From here you can launch your job template and add each object by name (e.g. Accounts, Leads, Custom__c, etc.).

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-08-03 11:52:33 -0500

Seen: 451 times

Last updated: Sep 27