Skip to content

Commit a853d0e

Browse files
committed
update acceptance tests
1 parent 1ee4ede commit a853d0e

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

acceptance/bundle/templates/lakeflow-pipelines/sql/output/my_lakeflow_pipelines/.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"python.testing.unittestEnabled": false,
1010
"python.testing.pytestEnabled": true,
11-
"python.analysis.extraPaths": ["assets/etl_pipeline"],
11+
"python.analysis.extraPaths": ["resources/my_lakeflow_pipelines_pipeline"],
1212
"files.exclude": {
1313
"**/*.egg-info": true,
1414
"**/__pycache__": true,

acceptance/bundle/templates/lakeflow-pipelines/sql/output/my_lakeflow_pipelines/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# my_lakeflow_pipelines
22

3-
The 'my_lakeflow_pipelines' project was generated by using the Lakeflow template.
3+
The 'my_lakeflow_pipelines' project was generated by using the Lakeflow Pipelines template.
44

55
## Setup
66

acceptance/bundle/templates/lakeflow-pipelines/sql/output/my_lakeflow_pipelines/databricks.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@ targets:
3636
mode: production
3737
workspace:
3838
host: [DATABRICKS_URL]
39-
# We explicitly specify /Workspace/Users/[USERNAME] to make sure we only have a single copy.
39+
# We explicitly deploy to /Workspace/Users/[USERNAME] to make sure we only have a single copy.
4040
root_path: /Workspace/Users/[USERNAME]/.bundle/${bundle.name}/${bundle.target}
4141
permissions:
4242
- user_name: [USERNAME]
4343
level: CAN_MANAGE
44-
run_as:
45-
user_name: [USERNAME]
4644
variables:
4745
catalog: main
4846
schema: default

libs/template/templates/lakeflow-pipelines/databricks_template_schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"properties": {
44
"project_name": {
55
"type": "string",
6-
"default": "my_project",
6+
"default": "my_lakeflow_project",
77
"description": "Please provide the following details to tailor the template to your preferences.\n\nUnique name for this project\nproject_name",
88
"order": 1,
99
"pattern": "^[a-z0-9_]+$",
@@ -45,7 +45,7 @@
4545
"language": {
4646
"type": "string",
4747
"default": "python",
48-
"description": "\nLanguage for this project:\nlanguage",
48+
"description": "\nInitial language for this project:\nlanguage",
4949
"enum": [
5050
"python",
5151
"sql"

libs/template/templates/lakeflow-pipelines/library/variables.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- define `table_suffix` -}}
2-
{{ (regexp `^_+|_+$`).ReplaceAllString ((regexp `_+`).ReplaceAllString .project_name `_`) `` }}
2+
{{ .project_name }}{{/* {{ (regexp `^_+|_+$`).ReplaceAllString ((regexp `_+`).ReplaceAllString .project_name `_`) `` }} */}}
33
{{- end }}
44

55
{{- define `pipeline_name` -}}

libs/template/templates/lakeflow-pipelines/template/__preamble.tmpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ This file only contains template directives; it is skipped for the actual output
77
{{$isSQL := eq .language "sql"}}
88

99
{{if $isSQL}}
10-
{{skip "{{.project_name}}/resources/{{template `pipeline_name` .}}/utilities/utils.py"}}
11-
{{skip "{{.project_name}}/resources/{{template `pipeline_name` .}}/transformations/sample_zones_{{template `table_suffix` .}}.py"}}
12-
{{skip "{{.project_name}}/resources/{{template `pipeline_name` .}}/transformations/sample_trips_{{template `table_suffix` .}}.py"}}
10+
{{skip "{{.project_name}}/resources/{{.project_name}}_pipeline/utilities/utils.py"}}
11+
{{skip "{{.project_name}}/resources/{{.project_name}}_pipeline/transformations/sample_zones_{{.project_name}}.py"}}
12+
{{skip "{{.project_name}}/resources/{{.project_name}}_pipeline/transformations/sample_trips_{{.project_name}}.py"}}
1313
{{else}}
14-
{{skip "{{.project_name}}/resources/{{template `pipeline_name` .}}/transformations/sample_zones_{{template `table_suffix` .}}.sql"}}
15-
{{skip "{{.project_name}}/resources/{{template `pipeline_name` .}}/transformations/sample_trips_{{template `table_suffix` .}}.sql"}}
14+
{{skip "{{.project_name}}/resources/{{.project_name}}_pipeline/transformations/sample_zones_{{.project_name}}.sql"}}
15+
{{skip "{{.project_name}}/resources/{{.project_name}}_pipeline/transformations/sample_trips_{{.project_name}}.sql"}}
1616
{{end}}

libs/template/templates/lakeflow-pipelines/template/{{.project_name}}/.vscode/settings.json.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"python.testing.unittestEnabled": false,
1010
"python.testing.pytestEnabled": true,
1111
{{- /* Unfortunately extraPaths doesn't support globs!! See: https://github.com/microsoft/pylance-release/issues/973 */}}
12-
"python.analysis.extraPaths": ["assets/etl_pipeline"],
12+
"python.analysis.extraPaths": ["resources/{{.project_name}}_pipeline"],
1313
"files.exclude": {
1414
"**/*.egg-info": true,
1515
"**/__pycache__": true,

libs/template/templates/lakeflow-pipelines/template/{{.project_name}}/README.md.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# {{.project_name}}
22

3-
The '{{.project_name}}' project was generated by using the Lakeflow template.
3+
The '{{.project_name}}' project was generated by using the Lakeflow Pipelines template.
44

55
## Setup
66

libs/template/templates/lakeflow-pipelines/template/{{.project_name}}/databricks.yml.tmpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@ targets:
3636
mode: production
3737
workspace:
3838
host: {{workspace_host}}
39-
# We explicitly specify /Workspace/Users/{{user_name}} to make sure we only have a single copy.
39+
# We explicitly deploy to /Workspace/Users/{{user_name}} to make sure we only have a single copy.
4040
root_path: /Workspace/Users/{{user_name}}/.bundle/${bundle.name}/${bundle.target}
4141
permissions:
4242
- {{if is_service_principal}}service_principal{{else}}user{{end}}_name: {{user_name}}
4343
level: CAN_MANAGE
44-
run_as:
45-
{{if is_service_principal}}service_principal{{else}}user{{end}}_name: {{user_name}}
4644
variables:
4745
catalog: {{.default_catalog}}
4846
schema: {{template `prod_schema` .}}

libs/template/templates/lakeflow-pipelines/template/{{.project_name}}/resources/{{.project_name}}_pipeline/README.md.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{{- if (eq .language "python") -}}
2+
23
# {{template `pipeline_name` .}}
34

45
This folder defines all source code for the {{template `pipeline_name` .}} pipeline:
56

67
- `explorations`: Ad-hoc notebooks used to explore the data processed by this pipeline.
78
- `transformations`: All dataset definitions and transformations.
8-
- `utilities`: Utility functions and Python modules used in this pipeline.
9+
- `utilities` (optional): Utility functions and Python modules used in this pipeline.
910
- `data_sources` (optional): View definitions describing the source data for this pipeline.
1011

1112
## Getting Started
@@ -21,7 +22,9 @@ To get started, go to the `transformations` folder -- most of the relevant sourc
2122
* Use `Schedule` to run the pipeline on a schedule!
2223

2324
For more tutorials and reference material, see https://docs.databricks.com/dlt.
25+
2426
{{- else -}}
27+
2528
# {{template `pipeline_name` .}}
2629

2730
This folder defines all source code for the '{{template `pipeline_name` .}}' pipeline:
@@ -43,4 +46,5 @@ To get started, go to the \`transformations\` folder -- most of the relevant sou
4346
* Use \`Schedule\` to run the pipeline on a schedule!
4447

4548
For more tutorials and reference material, see https://docs.databricks.com/dlt.
49+
4650
{{- end -}}

0 commit comments

Comments
 (0)