databricks / bundle-examples

Examples of Databricks Asset Bundles
Other
57 stars 23 forks source link

Fix Dbt profile name for asset bundle deployment #27

Closed kijewskimateusz closed 1 month ago

kijewskimateusz commented 1 month ago

Hello Team,

While tinkering with your solution, I've noticed that profiles provided in dbt_project.yml and profiles.yml do not align. This led to the following error, when deploying dbt using asset bundles:

+ dbt deps --target=dev
11:24:02  Running with dbt=1.8.2
11:24:02  Warning: No packages were found in packages.yml
11:24:02  Warning: No packages were found in packages.yml

+ dbt seed --target=dev --vars '{ dev_schema: mateusz_kijewski }'
11:24:05  Running with dbt=1.8.2
11:24:05  Encountered an error:
Runtime Error
  Could not find profile named 'dbt_sql'

I have corrected profile name in profiles.yml to the name provided in dbt_project.yml. Using the opportunity of forking your repo, I've also updated tests configuration in model config as starting of dbt v1.8 it's been raising warnings of configuration change from tests to data_tests

11:31:34  [WARNING]: Deprecated functionality
The `tests` config has been renamed to `data_tests`. Please see
https://docs.getdbt.com/docs/build/data-tests#new-data_tests-syntax for more
information.
pietern commented 1 month ago

Thanks for reporting! This should be addressed in the template itself. This repository contains the materialized template.

kijewskimateusz commented 1 month ago

Thanks for reporting! This should be addressed in the template itself. This repository contains the materialized template.

Could you please point me to the right direction in which repository will I find the template to fix?

EDIT: NVM found it in https://github.com/databricks/cli repository

pietern commented 1 month ago

The template is located at https://github.com/databricks/cli/tree/main/libs/template/templates/dbt-sql.

We do require a CLA for contributions. If you're willing to sign it then we'll happily accept a contribution!

kijewskimateusz commented 1 month ago

Hah, I've already been editing my previous comment with mention that I've found it. Let's keep it under the rug for a day, later today I'll create an issue with following PR fixing the issue into the CLI repo.

Have a great day!