Skip to content

Commit 972db90

Browse files
authored
Fix indentation issue in dbt-sql template (#3667)
## Why The profiles file was incorrectly indented and made the example job run fail. The indentation change happened in #3026. Fixes #3596. ## Tests Initialized the template and successfully ran the job.
1 parent c02e181 commit 972db90

File tree

2 files changed

+59
-59
lines changed
  • acceptance/bundle/templates/dbt-sql/output/my_dbt_sql/dbt_profiles
  • libs/template/templates/dbt-sql/template/{{.project_name}}/dbt_profiles

2 files changed

+59
-59
lines changed

acceptance/bundle/templates/dbt-sql/output/my_dbt_sql/dbt_profiles/profiles.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@ my_dbt_sql:
44
target: dev # default target
55
outputs:
66

7-
# Doing local development with the dbt CLI?
8-
# Then you should create your own profile in your .dbt/profiles.yml using 'dbt init'
9-
# (See README.md)
10-
11-
# The default target when deployed with the Databricks CLI
12-
# N.B. when you use dbt from the command line, it uses the profile from .dbt/profiles.yml
13-
dev:
14-
type: databricks
15-
method: http
16-
catalog: main
17-
schema: "{{ var('dev_schema') }}"
18-
19-
http_path: /sql/2.0/warehouses/f00dcafe
20-
21-
# The workspace host / token are provided by Databricks
22-
# see databricks.yml for the workspace host used for 'dev'
23-
host: "{{ env_var('DBT_HOST') }}"
24-
token: "{{ env_var('DBT_ACCESS_TOKEN') }}"
25-
26-
# The production target when deployed with the Databricks CLI
27-
prod:
28-
type: databricks
29-
method: http
30-
catalog: main
31-
schema: default
32-
33-
http_path: /sql/2.0/warehouses/f00dcafe
34-
35-
# The workspace host / token are provided by Databricks
36-
# see databricks.yml for the workspace host used for 'prod'
37-
host: "{{ env_var('DBT_HOST') }}"
38-
token: "{{ env_var('DBT_ACCESS_TOKEN') }}"
7+
# Doing local development with the dbt CLI?
8+
# Then you should create your own profile in your .dbt/profiles.yml using 'dbt init'
9+
# (See README.md)
10+
11+
# The default target when deployed with the Databricks CLI
12+
# N.B. when you use dbt from the command line, it uses the profile from .dbt/profiles.yml
13+
dev:
14+
type: databricks
15+
method: http
16+
catalog: main
17+
schema: "{{ var('dev_schema') }}"
18+
19+
http_path: /sql/2.0/warehouses/f00dcafe
20+
21+
# The workspace host / token are provided by Databricks
22+
# see databricks.yml for the workspace host used for 'dev'
23+
host: "{{ env_var('DBT_HOST') }}"
24+
token: "{{ env_var('DBT_ACCESS_TOKEN') }}"
25+
26+
# The production target when deployed with the Databricks CLI
27+
prod:
28+
type: databricks
29+
method: http
30+
catalog: main
31+
schema: default
32+
33+
http_path: /sql/2.0/warehouses/f00dcafe
34+
35+
# The workspace host / token are provided by Databricks
36+
# see databricks.yml for the workspace host used for 'prod'
37+
host: "{{ env_var('DBT_HOST') }}"
38+
token: "{{ env_var('DBT_ACCESS_TOKEN') }}"

libs/template/templates/dbt-sql/template/{{.project_name}}/dbt_profiles/profiles.yml.tmpl

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,39 @@
77
target: dev # default target
88
outputs:
99

10-
# Doing local development with the dbt CLI?
11-
# Then you should create your own profile in your .dbt/profiles.yml using 'dbt init'
12-
# (See README.md)
10+
# Doing local development with the dbt CLI?
11+
# Then you should create your own profile in your .dbt/profiles.yml using 'dbt init'
12+
# (See README.md)
1313

14-
# The default target when deployed with the Databricks CLI
15-
# N.B. when you use dbt from the command line, it uses the profile from .dbt/profiles.yml
16-
dev:
17-
type: databricks
18-
method: http
19-
catalog: {{$catalog}}
14+
# The default target when deployed with the Databricks CLI
15+
# N.B. when you use dbt from the command line, it uses the profile from .dbt/profiles.yml
16+
dev:
17+
type: databricks
18+
method: http
19+
catalog: {{$catalog}}
2020
{{- if (regexp "^yes").MatchString .personal_schemas}}
21-
schema: "{{"{{"}} var('dev_schema') {{"}}"}}"
21+
schema: "{{"{{"}} var('dev_schema') {{"}}"}}"
2222
{{- else}}
23-
schema: "{{.shared_schema}}"
23+
schema: "{{.shared_schema}}"
2424
{{- end}}
2525

26-
http_path: {{.http_path}}
26+
http_path: {{.http_path}}
2727

28-
# The workspace host / token are provided by Databricks
29-
# see databricks.yml for the workspace host used for 'dev'
30-
host: "{{"{{"}} env_var('DBT_HOST') {{"}}"}}"
31-
token: "{{"{{"}} env_var('DBT_ACCESS_TOKEN') {{"}}"}}"
28+
# The workspace host / token are provided by Databricks
29+
# see databricks.yml for the workspace host used for 'dev'
30+
host: "{{"{{"}} env_var('DBT_HOST') {{"}}"}}"
31+
token: "{{"{{"}} env_var('DBT_ACCESS_TOKEN') {{"}}"}}"
3232

33-
# The production target when deployed with the Databricks CLI
34-
prod:
35-
type: databricks
36-
method: http
37-
catalog: {{$catalog}}
38-
schema: {{.shared_schema}}
33+
# The production target when deployed with the Databricks CLI
34+
prod:
35+
type: databricks
36+
method: http
37+
catalog: {{$catalog}}
38+
schema: {{.shared_schema}}
3939

40-
http_path: {{.http_path}}
40+
http_path: {{.http_path}}
4141

42-
# The workspace host / token are provided by Databricks
43-
# see databricks.yml for the workspace host used for 'prod'
44-
host: "{{"{{"}} env_var('DBT_HOST') {{"}}"}}"
45-
token: "{{"{{"}} env_var('DBT_ACCESS_TOKEN') {{"}}"}}"
42+
# The workspace host / token are provided by Databricks
43+
# see databricks.yml for the workspace host used for 'prod'
44+
host: "{{"{{"}} env_var('DBT_HOST') {{"}}"}}"
45+
token: "{{"{{"}} env_var('DBT_ACCESS_TOKEN') {{"}}"}}"

0 commit comments

Comments
 (0)