uranusjr commented on a change in pull request #19053:
URL: https://github.com/apache/airflow/pull/19053#discussion_r732229012



##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -446,13 +469,14 @@ Here we are passing a ``GET`` request to get the data 
from the URL and save it i
           from "Employees_temp";
       """
       try:
-          postgres_hook = PostgresHook(postgres_conn_id="LOCAL")
+          postgres_hook = PostgresHook(postgres_conn_id=conn_id)
           conn = postgres_hook.get_conn()
           cur = conn.cursor()
           cur.execute(query)
           conn.commit()
           return 0
       except Exception as e:
+          logging.error(f"Failed to merge data: {e}")

Review comment:
       Better to
   
   1. Use `logger = logging.getLogger(__name__)` instead of logging directly to 
the root logger.
   2. Use `logger.exception("Failed to merge data")` since it keeps the 
traceback. See documentation of the logging module for more information.




-- 
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]


Reply via email to