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

Add staticmethod on the debug task to validate targets #1775

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

beckjake
Copy link
Contributor

The syntax is like this, mirroring the actual contents of a target dict in profiles.yml (and very close to the one proposed in #1754) - instead of having the adapter type a separate argument, it's part of the only parameter:

from dbt.task.debug_task import DebugTask
from dbt.exceptions import DbtConfigError

try:
  DebugTask.validate_connection({'type': 'redshift', 'host': 'abc123', ...})
except DbtConfigError as e:
  ...

I put this on the DebugTask object to re-use some code.

Added unit tests for this feature, and some very basic integration tests for dbt debug.

@cla-bot cla-bot bot added the cla:yes label Sep 23, 2019
@beckjake beckjake force-pushed the feature/validate-targets-programmatically branch from 0a0da95 to fb9e112 Compare September 23, 2019 15:24
@beckjake beckjake changed the base branch from dev/louisa-may-alcott to dev/0.14.3 September 23, 2019 15:24
@cmcarthur cmcarthur self-requested a review September 23, 2019 15:26
@beckjake beckjake force-pushed the feature/validate-targets-programmatically branch from fb9e112 to bc8ca6f Compare September 23, 2019 15:28
@cmcarthur cmcarthur removed their request for review September 23, 2019 15:28
@beckjake beckjake force-pushed the feature/validate-targets-programmatically branch from bc8ca6f to eaa6c67 Compare September 23, 2019 15:53
@beckjake beckjake force-pushed the feature/validate-targets-programmatically branch from eaa6c67 to b78fd60 Compare September 23, 2019 15:56
@drewbanin drewbanin requested review from cmcarthur and removed request for drewbanin September 23, 2019 19:59
@drewbanin
Copy link
Contributor

this LGTM but adding @cmcarthur for the official review!

@beckjake beckjake merged commit 1cce96f into dev/0.14.3 Sep 24, 2019
@beckjake beckjake deleted the feature/validate-targets-programmatically branch September 24, 2019 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants