From 3c881f5d7e1304df3451ae0ec9208542da178107 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Fri, 26 Sep 2025 15:06:50 +0200 Subject: [PATCH] Fix DBT template The profiles file was incorrectly indented and made the example job run fail. --- .../my_dbt_sql/dbt_profiles/profiles.yml | 64 +++++++++---------- .../dbt_profiles/profiles.yml.tmpl | 54 ++++++++-------- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/acceptance/bundle/templates/dbt-sql/output/my_dbt_sql/dbt_profiles/profiles.yml b/acceptance/bundle/templates/dbt-sql/output/my_dbt_sql/dbt_profiles/profiles.yml index 32c56b6f23..dc70dc9b40 100644 --- a/acceptance/bundle/templates/dbt-sql/output/my_dbt_sql/dbt_profiles/profiles.yml +++ b/acceptance/bundle/templates/dbt-sql/output/my_dbt_sql/dbt_profiles/profiles.yml @@ -4,35 +4,35 @@ my_dbt_sql: target: dev # default target outputs: - # Doing local development with the dbt CLI? - # Then you should create your own profile in your .dbt/profiles.yml using 'dbt init' - # (See README.md) - - # The default target when deployed with the Databricks CLI - # N.B. when you use dbt from the command line, it uses the profile from .dbt/profiles.yml - dev: - type: databricks - method: http - catalog: main - schema: "{{ var('dev_schema') }}" - - http_path: /sql/2.0/warehouses/f00dcafe - - # The workspace host / token are provided by Databricks - # see databricks.yml for the workspace host used for 'dev' - host: "{{ env_var('DBT_HOST') }}" - token: "{{ env_var('DBT_ACCESS_TOKEN') }}" - - # The production target when deployed with the Databricks CLI - prod: - type: databricks - method: http - catalog: main - schema: default - - http_path: /sql/2.0/warehouses/f00dcafe - - # The workspace host / token are provided by Databricks - # see databricks.yml for the workspace host used for 'prod' - host: "{{ env_var('DBT_HOST') }}" - token: "{{ env_var('DBT_ACCESS_TOKEN') }}" + # Doing local development with the dbt CLI? + # Then you should create your own profile in your .dbt/profiles.yml using 'dbt init' + # (See README.md) + + # The default target when deployed with the Databricks CLI + # N.B. when you use dbt from the command line, it uses the profile from .dbt/profiles.yml + dev: + type: databricks + method: http + catalog: main + schema: "{{ var('dev_schema') }}" + + http_path: /sql/2.0/warehouses/f00dcafe + + # The workspace host / token are provided by Databricks + # see databricks.yml for the workspace host used for 'dev' + host: "{{ env_var('DBT_HOST') }}" + token: "{{ env_var('DBT_ACCESS_TOKEN') }}" + + # The production target when deployed with the Databricks CLI + prod: + type: databricks + method: http + catalog: main + schema: default + + http_path: /sql/2.0/warehouses/f00dcafe + + # The workspace host / token are provided by Databricks + # see databricks.yml for the workspace host used for 'prod' + host: "{{ env_var('DBT_HOST') }}" + token: "{{ env_var('DBT_ACCESS_TOKEN') }}" diff --git a/libs/template/templates/dbt-sql/template/{{.project_name}}/dbt_profiles/profiles.yml.tmpl b/libs/template/templates/dbt-sql/template/{{.project_name}}/dbt_profiles/profiles.yml.tmpl index 948c3eca90..71d155c501 100644 --- a/libs/template/templates/dbt-sql/template/{{.project_name}}/dbt_profiles/profiles.yml.tmpl +++ b/libs/template/templates/dbt-sql/template/{{.project_name}}/dbt_profiles/profiles.yml.tmpl @@ -7,39 +7,39 @@ target: dev # default target outputs: - # Doing local development with the dbt CLI? - # Then you should create your own profile in your .dbt/profiles.yml using 'dbt init' - # (See README.md) + # Doing local development with the dbt CLI? + # Then you should create your own profile in your .dbt/profiles.yml using 'dbt init' + # (See README.md) - # The default target when deployed with the Databricks CLI - # N.B. when you use dbt from the command line, it uses the profile from .dbt/profiles.yml - dev: - type: databricks - method: http - catalog: {{$catalog}} + # The default target when deployed with the Databricks CLI + # N.B. when you use dbt from the command line, it uses the profile from .dbt/profiles.yml + dev: + type: databricks + method: http + catalog: {{$catalog}} {{- if (regexp "^yes").MatchString .personal_schemas}} - schema: "{{"{{"}} var('dev_schema') {{"}}"}}" + schema: "{{"{{"}} var('dev_schema') {{"}}"}}" {{- else}} - schema: "{{.shared_schema}}" + schema: "{{.shared_schema}}" {{- end}} - http_path: {{.http_path}} + http_path: {{.http_path}} - # The workspace host / token are provided by Databricks - # see databricks.yml for the workspace host used for 'dev' - host: "{{"{{"}} env_var('DBT_HOST') {{"}}"}}" - token: "{{"{{"}} env_var('DBT_ACCESS_TOKEN') {{"}}"}}" + # The workspace host / token are provided by Databricks + # see databricks.yml for the workspace host used for 'dev' + host: "{{"{{"}} env_var('DBT_HOST') {{"}}"}}" + token: "{{"{{"}} env_var('DBT_ACCESS_TOKEN') {{"}}"}}" - # The production target when deployed with the Databricks CLI - prod: - type: databricks - method: http - catalog: {{$catalog}} - schema: {{.shared_schema}} + # The production target when deployed with the Databricks CLI + prod: + type: databricks + method: http + catalog: {{$catalog}} + schema: {{.shared_schema}} - http_path: {{.http_path}} + http_path: {{.http_path}} - # The workspace host / token are provided by Databricks - # see databricks.yml for the workspace host used for 'prod' - host: "{{"{{"}} env_var('DBT_HOST') {{"}}"}}" - token: "{{"{{"}} env_var('DBT_ACCESS_TOKEN') {{"}}"}}" + # The workspace host / token are provided by Databricks + # see databricks.yml for the workspace host used for 'prod' + host: "{{"{{"}} env_var('DBT_HOST') {{"}}"}}" + token: "{{"{{"}} env_var('DBT_ACCESS_TOKEN') {{"}}"}}"