How to use Synapse notebooks - Azure Synapse Analytics (2024)

  • Article

A Synapse notebook is a web interface for you to create files that contain live code, visualizations, and narrative text. Notebooks are a good place to validate ideas and use quick experiments to get insights from your data. Notebooks are also widely used in data preparation, data visualization, machine learning, and other Big Data scenarios.

With a Synapse notebook, you can:

  • Get started with zero setup effort.
  • Keep data secure with built-in enterprise security features.
  • Analyze data across raw formats (CSV, txt, JSON, etc.), processed file formats (parquet, Delta Lake, ORC, etc.), and SQL tabular data files against Spark and SQL.
  • Be productive with enhanced authoring capabilities and built-in data visualization.

This article describes how to use notebooks in Synapse Studio.

Create a notebook

There are two ways to create a notebook. You can create a new notebook or import an existing notebook to a Synapse workspace from the Object Explorer. Synapse notebooks recognize standard Jupyter Notebook IPYNB files.

How to use Synapse notebooks - Azure Synapse Analytics (1)

Develop notebooks

Notebooks consist of cells, which are individual blocks of code or text that can be run independently or as a group.

We provide rich operations to develop notebooks:

  • Add a cell
  • Set a primary language
  • Use multiple languages
  • Use temp tables to reference data across languages
  • IDE-style IntelliSense
  • Code Snippets
  • Format text cell with toolbar buttons
  • Undo/Redo cell operation
  • Code cell commenting
  • Move a cell
  • Delete a cell
  • Collapse a cell input
  • Collapse a cell output
  • Notebook outline

Note

In the notebooks, there is a SparkSession automatically created for you, stored in a variable called spark. Also there is a variable for SparkContext which is called sc. Users can access these variables directly and should not change the values of these variables.

Add a cell

There are multiple ways to add a new cell to your notebook.

  1. Hover over the space between two cells and select Code or Markdown.How to use Synapse notebooks - Azure Synapse Analytics (2)

  2. Use aznb Shortcut keys under command mode. Press A to insert a cell above the current cell. Press B to insert a cell below the current cell.

Set a primary language

Synapse notebooks support four Apache Spark languages:

  • PySpark (Python)
  • Spark (Scala)
  • Spark SQL
  • .NET Spark (C#)
  • SparkR (R)

You can set the primary language for new added cells from the dropdown list in the top command bar.

How to use Synapse notebooks - Azure Synapse Analytics (3)

Use multiple languages

You can use multiple languages in one notebook by specifying the correct language magic command at the beginning of a cell. The following table lists the magic commands to switch cell languages.

Magic commandLanguageDescription
%%pysparkPythonExecute a Python query against Spark Context.
%%sparkScalaExecute a Scala query against Spark Context.
%%sqlSparkSQLExecute a SparkSQL query against Spark Context.
%%csharp.NET for Spark C#Execute a .NET for Spark C# query against Spark Context.
%%sparkrRExecute a R query against Spark Context.

The following image is an example of how you can write a PySpark query using the %%pyspark magic command or a SparkSQL query with the %%sql magic command in a Spark(Scala) notebook. Notice that the primary language for the notebook is set to pySpark.

How to use Synapse notebooks - Azure Synapse Analytics (4)

Use temp tables to reference data across languages

You cannot reference data or variables directly across different languages in a Synapse notebook. In Spark, a temporary table can be referenced across languages. Here is an example of how to read a Scala DataFrame in PySpark and SparkSQL using a Spark temp table as a workaround.

  1. In Cell 1, read a DataFrame from a SQL pool connector using Scala and create a temporary table.

    %%sparkval scalaDataFrame = spark.read.sqlanalytics("mySQLPoolDatabase.dbo.mySQLPoolTable")scalaDataFrame.createOrReplaceTempView( "mydataframetable" )
  2. In Cell 2, query the data using Spark SQL.

    %%sqlSELECT * FROM mydataframetable
  3. In Cell 3, use the data in PySpark.

    %%pysparkmyNewPythonDataFrame = spark.sql("SELECT * FROM mydataframetable")

IDE-style IntelliSense

Synapse notebooks are integrated with the Monaco editor to bring IDE-style IntelliSense to the cell editor. Syntax highlight, error marker, and automatic code completions help you to write code and identify issues quicker.

The IntelliSense features are at different levels of maturity for different languages. Use the following table to see what's supported.

LanguagesSyntax HighlightSyntax Error MarkerSyntax Code CompletionVariable Code CompletionSystem Function Code CompletionUser Function Code CompletionSmart IndentCode Folding
PySpark (Python)YesYesYesYesYesYesYesYes
Spark (Scala)YesYesYesYesYesYes-Yes
SparkSQLYesYesYesYesYes---
.NET for Spark (C#)YesYesYesYesYesYesYesYes

Note

An active Spark session is required to benefit the Variable Code Completion, System Function Code Completion,User Function Code Completion for .NET for Spark (C#).

Code Snippets

Synapse notebooks provide code snippets that make it easier to enter common used code patterns, such as configuring your Spark session, reading data as a Spark DataFrame, or drawing charts with matplotlib etc.

Snippets appear in Shortcut keys of IDE style IntelliSense mixed with other suggestions. The code snippets contents align with the code cell language. You can see available snippets by typing Snippet or any keywords appear in the snippet title in the code cell editor. For example, by typing read you can see the list of snippets to read data from various data sources.

How to use Synapse notebooks - Azure Synapse Analytics (5)

Format text cell with toolbar buttons

You can use the format buttons in the text cells toolbar to do common markdown actions. It includes bolding text, italicizing text, paragraph/headers through a dropdown, inserting code, inserting unordered list, inserting ordered list, inserting hyperlink and inserting image from URL.

How to use Synapse notebooks - Azure Synapse Analytics (6)

Undo/Redo cell operation

Select the Undo / Redo button or press Z / Shift+Z to revoke the most recent cell operations. Now you can undo/redo up to the latest 10 historical cell operations.

How to use Synapse notebooks - Azure Synapse Analytics (7)

Supported undo cell operations:

  • Insert/Delete cell: You could revoke the delete operations by selecting Undo, the text content is kept along with the cell.
  • Reorder cell.
  • Toggle parameter.
  • Convert between Code cell and Markdown cell.

Note

In-cell text operations and code cell commenting operations are not undoable.Now you can undo/redo up to the latest 10 historical cell operations.

Code cell commenting

  1. Select Comments button on the notebook toolbar to open Comments pane.

    How to use Synapse notebooks - Azure Synapse Analytics (8)

  2. Select code in the code cell, click New in the Comments pane, add comments then click Post comment button to save.

    How to use Synapse notebooks - Azure Synapse Analytics (9)

  3. You could perform Edit comment, Resolve thread, or Delete thread by clicking the More button besides your comment.

    How to use Synapse notebooks - Azure Synapse Analytics (10)

Move a cell

Click on the left-hand side of a cell and drag it to the desired position.How to use Synapse notebooks - Azure Synapse Analytics (11)

Delete a cell

To delete a cell, select the delete button at the right hand of the cell.

You can also use shortcut keys under command mode. Press Shift+D to delete the current cell.

How to use Synapse notebooks - Azure Synapse Analytics (12)

Collapse a cell input

Select the More commands ellipses (...) on the cell toolbar and Hide input to collapse current cell's input. To expand it, Select the Show input while the cell is collapsed.

How to use Synapse notebooks - Azure Synapse Analytics (13)

Collapse a cell output

Select the More commands ellipses (...) on the cell toolbar and Hide output to collapse current cell's output. To expand it, select the Show output while the cell's output is hidden.

How to use Synapse notebooks - Azure Synapse Analytics (14)

Notebook outline

The Outlines (Table of Contents) presents the first markdown header of any markdown cell in a sidebar window for quick navigation. The Outlines sidebar is resizable and collapsible to fit the screen in the best ways possible. You can select the Outline button on the notebook command bar to open or hide sidebar

How to use Synapse notebooks - Azure Synapse Analytics (15)

Run notebooks

You can run the code cells in your notebook individually or all at once. The status and progress of each cell is represented in the notebook.

Run a cell

There are several ways to run the code in a cell.

  1. Hover on the cell you want to run and select the Run Cell button or press Ctrl+Enter.

    How to use Synapse notebooks - Azure Synapse Analytics (16)

  2. Use Shortcut keys under command mode. Press Shift+Enter to run the current cell and select the cell below. Press Alt+Enter to run the current cell and insert a new cell below.

Run all cells

Select the Run All button to run all the cells in current notebook in sequence.

How to use Synapse notebooks - Azure Synapse Analytics (17)

Run all cells above or below

Expand the dropdown list from Run all button, then select Run cells above to run all the cells above the current in sequence. Select Run cells below to run all the cells below the current in sequence.

How to use Synapse notebooks - Azure Synapse Analytics (18)

Cancel all running cells

Select the Cancel All button to cancel the running cells or cells waiting in the queue.How to use Synapse notebooks - Azure Synapse Analytics (19)

Notebook reference

You can use %run <notebook path> magic command to reference another notebook within current notebook's context. All the variables defined in the reference notebook are available in the current notebook. %run magic command supports nested calls but not support recursive calls. You receive an exception if the statement depth is larger than five.

Example:%run /<path>/Notebook1 { "parameterInt": 1, "parameterFloat": 2.5, "parameterBool": true, "parameterString": "abc" }.

Notebook reference works in both interactive mode and Synapse pipeline.

Note

  • %run command currently only supports to pass a absolute path or notebook name only as parameter, relative path is not supported.
  • %run command currently only supports to 4 parameter value types: int, float, bool, string, variable replacement operation is not supported.
  • The referenced notebooks are required to be published. You need to publish the notebooks to reference them unless Reference unpublished notebook is enabled. Synapse Studio does not recognize the unpublished notebooks from the Git repo.
  • Referenced notebooks do not support statement that depth is larger than five.

Variable explorer

Synapse notebook provides a built-in variables explorer for you to see the list of the variables name, type, length, and value in the current Spark session for PySpark (Python) cells. More variables show up automatically as they are defined in the code cells. Clicking on each column header sorts the variables in the table.

You can select the Variables button on the notebook command bar to open or hide the variable explorer.

How to use Synapse notebooks - Azure Synapse Analytics (20)

Note

Variable explorer only supports python.

Cell status indicator

A step-by-step cell execution status is displayed beneath the cell to help you see its current progress. Once the cell run is complete, an execution summary with the total duration and end time are shown and kept there for future reference.

How to use Synapse notebooks - Azure Synapse Analytics (21)

Spark progress indicator

Synapse notebook is purely Spark based. Code cells are executed on the serverless Apache Spark pool remotely. A Spark job progress indicator is provided with a real-time progress bar appears to help you understand the job execution status.The number of tasks per each job or stage help you to identify the parallel level of your spark job. You can also drill deeper to the Spark UI of a specific job (or stage) via selecting the link on the job (or stage) name.

How to use Synapse notebooks - Azure Synapse Analytics (22)

Spark session configuration

You can specify the timeout duration, the number, and the size of executors to give to the current Spark session in Configure session. Restart the Spark session is for configuration changes to take effect. All cached notebook variables are cleared.

You can also create a configuration from the Apache Spark configuration or select an existing configuration. For details, please refer to Apache Spark Configuration Management.

Spark session configuration magic command

You can also specify spark session settings via a magic command %%configure. The spark session needs to restart to make the settings effect. We recommend you to run the %%configure at the beginning of your notebook. Here is a sample, refer to https://github.com/cloudera/livy#request-body for full list of valid parameters.

%%configure{ //You can get a list of valid parameters to config the session from https://github.com/cloudera/livy#request-body. "driverMemory":"28g", // Recommended values: ["28g", "56g", "112g", "224g", "400g", "472g"] "driverCores":4, // Recommended values: [4, 8, 16, 32, 64, 80] "executorMemory":"28g", "executorCores":4, "jars":["abfs[s]://<file_system>@<account_name>.dfs.core.windows.net/<path>/myjar.jar","wasb[s]://<containername>@<accountname>.blob.core.windows.net/<path>/myjar1.jar"], "conf":{ //Example of standard spark property, to find more available properties please visit:https://spark.apache.org/docs/latest/configuration.html#application-properties. "spark.driver.maxResultSize":"10g", //Example of customized property, you can specify count of lines that Spark SQL returns by configuring "livy.rsc.sql.num-rows". "livy.rsc.sql.num-rows":"3000" }}

Note

  • "DriverMemory" and "ExecutorMemory" are recommended to set as same value in %%configure, so do "driverCores" and "executorCores".
  • You can use %%configure in Synapse pipelines, but if it's not set in the first code cell, the pipeline run will fail due to cannot restart session.
  • The %%configure used in mssparkutils.notebook.run is going to be ignored but used in %run notebook will continue executing.
  • The standard Spark configuration properties must be used in the "conf" body. We do not support first level reference for the Spark configuration properties.
  • Some special spark properties including "spark.driver.cores", "spark.executor.cores", "spark.driver.memory", "spark.executor.memory", "spark.executor.instances" won't take effect in "conf" body.

Parameterized session configuration from pipeline

Parameterized session configuration allows you to replace the value in %%configure magic with Pipeline run (Notebook activity) parameters. When preparing %%configure code cell, you can override default values (also configurable, 4 and "2000" in the below example) with an object like this:

{ "activityParameterName": "paramterNameInPipelineNotebookActivity", "defaultValue": "defaultValueIfNoParamterFromPipelineNotebookActivity"} 
%%configure { "driverCores": { "activityParameterName": "driverCoresFromNotebookActivity", "defaultValue": 4 }, "conf": { "livy.rsc.sql.num-rows": { "activityParameterName": "rows", "defaultValue": "2000" } } } 

Notebook uses default value if run a notebook in interactive mode directly or no parameter that match "activityParameterName" is given from Pipeline Notebook activity.

During the pipeline run mode, you can configure pipeline Notebook activity settings as below:How to use Synapse notebooks - Azure Synapse Analytics (24)

If you want to change the session configuration, pipeline Notebook activity parameters name should be same as activityParameterName in the notebook. When running this pipeline, in this example driverCores in %%configure will be replaced by 8 and livy.rsc.sql.num-rows will be replaced by 4000.

Note

If run pipeline failed because of using this new %%configure magic, you can check more error information by running %%configure magic cell in the interactive mode of the notebook.

Bring data to a notebook

You can load data from Azure Blob Storage, Azure Data Lake Store Gen 2, and SQL pool as shown in the code samples below.

Read a CSV from Azure Data Lake Store Gen2 as a Spark DataFrame

from pyspark.sql import SparkSessionfrom pyspark.sql.types import *account_name = "Your account name"container_name = "Your container name"relative_path = "Your path"adls_path = 'abfss://%s@%s.dfs.core.windows.net/%s' % (container_name, account_name, relative_path)df1 = spark.read.option('header', 'true') \ .option('delimiter', ',') \ .csv(adls_path + '/Testfile.csv')

Read a CSV from Azure Blob Storage as a Spark DataFrame

from pyspark.sql import SparkSession# Azure storage access infoblob_account_name = 'Your account name' # replace with your blob nameblob_container_name = 'Your container name' # replace with your container nameblob_relative_path = 'Your path' # replace with your relative folder pathlinked_service_name = 'Your linked service name' # replace with your linked service nameblob_sas_token = mssparkutils.credentials.getConnectionStringOrCreds(linked_service_name)# Allow SPARK to access from Blob remotelywasb_path = 'wasbs://%s@%s.blob.core.windows.net/%s' % (blob_container_name, blob_account_name, blob_relative_path)spark.conf.set('fs.azure.sas.%s.%s.blob.core.windows.net' % (blob_container_name, blob_account_name), blob_sas_token)print('Remote blob path: ' + wasb_path)df = spark.read.option("header", "true") \ .option("delimiter","|") \ .schema(schema) \ .csv(wasbs_path)

Read data from the primary storage account

You can access data in the primary storage account directly. There's no need to provide the secret keys. In Data Explorer, right-click on a file and select New notebook to see a new notebook with data extractor autogenerated.

How to use Synapse notebooks - Azure Synapse Analytics (25)

Widgets are eventful Python objects that have a representation in the browser, often as a control like a slider, textbox etc. IPython Widgets only works in Python environment, it's not supported in other languages (for example, Scala, SQL, C#) yet.

To use IPython Widget

  1. You need to import ipywidgets module first to use the Jupyter Widget framework.

    import ipywidgets as widgets
  2. You can use top-level display function to render a widget, or leave an expression of widget type at the last line of code cell.

    slider = widgets.IntSlider()display(slider)
    slider = widgets.IntSlider()slider
  3. Run the cell, the widget displays at the output area.

    How to use Synapse notebooks - Azure Synapse Analytics (26)

  4. You can use multiple display() calls to render the same widget instance multiple times, but they remain in sync with each other.

    slider = widgets.IntSlider()display(slider)display(slider)

    How to use Synapse notebooks - Azure Synapse Analytics (27)

  5. To render two widgets independent of each other, create two widget instances:

    slider1 = widgets.IntSlider()slider2 = widgets.IntSlider()display(slider1)display(slider2)

Supported widgets

Widgets TypeWidgets
Numeric widgetsIntSlider, FloatSlider, FloatLogSlider, IntRangeSlider, FloatRangeSlider, IntProgress, FloatProgress, BoundedIntText, BoundedFloatText, IntText, FloatText
Boolean widgetsToggleButton, Checkbox, Valid
Selection widgetsDropdown, RadioButtons, Select, SelectionSlider, SelectionRangeSlider, ToggleButtons, SelectMultiple
String WidgetsText, Text area, Combobox, Password, Label, HTML, HTML Math, Image, Button
Play (Animation) widgetsDate picker, Color picker, Controller
Container/Layout widgetsBox, HBox, VBox, GridBox, Accordion, Tabs, Stacked

Known limitations

  1. The following widgets are not supported yet, you could follow the corresponding workaround as below:

    FunctionalityWorkaround
    Output widgetYou can use print() function instead to write text into stdout.
    widgets.jslink()You can use widgets.link() function to link two similar widgets.
    FileUpload widgetNot support yet.
  2. Global display function provided by Synapse does not support displaying multiple widgets in one call (that is, display(a, b)), which is different from IPython display function.

  3. If you close a notebook that contains IPython Widget, you will not be able to see or interact with it until you execute the corresponding cell again.

Save notebooks

You can save a single notebook or all notebooks in your workspace.

  1. To save changes you made to a single notebook, select the Publish button on the notebook command bar.

    How to use Synapse notebooks - Azure Synapse Analytics (28)

  2. To save all notebooks in your workspace, select the Publish all button on the workspace command bar.

    How to use Synapse notebooks - Azure Synapse Analytics (29)

In the notebook properties, you can configure whether to include the cell output when saving.

How to use Synapse notebooks - Azure Synapse Analytics (30)

Magic commands

You can use familiar Jupyter magic commands in Synapse notebooks. Review the following list as the current available magic commands. Tell us your use cases on GitHub so that we can continue to build out more magic commands to meet your needs.

Note

Only following magic commands are supported in Synapse pipeline : %%pyspark, %%spark, %%csharp, %%sql.

Available line magics:%lsmagic, %time, %timeit, %history, %run, %load

Available cell magics:%%time, %%timeit, %%capture, %%writefile, %%sql, %%pyspark, %%spark, %%csharp, %%html, %%configure

Reference unpublished notebook

Reference unpublished notebook is helpful when you want to debug "locally", when enabling this feature, notebook run fetches the current content in web cache, if you run a cell including a reference notebooks statement, you reference the presenting notebooks in the current notebook browser instead of a saved versions in cluster, that means the changes in your notebook editor can be referenced immediately by other notebooks without having to be published(Live mode) or committed(Git mode), by leveraging this approach you can easily avoid common libraries getting polluted during developing or debugging process.

You can enable Reference unpublished notebook from Properties panel:

How to use Synapse notebooks - Azure Synapse Analytics (31)

For different cases comparison please check the table below:

Notice that %run and mssparkutils.notebook.run has same behavior here. We use %run here as an example.

CaseDisableEnable
Live Mode
- Nb1 (Published)
%run Nb1
Run published version of Nb1Run published version of Nb1
- Nb1 (New)
%run Nb1
ErrorRun new Nb1
- Nb1 (Previously published, edited)
%run Nb1
Run published version of Nb1Run edited version of Nb1
Git Mode
- Nb1 (Published)
%run Nb1
Run published version of Nb1Run published version of Nb1
- Nb1 (New)
%run Nb1
ErrorRun new Nb1
- Nb1 (Not published, committed)
%run Nb1
ErrorRun committed Nb1
- Nb1 (Previously published, committed)
%run Nb1
Run published version of Nb1Run committed version of Nb1
- Nb1 (Previously published, new in current branch)
%run Nb1
Run published version of Nb1Run new Nb1
- Nb1 (Not published, previously committed, edited)
%run Nb1
ErrorRun edited version of Nb1
- Nb1 (Previously published and committed, edited)
%run Nb1
Run published version of Nb1Run edited version of Nb1

Conclusion

  • If disabled, always run published version.
  • If enabled, the reference run will always adopt the current version of notebook you can see from the notebook UX.

Active session management

You can reuse your notebook sessions conveniently now without having to start new ones. Synapse notebook now supports managing your active sessions in the Manage sessions list, you can see all the sessions in the current workspace started by you from notebook.

How to use Synapse notebooks - Azure Synapse Analytics (32)

In the Active sessions, list you can see the session information and the corresponding notebook that is currently attached to the session. You can operate Detach with notebook, Stop the session, and View in monitoring from here. Moreover, you can easily connect your selected notebook to an active session in the list started from another notebook, the session is detached from the previous notebook (if it's not idle) then attach to the current one.

How to use Synapse notebooks - Azure Synapse Analytics (33)

Python logging in Notebook

You can find Python logs and set different log levels and format following the sample code below:

import logging# Customize the logging format for all loggersFORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"formatter = logging.Formatter(fmt=FORMAT)for handler in logging.getLogger().handlers: handler.setFormatter(formatter)# Customize log level for all loggerslogging.getLogger().setLevel(logging.INFO)# Customize the log level for a specific loggercustomizedLogger = logging.getLogger('customized')customizedLogger.setLevel(logging.WARNING)# logger that use the default global log leveldefaultLogger = logging.getLogger('default')defaultLogger.debug("default debug message")defaultLogger.info("default info message")defaultLogger.warning("default warning message")defaultLogger.error("default error message")defaultLogger.critical("default critical message")# logger that use the customized log levelcustomizedLogger.debug("customized debug message")customizedLogger.info("customized info message")customizedLogger.warning("customized warning message")customizedLogger.error("customized error message")customizedLogger.critical("customized critical message")

View the history of input commands

Synapse notebook support magic command %history to print the input command history that executed in the current session, comparing to the standard Jupyter Ipython command the %history works for multiple languages context in notebook.

%history [-n] [range [range ...]]

For options:

  • -n: Print execution number.

Where range can be:

  • N: Print code of Nth executed cell.
  • M-N: Print code from Mth to Nth executed cell.

Example:

  • Print input history from 1st to 2nd executed cell: %history -n 1-2

Integrate a notebook

Add a notebook to a pipeline

Select the Add to pipeline button on the upper right corner to add a notebook to an existing pipeline or create a new pipeline.

How to use Synapse notebooks - Azure Synapse Analytics (34)

Designate a parameters cell

To parameterize your notebook, select the ellipses (...) to access the more commands at the cell toolbar. Then select Toggle parameter cell to designate the cell as the parameters cell.

How to use Synapse notebooks - Azure Synapse Analytics (35)

Azure Data Factory looks for the parameters cell and treats this cell as defaults for the parameters passed in at execution time. The execution engine adds a new cell beneath the parameters cell with input parameters in order to overwrite the default values.

Assign parameters values from a pipeline

Once you've created a notebook with parameters, you can execute it from a pipeline with the Synapse Notebook activity. After you add the activity to your pipeline canvas, you will be able to set the parameters values under Base parameters section on the Settings tab.

How to use Synapse notebooks - Azure Synapse Analytics (36)

When assigning parameter values, you can use the pipeline expression language or system variables.

Shortcut keys

Similar to Jupyter Notebooks, Synapse notebooks have a modal user interface. The keyboard does different things depending on which mode the notebook cell is in. Synapse notebooks support the following two modes for a given code cell: command mode and edit mode.

  1. A cell is in command mode when there is no text cursor prompting you to type. When a cell is in Command mode, you can edit the notebook as a whole but not type into individual cells. Enter command mode by pressing ESC or using the mouse to select outside of a cell's editor area.

    How to use Synapse notebooks - Azure Synapse Analytics (37)

  2. Edit mode is indicated by a text cursor prompting you to type in the editor area. When a cell is in edit mode, you can type into the cell. Enter edit mode by pressing Enter or using the mouse to select on a cell's editor area.

    How to use Synapse notebooks - Azure Synapse Analytics (38)

Shortcut keys under command mode

ActionSynapse notebook Shortcuts
Run the current cell and select belowShift+Enter
Run the current cell and insert belowAlt+Enter
Run current cellCtrl+Enter
Select cell aboveUp
Select cell belowDown
Select previous cellK
Select next cellJ
Insert cell aboveA
Insert cell belowB
Delete selected cellsShift+D
Switch to edit modeEnter

Shortcut keys under edit mode

Using the following keystroke shortcuts, you can more easily navigate and run code in Synapse notebooks when in Edit mode.

ActionSynapse notebook shortcuts
Move cursor upUp
Move cursor downDown
UndoCtrl + Z
RedoCtrl + Y
Comment/UncommentCtrl + /
Delete word beforeCtrl + Backspace
Delete word afterCtrl + Delete
Go to cell startCtrl + Home
Go to cell endCtrl + End
Go one word leftCtrl + Left
Go one word rightCtrl + Right
Select allCtrl + A
IndentCtrl +]
DedentCtrl + [
Switch to command modeEsc

Next steps

  • Check out Synapse sample notebooks
  • Quickstart: Create an Apache Spark pool in Azure Synapse Analytics using web tools
  • What is Apache Spark in Azure Synapse Analytics
  • Use .NET for Apache Spark with Azure Synapse Analytics
  • .NET for Apache Spark documentation
  • Azure Synapse Analytics
How to use Synapse notebooks - Azure Synapse Analytics (2024)

FAQs

What are notebooks in Azure Synapse? ›

A Synapse notebook is a web interface for you to create files that contain live code, visualizations, and narrative text. Notebooks are a good place to validate ideas and use quick experiments to get insights from your data.

Can an Azure Synapse Studio notebook load data? ›

***Step 4: Conclusion*** Yes, an Azure Synapse Studio notebook can indeed load data from an Azure Cosmos DB for NoSQL database.

How long does it take to learn Azure Synapse? ›

Take your data analytics skills to the next level with Azure Synapse Analytics. In under 20 hours, you'll learn how to design, develop and optimize an enterprise data warehouse and big data analytics solution using Azure Synapse Analytics.

Is Azure Synapse Analytics an ETL tool? ›

Yes, Azure Synapse Analytics is a cloud-based ETL tool that helps you build data pipelines to transform and load data.

Why is Snowflake better than Synapse? ›

Snowflake manages all aspects of data storage and access through SQL queries, limiting direct access to data objects. Azure Synapse Analytics, while fully managed, offers users more control over data processing. The choice between the two depends on the balance desired between management and control.

How do I create a data flow in Azure Synapse analytics? ›

Data flows are created from the Develop pane in Synapse studio. To create a data flow, select the plus sign next to Develop, and then select Data Flow. This action takes you to the data flow canvas, where you can create your transformation logic. Select Add source to start configuring your source transformation.

What is the difference between Databricks and synapse notebooks? ›

Synapse has an open-source Spark version with built-in support for . NET, whereas Databricks has an optimized version of Spark which offers increased performance and this allows users to select GPU-enabled clusters that will process data faster and have a higher data concurrency.

What is the function of synapse notebook? ›

With Synapse Notebooks, you can: Develop code using Python, Scala, SQL, C# and R. Store live code, visualisations and markdown documentation. Utilise the computing power of Apache Spark Pools.

Does Azure Synapse have notebooks? ›

The Azure Synapse notebook activity in a Synapse pipeline runs a Synapse notebook in your Azure Synapse workspace.

What is the difference between Azure workbook and notebook? ›

Workbooks are provided for analysts and SOC managers to build interactive views and reports of the Sentinel data. Notebooks should be an integral part of the security team's daily processes, particularly those security teams using Microsoft Sentinel as their SIEM of choice.

What is the difference between Azure Databricks and Synapse notebooks? ›

Azure Synapse supports notebooks but does not support automated versions. The supported notebook is the Nteract Notebook, and one person must save the notebook before the other person can see the changes in Synapse. On the other hand, Databrick supports both - notebooks and automated versioning features.

What is notebook in spark? ›

The Spark Notebook comes with dynamic charts and most (if not all) components can be listened for and can react to events. This is very helpful in many cases, for example: data entering the system live at runtime. visually plots of events.

What is notebook in Azure machine learning? ›

In Azure Databricks, notebooks are the primary tool for creating data science and machine learning workflows and collaborating with colleagues. Databricks notebooks provide real-time coauthoring in multiple languages, automatic versioning, and built-in data visualizations.

Top Articles
Qual'è la differenza tra un Blog e un Sito?
Special Education Sayings: Inspirational Quotes
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
Things To Do In Atlanta Tomorrow Night
Non Sequitur
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Catherine Tremblay

Last Updated:

Views: 5528

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Catherine Tremblay

Birthday: 1999-09-23

Address: Suite 461 73643 Sherril Loaf, Dickinsonland, AZ 47941-2379

Phone: +2678139151039

Job: International Administration Supervisor

Hobby: Dowsing, Snowboarding, Rowing, Beekeeping, Calligraphy, Shooting, Air sports

Introduction: My name is Catherine Tremblay, I am a precious, perfect, tasty, enthusiastic, inexpensive, vast, kind person who loves writing and wants to share my knowledge and understanding with you.