Databricks is the lakehouse company, helping data teams solve the world’s toughest problems.
Go to siteimport { axios } from "@pipedream/platform"
export default defineComponent({
props: {
databricks_oauth: {
type: "app",
app: "databricks_oauth",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.databricks_oauth.$auth.domain}.cloud.databricks.com/api/2.0/clusters/list`,
headers: {
Authorization: `Bearer ${this.databricks_oauth.$auth.oauth_access_token}`,
},
})
},
})
Databricks (OAuth - Service Principal) uses OAuth authentication. When you connect your Databricks (OAuth - Service Principal) account, Pipedream will open a popup window where you can sign into Databricks (OAuth - Service Principal) and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Databricks (OAuth - Service Principal) API.
Pipedream requests the following authorization scopes when you connect your account:
all-apis
sql
POST
https://accounts.cloud.databricks.com/oidc/accounts/{{custom_fields.account_id}}/v1/token
content-type: application/x-www-form-urlencoded
accept: application/json
grant_type=client_credentials
&
scope={{oauth.comma_separated_scopes}}
POST
https://accounts.cloud.databricks.com/oidc/accounts/{{custom_fields.account_id}}/v1/token
content-type: application/x-www-form-urlencoded
accept: application/json
grant_type=client_credentials
&
scope={{oauth.comma_separated_scopes}}