Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow nested YAML in profile templates #4466

Closed
wants to merge 1 commit into from
Closed

feat: allow nested YAML in profile templates #4466

wants to merge 1 commit into from

Conversation

edgarrmondragon
Copy link
Contributor

resolves #4462

Description

Allow YAML objects and arrays to be parsed from user input or passed directly from default values in order to fill the target profile.

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change

@NiallRees
Copy link
Contributor

I do like the flexibility that this would offer and it definitely resolves the issue you raised! Will leave a comment around making this more interactive on the issue.

Copy link
Contributor

@nathaniel-may nathaniel-may left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this is still in draft, but I'm leaving a small note here while you work on it.

Comment on lines +62 to +63
if isinstance(value, str):
return yaml.safe_load(value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If value is an empty string, yaml.safe_load will return None. I'm pointing it out because we had a previous production bug because of this. Not sure how the click library handles None values.

@gshank gshank removed their request for review March 25, 2022 14:11
@github-actions
Copy link
Contributor

This PR has been marked as Stale because it has been open for 180 days with no activity. If you would like the PR to remain open, please remove the stale label or comment on the PR, or it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues that have gone stale label Sep 22, 2022
@github-actions github-actions bot closed this Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes stale Issues that have gone stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Allow dbt init to use profile templates with nested configurations
4 participants