โ11-03-2022 05:36 AM
โ11-03-2022 07:26 AM
List all notebooks by making API call and then run them by using dbutils.notebook.run:
import requests
ctx = dbutils.notebook.entry_point.getDbutils().notebook().getContext()
host_name = ctx.tags().get("browserHostName").get()
host_token = ctx.apiToken().get()
notebook_folder = '/Users/hubert.dudek@databrickster.com'
response = requests.get(
f'https://{host_name}/api/2.0/workspace/list',
headers={'Authorization': f'Bearer {host_token}'},
json={'path': notebook_folder}
).json()
for notebook in response['objects']:
if notebook['object_type'] == 'NOTEBOOK':
dbutils.notebook.run(notebook['path'], 1800)
โ11-03-2022 05:49 AM
hello, could you detail what the file type would be? To run several files you could enter the *(asterisk)
โ11-03-2022 07:26 AM
List all notebooks by making API call and then run them by using dbutils.notebook.run:
import requests
ctx = dbutils.notebook.entry_point.getDbutils().notebook().getContext()
host_name = ctx.tags().get("browserHostName").get()
host_token = ctx.apiToken().get()
notebook_folder = '/Users/hubert.dudek@databrickster.com'
response = requests.get(
f'https://{host_name}/api/2.0/workspace/list',
headers={'Authorization': f'Bearer {host_token}'},
json={'path': notebook_folder}
).json()
for notebook in response['objects']:
if notebook['object_type'] == 'NOTEBOOK':
dbutils.notebook.run(notebook['path'], 1800)
โ11-03-2022 12:17 PM
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