Skip to content

Commit 0088b28

Browse files
Always emit catalog field for serverless compute
1 parent 372f153 commit 0088b28

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

acceptance/bundle/templates/default-python/classic/out.compare-vs-serverless.diff

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
@@ -5,8 +5,7 @@
1313
my_default_python_etl:
1414
name: my_default_python_etl
15-
- ## Serverless compute requires Unity Catalog
15+
- # Serverless compute requires Unity Catalog
16+
- catalog: ${var.catalog}
1617
+ ## Specify the 'catalog' field to configure this pipeline to make use of Unity Catalog:
17-
# catalog: ${var.catalog}
18+
+ # catalog: ${var.catalog}
1819
schema: ${var.schema}
1920
- serverless: true
2021
root_path: "../src/my_default_python_etl"

acceptance/bundle/templates/default-python/serverless-customcatalog/output.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@ To get started, refer to the project README.md file and the documentation at htt
3131
permissions:
3232
--- [TESTROOT]/bundle/templates/default-python/serverless-customcatalog/../serverless/output/my_default_python/resources/my_default_python_etl.pipeline.yml
3333
+++ output/my_default_python/resources/my_default_python_etl.pipeline.yml
34-
@@ -5,6 +5,5 @@
34+
@@ -5,5 +5,4 @@
3535
my_default_python_etl:
3636
name: my_default_python_etl
37-
- ## Serverless compute requires Unity Catalog
38-
- # catalog: ${var.catalog}
39-
+ catalog: ${var.catalog}
37+
- # Serverless compute requires Unity Catalog
38+
catalog: ${var.catalog}
4039
schema: ${var.schema}
41-
serverless: true
4240
--- [TESTROOT]/bundle/templates/default-python/serverless-customcatalog/../serverless/output/my_default_python/src/my_default_python_etl/explorations/sample_exploration.ipynb
4341
+++ output/my_default_python/src/my_default_python_etl/explorations/sample_exploration.ipynb
4442
@@ -38,5 +38,5 @@

acceptance/bundle/templates/default-python/serverless/output/my_default_python/resources/my_default_python_etl.pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ resources:
44
pipelines:
55
my_default_python_etl:
66
name: my_default_python_etl
7-
## Serverless compute requires Unity Catalog
8-
# catalog: ${var.catalog}
7+
# Serverless compute requires Unity Catalog
8+
catalog: ${var.catalog}
99
schema: ${var.schema}
1010
serverless: true
1111
root_path: "../src/my_default_python_etl"

libs/template/templates/default/template/{{.project_name}}/resources/{{.project_name}}_etl.pipeline.yml.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ resources:
1010
*/}}
1111
name: {{.project_name}}_etl
1212
{{- if or (eq .default_catalog "") (eq .default_catalog "hive_metastore")}}
13-
{{- if $serverless }}
14-
## Serverless compute requires Unity Catalog
15-
# catalog: ${var.catalog}
13+
{{- if $serverless}}
14+
# Serverless compute requires Unity Catalog
15+
catalog: ${var.catalog}
1616
{{- else}}
1717
## Specify the 'catalog' field to configure this pipeline to make use of Unity Catalog:
1818
# catalog: ${var.catalog}
@@ -21,7 +21,7 @@ resources:
2121
catalog: ${var.catalog}
2222
{{- end}}
2323
schema: ${var.schema}
24-
{{- if $serverless }}
24+
{{- if $serverless}}
2525
serverless: true
2626
{{- end}}
2727
root_path: "../src/{{.project_name}}_etl"

libs/template/templates/default/template/{{.project_name}}/resources/{{.project_name}}_etl_pipeline.py.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ The main pipeline for {{.project_name}}
1111
{{- /* Note that pipeline names must be unique in a worskspace, so we use the project name as part as the name. */}}
1212
"name": "{{.project_name}}_etl",
1313
{{- if or (eq .default_catalog "") (eq .default_catalog "hive_metastore")}}
14-
{{- if $serverless }}
15-
## Serverless compute requires Unity Catalog
16-
# "catalog": "${var.catalog}",
14+
{{- if $serverless}}
15+
# Serverless compute requires Unity Catalog
16+
"catalog": "${var.catalog}",
1717
{{- else}}
1818
## Specify the 'catalog' field to configure this pipeline to make use of Unity Catalog:
1919
# "catalog": "${var.catalog}",
@@ -22,7 +22,7 @@ The main pipeline for {{.project_name}}
2222
"catalog": "${var.catalog}",
2323
{{- end}}
2424
"schema": "${var.schema}",
25-
{{- if $serverless }}
25+
{{- if $serverless}}
2626
"serverless": True,
2727
{{- end}}
2828
"root_path": "src/{{.project_name}}_etl",

0 commit comments

Comments
 (0)