obarisk commented on code in PR #55110:
URL: https://github.com/apache/airflow/pull/55110#discussion_r2431022957


##########
providers/apache/hive/src/airflow/providers/apache/hive/operators/hive.py:
##########
@@ -143,9 +143,15 @@ def execute(self, context: Context) -> None:
         # set the mapred_job_name if it's not set with dag, task, execution 
time info
         if not self.mapred_job_name:
             ti = context["ti"]
-            logical_date = context["logical_date"]
+            logical_date = context.get("logical_date", None)
             if logical_date is None:
-                raise RuntimeError("logical_date is None")
+                raise RuntimeError(
+                    "logical_date is None. Please make sure the task is not 
used in an asset-triggered Dag. "
+                    "HiveOperator was designed to work with timetable 
scheduled Dags, "
+                    "and asset-triggered Dags do not have logical_date. "
+                    "If asset-triggered HiveOperator is a required use case, "
+                    "please open an issue on the Airflow project."

Review Comment:
   If I remember correctly, it's only prefer `Dag` instead of dag nor DAG. Is 
this correct?



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