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

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

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!

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!