DungTran
New Contributor II

this is a more simple version:

dbutils.notebook.entry_point.getDbutils().notebook().getContext().jobId().get()