You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dbt should provide a programmatic method for validating target definitions. This method should accept a plain Python dictionary containing a target definition, as well as the name of an adapter to validate that target with.
If the target is valid (not malformed + dbt can connect to the database and run a select 1 statement), then the method should return a successful result. If there is an issue validating the target or making the request to the database, then the method should raise an exception.
Example API:
import dbt
from dbt.task.debug_task import DebugTask
try:
DebugTask.validate_connection('redshift', {'host': 'abc123', ...})
except ValidationException as e:
...
@beckjake can you help inform the API here? Unsure if it makes sense to build this into the DebugTask, or if this should happen somewhere else.
The big idea is to give production environments (dbt Cloud, Airflow, Jenkins) a good way to validate connections & return a machine readable connection status without requiring a dbt project to be present. Presently, the dbt debug command only works if the command is run from a project directory with a profiles.yml file located somewhere on disk.
Unsure if it makes sense to build this into the DebugTask, or if this should happen somewhere else.
I think it should probably just be a utility function somewhere. We can attach it to the DebugTask namespace if that feels nice to us but I don't think it matters.
Describe the feature
dbt should provide a programmatic method for validating target definitions. This method should accept a plain Python dictionary containing a
target
definition, as well as the name of an adapter to validate that target with.If the target is valid (not malformed + dbt can connect to the database and run a
select 1
statement), then the method should return a successful result. If there is an issue validating the target or making the request to the database, then the method should raise an exception.Example API:
@beckjake can you help inform the API here? Unsure if it makes sense to build this into the DebugTask, or if this should happen somewhere else.
The big idea is to give production environments (dbt Cloud, Airflow, Jenkins) a good way to validate connections & return a machine readable connection status without requiring a dbt project to be present. Presently, the
dbt debug
command only works if the command is run from a project directory with aprofiles.yml
file located somewhere on disk.cc @cmcarthur
The text was updated successfully, but these errors were encountered: