From 0d8775e05e398867d14541a6d7f7af0c7029bbf5 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Mon, 27 May 2024 15:36:32 +0200 Subject: [PATCH 1/8] Make default-sql and dbt-sql templates public --- cmd/bundle/init.go | 2 -- libs/template/materialize.go | 16 ++++++++------ .../dbt-sql/databricks_template_schema.json | 4 ++-- .../dbt_profiles/profiles.yml.tmpl | 21 +++++++++++++------ .../resources/{{.project_name}}_job.yml.tmpl | 13 ++++++------ .../databricks_template_schema.json | 4 ++-- .../src/orders_daily.sql.tmpl | 11 +++++++--- 7 files changed, 44 insertions(+), 27 deletions(-) diff --git a/cmd/bundle/init.go b/cmd/bundle/init.go index 6845ab672b..14f265c720 100644 --- a/cmd/bundle/init.go +++ b/cmd/bundle/init.go @@ -38,12 +38,10 @@ var nativeTemplates = []nativeTemplate{ { name: "default-sql", description: "The default SQL template for .sql files that run with Databricks SQL", - hidden: true, }, { name: "dbt-sql", description: "The dbt SQL template (https://www.databricks.com/blog/delivering-cost-effective-data-real-time-dbt-and-databricks)", - hidden: true, }, { name: "mlops-stacks", diff --git a/libs/template/materialize.go b/libs/template/materialize.go index 811ef9259b..ff19189b13 100644 --- a/libs/template/materialize.go +++ b/libs/template/materialize.go @@ -53,12 +53,6 @@ func Materialize(ctx context.Context, configFilePath, templateRoot, outputDir st return err } - // Print welcome message - welcome := config.schema.WelcomeMessage - if welcome != "" { - cmdio.LogString(ctx, welcome) - } - // Read and assign config values from file if configFilePath != "" { err = config.assignValuesFromFile(configFilePath) @@ -72,6 +66,16 @@ func Materialize(ctx context.Context, configFilePath, templateRoot, outputDir st return err } + // Print welcome message + welcome := config.schema.WelcomeMessage + if welcome != "" { + welcome, err = r.executeTemplate(welcome) + if err != nil { + return err + } + cmdio.LogString(ctx, welcome) + } + // Prompt user for any missing config values. Assign default values if // terminal is not TTY err = config.promptOrAssignDefaultValues(r) diff --git a/libs/template/templates/dbt-sql/databricks_template_schema.json b/libs/template/templates/dbt-sql/databricks_template_schema.json index 7b39f61878..1e273093ff 100644 --- a/libs/template/templates/dbt-sql/databricks_template_schema.json +++ b/libs/template/templates/dbt-sql/databricks_template_schema.json @@ -1,12 +1,12 @@ { - "welcome_message": "\nWelcome to the (EXPERIMENTAL) dbt template for Databricks Asset Bundles!", + "welcome_message": "\nWelcome to the dbt template for Databricks Asset Bundles!\n\nWorkspace host selected based on your current profile (see https://docs.databricks.com/dev-tools/cli/profiles.html for how to change this).\nworkspace_host: {{workspace_host}}", "properties": { "project_name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9-_]+$", "pattern_match_failure_message": "Name must consist of letters, numbers, dashes, and underscores.", "default": "dbt_project", - "description": "\nPlease provide a unique name for this project.\nproject_name", + "description": "\nWorkspace selected based on your current profile (see https://docs.databricks.com/dev-tools/cli/profiles.html for how to change this).\nworkspace_host: {{workspace_host}}\n\nPlease provide a unique name for this project.\nproject_name", "order": 1 }, "http_path": { 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 d29bd55ce3..cce80f8d4c 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 @@ -3,26 +3,35 @@ {{- $catalog = "\"\" # workspace default"}} {{- end}} # This file defines dbt profiles for deployed dbt jobs. -# Note that for local development you should create your own, local profile. -# (see README.md). my_dbt_project: target: dev # default target outputs: - dev: + # 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}} +{{- if (regexp "^yes").MatchString .personal_schemas}} schema: "{{"{{"}} var('dev_schema') {{"}}"}}" +{{- else}} + schema: "{{.shared_schema}}" +{{- end}} http_path: {{.http_path}} # The workspace host / token are provided by Databricks - # see databricks.yml for the host used for 'dev' + # see databricks.yml for the workspace host used for 'dev' host: "{{"{{"}} env_var('DBT_HOST') {{"}}"}}" token: "{{"{{"}} env_var('DBT_ACCESS_TOKEN') {{"}}"}}" - prod: + # The production target when deployed with the Databricks CLI + prod: type: databricks method: http catalog: {{$catalog}} @@ -31,6 +40,6 @@ my_dbt_project: http_path: {{.http_path}} # The workspace host / token are provided by Databricks - # see databricks.yml for the host used for 'dev' + # 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}}/resources/{{.project_name}}_job.yml.tmpl b/libs/template/templates/dbt-sql/template/{{.project_name}}/resources/{{.project_name}}_job.yml.tmpl index 688c23b920..d4c6eee332 100644 --- a/libs/template/templates/dbt-sql/template/{{.project_name}}/resources/{{.project_name}}_job.yml.tmpl +++ b/libs/template/templates/dbt-sql/template/{{.project_name}}/resources/{{.project_name}}_job.yml.tmpl @@ -12,10 +12,6 @@ resources: on_failure: - {{user_name}} -{{- $dev_schema := .shared_schema }} -{{- if (regexp "^yes").MatchString .personal_schemas}} -{{- $dev_schema = "${workspace.current_user.short_name}"}} -{{- end}} tasks: - task_key: dbt @@ -26,8 +22,13 @@ resources: profiles_directory: dbt_profiles/ commands: - 'dbt deps --target=${bundle.target}' - - 'dbt seed --target=${bundle.target} --vars "{ dev_schema: {{$dev_schema}} }"' - - 'dbt run --target=${bundle.target} --vars "{ dev_schema: {{$dev_schema}} }"' +{{- if (regexp "^yes").MatchString .personal_schemas}} + - 'dbt seed --target=${bundle.target} --vars "{ dev_schema: ${workspace.current_user.short_name} }"' + - 'dbt run --target=${bundle.target} --vars "{ dev_schema: ${workspace.current_user.short_name} }"' +{{- else}} + - 'dbt seed' + - 'dbt run' +{{- end}} libraries: - pypi: diff --git a/libs/template/templates/default-sql/databricks_template_schema.json b/libs/template/templates/default-sql/databricks_template_schema.json index b7a42e1988..69a4bbb5f9 100644 --- a/libs/template/templates/default-sql/databricks_template_schema.json +++ b/libs/template/templates/default-sql/databricks_template_schema.json @@ -1,10 +1,10 @@ { - "welcome_message": "\nWelcome to the (EXPERIMENTAL) default SQL template for Databricks Asset Bundles!", + "welcome_message": "\nWelcome to the default SQL template for Databricks Asset Bundles!", "properties": { "project_name": { "type": "string", "default": "sql_project", - "description": "\nPlease provide a unique name for this project.\nproject_name", + "description": "\nWorkspace selected based on your current profile (see https://docs.databricks.com/dev-tools/cli/profiles.html for how to change this).\nworkspace_host: {{workspace_host}}\n\nPlease provide a unique name for this project.\nproject_name", "order": 1, "pattern": "^[A-Za-z_][A-Za-z0-9-_]+$", "pattern_match_failure_message": "Name must consist of letters, numbers, dashes, and underscores." diff --git a/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl b/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl index 76ecadd3ea..d4dd6af59e 100644 --- a/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl +++ b/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl @@ -1,5 +1,5 @@ -- This query is executed using Databricks Workflows (see resources/{{.project_name}}_sql_job.yml) -{{- /* We can't use a materialized view here since they don't support 'create or refresh yet.*/}} +{{- /* We can't use a materialized view here since they don't support 'create or refresh' yet.*/}} CREATE OR REPLACE VIEW IDENTIFIER(CONCAT({{"{{"}}catalog{{"}}"}}, '.', {{"{{"}}schema{{"}}"}}, '.', 'orders_daily')) @@ -8,7 +8,12 @@ AS SELECT FROM IDENTIFIER(CONCAT({{"{{"}}catalog{{"}}"}}, '.', {{"{{"}}schema{{"}}"}}, '.', 'orders_raw')) --- During development, only process a smaller range of data -WHERE {{"{{"}}bundle_target{{"}}"}} == "prod" OR (order_date >= '2019-08-01' AND order_date < '2019-09-01') +WHERE if( + {{"{{"}}bundle_target{{"}}"}} != "prod", + true, + + -- During development, only process a smaller range of data + order_date >= '2019-08-01' AND order_date < '2019-09-01' +) GROUP BY order_date From 55f55a5c94016c6ba21d0b7f570915d2e5c553ca Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Mon, 27 May 2024 20:51:02 +0200 Subject: [PATCH 2/8] Refine template based on multi-statement support --- .../template/{{.project_name}}/src/orders_daily.sql.tmpl | 7 +++++-- .../template/{{.project_name}}/src/orders_raw.sql.tmpl | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl b/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl index d4dd6af59e..7c86f92121 100644 --- a/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl +++ b/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl @@ -1,12 +1,15 @@ -- This query is executed using Databricks Workflows (see resources/{{.project_name}}_sql_job.yml) {{- /* We can't use a materialized view here since they don't support 'create or refresh' yet.*/}} +USE CATALOG {{"{{"}}catalog{{"}}"}}; +USE IDENTIFIER({{"{{"}}schema{{"}}"}}); + CREATE OR REPLACE VIEW - IDENTIFIER(CONCAT({{"{{"}}catalog{{"}}"}}, '.', {{"{{"}}schema{{"}}"}}, '.', 'orders_daily')) + orders_daily AS SELECT order_date, count(*) AS number_of_orders FROM - IDENTIFIER(CONCAT({{"{{"}}catalog{{"}}"}}, '.', {{"{{"}}schema{{"}}"}}, '.', 'orders_raw')) + orders_raw WHERE if( {{"{{"}}bundle_target{{"}}"}} != "prod", diff --git a/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_raw.sql.tmpl b/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_raw.sql.tmpl index 96769062b5..c73606ef1a 100644 --- a/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_raw.sql.tmpl +++ b/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_raw.sql.tmpl @@ -3,8 +3,11 @@ -- The streaming table below ingests all JSON files in /databricks-datasets/retail-org/sales_orders/ -- See also https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-streaming-table.html +USE CATALOG {{"{{"}}catalog{{"}}"}}; +USE IDENTIFIER({{"{{"}}schema{{"}}"}}); + CREATE OR REFRESH STREAMING TABLE - IDENTIFIER(CONCAT({{"{{"}}catalog{{"}}"}}, '.', {{"{{"}}schema{{"}}"}}, '.', 'orders_raw')) + orders_raw AS SELECT customer_name, DATE(TIMESTAMP(FROM_UNIXTIME(TRY_CAST(order_datetime AS BIGINT)))) AS order_date, From 3d1c2f55582f0bbb66bd7fce6a9e38e3740d076e Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Sun, 2 Jun 2024 13:06:31 +0200 Subject: [PATCH 3/8] Simplify schema selection --- .../template/{{.project_name}}/src/orders_daily.sql.tmpl | 2 +- .../template/{{.project_name}}/src/orders_raw.sql.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl b/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl index 7c86f92121..870fe9c0b8 100644 --- a/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl +++ b/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_daily.sql.tmpl @@ -2,7 +2,7 @@ {{- /* We can't use a materialized view here since they don't support 'create or refresh' yet.*/}} USE CATALOG {{"{{"}}catalog{{"}}"}}; -USE IDENTIFIER({{"{{"}}schema{{"}}"}}); +USE {{"{{"}}schema{{"}}"}}; CREATE OR REPLACE VIEW orders_daily diff --git a/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_raw.sql.tmpl b/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_raw.sql.tmpl index c73606ef1a..d5891895a7 100644 --- a/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_raw.sql.tmpl +++ b/libs/template/templates/default-sql/template/{{.project_name}}/src/orders_raw.sql.tmpl @@ -4,7 +4,7 @@ -- See also https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-streaming-table.html USE CATALOG {{"{{"}}catalog{{"}}"}}; -USE IDENTIFIER({{"{{"}}schema{{"}}"}}); +USE {{"{{"}}schema{{"}}"}}; CREATE OR REFRESH STREAMING TABLE orders_raw From e684e88d321276c7dfd3e09eac3542b236e31633 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Sun, 2 Jun 2024 13:12:29 +0200 Subject: [PATCH 4/8] Cleanup --- libs/template/templates/dbt-sql/databricks_template_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/template/templates/dbt-sql/databricks_template_schema.json b/libs/template/templates/dbt-sql/databricks_template_schema.json index 1e273093ff..ee3b8121de 100644 --- a/libs/template/templates/dbt-sql/databricks_template_schema.json +++ b/libs/template/templates/dbt-sql/databricks_template_schema.json @@ -1,5 +1,5 @@ { - "welcome_message": "\nWelcome to the dbt template for Databricks Asset Bundles!\n\nWorkspace host selected based on your current profile (see https://docs.databricks.com/dev-tools/cli/profiles.html for how to change this).\nworkspace_host: {{workspace_host}}", + "welcome_message": "\nWelcome to the dbt template for Databricks Asset Bundles!", "properties": { "project_name": { "type": "string", From 7afc0cdf0b56a77fad5493dab116f4b73a9abaa2 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Mon, 3 Jun 2024 09:08:13 +0200 Subject: [PATCH 5/8] Fix tests --- cmd/bundle/init.go | 2 +- cmd/bundle/init_test.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/bundle/init.go b/cmd/bundle/init.go index 14f265c720..c8c59c1490 100644 --- a/cmd/bundle/init.go +++ b/cmd/bundle/init.go @@ -41,7 +41,7 @@ var nativeTemplates = []nativeTemplate{ }, { name: "dbt-sql", - description: "The dbt SQL template (https://www.databricks.com/blog/delivering-cost-effective-data-real-time-dbt-and-databricks)", + description: "The dbt SQL template (databricks.com/blog/delivering-cost-effective-data-real-time-dbt-and-databricks)", }, { name: "mlops-stacks", diff --git a/cmd/bundle/init_test.go b/cmd/bundle/init_test.go index aa89915968..475b2e1499 100644 --- a/cmd/bundle/init_test.go +++ b/cmd/bundle/init_test.go @@ -30,6 +30,8 @@ func TestBundleInitRepoName(t *testing.T) { func TestNativeTemplateOptions(t *testing.T) { expected := []cmdio.Tuple{ {Name: "default-python", Id: "The default Python template for Notebooks / Delta Live Tables / Workflows"}, + {Name: "default-sql", Id: "The default SQL template for .sql files that run with Databricks SQL"}, + {Name: "dbt-sql", Id: "The dbt SQL template (databricks.com/blog/delivering-cost-effective-data-real-time-dbt-and-databricks)"}, {Name: "mlops-stacks", Id: "The Databricks MLOps Stacks template (github.com/databricks/mlops-stacks)"}, {Name: "custom...", Id: "Bring your own template"}, } @@ -38,6 +40,8 @@ func TestNativeTemplateOptions(t *testing.T) { func TestNativeTemplateHelpDescriptions(t *testing.T) { expected := `- default-python: The default Python template for Notebooks / Delta Live Tables / Workflows +- default-sql: The default SQL template for .sql files that run with Databricks SQL +- dbt-sql: The dbt SQL template (databricks.com/blog/delivering-cost-effective-data-real-time-dbt-and-databricks) - mlops-stacks: The Databricks MLOps Stacks template (github.com/databricks/mlops-stacks)` assert.Equal(t, expected, nativeTemplateHelpDescriptions()) } From 33d6edfc2389e66775f3ba123cecb1d85a5f08f4 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Mon, 3 Jun 2024 13:18:21 +0200 Subject: [PATCH 6/8] Move workspace_host to welcome message --- .../templates/dbt-sql/databricks_template_schema.json | 4 ++-- .../templates/default-sql/databricks_template_schema.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/template/templates/dbt-sql/databricks_template_schema.json b/libs/template/templates/dbt-sql/databricks_template_schema.json index ee3b8121de..7fc353521f 100644 --- a/libs/template/templates/dbt-sql/databricks_template_schema.json +++ b/libs/template/templates/dbt-sql/databricks_template_schema.json @@ -1,12 +1,12 @@ { - "welcome_message": "\nWelcome to the dbt template for Databricks Asset Bundles!", + "welcome_message": "\nWelcome to the dbt template for Databricks Asset Bundles!\n\nWorkspace selected based on your current profile (see https://docs.databricks.com/dev-tools/cli/profiles.html for how to change this).\nworkspace_host: {{workspace_host}}", "properties": { "project_name": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9-_]+$", "pattern_match_failure_message": "Name must consist of letters, numbers, dashes, and underscores.", "default": "dbt_project", - "description": "\nWorkspace selected based on your current profile (see https://docs.databricks.com/dev-tools/cli/profiles.html for how to change this).\nworkspace_host: {{workspace_host}}\n\nPlease provide a unique name for this project.\nproject_name", + "description": "\nPlease provide a unique name for this project.\nproject_name", "order": 1 }, "http_path": { diff --git a/libs/template/templates/default-sql/databricks_template_schema.json b/libs/template/templates/default-sql/databricks_template_schema.json index 69a4bbb5f9..aacd6a0afc 100644 --- a/libs/template/templates/default-sql/databricks_template_schema.json +++ b/libs/template/templates/default-sql/databricks_template_schema.json @@ -1,10 +1,10 @@ { - "welcome_message": "\nWelcome to the default SQL template for Databricks Asset Bundles!", + "welcome_message": "\nWelcome to the default SQL template for Databricks Asset Bundles!\n\nWorkspace selected based on your current profile (see https://docs.databricks.com/dev-tools/cli/profiles.html for how to change this).\nworkspace_host: {{workspace_host}}", "properties": { "project_name": { "type": "string", "default": "sql_project", - "description": "\nWorkspace selected based on your current profile (see https://docs.databricks.com/dev-tools/cli/profiles.html for how to change this).\nworkspace_host: {{workspace_host}}\n\nPlease provide a unique name for this project.\nproject_name", + "description": "\nPlease provide a unique name for this project.\nproject_name", "order": 1, "pattern": "^[A-Za-z_][A-Za-z0-9-_]+$", "pattern_match_failure_message": "Name must consist of letters, numbers, dashes, and underscores." From df7968f17948ad0c959b5297b724697fb6e475b1 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Tue, 4 Jun 2024 09:48:01 +0200 Subject: [PATCH 7/8] Adding a comment --- .../resources/{{.project_name}}_job.yml.tmpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/template/templates/dbt-sql/template/{{.project_name}}/resources/{{.project_name}}_job.yml.tmpl b/libs/template/templates/dbt-sql/template/{{.project_name}}/resources/{{.project_name}}_job.yml.tmpl index d4c6eee332..d6a38dc891 100644 --- a/libs/template/templates/dbt-sql/template/{{.project_name}}/resources/{{.project_name}}_job.yml.tmpl +++ b/libs/template/templates/dbt-sql/template/{{.project_name}}/resources/{{.project_name}}_job.yml.tmpl @@ -21,11 +21,14 @@ resources: # The default schema, catalog, etc. are defined in ../dbt_profiles/profiles.yml profiles_directory: dbt_profiles/ commands: - - 'dbt deps --target=${bundle.target}' {{- if (regexp "^yes").MatchString .personal_schemas}} + # The dbt commands to run (see also dbt_profiles/profiles.yml; dev_schema is used in the dev profile) + - 'dbt deps --target=${bundle.target}' - 'dbt seed --target=${bundle.target} --vars "{ dev_schema: ${workspace.current_user.short_name} }"' - 'dbt run --target=${bundle.target} --vars "{ dev_schema: ${workspace.current_user.short_name} }"' {{- else}} + # The dbt commands to run (see also the dev/prod profiles in dbt_profiles/profiles.yml) + - 'dbt deps --target=${bundle.target}' - 'dbt seed' - 'dbt run' {{- end}} From ccd9bf87477400182be02e1bbba90d478288015c Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Tue, 4 Jun 2024 10:50:26 +0200 Subject: [PATCH 8/8] Fix run command --- .../resources/{{.project_name}}_job.yml.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/template/templates/dbt-sql/template/{{.project_name}}/resources/{{.project_name}}_job.yml.tmpl b/libs/template/templates/dbt-sql/template/{{.project_name}}/resources/{{.project_name}}_job.yml.tmpl index d6a38dc891..acf1aa4807 100644 --- a/libs/template/templates/dbt-sql/template/{{.project_name}}/resources/{{.project_name}}_job.yml.tmpl +++ b/libs/template/templates/dbt-sql/template/{{.project_name}}/resources/{{.project_name}}_job.yml.tmpl @@ -29,8 +29,8 @@ resources: {{- else}} # The dbt commands to run (see also the dev/prod profiles in dbt_profiles/profiles.yml) - 'dbt deps --target=${bundle.target}' - - 'dbt seed' - - 'dbt run' + - 'dbt seed --target=${bundle.target}' + - 'dbt run --target=${bundle.target}' {{- end}} libraries: