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: 

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..

Uma Mahesh D