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

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