Cloudability Connect Databricks
You can connect your Databricks account to Cloudability to enable the ingestion of cost and usage data. This integration is intended to be used only for Databricks on AWS and Databricks on GCP. If you are using Azure Databricks, you will have sufficient data granularity in your Azure billing data.
It takes 4 to 24 hours before your initial cost and usage data appears in Cloudability. During this time, a message indicates that the process is yet to complete.
Summary of the integration
This integration requires users to set up a Unity Catalog, enable a Workspace & System Schema and create a Service Principal User that will have access to the catalog, schema, and table. Users also need to create a SQL Warehouse, that can be used by the Service Principal User to run it, based on the notebook downloaded in the Credentials UI. This notebook must run once every day to pull Databricks costs and usage data. Cloudability does not have access to your custom discounts with Databricks, so we have added an option to input that information in the credentialing UI so that we can factor this discount into the costs we display.
Databricks recommends using a service principal identity for automated tools, jobs, and applications. We ask you to create one for this integration, as we are automating the process of usage and billing monitoring.
It If you are purchasing Databricks via a cloud provider marketplace and adding cost and usage data for Snowflake with this integration, you will see costs displayed twice in Cloudability reporting. As an example, if you purchased Snowflake via the AWS Marketplace, you would have:
-
The high-level line item for AWS.
-
The line items with detailed Snowflake costs and AWS Marketplace listed as Seller.
You will need to set up filters or views to hide your Marketplace costs. Marketplace costs are excluded from billing.
Before you start
-
You are a Cloudability administrator.
-
You are a Databricks Account admin to manage OAuth credentials for the service principals.
Steps for integration
Integration Pre-requisites
-
Set Up Unity Catalog. Click https://docs.databricks.com/en/data-governance/unity-catalog/get-started.html .
-
Enable a Workspace for Unity Catalog. Click https://docs.databricks.com/en/data-governance/unity-catalog/enable-workspaces.html .
-
Enable System Schema in Unity Catalog.
Click https://docs.databricks.com/api/azure/workspace/systemschemas/enable
-
Create a Service Principal User at account level. Click https://docs.databricks.com/en/admin/users-groups/service-principals.html#add-service-principals-to-your-account-using-the-account-consol .
Save the Client Id and Secret of the Service Principal.
-
Add Service Principal to Unity Catalog Enabled Workspace. Click https://docs.databricks.com/en/admin/users-groups/service-principals.html#add-a-service-principal-to-a-workspace-using-the-workspace-admin-settings .
-
Download Notebook from credentials page and run it and schedule a job to run it once everyday.
-
Grant Service Principal the privilege on the newly created catalog, schema and table. Click https://docs.databricks.com/en/data-governance/unity-catalog/manage-privileges/index.html#manage-privileges-in-unity-catalog .
-
Create an SQL warehouse, Click https://docs.databricks.com/en/compute/sql-warehouse/create.html .
SQL Warehouse should be serverless.
-
Grant Service Principal the permission to use SQL Warehouse. Click https://docs.databricks.com/en/compute/sql-warehouse/create.html#manage-a-sql-warehouse .
-
The downloaded notebook must run once every day.
Create a Service Principal
- As an account admin, log in to the account console.
- Click User Management .
- On the Service Principals tab, click Add Service Principal .
- Enter a name for the service principal.
- Click Add .
- As an account admin, log in to the account console.
- Click User Management .
- On the S ervice Principals tab, select your service principal.
- Click the Roles tab.
- Opt in for Account Admin role
- As an account admin, log in to the account console.
- Click User Management .
- On the Service Principals tab, select your service principal.
- Under OAuth Secrets , click Generate Secret .
- Copy the displayed Secret and Client ID , and then click Done.
- Log in to the workspace.
- Click User Management .
- Select Settings .
- Click Identity and access .
- Click Manage in Service principals.
- Click Add Service Principal.
- Add the service principal.
- Click SQL Warehouse .
- For the warehouse to be used in querying, click on the warehouse.
- Click Permissions .
- Add Service Principal with the Can Use permission.
- Click on the catalog.
- Click the catalog name, for which permissions need to be given.
- Click Permissions .
- Click Grant .
- Select the Principals.
- Select USE CATALOG , USE SCHEMA , and SELECT under Privileges .
- Click Grant .
Private links are not yet supported for Databricks.