-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Salesforce Connector 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. * Improve Readability With Whitespace * Lowercase Error Strings Update error strings to be lowercase for consistency with existing convention. * Error If No Client Id When Authenticating Update salesforce.authenticate method to return an error if there is no Connected App client id defined. * Remove Authenticable Interface Remove Authenticable interface and forceProvider implementation. For force functions directly. * Fix Call to force.JwtAssertionForEndpoint JwtAssertionForEndpoint takes a file containing the signing key for creating a JWT assertion. Write the configured key to a temp file. * Simplify Missing Username Error Handling * Add Tests for endpoint Function * Remove Forceable Interface Use force.Force directly. * Replace Deprecated iotuil.TempFile with os.CreateTemp * Simplify endpoint() Short-circuit and return default endpoint if no endpoint is defined. Make code clearer when scheme is missing from the endpoint. * Return Error If Bulk Query Fails If the query is invalid and the initial PK chunking batch fails, return an error. * Add Documentation For Configuring Salesforce Credentials
- Loading branch information
Showing
14 changed files
with
1,018 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: Salesforce | ||
description: Connect to data in a Salesforce org using the Bulk API | ||
sidebar_label: Salesforce | ||
sidebar_position: 80 | ||
--- | ||
|
||
<!-- WARNING: There are links to this page in source code. If you move it, find and replace the links and consider adding a redirect in docusaurus.config.js. --> | ||
|
||
## How to configure credentials in Rill | ||
|
||
Rill utilizes a Salesforce username along with a password (and token, depending | ||
on org configuration) to authenticate against a Salesforce org. | ||
|
||
### Configure credentials for local development | ||
|
||
When working on a local project, you have the option to specify credentials when running Rill using the `--env` flag. | ||
An example of using this syntax in terminal: | ||
``` | ||
rill start --env connector.salesforce.username="[email protected]" --env connector.salesforce.password="MyPasswordMyToken" | ||
``` | ||
|
||
Alternatively, you can include the credentials string directly in the source code by adding the `username` and `password` parameters. | ||
An example of a source using this approach: | ||
``` | ||
type: "salesforce" | ||
endpoint: "login.salesforce.com" | ||
username: "[email protected]" | ||
password: "MyPasswordMyToken" | ||
soql: "SELECT Id, Name, CreatedDate FROM Opportunity" | ||
sobject: "Opportunity" | ||
``` | ||
This approach is less recommended because it places the connection string (which may contain sensitive information like passwords) in the source file, which is committed to Git. For more information, please refer to the documentation on [sources](../../reference/project-files/index.md). | ||
|
||
### Configure credentials for deployments on Rill Cloud | ||
|
||
Once a project having a Salesforce source has been deployed using `rill deploy`, Rill requires you to explicitly provide the credentials using following command: | ||
``` | ||
rill env configure | ||
``` | ||
Note that you must `cd` into the Git repository that your project was deployed from before running `rill env configure`. | ||
|
||
Leave `key` and `client_id` blank unless using JWT as described below. | ||
|
||
### JWT | ||
|
||
Authentication using JWT instead of a password is also supported by setting | ||
`client_id` to the Client Id (also known as Consumer Key) of the Connected App | ||
to use, and setting `key` to contain the PEM-formatted private key to use for | ||
signing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
2a71b2b
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.
🎉 Published on https://ui.rilldata.in as production
🚀 Deployed on https://65a54eab94e2721c0be18137--rill-ui-dev.netlify.app