Skip to content

Add an experimental dbt-sql template#1059

Merged
lennartkats-db merged 29 commits into
databricks:mainfrom
lennartkats-db:dbt-template
Feb 19, 2024
Merged

Add an experimental dbt-sql template#1059
lennartkats-db merged 29 commits into
databricks:mainfrom
lennartkats-db:dbt-template

Conversation

@lennartkats-db
Copy link
Copy Markdown
Contributor

@lennartkats-db lennartkats-db commented Dec 12, 2023

Changes

This adds a new dbt-sql template. This work requires the new WorkspaceFS support for dbt tasks.

In this latest revision, I've hidden the new template from the list so we can merge it, iterate over it, and propertly release the template at the right time.

Blockers:

Tests

  • Unit tests
  • Manual testing
  • More manual testing
  • Reviewer manual testing
    • I'd like to do a small bug bash post-merging.
  • Unit tests

@lennartkats-db lennartkats-db changed the title [WIP] Add a dbt template [WIP] Add a dbt-sql template Dec 12, 2023
Comment thread libs/template/templates/dbt-sql/databricks_template_schema.json
@lennartkats-db lennartkats-db changed the title [WIP] Add a dbt-sql template [WIP] [DONTMERGE] Add a dbt-sql template Dec 23, 2023
github-merge-queue Bot pushed a commit that referenced this pull request Dec 27, 2023
## Changes
This enhances the template selection experience a bit as we add more and
more built-in templates (like
#1051 and
#1059):

### New experience:
<img width="661" alt="image"
src="https://github.com/databricks/cli/assets/58432911/afe3b84d-8a77-47f3-b9c2-f827f7893cd7">

### Current experience:
<img width="265" alt="image"
src="https://github.com/databricks/cli/assets/58432911/36f8d568-819f-4920-83b1-fb76109ea3d1">

---------

Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com>
@lennartkats-db lennartkats-db marked this pull request as ready for review December 28, 2023 12:34
@lennartkats-db lennartkats-db changed the title [WIP] [DONTMERGE] Add a dbt-sql template [DONTMERGE] Add a dbt-sql template Dec 28, 2023
@lennartkats-db lennartkats-db changed the title [DONTMERGE] [WIP] Add a dbt-sql template Add a dbt-sql template Jan 28, 2024
@lennartkats-db lennartkats-db changed the title Add a dbt-sql template Add an experimental dbt-sql template Jan 29, 2024
Comment thread libs/template/helpers.go
},
"http_path": {
"type": "string",
"pattern": "^/sql/.\\../warehouses/[a-z0-9]+$",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this pattern work without + or *?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand this question. There is a + in there?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe you're referring to the \.\\.. part? That matches a version, like 1.0.

Comment thread libs/template/templates/dbt-sql/databricks_template_schema.json
Comment thread libs/template/templates/dbt-sql/template/{{.project_name}}/README.md.tmpl Outdated
Comment thread libs/template/templates/dbt-sql/template/{{.project_name}}/README.md.tmpl Outdated
Comment thread libs/template/templates/dbt-sql/template/{{.project_name}}/README.md.tmpl Outdated
@lennartkats-db lennartkats-db removed the request for review from PaulCornellDB February 19, 2024 09:12
@lennartkats-db lennartkats-db added this pull request to the merge queue Feb 19, 2024
Merged via the queue into databricks:main with commit 1c68012 Feb 19, 2024
@lennartkats-db lennartkats-db deleted the dbt-template branch February 19, 2024 09:20
andrewnester added a commit that referenced this pull request Feb 20, 2024
CLI:
 * Add support for UC Volumes to the `databricks fs` commands ([#1209](#1209)).

Bundles:
 * Use dynamic configuration model in bundles ([#1098](#1098)).
 * Allow use of variables references in primitive non-string fields ([#1219](#1219)).
 * Add an experimental default-sql template ([#1051](#1051)).
 * Add an experimental dbt-sql template ([#1059](#1059)).

Internal:
 * Add fork-user to winget release workflow ([#1214](#1214)).
 * Use `any` as type for data sources and resources in `tf/schema` ([#1216](#1216)).
 * Avoid infinite recursion when normalizing a recursive type ([#1213](#1213)).
 * Fix issue where interpolating a new ref would rewrite unrelated fields ([#1217](#1217)).
 * Use `dyn.Value` as input to generating Terraform JSON ([#1218](#1218)).

API Changes:
 * Changed `databricks lakehouse-monitors update` command with new required argument order.
 * Added `databricks online-tables` command group.

OpenAPI commit cdd76a98a4fca7008572b3a94427566dd286c63b (2024-02-19)
Dependency updates:
 * Bump Terraform provider to v1.36.2 ([#1215](#1215)).
 * Bump github.com/databricks/databricks-sdk-go from 0.32.0 to 0.33.0 ([#1222](#1222)).
@andrewnester andrewnester mentioned this pull request Feb 20, 2024
github-merge-queue Bot pushed a commit that referenced this pull request Feb 20, 2024
CLI:
* Add support for UC Volumes to the `databricks fs` commands
([#1209](#1209)).

Bundles:
* Use dynamic configuration model in bundles
([#1098](#1098)).
* Allow use of variables references in primitive non-string fields
([#1219](#1219)).
* Add an experimental default-sql template
([#1051](#1051)).
* Add an experimental dbt-sql template
([#1059](#1059)).

Internal:
* Add fork-user to winget release workflow
([#1214](#1214)).
* Use `any` as type for data sources and resources in `tf/schema`
([#1216](#1216)).
* Avoid infinite recursion when normalizing a recursive type
([#1213](#1213)).
* Fix issue where interpolating a new ref would rewrite unrelated fields
([#1217](#1217)).
* Use `dyn.Value` as input to generating Terraform JSON
([#1218](#1218)).

API Changes:
* Changed `databricks lakehouse-monitors update` command with new
required argument order.
 * Added `databricks online-tables` command group.

OpenAPI commit cdd76a98a4fca7008572b3a94427566dd286c63b (2024-02-19)
Dependency updates:
* Bump Terraform provider to v1.36.2
([#1215](#1215)).
* Bump github.com/databricks/databricks-sdk-go from 0.32.0 to 0.33.0
([#1222](#1222)).
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
This enhances the template selection experience a bit as we add more and
more built-in templates (like
#1051 and
#1059):

### New experience:
<img width="661" alt="image"
src="https://github.com/databricks/cli/assets/58432911/afe3b84d-8a77-47f3-b9c2-f827f7893cd7">

### Current experience:
<img width="265" alt="image"
src="https://github.com/databricks/cli/assets/58432911/36f8d568-819f-4920-83b1-fb76109ea3d1">

---------

Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com>
denik pushed a commit that referenced this pull request May 20, 2026
## Changes

This adds a new dbt-sql template. This work requires the new WorkspaceFS
support for dbt tasks.

In this latest revision, I've hidden the new template from the list so
we can merge it, iterate over it, and propertly release the template at
the right time.

Blockers:
- [x] WorkspaceFS support for dbt projects is in prod
- [x] Move dbt files into a subdirectory
- [ ] Wait until the next (>1.7.4) release of the dbt plugin which will
have major improvements!
- _Rather than wait, this template is hidden from the list of
templates._
- [x] SQL extension is preconfigured based on extension settings (if
possible)
- MV / streaming tables:
  - [x] Add to template
- [x] Fix databricks/dbt-databricks#535 (to be
released with in 1.7.4)
- [x] Merge databricks/dbt-databricks#338 (to be
released with in 1.7.4)
- [ ] Fix "too many 503 errors" issue
(databricks/dbt-databricks#570, internal
tracker: ES-1009215, ES-1014138)
  - [x] Support ANSI mode in the template
- [ ] Streaming tables support is either ungated or the template
provides instructions about signup
- _Mitigation for now: this template is hidden from the list of
templates._
- [x] Support non-workspace-admin deployment
- [x] Make sure `data_security_mode: SINGLE_USER` works on non-UC
workspaces (it's required to be explicitly specified on UC workspaces
with single-node clusters)
- [x] Support non-UC workspaces

## Tests

- [x] Unit tests
- [x] Manual testing
- [x] More manual testing
- [ ] Reviewer manual testing
  - _I'd like to do a small bug bash post-merging._
- [x] Unit tests
denik pushed a commit that referenced this pull request May 20, 2026
CLI:
* Add support for UC Volumes to the `databricks fs` commands
([#1209](#1209)).

Bundles:
* Use dynamic configuration model in bundles
([#1098](#1098)).
* Allow use of variables references in primitive non-string fields
([#1219](#1219)).
* Add an experimental default-sql template
([#1051](#1051)).
* Add an experimental dbt-sql template
([#1059](#1059)).

Internal:
* Add fork-user to winget release workflow
([#1214](#1214)).
* Use `any` as type for data sources and resources in `tf/schema`
([#1216](#1216)).
* Avoid infinite recursion when normalizing a recursive type
([#1213](#1213)).
* Fix issue where interpolating a new ref would rewrite unrelated fields
([#1217](#1217)).
* Use `dyn.Value` as input to generating Terraform JSON
([#1218](#1218)).

API Changes:
* Changed `databricks lakehouse-monitors update` command with new
required argument order.
 * Added `databricks online-tables` command group.

OpenAPI commit cdd76a98a4fca7008572b3a94427566dd286c63b (2024-02-19)
Dependency updates:
* Bump Terraform provider to v1.36.2
([#1215](#1215)).
* Bump github.com/databricks/databricks-sdk-go from 0.32.0 to 0.33.0
([#1222](#1222)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants