Skip to main content

notebook

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

Overview

Namenotebook
TypeResource
Idazure.synapse_artifacts.notebook

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
namestringThe name of the resource. Required.
objectUnmatched properties from the message are deserialized to this collection.
bigDataPoolobjectBig data pool reference.
cellsarrayArray of cells of the current notebook. Required.
descriptionstringThe description of the notebook.
etagstringResource Etag.
folderobjectThe folder that this notebook is in. If not specified, this notebook will appear at the root level.
metadataobjectNotebook root-level metadata. Required.
nbformatintegerNotebook format (major number). Incremented between backwards incompatible changes to the notebook format. Required.
nbformat_minorintegerNotebook format (minor number). Incremented for backward compatible changes to the notebook format. Required.
sessionPropertiesobjectSession properties.
targetSparkConfigurationobjectThe spark configuration of the spark job.
typestringThe type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_notebookselectnotebook_name, endpointIf-None-MatchGets a Note Book.
get_notebooks_by_workspaceselectendpointLists Notebooks.
create_or_update_notebookinsertnotebook_name, endpoint, name, propertiesIf-MatchCreates or updates a Note Book.
create_or_update_notebookreplacenotebook_name, endpoint, name, propertiesIf-MatchCreates or updates a Note Book.
delete_notebookdeletenotebook_name, endpointDeletes a Note book.
get_notebook_summary_by_work_spaceexecendpointLists a summary of Notebooks.
rename_notebookexecnotebook_name, endpointRenames a notebook.

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: )
notebook_namestringThe notebook name. Required.
If-MatchstringETag of the Note book entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. Default value is None.
If-None-MatchstringETag of the Notebook entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. Default value is None.

SELECT examples

Gets a Note Book.

SELECT
id,
name,
,
bigDataPool,
cells,
description,
etag,
folder,
metadata,
nbformat,
nbformat_minor,
sessionProperties,
targetSparkConfiguration,
type
FROM azure.synapse_artifacts.notebook
WHERE notebook_name = '{{ notebook_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND If-None-Match = '{{ If-None-Match }}'
;

INSERT examples

Creates or updates a Note Book.

INSERT INTO azure.synapse_artifacts.notebook (
name,
properties,
notebook_name,
endpoint,
If-Match
)
SELECT
'{{ name }}' /* required */,
'{{ properties }}' /* required */,
'{{ notebook_name }}',
'{{ endpoint }}',
'{{ If-Match }}'
RETURNING
id,
name,
etag,
properties,
type
;

REPLACE examples

Creates or updates a Note Book.

REPLACE azure.synapse_artifacts.notebook
SET
name = '{{ name }}',
properties = '{{ properties }}'
WHERE
notebook_name = '{{ notebook_name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND name = '{{ name }}' --required
AND properties = '{{ properties }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
etag,
properties,
type;

DELETE examples

Deletes a Note book.

DELETE FROM azure.synapse_artifacts.notebook
WHERE notebook_name = '{{ notebook_name }}' --required
AND endpoint = '{{ endpoint }}' --required
;

Lifecycle Methods

Lists a summary of Notebooks.

EXEC azure.synapse_artifacts.notebook.get_notebook_summary_by_work_space 
@endpoint='{{ endpoint }}' --required
;