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

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

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

adriennn
Valued Contributor

 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.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now