You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "daesung9511 (via GitHub)" <gi...@apache.org> on 2025/07/04 23:01:18 UTC
Re: [PR] Fix: ensure get_df uses SQLAlchemy engine to avoid pandas warning [airflow]
daesung9511 commented on code in PR #52224:
URL: https://github.com/apache/airflow/pull/52224#discussion_r2186176634
##########
providers/postgres/src/airflow/providers/postgres/hooks/postgres.py:
##########
@@ -173,6 +180,42 @@ def get_conn(self) -> connection:
self.conn = psycopg2.connect(**conn_args)
return self.conn
+ def get_df(
+ self,
+ sqls: str | list[str],
+ parameters: list | tuple | Mapping[str, Any] | None = None,
+ *,
+ df_type: Literal["pandas", "polars"] = "pandas",
+ **kwargs,
+ ) -> PandasDataFrame | PolarsDataFrame:
+ """
+ Execute the sql and returns a dataframe.
Review Comment:
Yes, I’ve added the return type to the docstring and included a unit test for get_df. Thank you for your review and guidance! Please let me know if there’s anything else I should fix.
@bugraoz93
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org