Back to feed
Dev.to
Dev.to
7/21/2026
How to Query Databricks from Salesforce Apex (Without Copying a Billion Rows)

How to Query Databricks from Salesforce Apex (Without Copying a Billion Rows)

Short summary

A detailed tutorial on querying Databricks from Salesforce Apex without copying large datasets, using the Databricks SQL Statement Execution REST API directly. The author covers Named Credentials setup, asynchronous polling for cold warehouses, and four undocumented gotchas including the critical 'Allow Formulas in HTTP Header' checkbox. Includes Apex code for the Databricks client class with statement submission and polling logic.

  • Query Databricks on-demand via REST API instead of syncing billions of rows into Salesforce
  • Configure Named Credentials with custom auth and Bearer token formula for Databricks
  • Four undocumented gotchas including 'Allow Formulas in HTTP Header' checkbox and permission set requirements

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more