run_notebook
Creates, updates, deletes, gets or lists a run_notebook resource.
Overview
| Name | run_notebook |
| Type | Resource |
| Id | azure.synapse_artifacts.run_notebook |
Fields
The following fields are returned by SELECT queries:
- get_status
| Name | Datatype | Description |
|---|---|---|
message | string | Response message. |
result | object | Result of run notebook. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_status | select | run_id, endpoint | Get RunNotebook Status for run id. | |
create_run | insert | run_id, endpoint | Run notebook. | |
get_snapshot | exec | run_id, endpoint | Get RunNotebook Snapshot for run id. | |
cancel_run | exec | run_id, endpoint | Cancel notebook run. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme). (default: ) |
run_id | string | Notebook run id. For Create Run, you can generate a new GUID and use it here. For other actions, this is the same ID used in Create Run. Required. |
SELECT examples
- get_status
Get RunNotebook Status for run id.
SELECT
message,
result
FROM azure.synapse_artifacts.run_notebook
WHERE run_id = '{{ run_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
INSERT examples
- create_run
- Manifest
Run notebook.
INSERT INTO azure.synapse_artifacts.run_notebook (
notebook,
sparkPool,
sessionOptions,
honorSessionTimeToLive,
parameters,
run_id,
endpoint
)
SELECT
'{{ notebook }}',
'{{ sparkPool }}',
'{{ sessionOptions }}',
{{ honorSessionTimeToLive }},
'{{ parameters }}',
'{{ run_id }}',
'{{ endpoint }}'
RETURNING
message,
result
;
# Description fields are for documentation purposes
- name: run_notebook
props:
- name: run_id
value: "{{ run_id }}"
description: Required parameter for the run_notebook resource.
- name: endpoint
value: "{{ endpoint }}"
description: Required parameter for the run_notebook resource.
- name: notebook
value: "{{ notebook }}"
description: |
Notebook name.
- name: sparkPool
value: "{{ sparkPool }}"
description: |
SparkPool name.
- name: sessionOptions
description: |
Session properties.
value:
tags: "{{ tags }}"
kind: "{{ kind }}"
proxyUser: "{{ proxyUser }}"
name: "{{ name }}"
jars:
- "{{ jars }}"
pyFiles:
- "{{ pyFiles }}"
files:
- "{{ files }}"
archives:
- "{{ archives }}"
queue: "{{ queue }}"
conf: "{{ conf }}"
driverMemory: "{{ driverMemory }}"
driverCores: {{ driverCores }}
executorMemory: "{{ executorMemory }}"
executorCores: {{ executorCores }}
numExecutors: {{ numExecutors }}
isQueueable: {{ isQueueable }}
heartbeatTimeoutInSecond: {{ heartbeatTimeoutInSecond }}
- name: honorSessionTimeToLive
value: {{ honorSessionTimeToLive }}
description: |
Whether session should run till time to live after run completes.
- name: parameters
value: "{{ parameters }}"
description: |
Run notebook parameters.
Lifecycle Methods
- get_snapshot
- cancel_run
Get RunNotebook Snapshot for run id.
EXEC azure.synapse_artifacts.run_notebook.get_snapshot
@run_id='{{ run_id }}' --required,
@endpoint='{{ endpoint }}' --required
;
Cancel notebook run.
EXEC azure.synapse_artifacts.run_notebook.cancel_run
@run_id='{{ run_id }}' --required,
@endpoint='{{ endpoint }}' --required
;