turbot/databricks
steampipe plugin install databricks

Table: databricks_compute_policy_family - Query Databricks Compute Policy Families using SQL

Databricks Compute Policy Family is a feature within Databricks that groups related compute policies together. It provides a way to manage and organize compute policies, which are rules that control the usage of Databricks compute resources. Databricks Compute Policy Family helps in maintaining a structured and organized approach to resource allocation and usage within Databricks.

Table Usage Guide

The databricks_compute_policy_family table provides insights into Compute Policy Families within Databricks. As a DevOps engineer or a data administrator, explore compute policy family-specific details through this table, including the name, ID, and member compute policies. Utilize it to understand the organization and management of compute resources in your Databricks environment, and to identify any potential resource allocation issues.

Examples

Basic info

Explore the various policies within your Databricks compute environment to understand their purpose and details. This can help streamline your cloud operations by identifying any unnecessary or outdated policies.

select
policy_family_id,
name,
description,
definition,
account_id
from
databricks_compute_policy_family;
select
policy_family_id,
name,
description,
definition,
account_id
from
databricks_compute_policy_family;

List cluster policies associated with policy family

Explore the association between cluster policies and their respective policy families within your account. This could be useful in identifying and understanding the relationships and dependencies between different policies and families, aiding in efficient policy management.

select
f.policy_family_id,
f.name as policy_family_name,
p.policy_id,
p.name as policy_name,
f.description as policy_family_description,
f.account_id
from
databricks_compute_policy_family f,
databricks_compute_cluster_policy p
where
f.policy_family_id = p.policy_family_id
and f.account_id = p.account_id;
select
f.policy_family_id,
f.name as policy_family_name,
p.policy_id,
p.name as policy_name,
f.description as policy_family_description,
f.account_id
from
databricks_compute_policy_family f,
databricks_compute_cluster_policy p
where
f.policy_family_id = p.policy_family_id
and f.account_id = p.account_id;

Find the account with the most policy families

Identify the account with the highest number of policy families. This can help in understanding which account is utilizing the most resources, aiding in resource management and optimization.

select
account_id,
count(*) as policy_family_count
from
databricks_compute_policy_family
group by
account_id
order by
policy_family_count desc
limit
1;
select
account_id,
count(*) as policy_family_count
from
databricks_compute_policy_family
group by
account_id
order by
policy_family_count desc
limit
1;

Schema for databricks_compute_policy_family

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
account_idtextThe Databricks Account ID in which the resource is located.
definitionjsonbPolicy definition document expressed in Databricks Cluster Policy Definition Language.
descriptiontextHuman-readable description of the purpose of the policy family.
nametextName of the policy family.
policy_family_idtext=ID of the policy family.
titletextThe title of the resource.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- databricks

You can pass the configuration to the command with the --config argument:

steampipe_export_databricks --config '<your_config>' databricks_compute_policy_family