Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,33 @@ jobs:
if [ $PROVIDER == "root" ]; then
echo "adding vanity url redirects to _redirects file.."
touch ./build/_redirects
array=( aws azure azure-extras azure-isv azure-stack digitalocean firebase confluent github openai anthropic google googleadmin k8s linode netlify okta sumologic vercel godaddy pagerduty homebrew datadog )
array=(
aws
azure
azure-extras
azure-isv
azure-stack
digitalocean
firebase
confluent
databricks-account
databricks-workspace
github
openai
anthropic
google
googleadmin
k8s
linode
netlify
okta
sumologic
vercel
godaddy
pagerduty
homebrew
datadog
)
for i in "${array[@]}"
do
echo "adding redirects for $i"
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ This repository contains documentation for StackQL providers, which is published
| Netlify Deploy OpenAI | [![Netlify Status](https://api.netlify.com/api/v1/badges/6df5743b-8c5d-4949-866e-eda4ca3f74d0/deploy-status)](https://app.netlify.com/sites/stackql-openai-docs/deploys) | [openai-docs.stackql.io](https://openai-docs.stackql.io)<br/>[openai.stackql.io](https://openai.stackql.io) |
| Netlify Deploy Anthropic | [![Netlify Status](https://api.netlify.com/api/v1/badges/114c5a2a-9b76-4941-a0e8-3669ee7d2016/deploy-status)](https://app.netlify.com/sites/stackql-anthropic-docs/deploys) | [anthropic-docs.stackql.io](https://anthropic-docs.stackql.io)<br/>[anthropic.stackql.io](https://anthropic.stackql.io) |
| Netlify Deploy Confluent | [![Netlify Status](https://api.netlify.com/api/v1/badges/63149c2f-6c3d-43f1-be38-80c55c223ac0/deploy-status)](https://app.netlify.com/sites/stackql-confluent-docs/deploys) | [confluent-docs.stackql.io](https://confluent-docs.stackql.io)<br/>[confluent.stackql.io](https://confluent.stackql.io) |
| Netlify Deploy Databricks Account | [![Netlify Status](https://api.netlify.com/api/v1/badges/9250b360-9e36-49dd-8cc8-b8cbe2f8d983/deploy-status)](https://app.netlify.com/sites/stackql-databricks-account-docs/deploys) | [databricks-account-docs.stackql.io](https://databricks-account-docs.stackql.io)<br/>[databricks-account.stackql.io](https://databricks-account.stackql.io) |
| Netlify Deploy Databricks Workspace | [![Netlify Status](https://api.netlify.com/api/v1/badges/7456d122-1d4a-445c-b410-7a9aa1bd3f05/deploy-status)](https://app.netlify.com/sites/stackql-databricks-workspace-docs/deploys) | [databricks-workspace-docs.stackql.io](https://databricks-workspace-docs.stackql.io)<br/>[databricks-workspace.stackql.io](https://databricks-workspace.stackql.io) |

## Adding Docs for a New Provider

Adding docs for a new provider requires creating a new web property (subdomain) and will force an update to the root/base site and all other providers. The steps are:

- [ ] update `scripts/docgen/provider_data.py` with metadata for new provider
- [ ] generate docs for provider using `cd scripts; sh docgen.sh {provider}`
- [ ] publish docs for provider using `cd scripts; sh publish.sh {provider}`
- [ ] update `scripts/docgen/provider_data.py` with metadata for new provider (not applicable if docs are built elsewhere)
- [ ] generate docs for provider using `cd scripts; sh docgen.sh {provider}` (not applicable if docs are built elsewhere)
- [ ] publish docs for provider using `cd scripts; sh publish.sh {provider}` (not applicable if docs are built elsewhere)
- [x] add the new provider docs to `docs/{provider}-docs` (following directory structure of existing providers) (done automatically by `scripts/publish.sh`)
- [x] update frontmatter in the `index.md` at the root of the new providers docs, set `slug` to `/providers/{provider}` and `id` to `{provider}-doc` (done automatically by `scripts/docgen.sh`)
- [x] update `stackql-provider-registry.mdx` in the root of the new provider to add the `currentProvider` prop, e.g. `<RegistryPage currentProvider="okta" />` (done automatically by `scripts/docgen.sh`)
Expand Down
2 changes: 2 additions & 0 deletions ci-scripts/get-providers-to-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const allProviders = [
'firebase',
'github',
'confluent',
'databricks_account',
'databricks_workspace',
'openai',
'anthropic',
'google',
Expand Down
67 changes: 67 additions & 0 deletions docs/databricks_account-docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: databricks_account
hide_title: false
hide_table_of_contents: false
keywords:
- databricks
- databricks_account
- stackql
- infrastructure-as-code
- configuration-as-data
- cloud inventory
description: Query, deploy and manage Databricks resources using SQL
custom_edit_url: null
image: /img/providers/databricks_account/stackql-databricks-provider-featured-image.png
id: databricks_account-doc
slug: /providers/databricks_account
---

import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';

Services from Databricks.

:::info Provider Summary

<div class="row">
<div class="providerDocColumn">
<span>total services:&nbsp;<b>7</b></span><br />
<span>total resources:&nbsp;<b>31</b></span><br />
<span>total methods:&nbsp;<b>111</b></span><br />
</div>
</div>

:::

See also:
[[` SHOW `]](https://stackql.io/docs/language-spec/show) [[` DESCRIBE `]](https://stackql.io/docs/language-spec/describe) [[` REGISTRY `]](https://stackql.io/docs/language-spec/registry)
* * *

## Installation
```bash
REGISTRY PULL databricks_account;
```

## Authentication

To use the databricks_account, set the following environment variables:

- <CopyableCode code="DATABRICKS_ACCOUNT_ID" /> - a uuid representing your Databricks account id, you can get this from the Databricks UI (see <a href="https://docs.databricks.com/en/admin/account-settings/index.html#locate-your-account-id">Locate your account id</a>)
- <CopyableCode code="DATABRICKS_CLIENT_ID" /> - obtained after creating a service principal through the Databricks UI (see <a href="https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html">Authenticate access to Databricks with a service principal using OAuth</a>)
- <CopyableCode code="DATABRICKS_CLIENT_SECRET" /> - obtained after creating a service principal secret through the Databricks UI, using the "Generate Secret" function (see <a href="https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html">Authenticate access to Databricks with a service principal using OAuth</a>)

These are the same variables that Terraform, the Databricks SDKs, and CLI use.

## Services
<div class="row">
<div class="providerDocColumn">
<a href="/providers/databricks_account/billing/">billing</a><br />
<a href="/providers/databricks_account/iam/">iam</a><br />
<a href="/providers/databricks_account/logging/">logging</a><br />
<a href="/providers/databricks_account/oauth/">oauth</a><br />
</div>
<div class="providerDocColumn">
<a href="/providers/databricks_account/provisioning/">provisioning</a><br />
<a href="/providers/databricks_account/settings/">settings</a><br />
<a href="/providers/databricks_account/unity_catalog/">unity_catalog</a><br />
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: billable_usage
hide_title: false
hide_table_of_contents: false
keywords:
- Databricks
- billable_usage
- billing
- databricks_account
- stackql
- infrastructure-as-code
- configuration-as-data
- cloud inventory
description: Query, deploy and manage Databricks resources using SQL
custom_edit_url: null
image: /img/providers/databricks_account/stackql-databricks-provider-featured-image.png
---

import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Operations on a <code>billable_usage</code> resource.

## Overview
<table><tbody>
<tr><td><b>Name</b></td><td><code>billable_usage</code></td></tr>
<tr><td><b>Type</b></td><td>Resource</td></tr>
<tr><td><b>Id</b></td><td><CopyableCode code="databricks_account.billing.billable_usage" /></td></tr>
</tbody></table>


`SELECT` not supported for this resource, see the methods section for supported operations.
## Methods
| Name | Accessible by | Required Params | Description |
|:-----|:--------------|:----------------|:------------|
| <CopyableCode code="download" /> | `EXEC` | <CopyableCode code="account_id, end_month, start_month" /> | Returns billable usage logs in CSV format for the specified account and date range. For the data schema, see |
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
---
title: budgets
hide_title: false
hide_table_of_contents: false
keywords:
- Databricks
- budgets
- billing
- databricks_account
- stackql
- infrastructure-as-code
- configuration-as-data
- cloud inventory
description: Query, deploy and manage Databricks resources using SQL
custom_edit_url: null
image: /img/providers/databricks_account/stackql-databricks-provider-featured-image.png
---

import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Operations on a <code>budgets</code> resource.

## Overview
<table><tbody>
<tr><td><b>Name</b></td><td><code>budgets</code></td></tr>
<tr><td><b>Type</b></td><td>Resource</td></tr>
<tr><td><b>Id</b></td><td><CopyableCode code="databricks_account.billing.budgets" /></td></tr>
</tbody></table>

## Fields
| Name | Datatype |
|:-----|:---------|
| <CopyableCode code="account_id" /> | `string` |
| <CopyableCode code="alert_configurations" /> | `array` |
| <CopyableCode code="budget_configuration_id" /> | `string` |
| <CopyableCode code="create_time" /> | `integer` |
| <CopyableCode code="display_name" /> | `string` |
| <CopyableCode code="filter" /> | `object` |
| <CopyableCode code="update_time" /> | `integer` |

## Methods
| Name | Accessible by | Required Params | Description |
|:-----|:--------------|:----------------|:------------|
| <CopyableCode code="get" /> | `SELECT` | <CopyableCode code="account_id, budget_id" /> | Gets a budget configuration for an account. Both account and budget configuration are specified by ID. |
| <CopyableCode code="list" /> | `SELECT` | <CopyableCode code="account_id" /> | Gets all budgets associated with this account. |
| <CopyableCode code="create" /> | `INSERT` | <CopyableCode code="account_id" /> | Create a new budget configuration for an account. For full details, see |
| <CopyableCode code="delete" /> | `DELETE` | <CopyableCode code="account_id, budget_id" /> | Deletes a budget configuration for an account. Both account and budget configuration are specified by ID. This cannot be undone. |
| <CopyableCode code="update" /> | `REPLACE` | <CopyableCode code="account_id, budget_id" /> | Updates a budget configuration for an account. Both account and budget configuration are specified by ID. |

## `SELECT` examples

<Tabs
defaultValue="list"
values={[
{ label: 'budgets (list)', value: 'list' },
{ label: 'budgets (get)', value: 'get' }
]
}>
<TabItem value="list">

```sql
SELECT
account_id,
alert_configurations,
budget_configuration_id,
create_time,
display_name,
filter,
update_time
FROM databricks_account.billing.budgets
WHERE account_id = '{{ account_id }}';
```

</TabItem>
<TabItem value="get">

```sql
SELECT
account_id,
alert_configurations,
budget_configuration_id,
create_time,
display_name,
filter,
update_time
FROM databricks_account.billing.budgets
WHERE account_id = '{{ account_id }}' AND
budget_id = '{{ budget_id }}';
```

</TabItem>
</Tabs>

## `INSERT` example

Use the following StackQL query and manifest file to create a new <code>budgets</code> resource.

<Tabs
defaultValue="create"
values={[
{ label: 'budgets', value: 'create', },
{ label: 'Manifest', value: 'manifest', },
]}
>
<TabItem value="create">

```sql
/*+ create */
INSERT INTO databricks_account.billing.budgets (
account_id,
data__budget
)
SELECT
'{{ account_id }}',
'{{ budget }}'
;
```

</TabItem>
<TabItem value="manifest">

```yaml
- name: your_resource_model_name
props:
- name: budget
value:
account_id: 449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65
alert_configurations:
- time_period: MONTH
trigger_type: CUMULATIVE_SPENDING_EXCEEDED
quantity_type: LIST_PRICE_DOLLARS_USD
quantity_threshold: string
action_configurations:
- action_type: EMAIL_NOTIFICATION
target: string
filter:
workspace_id:
operator: IN
values:
- 0
tags:
- key: string
value:
operator: IN
values:
- string
display_name: string

```

</TabItem>
</Tabs>

## `REPLACE` example

Replaces a <code>budgets</code> resource.

```sql
/*+ update */
REPLACE databricks_account.billing.budgets
SET { field = value }
WHERE account_id = '{{ account_id }}' AND
budget_id = '{{ budget_id }}';
```

## `DELETE` example

Deletes a <code>budgets</code> resource.

```sql
/*+ delete */
DELETE FROM databricks_account.billing.budgets
WHERE account_id = '{{ account_id }}' AND
budget_id = '{{ budget_id }}';
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: billing
hide_title: false
hide_table_of_contents: false
keywords:
- Databricks
- billing
- databricks_account
- stackql
- infrastructure-as-code
- configuration-as-data
- cloud inventory
description: Query, deploy and manage Databricks resources using SQL
custom_edit_url: null
image: /img/providers/databricks_account/stackql-databricks-provider-featured-image.png
---

__`billing`__ service documentation.

:::info Service Summary

<div class="row">
<div class="providerDocColumn">
<span>total resources:&nbsp;<b>3</b></span><br />
</div>
</div>

:::

## Resources
<div class="row">
<div class="providerDocColumn">
<a href="/providers/databricks_account/billing/billable_usage/">billable_usage</a><br />
<a href="/providers/databricks_account/billing/budgets/">budgets</a><br />
</div>
<div class="providerDocColumn">
<a href="/providers/databricks_account/billing/usage_dashboards/">usage_dashboards</a><br />
</div>
</div>
Loading