Skip to main content

run_notebook

Creates, updates, deletes, gets or lists a run_notebook resource.

Overview

Namerun_notebook
TypeResource
Idazure.synapse_artifacts.run_notebook

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
messagestringResponse message.
resultobjectResult of run notebook.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_statusselectrun_id, endpointGet RunNotebook Status for run id.
create_runinsertrun_id, endpointRun notebook.
get_snapshotexecrun_id, endpointGet RunNotebook Snapshot for run id.
cancel_runexecrun_id, endpointCancel 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.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme). (default: )
run_idstringNotebook 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 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

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
;

Lifecycle Methods

Get RunNotebook Snapshot for run id.

EXEC azure.synapse_artifacts.run_notebook.get_snapshot 
@run_id='{{ run_id }}' --required,
@endpoint='{{ endpoint }}' --required
;