-
Notifications
You must be signed in to change notification settings - Fork 0
DLT init reusing lakeflow-pipelines template #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: install-dlt-feat
Are you sure you want to change the base?
Conversation
shreyas-goenka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we considered creating a new independent template for this? Being surgical here can be more complex than just having a new template.
For example: The Readme in lakeflow-pipelines template has a bunch of references to the databricks that you would probably like to change to dlt.
| "is_dlt": { | ||
| "skip_prompt_if": {}, | ||
| "type": "boolean", | ||
| "description": "DLT pipelines using this template", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "description": "DLT pipelines using this template", | |
| "description": "Whether this template is initialized via the DLT CLI", |
| # This is a Databricks asset bundle definition for {{.project_name}}. | ||
| # See https://docs.databricks.com/dev-tools/bundles/index.html for documentation. | ||
| bundle: | ||
| {{$isDLT := eq .is_dlt true}}{{if $isDLT}}project{{else}}bundle{{end}}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| {{$isDLT := eq .is_dlt true}}{{if $isDLT}}project{{else}}bundle{{end}}: | |
| {{- $isDLT := eq .is_dlt true}} | |
| {{if $isDLT}}project{{else}}bundle{{end}}: |
Please play a bit with the - here to make this a bit easier to read. The - chops a way all whitespace.
| include: | ||
| - resources/*.yml | ||
| - resources/*/*.yml | ||
| {{if $isDLT}}- ./*.yml{{else}}- resources/*.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dlt template should include both
| # See also https://docs.databricks.com/dev-tools/bundles/deployment-modes.html. | ||
| mode: development | ||
| default: true | ||
| {{if $isDLT}}deploy_on_run: true{{end}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would leave a blank line when false; please experiment with {{- :)
| permissions: | ||
| {{if not $isDLT}}# We explicitly deploy to /Workspace/Users/{{user_name}} to make sure we only have a single copy. | ||
| root_path: /Workspace/Users/{{user_name}}/.bundle/${bundle.name}/${bundle.target}}{{end}} | ||
| {{if $isDLT}}owner: user@company.com{{else}}permissions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep in mind that the template won't yet work if you replace the root_path with the owner as I originally suggested. The CLI would first need to support that.
So you should probably sequence this change to be later.
515956f to
1da3ff0
Compare
Changes
New
dlt initcommand that generates a pipeline specific template.Adding new field to schema that allows for reusing lakeflow-pipelines template for DLT
Why
Allow for
dlt initcommand to reuse templateTests
Acceptance tests pending but locally generates 2 sets of files if using
databricks bundle initordlt init