cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to capture the Query result via JDBC client execution

inagar
New Contributor
As shown in below screenshots MERGE INTO command produces information about the result (num_affected_rows, num_updated_rows, num_deleted_rows, num_inserted_rows).
Unable to get this information when the same query is being executed via JDBC client. Is there a way to read this information via the JDBC client ?
 
Using below databricks maven dependency
<dependency>
<groupId>com.databricks</groupId>
<artifactId>databricks-jdbc</artifactId>
<version>2.6.36</version></dependency>

Screenshot 2024-06-26 at 1.30.19 AM.pngScreenshot 2024-06-26 at 1.36.10 AM (1).png

Only The Affected rows information can be obtained as shown below.

Screenshot 2024-06-26 at 1.45.23 AM.png

2 REPLIES 2

Rishabh_Tiwari
Databricks Employee
Databricks Employee

Hi @inagar ,

Thank you for reaching out to our community! We're here to help you. 

To ensure we provide you with the best support, could you please take a moment to review the response and choose the one that best answers your question? Your feedback not only helps us assist you better but also benefits other community members who may have similar questions in the future.

If you found the answer helpful, consider giving it a kudo. If the response fully addresses your question, please mark it as the accepted solution. This will help us close the thread and ensure your question is resolved.

We appreciate your participation and are here to assist you further if you need it!

Thanks,

Rishabh

NandiniN
Databricks Employee
Databricks Employee

Delta API can help you get these details. 

Reference - https://docs.databricks.com/en/delta/history.html#history-schema