Lee-W commented on code in PR #70581:
URL: https://github.com/apache/airflow/pull/70581#discussion_r3664931012
##########
providers/dbt/cloud/src/airflow/providers/dbt/cloud/hooks/dbt.py:
##########
@@ -341,13 +343,30 @@ async def get_job_status(
job_run_status: int = response["data"]["status"]
return job_run_status
+ @staticmethod
+ def _require_password(conn: Connection) -> Connection:
+ if not conn.password:
+ raise AirflowException("An API token is required to connect to dbt
Cloud.")
+ return conn
+
@cached_property
def connection(self) -> Connection:
Review Comment:
I think we'll at least need some docstring here or someone else will use
this again and encounter the same issue. Are we encountering such behavior in
other hooks as well? or is it a dbt specific thing?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]