Skip to content

Commit 0088836

Browse files
Merge remote-tracking branch 'origin/main' into update-templates-with-script
2 parents e761cbb + 51b8714 commit 0088836

57 files changed

Lines changed: 913 additions & 24 deletions

File tree

Some content is hidden

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

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"

.github/workflows/fmt.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: fmt
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
merge_group:
7+
types: [checks_requested]
8+
9+
jobs:
10+
ruff:
11+
runs-on:
12+
group: databricks-protected-runner-group
13+
labels: linux-ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository and submodules
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
19+
- name: Run ruff
20+
uses: astral-sh/ruff-action@eaf0ecdd668ceea36159ff9d91882c9795d89b49 # v3.4.0
21+
with:
22+
version: "0.9.1"
23+
args: "format --check"

.gitignore

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

.ruff.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[format]
2+
exclude = [
3+
# Templates are responsible for formatting at the source.
4+
"dbt_sql/*",
5+
"default_python/*",
6+
"default_sql/*",
7+
"mlops_stacks/*",
8+
]

contrib/data_engineering/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ The 'data_engineering' project was generated by using the data-engineering templ
1212
```
1313
1414
3. We recommend the UV package manager to install project dependencies. It's a drop-in replacement for `pip`.
15-
See https://docs.astral.sh/uv/getting-started/installation/ for full installation instructions,
16-
or run:
17-
```
18-
$ pip install uv
19-
```
15+
UV should be installed as a global package; https://docs.astral.sh/uv/getting-started/installation/ instructions.
2016
2117
4. Install all project dependencies:
2218
```

contrib/data_engineering/scripts/add_asset.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111

1212

1313
def init_bundle(asset_type: AssetType) -> None:
14-
cmd = f"databricks bundle init https://github.com/databricks/bundle-examples --template-dir contrib/templates/data-engineering/assets/{asset_type}"
14+
cmd = (
15+
f"databricks bundle init https://github.com/databricks/bundle-examples --template-dir contrib/templates/data-engineering/assets/{asset_type} "
16+
+ " ".join(sys.argv[2:])
17+
)
1518
subprocess.run(cmd, shell=True)
1619

1720

contrib/templates/data-engineering/assets/etl-pipeline/databricks_template_schema.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@
4040
"no"
4141
],
4242
"default": "yes"
43+
},
44+
"use_serverless": {
45+
"type": "string",
46+
"default": "no",
47+
"enum": [
48+
"yes",
49+
"no"
50+
],
51+
"description": "\nWould you like to use serverless compute for this pipeline?\nuse_serverless",
52+
"order": 5
4353
}
4454
},
4555
"success_message": "\n\n🪠 New pipeline definition generated under 'assets/{{.pipeline_name}}'!"

contrib/templates/data-engineering/assets/etl-pipeline/template/assets/{{.pipeline_name}}/{{.pipeline_name}}.pipeline.yml.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ resources:
22
pipelines:
33
{{.pipeline_name}}:
44
name: {{.pipeline_name}}
5+
{{- if eq .use_serverless "yes"}}
56
serverless: true
7+
{{- else}}
8+
serverless: false
9+
{{- end}}
610
{{- if or (eq default_catalog "") (eq default_catalog "hive_metastore")}}
711
## Specify the 'catalog' field to configure this pipeline to make use of Unity Catalog:
812
# catalog: ${var.catalog}

contrib/templates/data-engineering/template/{{.project_name}}/README.md.tmpl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ The '{{.project_name}}' project was generated by using the data-engineering temp
1212
```
1313

1414
3. We recommend the UV package manager to install project dependencies. It's a drop-in replacement for `pip`.
15-
See https://docs.astral.sh/uv/getting-started/installation/ for full installation instructions,
16-
or run:
17-
```
18-
$ pip install uv
19-
```
15+
UV should be installed as a global package; https://docs.astral.sh/uv/getting-started/installation/ instructions.
2016

2117
4. Install all project dependencies:
2218
```

contrib/templates/data-engineering/template/{{.project_name}}/scripts/add_asset.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111

1212

1313
def init_bundle(asset_type: AssetType) -> None:
14-
cmd = f"databricks bundle init https://github.com/databricks/bundle-examples --template-dir contrib/templates/data-engineering/assets/{asset_type}"
14+
cmd = (
15+
f"databricks bundle init https://github.com/databricks/bundle-examples --template-dir contrib/templates/data-engineering/assets/{asset_type} "
16+
+ " ".join(sys.argv[2:])
17+
)
1518
subprocess.run(cmd, shell=True)
1619

1720

0 commit comments

Comments
 (0)