Skip to content

Commit ea3cd44

Browse files
Update to templates from 0.279.0 (#134)
* Update all generated templates using Databricks CLI 0.279.0 * Update scripts/update_from_templates.sh to include the `default_minimal` and `pydabs` templates
1 parent 10a9275 commit ea3cd44

Some content is hidden

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

54 files changed

+672
-463
lines changed

dbt_sql/resources/dbt_sql.job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ resources:
2929
environments:
3030
- environment_key: default
3131
spec:
32-
environment_version: "2"
32+
environment_version: "4"
3333
dependencies:
3434
- dbt-databricks>=1.8.0,<2.0.0

default_minimal/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.databricks/
2+
build/
3+
dist/
4+
__pycache__/
5+
*.egg-info
6+
.venv/
7+
scratch/**
8+
!scratch/README.md
9+
**/explorations/**
10+
**/!explorations/README.md
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Typings for Pylance in Visual Studio Code
2+
# see https://github.com/microsoft/pyright/blob/main/docs/builtins.md
3+
from databricks.sdk.runtime import *
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"databricks.databricks",
4+
"redhat.vscode-yaml",
5+
"ms-python.black-formatter"
6+
]
7+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"jupyter.interactiveWindow.cellMarker.codeRegex": "^# COMMAND ----------|^# Databricks notebook source|^(#\\s*%%|#\\s*\\<codecell\\>|#\\s*In\\[\\d*?\\]|#\\s*In\\[ \\])",
3+
"jupyter.interactiveWindow.cellMarker.default": "# COMMAND ----------",
4+
"python.testing.pytestArgs": [
5+
"."
6+
],
7+
"files.exclude": {
8+
"**/*.egg-info": true,
9+
"**/__pycache__": true,
10+
".pytest_cache": true,
11+
"dist": true,
12+
},
13+
"files.associations": {
14+
"**/.gitkeep": "markdown"
15+
},
16+
17+
// Pylance settings (VS Code)
18+
// Set typeCheckingMode to "basic" to enable type checking!
19+
"python.analysis.typeCheckingMode": "off",
20+
"python.analysis.extraPaths": ["src", "lib", "resources"],
21+
"python.analysis.diagnosticMode": "workspace",
22+
"python.analysis.stubPath": ".vscode",
23+
24+
// Pyright settings (Cursor)
25+
// Set typeCheckingMode to "basic" to enable type checking!
26+
"cursorpyright.analysis.typeCheckingMode": "off",
27+
"cursorpyright.analysis.extraPaths": ["src", "lib", "resources"],
28+
"cursorpyright.analysis.diagnosticMode": "workspace",
29+
"cursorpyright.analysis.stubPath": ".vscode",
30+
31+
// General Python settings
32+
"python.defaultInterpreterPath": "./.venv/bin/python",
33+
"python.testing.unittestEnabled": false,
34+
"python.testing.pytestEnabled": true,
35+
"[python]": {
36+
"editor.defaultFormatter": "ms-python.black-formatter",
37+
"editor.formatOnSave": true,
38+
},
39+
}

default_minimal/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# default_minimal
2+
3+
The 'default_minimal' project was generated by using the default-minimal template.
4+
5+
* `src/`: SQL source code for this project.
6+
* `resources/`: Resource configurations (jobs, pipelines, etc.)
7+
8+
## Getting started
9+
10+
Choose how you want to work on this project:
11+
12+
(a) Directly in your Databricks workspace, see
13+
https://docs.databricks.com/dev-tools/bundles/workspace.
14+
15+
(b) Locally with an IDE like Cursor or VS Code, see
16+
https://docs.databricks.com/dev-tools/vscode-ext.html.
17+
18+
(c) With command line tools, see https://docs.databricks.com/dev-tools/cli/databricks-cli.html
19+
20+
If you're developing with an IDE, dependencies for this project should be installed using uv:
21+
22+
* Make sure you have the UV package manager installed.
23+
It's an alternative to tools like pip: https://docs.astral.sh/uv/getting-started/installation/.
24+
* Run `uv sync --dev` to install the project's dependencies.
25+
26+
27+
# Using this project using the CLI
28+
29+
The Databricks workspace and IDE extensions provide a graphical interface for working
30+
with this project. It's also possible to interact with it directly using the CLI:
31+
32+
1. Authenticate to your Databricks workspace, if you have not done so already:
33+
```
34+
$ databricks configure
35+
```
36+
37+
2. To deploy a development copy of this project, type:
38+
```
39+
$ databricks bundle deploy --target dev
40+
```
41+
(Note that "dev" is the default target, so the `--target` parameter
42+
is optional here.)
43+
44+
This deploys everything that's defined for this project.
45+
46+
3. Similarly, to deploy a production copy, type:
47+
```
48+
$ databricks bundle deploy --target prod
49+
```
50+
51+
4. To run a job or pipeline, use the "run" command:
52+
```
53+
$ databricks bundle run
54+
```

default_minimal/databricks.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This is a Databricks asset bundle definition for default_minimal.
2+
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
3+
bundle:
4+
name: default_minimal
5+
uuid: 8127e9c1-adac-4c9c-b006-d3450874f663
6+
7+
include:
8+
- resources/*.yml
9+
- resources/*/*.yml
10+
11+
# Variable declarations. These variables are assigned in the dev/prod targets below.
12+
variables:
13+
catalog:
14+
description: The catalog to use
15+
schema:
16+
description: The schema to use
17+
18+
targets:
19+
dev:
20+
# The default target uses 'mode: development' to create a development copy.
21+
# - Deployed resources get prefixed with '[dev my_user_name]'
22+
# - Any job schedules and triggers are paused by default.
23+
# See also https://docs.databricks.com/dev-tools/bundles/deployment-modes.html.
24+
mode: development
25+
default: true
26+
workspace:
27+
host: https://company.databricks.com
28+
variables:
29+
catalog: catalog
30+
schema: ${workspace.current_user.short_name}
31+
prod:
32+
mode: production
33+
workspace:
34+
host: https://company.databricks.com
35+
# We explicitly deploy to /Workspace/Users/[email protected] to make sure we only have a single copy.
36+
root_path: /Workspace/Users/[email protected]/.bundle/${bundle.name}/${bundle.target}
37+
variables:
38+
catalog: catalog
39+
schema: prod
40+
permissions:
41+
- user_name: [email protected]
42+
level: CAN_MANAGE

default_minimal/resources/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

default_minimal/src/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

default_python/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ __pycache__/
66
.venv/
77
scratch/**
88
!scratch/README.md
9+
**/explorations/**
10+
**/!explorations/README.md

0 commit comments

Comments
 (0)