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: 

Impacts of running multiple jobs in parallel that refers the same notebook

Murthy1
Contributor II

Can I run multiple jobs(for example: 100+) in parallel that refers the same notebook? I supply each job with a different parameter. If we can do this, what would be the impact? (for example: reliability, performance, troubleshooting etc. )

Example:

Notebook:

table_name = dbutils.widgets.get("table_name")
 
df = (spark.read.format("parquet").load(f's3://data_source_bucket_name/{table_name}/'))
 
<process  the data >
 
df.write.saveAsTable(table_name,mode="overwrite")

Job 1 Parameters:

table_name = 'Table_1'

Job 2 Parameters:

table_name = 'Table_2'

.

.

.

.

Job 100 Parameters:

table_name = 'Table_100'

Explanation : Read parquet files from the table folder and load into delta table after processing. The processing steps are the same for all the tables.

1 ACCEPTED SOLUTION

Accepted Solutions

Lakshay
Databricks Employee
Databricks Employee

Hi @Murthy Ramalingam​ , you can create multiple jobs referencing the same notebook code without any issue. We generally see issues when writing to the same location or table . However, in your case you will be passing different tables to these jobs, so I expect it to run fine.

For troubleshooting purposes, it is always advisable to use job cluster for different jobs so that the logs for each job run are accessible separately.

View solution in original post

3 REPLIES 3

Lakshay
Databricks Employee
Databricks Employee

Hi @Murthy Ramalingam​ , you can create multiple jobs referencing the same notebook code without any issue. We generally see issues when writing to the same location or table . However, in your case you will be passing different tables to these jobs, so I expect it to run fine.

For troubleshooting purposes, it is always advisable to use job cluster for different jobs so that the logs for each job run are accessible separately.

Anonymous
Not applicable

When you run a job with a notebook, it doesn't go in and hit "run all" in the notebook but makes a copy of it to run.

Anonymous
Not applicable

Hi @Murthy Ramalingam​ 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

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