Skip to content

Commit a7bf6cd

Browse files
Update to templates from CLI 0.295.0 (#147)
Update all generated templates using Databricks CLI 0.295.0. Also updates scripts/update_from_templates.sh to use the standardized personal_schemas enum values.
1 parent 16d8874 commit a7bf6cd

28 files changed

Lines changed: 48 additions & 53 deletions

File tree

dbt_sql/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# dbt_sql
22

33
The 'dbt_sql' project was generated by using the dbt template for
4-
Databricks Asset Bundles. It follows the standard dbt project structure
4+
Declarative Automation Bundles. It follows the standard dbt project structure
55
and has an additional `resources` directory to define Databricks resources such as jobs
66
that run dbt models.
77

88
* Learn more about dbt and its standard project structure here: https://docs.getdbt.com/docs/build/projects.
9-
* Learn more about Databricks Asset Bundles here: https://docs.databricks.com/en/dev-tools/bundles/index.html
9+
* Learn more about Declarative Automation Bundles here: https://docs.databricks.com/en/dev-tools/bundles/index.html
1010

1111
The remainder of this file includes instructions for local development (using dbt)
12-
and deployment to production (using Databricks Asset Bundles).
12+
and deployment to production (using Declarative Automation Bundles).
1313

1414
## Development setup
1515

@@ -88,20 +88,20 @@ $ dbt test
8888
8989
## Production setup
9090
91-
Your production dbt profiles are defined in dbt_profiles/profiles.yml.
92-
These profiles define the default catalog, schema, and any other
91+
Your production dbt profiles are defined in `dbt_profiles/profiles.yml`.
92+
These profiles define the default warehouse, catalog, schema, and any other
9393
target-specific settings. Read more about dbt profiles on Databricks at
9494
https://docs.databricks.com/en/workflows/jobs/how-to/use-dbt-in-workflows.html#advanced-run-dbt-with-a-custom-profile.
9595
96-
The target workspaces for staging and prod are defined in databricks.yml.
96+
The target workspaces for staging and prod are defined in `databricks.yml`.
9797
You can manually deploy based on these configurations (see below).
9898
Or you can use CI/CD to automate deployment. See
9999
https://docs.databricks.com/dev-tools/bundles/ci-cd.html for documentation
100100
on CI/CD setup.
101101
102-
## Manually deploying to Databricks with Databricks Asset Bundles
102+
## Manually deploying to Databricks with Declarative Automation Bundles
103103
104-
Databricks Asset Bundles can be used to deploy to Databricks and to execute
104+
Declarative Automation Bundles can be used to deploy to Databricks and to execute
105105
dbt commands as a job using Databricks Workflows. See
106106
https://docs.databricks.com/dev-tools/bundles/index.html to learn more.
107107
@@ -120,7 +120,7 @@ For example, the default template would deploy a job called
120120
You can find that job by opening your workpace and clicking on **Workflows**.
121121
122122
You can also deploy to your production target directly from the command-line.
123-
The warehouse, catalog, and schema for that target are configured in databricks.yml.
123+
The warehouse, catalog, and schema for that target are configured in `dbt_profiles/profiles.yml`.
124124
When deploying to this target, note that the default job at resources/dbt_sql.job.yml
125125
has a schedule set that runs every day. The schedule is paused when deploying in development mode
126126
(see https://docs.databricks.com/dev-tools/bundles/deployment-modes.html).

dbt_sql/databricks.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# This file defines the structure of this project and how it is deployed
2-
# to production using Databricks Asset Bundles.
2+
# to production using Declarative Automation Bundles.
33
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
44
bundle:
55
name: dbt_sql
66
uuid: 5e5ca8d5-0388-473e-84a1-1414ed89c5df
77

88
include:
99
- resources/*.yml
10-
- resources/*/*.yml
1110

1211
# Deployment targets.
1312
# The default schema, catalog, etc. for dbt are defined in dbt_profiles/profiles.yml

default_minimal/.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"recommendations": [
33
"databricks.databricks",
44
"redhat.vscode-yaml",
5-
"ms-python.black-formatter"
5+
"charliermarsh.ruff"
66
]
77
}

default_minimal/.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"python.testing.unittestEnabled": false,
3434
"python.testing.pytestEnabled": true,
3535
"[python]": {
36-
"editor.defaultFormatter": "ms-python.black-formatter",
36+
"editor.defaultFormatter": "charliermarsh.ruff",
3737
"editor.formatOnSave": true,
3838
},
3939
}

default_minimal/databricks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ bundle:
66

77
include:
88
- resources/*.yml
9-
- resources/*/*.yml
109

1110
# Variable declarations. These variables are assigned in the dev/prod targets below.
1211
variables:

default_python/.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"recommendations": [
33
"databricks.databricks",
44
"redhat.vscode-yaml",
5-
"ms-python.black-formatter"
5+
"charliermarsh.ruff"
66
]
77
}

default_python/.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"python.testing.unittestEnabled": false,
3434
"python.testing.pytestEnabled": true,
3535
"[python]": {
36-
"editor.defaultFormatter": "ms-python.black-formatter",
36+
"editor.defaultFormatter": "charliermarsh.ruff",
3737
"editor.formatOnSave": true,
3838
},
3939
}

default_python/databricks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ bundle:
66

77
include:
88
- resources/*.yml
9-
- resources/*/*.yml
109

1110
artifacts:
1211
python_artifact:

default_python/pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ dependencies = [
1414
[dependency-groups]
1515
dev = [
1616
"pytest",
17+
"ruff",
1718
"databricks-dlt",
1819
"databricks-connect>=15.4,<15.5",
20+
"ipykernel",
1921
]
2022

2123
[project.scripts]
@@ -25,5 +27,5 @@ main = "default_python.main:main"
2527
requires = ["hatchling"]
2628
build-backend = "hatchling.build"
2729

28-
[tool.black]
29-
line-length = 125
30+
[tool.ruff]
31+
line-length = 120

default_python/src/default_python/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
def main():
77
# Process command-line arguments
8-
parser = argparse.ArgumentParser(description="Databricks job with catalog and schema parameters")
8+
parser = argparse.ArgumentParser(
9+
description="Databricks job with catalog and schema parameters",
10+
)
911
parser.add_argument("--catalog", required=True)
1012
parser.add_argument("--schema", required=True)
1113
args = parser.parse_args()

0 commit comments

Comments
 (0)