Skip to content

Commit f0b721f

Browse files
authored
Merge pull request #219 from stackql/feature/provider-docs
Feature/provider docs
2 parents 015681f + d8c12b3 commit f0b721f

File tree

255 files changed

+26057
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+26057
-6
lines changed

.github/workflows/build-docs.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,33 @@ jobs:
7878
if [ $PROVIDER == "root" ]; then
7979
echo "adding vanity url redirects to _redirects file.."
8080
touch ./build/_redirects
81-
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 )
81+
array=(
82+
aws
83+
azure
84+
azure-extras
85+
azure-isv
86+
azure-stack
87+
digitalocean
88+
firebase
89+
confluent
90+
databricks-account
91+
databricks-workspace
92+
github
93+
openai
94+
anthropic
95+
google
96+
googleadmin
97+
k8s
98+
linode
99+
netlify
100+
okta
101+
sumologic
102+
vercel
103+
godaddy
104+
pagerduty
105+
homebrew
106+
datadog
107+
)
82108
for i in "${array[@]}"
83109
do
84110
echo "adding redirects for $i"

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ This repository contains documentation for StackQL providers, which is published
3030
| 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) |
3131
| 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) |
3232
| 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) |
33+
| 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) |
34+
| 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) |
3335

3436
## Adding Docs for a New Provider
3537

3638
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:
3739

38-
- [ ] update `scripts/docgen/provider_data.py` with metadata for new provider
39-
- [ ] generate docs for provider using `cd scripts; sh docgen.sh {provider}`
40-
- [ ] publish docs for provider using `cd scripts; sh publish.sh {provider}`
40+
- [ ] update `scripts/docgen/provider_data.py` with metadata for new provider (not applicable if docs are built elsewhere)
41+
- [ ] generate docs for provider using `cd scripts; sh docgen.sh {provider}` (not applicable if docs are built elsewhere)
42+
- [ ] publish docs for provider using `cd scripts; sh publish.sh {provider}` (not applicable if docs are built elsewhere)
4143
- [x] add the new provider docs to `docs/{provider}-docs` (following directory structure of existing providers) (done automatically by `scripts/publish.sh`)
4244
- [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`)
4345
- [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`)

ci-scripts/get-providers-to-deploy.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ const allProviders = [
1616
'firebase',
1717
'github',
1818
'confluent',
19+
'databricks_account',
20+
'databricks_workspace',
1921
'openai',
2022
'anthropic',
2123
'google',

docs/databricks_account-docs/index.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
title: databricks_account
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- databricks
7+
- databricks_account
8+
- stackql
9+
- infrastructure-as-code
10+
- configuration-as-data
11+
- cloud inventory
12+
description: Query, deploy and manage Databricks resources using SQL
13+
custom_edit_url: null
14+
image: /img/providers/databricks_account/stackql-databricks-provider-featured-image.png
15+
id: databricks_account-doc
16+
slug: /providers/databricks_account
17+
---
18+
19+
import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
20+
21+
Services from Databricks.
22+
23+
:::info Provider Summary
24+
25+
<div class="row">
26+
<div class="providerDocColumn">
27+
<span>total services:&nbsp;<b>7</b></span><br />
28+
<span>total resources:&nbsp;<b>31</b></span><br />
29+
<span>total methods:&nbsp;<b>111</b></span><br />
30+
</div>
31+
</div>
32+
33+
:::
34+
35+
See also:
36+
[[` SHOW `]](https://stackql.io/docs/language-spec/show) [[` DESCRIBE `]](https://stackql.io/docs/language-spec/describe) [[` REGISTRY `]](https://stackql.io/docs/language-spec/registry)
37+
* * *
38+
39+
## Installation
40+
```bash
41+
REGISTRY PULL databricks_account;
42+
```
43+
44+
## Authentication
45+
46+
To use the databricks_account, set the following environment variables:
47+
48+
- <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>)
49+
- <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>)
50+
- <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>)
51+
52+
These are the same variables that Terraform, the Databricks SDKs, and CLI use.
53+
54+
## Services
55+
<div class="row">
56+
<div class="providerDocColumn">
57+
<a href="/providers/databricks_account/billing/">billing</a><br />
58+
<a href="/providers/databricks_account/iam/">iam</a><br />
59+
<a href="/providers/databricks_account/logging/">logging</a><br />
60+
<a href="/providers/databricks_account/oauth/">oauth</a><br />
61+
</div>
62+
<div class="providerDocColumn">
63+
<a href="/providers/databricks_account/provisioning/">provisioning</a><br />
64+
<a href="/providers/databricks_account/settings/">settings</a><br />
65+
<a href="/providers/databricks_account/unity_catalog/">unity_catalog</a><br />
66+
</div>
67+
</div>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: billable_usage
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- Databricks
7+
- billable_usage
8+
- billing
9+
- databricks_account
10+
- stackql
11+
- infrastructure-as-code
12+
- configuration-as-data
13+
- cloud inventory
14+
description: Query, deploy and manage Databricks resources using SQL
15+
custom_edit_url: null
16+
image: /img/providers/databricks_account/stackql-databricks-provider-featured-image.png
17+
---
18+
19+
import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
20+
import Tabs from '@theme/Tabs';
21+
import TabItem from '@theme/TabItem';
22+
23+
Operations on a <code>billable_usage</code> resource.
24+
25+
## Overview
26+
<table><tbody>
27+
<tr><td><b>Name</b></td><td><code>billable_usage</code></td></tr>
28+
<tr><td><b>Type</b></td><td>Resource</td></tr>
29+
<tr><td><b>Id</b></td><td><CopyableCode code="databricks_account.billing.billable_usage" /></td></tr>
30+
</tbody></table>
31+
32+
33+
`SELECT` not supported for this resource, see the methods section for supported operations.
34+
## Methods
35+
| Name | Accessible by | Required Params | Description |
36+
|:-----|:--------------|:----------------|:------------|
37+
| <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 |
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
---
2+
title: budgets
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- Databricks
7+
- budgets
8+
- billing
9+
- databricks_account
10+
- stackql
11+
- infrastructure-as-code
12+
- configuration-as-data
13+
- cloud inventory
14+
description: Query, deploy and manage Databricks resources using SQL
15+
custom_edit_url: null
16+
image: /img/providers/databricks_account/stackql-databricks-provider-featured-image.png
17+
---
18+
19+
import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
20+
import Tabs from '@theme/Tabs';
21+
import TabItem from '@theme/TabItem';
22+
23+
Operations on a <code>budgets</code> resource.
24+
25+
## Overview
26+
<table><tbody>
27+
<tr><td><b>Name</b></td><td><code>budgets</code></td></tr>
28+
<tr><td><b>Type</b></td><td>Resource</td></tr>
29+
<tr><td><b>Id</b></td><td><CopyableCode code="databricks_account.billing.budgets" /></td></tr>
30+
</tbody></table>
31+
32+
## Fields
33+
| Name | Datatype |
34+
|:-----|:---------|
35+
| <CopyableCode code="account_id" /> | `string` |
36+
| <CopyableCode code="alert_configurations" /> | `array` |
37+
| <CopyableCode code="budget_configuration_id" /> | `string` |
38+
| <CopyableCode code="create_time" /> | `integer` |
39+
| <CopyableCode code="display_name" /> | `string` |
40+
| <CopyableCode code="filter" /> | `object` |
41+
| <CopyableCode code="update_time" /> | `integer` |
42+
43+
## Methods
44+
| Name | Accessible by | Required Params | Description |
45+
|:-----|:--------------|:----------------|:------------|
46+
| <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. |
47+
| <CopyableCode code="list" /> | `SELECT` | <CopyableCode code="account_id" /> | Gets all budgets associated with this account. |
48+
| <CopyableCode code="create" /> | `INSERT` | <CopyableCode code="account_id" /> | Create a new budget configuration for an account. For full details, see |
49+
| <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. |
50+
| <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. |
51+
52+
## `SELECT` examples
53+
54+
<Tabs
55+
defaultValue="list"
56+
values={[
57+
{ label: 'budgets (list)', value: 'list' },
58+
{ label: 'budgets (get)', value: 'get' }
59+
]
60+
}>
61+
<TabItem value="list">
62+
63+
```sql
64+
SELECT
65+
account_id,
66+
alert_configurations,
67+
budget_configuration_id,
68+
create_time,
69+
display_name,
70+
filter,
71+
update_time
72+
FROM databricks_account.billing.budgets
73+
WHERE account_id = '{{ account_id }}';
74+
```
75+
76+
</TabItem>
77+
<TabItem value="get">
78+
79+
```sql
80+
SELECT
81+
account_id,
82+
alert_configurations,
83+
budget_configuration_id,
84+
create_time,
85+
display_name,
86+
filter,
87+
update_time
88+
FROM databricks_account.billing.budgets
89+
WHERE account_id = '{{ account_id }}' AND
90+
budget_id = '{{ budget_id }}';
91+
```
92+
93+
</TabItem>
94+
</Tabs>
95+
96+
## `INSERT` example
97+
98+
Use the following StackQL query and manifest file to create a new <code>budgets</code> resource.
99+
100+
<Tabs
101+
defaultValue="create"
102+
values={[
103+
{ label: 'budgets', value: 'create', },
104+
{ label: 'Manifest', value: 'manifest', },
105+
]}
106+
>
107+
<TabItem value="create">
108+
109+
```sql
110+
/*+ create */
111+
INSERT INTO databricks_account.billing.budgets (
112+
account_id,
113+
data__budget
114+
)
115+
SELECT
116+
'{{ account_id }}',
117+
'{{ budget }}'
118+
;
119+
```
120+
121+
</TabItem>
122+
<TabItem value="manifest">
123+
124+
```yaml
125+
- name: your_resource_model_name
126+
props:
127+
- name: budget
128+
value:
129+
account_id: 449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65
130+
alert_configurations:
131+
- time_period: MONTH
132+
trigger_type: CUMULATIVE_SPENDING_EXCEEDED
133+
quantity_type: LIST_PRICE_DOLLARS_USD
134+
quantity_threshold: string
135+
action_configurations:
136+
- action_type: EMAIL_NOTIFICATION
137+
target: string
138+
filter:
139+
workspace_id:
140+
operator: IN
141+
values:
142+
- 0
143+
tags:
144+
- key: string
145+
value:
146+
operator: IN
147+
values:
148+
- string
149+
display_name: string
150+
151+
```
152+
153+
</TabItem>
154+
</Tabs>
155+
156+
## `REPLACE` example
157+
158+
Replaces a <code>budgets</code> resource.
159+
160+
```sql
161+
/*+ update */
162+
REPLACE databricks_account.billing.budgets
163+
SET { field = value }
164+
WHERE account_id = '{{ account_id }}' AND
165+
budget_id = '{{ budget_id }}';
166+
```
167+
168+
## `DELETE` example
169+
170+
Deletes a <code>budgets</code> resource.
171+
172+
```sql
173+
/*+ delete */
174+
DELETE FROM databricks_account.billing.budgets
175+
WHERE account_id = '{{ account_id }}' AND
176+
budget_id = '{{ budget_id }}';
177+
```
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: billing
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- Databricks
7+
- billing
8+
- databricks_account
9+
- stackql
10+
- infrastructure-as-code
11+
- configuration-as-data
12+
- cloud inventory
13+
description: Query, deploy and manage Databricks resources using SQL
14+
custom_edit_url: null
15+
image: /img/providers/databricks_account/stackql-databricks-provider-featured-image.png
16+
---
17+
18+
__`billing`__ service documentation.
19+
20+
:::info Service Summary
21+
22+
<div class="row">
23+
<div class="providerDocColumn">
24+
<span>total resources:&nbsp;<b>3</b></span><br />
25+
</div>
26+
</div>
27+
28+
:::
29+
30+
## Resources
31+
<div class="row">
32+
<div class="providerDocColumn">
33+
<a href="/providers/databricks_account/billing/billable_usage/">billable_usage</a><br />
34+
<a href="/providers/databricks_account/billing/budgets/">budgets</a><br />
35+
</div>
36+
<div class="providerDocColumn">
37+
<a href="/providers/databricks_account/billing/usage_dashboards/">usage_dashboards</a><br />
38+
</div>
39+
</div>

0 commit comments

Comments
 (0)