Notebook - Get Notebook
Gets a Note Book.
GET {endpoint}/notebooks/{notebookName}?api-version=2020-12-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string uri |
The workspace development endpoint, for example |
notebook
|
path | True |
string |
The notebook name. |
api-version
|
query | True |
string |
The Synapse client API Version. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
If-None-Match |
string |
ETag 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. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. |
|
Other Status Codes |
Not modified. |
|
Other Status Codes |
An error response received from the Azure Synapse service. |
Examples
Notebooks_Get
Sample Request
GET exampleWorkspace.dev.azuresynapse.net/notebooks/exampleNotebook?api-version=2020-12-01
Sample Response
Date: Sat, 16 Jun 2018 00:37:41 GMT
X-Content-Type-Options: nosniff
x-ms-ratelimit-remaining-subscription-writes: 1192
x-ms-request-id: e4c589b7-a9fe-4c28-981c-3855ec27d264
x-ms-correlation-request-id: e4c589b7-a9fe-4c28-981c-3855ec27d264
{
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/notebooks/exampleNotebook",
"name": "exampleNotebook",
"type": "Microsoft.Synapse/workspaces/Notebooks",
"properties": {
"description": "A sample Notebook",
"nbformat": 4,
"nbformat_minor": 2,
"bigDataPool": {
"referenceName": "exampleBigDataPoolName",
"type": "BigDataPoolReference"
},
"sessionProperties": {
"driverMemory": "28g",
"driverCores": 4,
"executorMemory": "28g",
"executorCores": 4,
"numExecutors": 1
},
"metadata": {
"language_info": {
"name": "python"
},
"kernelspec": {
"name": "exampleName",
"display_name": "exampleDisplayName"
}
},
"cells": [
{
"cell_type": "code",
"metadata": {},
"source": [
"def my_function():\n",
" print(\"Hello from a function\")\n",
"\n",
"my_function()"
],
"attachments": {},
"outputs": [
{
"execution_count": 3,
"output_type": "execute_result",
"data": {
"text/plain": "Hello from a function"
},
"metadata": {}
}
]
}
]
},
"etag": "1500504f-0000-0200-0000-5cbe090f0000"
}
Definitions
Name | Description |
---|---|
Big |
Big data pool reference. |
Big |
Big data pool reference type. |
Cell |
Execution, display, or stream outputs. |
Cloud |
The object that defines the structure of an Azure Synapse error response. |
Folder |
The folder that this notebook is in. If not specified, this notebook will appear at the root level. |
Notebook |
Notebook. |
Notebook |
Notebook cell. |
Notebook |
An item of the notebook cell execution output. |
Notebook |
Kernel information. |
Notebook |
Language info. |
Notebook |
Notebook root-level metadata. |
Notebook |
Notebook resource type. |
Notebook |
Session properties. |
Spark |
Spark configuration reference. |
Spark |
Spark configuration reference type. |
BigDataPoolReference
Big data pool reference.
Name | Type | Description |
---|---|---|
referenceName |
string |
Reference big data pool name. |
type |
Big data pool reference type. |
BigDataPoolReferenceType
Big data pool reference type.
Name | Type | Description |
---|---|---|
BigDataPoolReference |
string |
CellOutputType
Execution, display, or stream outputs.
Name | Type | Description |
---|---|---|
display_data |
string |
|
error |
string |
|
execute_result |
string |
|
stream |
string |
CloudError
The object that defines the structure of an Azure Synapse error response.
Name | Type | Description |
---|---|---|
error.code |
string |
Error code. |
error.details |
Array with additional error details. |
|
error.message |
string |
Error message. |
error.target |
string |
Property name/path in request associated with error. |
Folder
The folder that this notebook is in. If not specified, this notebook will appear at the root level.
Name | Type | Description |
---|---|---|
name |
string |
The name of the folder that this notebook is in. |
Notebook
Notebook.
Name | Type | Description |
---|---|---|
bigDataPool |
Big data pool reference. |
|
cells |
Array of cells of the current notebook. |
|
description |
string |
The description of the notebook. |
folder |
The folder that this notebook is in. If not specified, this notebook will appear at the root level. |
|
metadata |
Notebook root-level metadata. |
|
nbformat |
integer |
Notebook format (major number). Incremented between backwards incompatible changes to the notebook format. |
nbformat_minor |
integer |
Notebook format (minor number). Incremented for backward compatible changes to the notebook format. |
sessionProperties |
Session properties. |
|
targetSparkConfiguration |
The spark configuration of the spark job. |
NotebookCell
Notebook cell.
Name | Type | Description |
---|---|---|
attachments |
object |
Attachments associated with the cell. |
cell_type |
string |
String identifying the type of cell. |
metadata |
object |
Cell-level metadata. |
outputs |
Cell-level output items. |
|
source |
string[] |
Contents of the cell, represented as an array of lines. |
NotebookCellOutputItem
An item of the notebook cell execution output.
Name | Type | Description |
---|---|---|
data |
object |
Output data. Use MIME type as key, and content as value. |
execution_count |
integer |
Execution sequence number. |
metadata |
object |
Metadata for the output item. |
name |
string |
For output_type=stream, determines the name of stream (stdout / stderr). |
output_type |
Execution, display, or stream outputs. |
|
text |
|
For output_type=stream, the stream's text output, represented as a string or an array of strings. |
NotebookKernelSpec
Kernel information.
Name | Type | Description |
---|---|---|
display_name |
string |
Name to display in UI. |
name |
string |
Name of the kernel specification. |
NotebookLanguageInfo
Language info.
Name | Type | Description |
---|---|---|
codemirror_mode |
string |
The codemirror mode to use for code in this language. |
name |
string |
The programming language which this kernel runs. |
NotebookMetadata
Notebook root-level metadata.
Name | Type | Description |
---|---|---|
kernelspec |
Kernel information. |
|
language_info |
Language info. |
NotebookResource
Notebook resource type.
Name | Type | Description |
---|---|---|
etag |
string |
Resource Etag. |
id |
string |
Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
The name of the resource |
properties |
Properties of Notebook. |
|
type |
string |
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. |
NotebookSessionProperties
Session properties.
Name | Type | Description |
---|---|---|
driverCores |
integer |
Number of cores to use for the driver. |
driverMemory |
string |
Amount of memory to use for the driver process. |
executorCores |
integer |
Number of cores to use for each executor. |
executorMemory |
string |
Amount of memory to use per executor process. |
numExecutors |
integer |
Number of executors to launch for this session. |
SparkConfigurationReference
Spark configuration reference.
Name | Type | Description |
---|---|---|
referenceName |
string |
Reference spark configuration name. |
type |
Spark configuration reference type. |
SparkConfigurationReferenceType
Spark configuration reference type.
Name | Type | Description |
---|---|---|
SparkConfigurationReference |
string |