-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Salesforce Connector #3747
Add Salesforce Connector #3747
Conversation
Hey @cwarden Thanks a lot for working on this. Thank you and looking forward to contribute on this with you. |
I'm using the force cli library, which I maintain. It's grown out of the command-line tool and some of the code dates back to Go 1.1 so there are some rough edges, but it has been heavily used. I plan to clean up the authentication in this PR so it doesn't use a credential store. I'm not sure if it makes sense to move some of the Bulk API handling into the library, but I'm open to suggestions. |
1366eff
to
918e235
Compare
Add Salesforce connector supporting the FileIterator interface using the Bulk API with CSV jobs. Each source requires a SOQL Query and SObject name. Credentials can be provided for the source or the connector. Username/password and JWT authentication is supported. Each bulk job batch result is retrieved as a single CSV file for rill to ingest.
2bb4100
to
076e93a
Compare
Update error strings to be lowercase for consistency with existing convention.
Update salesforce.authenticate method to return an error if there is no Connected App client id defined.
Remove Authenticable interface and forceProvider implementation. For force functions directly.
JwtAssertionForEndpoint takes a file containing the signing key for creating a JWT assertion. Write the configured key to a temp file.
Use force.Force directly.
Thanks for the thorough code review, @k-anshul. You're seeing some of the artifacts of this code being extracted from an existing application, such as the interfaces that were used to facilitate testing. |
Short-circuit and return default endpoint if no endpoint is defined. Make code clearer when scheme is missing from the endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @cwarden LGTM
I will also let @begelundmuller take a look at this.
Two things:
- I discovered that whenever I am submitting an incorrect query, the application gets stuck. Could you please take a look at this ? Sample incorrect query :
SELECT Id, IsDeleted, Name, Type, ParentId, Rating, Site FROM Account WHERE Rating is not null
- Would you also be interested in adding docs for the connector ? It can also be taken up in a separate PR. PR for reference : https://github.com/rilldata/rill/pull/3147/files
If the query is invalid and the initial PK chunking batch fails, return an error.
Fixed in d82fb1f.
Added in 8951aec. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Checklist
Summary
Issue addressed:
Use Salesforce Bulk API as a source.
Details:
Add Salesforce connector supporting the FileIterator interface using the Bulk API with CSV jobs.
Each source requires a SOQL Query and SObject name.
Credentials can be provided for the source or the connector.
Each bulk job batch is retrieved as a single CSV file for rill to ingest.
Steps to Verify