Commit eb0df9a
Update the default-python template according to Lakeflow conventions (#3712)
## Changes
This updates the `default-python` template according to the latest
Lakeflow conventions as established in
#3671. Notably, the new template
moves away from the use of notebooks for pipeline source code.
The new layout looks as follows when the user selects they want both the
sample job and the sample pipeline:
`📁 resources`
`├── sample_job.job.yml`
`└── sample_etl.pipeline.yml`
`📁 src`
`├── 📁 my_project` — shared source code for use in jobs and/or pipelines
`│ ├── __init__.py`
`│ └── main.py`
`└── 📁 my_project_etl` — source code for the sample_etl pipeline
` ├── __init__.py`
` ├── 📁 transformations`
` │ ├── __init__.py`
` │ ├── sample_zones_my_project.py`
` │ └── sample_trips_my_project.py`
` ├── 📁 explorations` — exploratory notebooks
` │ ├── __init__.py`
` │ └── sample_exploration.ipynb`
` └── README.md`
`📁 tests` — unit tests
`📁 fixtures` — fixtures (these can now be used with
[`load_fixture`](https://github.com/databricks/cli/blob/af524bb993eaffe059d65f93854d544a162fc6ef/acceptance/bundle/templates/default-python/serverless/output/my_default_python/fixtures/.gitkeep))
`databricks.yml`
`pyproject.toml`
`README.md`
The template prompts have been updated to cater to this structure.
Notably, they include a new prompt to manage the catalog and schema used
by the template. These settings are propagated to both the job and the
pipeline:
```
Welcome to the default Python template for Databricks Asset Bundles!
Answer the following questions to customize your project.
You can always change your configuration in the databricks.yml file later.
Note that https://e2-dogfood.staging.cloud.databricks.com is used for initialization.
(For information on how to change your profile, see https://docs.databricks.com/dev-tools/cli/profiles.html.)
Unique name for this project [my_project]: my_project
Include a Lakeflow job that runs a notebook: yes
Include an ETL pipeline: yes
Include a sample Python package that builds into a wheel file: yes
Use serverless compute: yes
Default catalog for any tables created by this project [main]: main
Use a personal schema for each user working on this project.
(This is recommended. Your personal schema will be 'main.lennart_kats'.): yes
✨ Your new project has been created in the 'my_project' directory!
To get started, refer to the project README.md file and the documentation at https://docs.databricks.com/dev-tools/bundles/index.html.
```
## Testing
* Standard unit testing, acceptance testing
* AI excercised templates and with all permutations of options,
deploying/testing/running/inspecting the result
* Bug bash of the original `lakeflow-pipelines` template from
#3671
---------
Co-authored-by: Claude <[email protected]>
Co-authored-by: Julia Crawford (Databricks) <[email protected]>1 parent 3d656af commit eb0df9a
File tree
111 files changed
+1729
-1848
lines changed- acceptance/bundle/templates
- default-python
- classic
- output/my_default_python
- .vscode
- fixtures
- resources
- scratch
- src
- my_default_python_etl
- explorations
- transformations
- my_default_python
- tests
- combinations
- classic
- serverless
- fail-missing-uv
- integration_classic
- no-uc
- serverless-customcatalog
- serverless
- output/my_default_python
- .vscode
- fixtures
- resources
- scratch
- src
- my_default_python_etl
- explorations
- transformations
- my_default_python
- tests
- lakeflow-pipelines
- python/output/my_lakeflow_pipelines
- resources
- sql/output/my_lakeflow_pipelines
- resources
- pydabs/init-classic/output/my_pydabs
- telemetry/default-python
- libs/template
- templates
- default-python
- library
- template
- {{.project_name}}
- .vscode
- fixtures
- resources
- scratch
- src
- {{.project_name}}
- tests
- default
- template/{{.project_name}}
- resources
- src
- experimental-default-python-vnext
- lakeflow-pipelines
- pydabs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
111 files changed
+1729
-1848
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
Lines changed: 38 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 7 | | |
12 | | - | |
13 | 8 | | |
14 | 9 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | | - | |
23 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
24 | 35 | | |
25 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
26 | 39 | | |
27 | 40 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 41 | | |
32 | 42 | | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
36 | 50 | | |
37 | | - | |
38 | 51 | | |
39 | 52 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
46 | 59 | | |
47 | 60 | | |
48 | 61 | | |
49 | 62 | | |
50 | | - | |
| 63 | + | |
51 | 64 | | |
52 | 65 | | |
53 | 66 | | |
54 | 67 | | |
55 | 68 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
Lines changed: 50 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
42 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
43 | 65 | | |
44 | 66 | | |
45 | 67 | | |
46 | | - | |
| 68 | + | |
47 | 69 | | |
48 | 70 | | |
49 | 71 | | |
50 | 72 | | |
51 | 73 | | |
52 | | - | |
| 74 | + | |
53 | 75 | | |
54 | 76 | | |
55 | 77 | | |
56 | 78 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
65 | 86 | | |
66 | | - | |
| 87 | + | |
67 | 88 | | |
68 | 89 | | |
69 | 90 | | |
| |||
72 | 93 | | |
73 | 94 | | |
74 | 95 | | |
75 | | - | |
| 96 | + | |
76 | 97 | | |
77 | 98 | | |
78 | 99 | | |
| |||
86 | 107 | | |
87 | 108 | | |
88 | 109 | | |
89 | | - | |
| 110 | + | |
90 | 111 | | |
91 | 112 | | |
92 | 113 | | |
93 | | - | |
| 114 | + | |
94 | 115 | | |
95 | 116 | | |
96 | 117 | | |
97 | 118 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 119 | | |
102 | 120 | | |
103 | 121 | | |
104 | 122 | | |
105 | 123 | | |
106 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
107 | 130 | | |
108 | 131 | | |
109 | | - | |
110 | | - | |
| 132 | + | |
| 133 | + | |
111 | 134 | | |
112 | 135 | | |
113 | 136 | | |
114 | | - | |
115 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
116 | 140 | | |
117 | 141 | | |
118 | 142 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments