akifcakir opened a new pull request #21709:
URL: https://github.com/apache/airflow/pull/21709


   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   As its known in Airflow when we have a failed step (submitted a run for a 
Databricks notebook), we are not able to see the error in Airflow logs and need 
to visit the run page via the given link. 
   
   In order to see the notebook error directly in Airflow step logs as in 
below, in airflow.providers.databricks.operators.databricks - 
DatabricksSubmitRunOperator, I enriched the AirflowException error message with 
ValueError from run output by using the Databricks api/2.0/jobs/runs/get-output 
API and additional method in databricks hook 
(airflow.providers.databricks.hooks.databricks - DatabricksHook). The operator 
and hook has been already tested with an example DAG in local setup by running 
test on both with succeed and fail cases.
   
   The new operator has all the functionality of prev version 
DatabricksSubmitRunOperator. Besides it has the functionality that with the API 
endpoint fetches the notebook error and shows the notebook error directly in 
step logs in Airflow.
   


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