Azure Databricks Notebook didn't pass parameter

Viewed 337

I have a problem here, I need to pass my notebook parameter to other notebook. But I got an error here. I have followed the example from Azure Databricks, but it doesn't work.

This is my Notebook Resources script

dbutils.notebook.run('./Test', timeout_seconds=(3600*4), {"current_date": "2022-01-25"})

This is my error

SyntaxError: positional argument follows keyword argument

Sources

1 Answers

if you specified one argument by name, then you need to specify the rest by name as well (see docs):

dbutils.notebook.run('./Test', timeout_seconds=(3600*4), 
   arguments={"current_date": "2022-01-25"})

Or you can omit the first name:

dbutils.notebook.run('./Test', 3600*4, {"current_date": "2022-01-25"})
Related