cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Read arguments in a scala note invoked by a job.

rrussell25
New Contributor

In a scala note, how to I read input arguments (e.g. those proved by a job that runs a scala notebook). In python, dbutils.notebook.entry_point.getCurrentBindings() works. How about for scala.

1 REPLY 1

UmaMahesh1
Honored Contributor III

Hi @Robert Russell​ 

You can use dbutils.notebook.getContext.currentRunId in scala notebooks.

Other methods are also available like

dbutils.notebook.getContext.jobGroup

dbutils.notebook.getContext.rootRunId

dbutils.notebook.getContext.tags etc...

You can check out the list of methods available in getContext using the autofill feature 😅 by hitting tab after dbutils.notebook.getContext.

Cheers..

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.