cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Single task job that runs SQL notebook, can't retrieve results

varonis_evgeniy
Visitor

Hello,

We are integrating databricks and I need to run a job with single task that will run notebok with SQL query in it. 
I Can only use SQL warehouse and no cluster, I need to retrieve a result of the the notebook task but I can't see the results. 
Is there something like dbutils.exit() in SQL notebook ( i can;t run python nor Java) 

Reason for going this way is that I need to run a job on behalf of another user.
Please help. Thank you. 

2 REPLIES 2

Walter_C
Honored Contributor

May I know what is being performed on this query? Is it a select on a table but no results being showed?

adriennn
Contributor II

 I need to retrieve a result of the the notebook task

If you want to know if the task run has succeeded or not, you can enable the "lakeflow" system schema and you'll find the logs of jobs and task runs.

You could then use the above info to execute an SQL query against the logs in a task after you job query task.

In any case, you should provide a better description of the problem you are trying to solve to help people understand what you are trying to achieve.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group