I have multiple %run statements currently in multiple lines in my databricks python notebook that work when running them one at a time. I was wondering if there was a way to combine them into one cell so that I don't have to run each individually. I have tried putting them together but keep getting errors
%run {location of file}
%run {location of file}
...
%run {location of file}
Error:
Failed to parse %run command: string matching regex `\$[\w_]+' expected but `%' found)
Below is what I tried based off OneCricketeer's suggestion. Turns out this solution doesn't resolve the issue.
notebooks = [
('{location of file}'),
('{location of file}'),
('{location of file}')]
for n in notebooks:
dbutils.notebook.run(n,60)
print('Finished loading notebook ' + n)
Generally, only first
%"command" is executable in any cell.To programmatically run a notebook, take a look at
dbutils.notebook.runExample