# Can we connect to Databricks notebooks?

**URL:** <https://forum.knime.com/t/can-we-connect-to-databricks-notebooks/89059>\
**Category:** KNIME Extensions\
**Tags:** big-data-extension\
**Created:** [July 11, 2025, 7:46am UTC](https://forum.knime.com/t/can-we-connect-to-databricks-notebooks/89059 "2025-07-11T07:46:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cuimaple](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/c/e274bd/32.png) [@cuimaple](https://forum.knime.com/u/cuimaple)\
**Post date:** [July 11, 2025, 7:46am UTC](https://forum.knime.com/t/can-we-connect-to-databricks-notebooks/89059/1 "2025-07-11T07:46:59Z")

</div>

I have some notebooks in Databricks, where my SQL is staying. So I am wondering can we connect to these notebooks, so that when I change some SQL, my workflow can also sync with this changes.  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/c/f/cf62a6c7a0306964491590c9e7e3adb020444cba.png)

---

<div class="post-metadata">

**Author:** ![tobias.koetter](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tobias.koetter/32/56844_2.png) [@tobias.koetter](https://forum.knime.com/u/tobias.koetter)\
**Post date:** [July 17, 2025, 9:28pm UTC](https://forum.knime.com/t/can-we-connect-to-databricks-notebooks/89059/2 "2025-07-17T21:28:58Z")

</div>

Hello @cuimaple ,  
I’m not sure what exactly you are trying to do. However we have a component that uses the Databricks jobs API to execute notebook jobs: [DatabricksNotebooks – KNIME Community Hub](https://hub.knime.com/s/T1Ofxx845h-rKS0b)  
Maybe you can use this as an inspiration on how to get connected to the Databricks AI from within KNIME. Maybe you can use the [export API](https://docs.databricks.com/api/workspace/workspace/export) to get the SQL.  
Bye  
Tobias

---

<div class="post-metadata">

**Author:** ![cuimaple](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/c/e274bd/32.png) [@cuimaple](https://forum.knime.com/u/cuimaple)\
**Post date:** [July 18, 2025, 3:51pm UTC](https://forum.knime.com/t/can-we-connect-to-databricks-notebooks/89059/3 "2025-07-18T15:51:14Z")

</div>

Hi，  
I am trying to extract the SQL codes storage in each notebook, then execute it in Knime.

---

<div class="post-metadata">

**Author:** ![cuimaple](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/c/e274bd/32.png) [@cuimaple](https://forum.knime.com/u/cuimaple)\
**Post date:** [July 18, 2025, 4:20pm UTC](https://forum.knime.com/t/can-we-connect-to-databricks-notebooks/89059/4 "2025-07-18T16:20:38Z")

</div>

I have tried to used the export API, but only got some codes which is not familiar with me.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/0/9/09a9c948c06f0da6aeb911903078c78d47b1c263.png)

---

<div class="post-metadata">

**Author:** ![tobias.koetter](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tobias.koetter/32/56844_2.png) [@tobias.koetter](https://forum.knime.com/u/tobias.koetter)\
**Post date:** [July 22, 2025, 12:43pm UTC](https://forum.knime.com/t/can-we-connect-to-databricks-notebooks/89059/5 "2025-07-22T12:43:09Z")

</div>

Hello @cuimaple ,

sorry I wasn’t aware that the result is Base64 encoded. Also the SQL and text boxes are all returned as a single string. That is why I have created an example workflow that uses a component which extracts the individual blocks from a notebook and flags them as comment or not. Check it out her: [DatabricksNotebookExtractSQL – KNIME Community Hub](https://hub.knime.com/s/bHuGP_SZcCNpylTk)

Bye  
Tobias

---

<div class="post-metadata">

**Author:** ![cuimaple](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/c/e274bd/32.png) [@cuimaple](https://forum.knime.com/u/cuimaple)\
**Post date:** [July 23, 2025, 1:04am UTC](https://forum.knime.com/t/can-we-connect-to-databricks-notebooks/89059/6 "2025-07-23T01:04:39Z")

</div>

Hi，  
That’s all right, from your hints, I also successfully decode the Base64 with python node after it. Your example for databricks API helped me a lot. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [July 30, 2025, 1:04am UTC](https://forum.knime.com/t/can-we-connect-to-databricks-notebooks/89059/7 "2025-07-30T01:04:43Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
