kadubhumika commented on code in PR #74330: URL: https://github.com/apache/airflow/pull/74330#discussion_r4438516560
########## providers/databricks/docs/operators/run_now.rst: ########## @@ -172,6 +172,44 @@ Durable execution requires Airflow 3.3 or newer, since it relies on the task sta operator always triggers a fresh run on retry, exactly as before this feature existed. + +Explicit assets +^^^^^^^^^^^^^^^ + +Use ``outlets`` to declare the Unity Catalog tables that the job writes to, +using :class:`~airflow.providers.databricks.assets.databricks.UnityTableIdentity`:: + + from airflow.providers.databricks.assets.databricks import UnityTableIdentity + + table = UnityTableIdentity( + host="my-workspace.cloud.databricks.com", + catalog="main", + schema="default", + table="my_airflow_table", + ) + + DatabricksRunNowOperator( + task_id="run_now", + job_id=jobs_create_named.output, + outlets=[ + table.to_asset() Review Comment: Warning text (databricks.py, 2 threads):\ Reworded as suggested in all three operators, and the tests were updated to match. “Why this change?” (SELECT to INSERT in the example): I first changed it to an INSERT because a SELECT doesn’t write to the table, so declaring an outlet on it would be misleading. Following @zozo123’s review, I’ve now also removed the outlet from the SELECT example in the system Dag. The INSERT example stays on the docs page. “Does not infer” (sql_statements.rst): Good point, no other operator in this provider infers tables. I removed that sentence and reworded the intro to just say how to declare outlets with UnityTableIdentity. -- 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]
