Skip to content

Update Salesforce Connector To Create Source Models#9491

Open
cwarden wants to merge 2 commits into
rilldata:mainfrom
cwarden:update-salesforce-connector
Open

Update Salesforce Connector To Create Source Models#9491
cwarden wants to merge 2 commits into
rilldata:mainfrom
cwarden:update-salesforce-connector

Conversation

@cwarden
Copy link
Copy Markdown
Contributor

@cwarden cwarden commented May 22, 2026

Update the Salesforce driver to create salesforce connectors and source models rather than the deprecated sources. Re-enable it in the Add Data modal.

Update the Salesforce connector to use OAuth Username/Password flow because SOAP login is being decommissioned. Client Credentials and JWT flows are also supported.

Update Salesforce models to use Bulk API 2.0, which doesn't require the sobject property, allowing it to work with the New Model modal.

cwarden added 2 commits May 22, 2026 09:17
The Salesforce connector now uses Salesforce's OAuth 2.0 endpoints
(SOAP login is being decommissioned) and fits the warehouse-style
connector + model flow used by other warehouses.

- Authentication: drop SOAP login; pick between OAuth password flow,
  client credentials flow, and JWT bearer based on which credentials
  are populated. Adds a required `client_secret` for username/password
  authentication.
- Schema: mark Salesforce as a warehouse so credentials are written to
  `connectors/<name>.yaml` and the SOQL query lives in
  `models/<name>.yaml`. The `key` field is uploaded as a file and
  base64-encoded before being stored in `.env` so embedded newlines
  do not break dotenv parsing; the driver accepts raw PEM as well.
- Driver: accepts `sql:` as an alias for `soql:` to match the model
  shape produced by the explorer.
- Bulk API 2.0: replace the v1 query path with `Bulk2QueryJob`. v2
  manages chunking server-side and derives the SObject from the query
  itself, so `sobject:` is no longer a required model property.
- SELECT * rewrite: SOQL does not accept `SELECT *`, but the connector
  explorer's "Table" mode produces it. The driver detects `SELECT * FROM
  <SObject>` (with optional WHERE / ORDER BY / LIMIT), calls
  DescribeSObject, and rewrites the query into an explicit field list.
  Compound `address` / `location` types are skipped — their atomic
  components remain because Salesforce exposes them as their own fields.
- Information schema: implement `ListDatabaseSchemas` / `ListTables` /
  `GetTable` via `force.ListSobjects` and `force.DescribeSObject`, so
  the connector explorer can browse SObjects as tables and clear the
  "does not implement information schema" error.
- Shared auth helpers: extract `connection.authOptions()` and
  `sourceProperties.applyOverrides()` so InformationSchema, Ping, and
  QueryAsFiles all build their auth options the same way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant