Skip to content

Commit

Permalink
dbt init profile_template.yml improvements (#4118)
Browse files Browse the repository at this point in the history
* Update profile_template.yml to use same syntax as target_options.yml

* Rename target_options to profile_template

* Update profile_template config spec

automatic commit by git-black, original commits:
  3397bdc
  • Loading branch information
NiallRees authored and iknox-fa committed Feb 8, 2022
1 parent 4b2df56 commit 1cda434
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/dbt/task/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ def write_profile(self, profile: dict, profile_name: str):

def create_profile_from_profile_template(self, profile_template: dict, profile_name: str):
"""Create and write a profile using the supplied profile_template."""
initial_target = profile_template.get('fixed', {})
prompts = profile_template.get('prompts', {})
initial_target = profile_template.get("fixed", {})
prompts = profile_template.get("prompts", {})
target = self.generate_target_from_input(prompts, initial_target)
profile = {"outputs": {"dev": target}, "target": "dev"}
self.write_profile(profile, profile_name)
Expand Down
2 changes: 1 addition & 1 deletion plugins/postgres/dbt/include/postgres/profile_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ prompts:
threads:
hint: '1 or more'
type: 'int'
default: 1
default: 1

0 comments on commit 1cda434

Please sign in to comment.