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

Start Up Notebook in Databricks

Soma
Valued Contributor

Hi Team,

Is it possible to have a startup notebook in databricks similar to init sql script (

This need to run on start of every cluster )

1 ACCEPTED SOLUTION

Accepted Solutions

Prabakar
Databricks Employee
Databricks Employee

@somanath Sankaranโ€‹ , Running a notebook while the cluster is starting won't be possible. If your requirement is for auditing, you can configure the audit logs.

https://docs.databricks.com/administration-guide/account-settings/audit-logs.html

View solution in original post

5 REPLIES 5

Hubert-Dudek
Esteemed Contributor III

There is a way to do that using terraform but it will be complicated... https://github.com/databrickslabs/terraform-provider-databricks

If you need something less complicated: for jobs cluster is easy just set task on which all others will depend.

Another way which I think of is to set the azure function which runs every minute and checks for new running clusters and then triggers their notebook.

In Azure using event grid and logic apps you can also monitor new VM deployment ad than trigger notebook.

Soma
Valued Contributor

@Hubert Dudekโ€‹ thanks but it will be helpful if Databricks provides something out of the box

as I am planning to set some startup tasks for auditing purpose (for eg secret detection etc ) .

Another easy way is to have %run on top of every notebook but devs can escape by not executing it

Also I need it on interactive cluster

Prabakar
Databricks Employee
Databricks Employee

@somanath Sankaranโ€‹ , Running a notebook while the cluster is starting won't be possible. If your requirement is for auditing, you can configure the audit logs.

https://docs.databricks.com/administration-guide/account-settings/audit-logs.html

Soma
Valued Contributor

@Kaniz Fatmaโ€‹ I think we dont have the option to do the same in Databricks

Soma
Valued Contributor

@Kaniz Fatmaโ€‹ sure will do

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