|
2 | 2 | title: How to use Synapse notebooks
|
3 | 3 | description: In this article, you learn how to create and develop Synapse notebooks to do data preparation and visualization.
|
4 | 4 | services: synapse analytics
|
5 |
| -author: ruixinxu |
| 5 | +author: JeneZhang |
6 | 6 | ms.service: synapse-analytics
|
7 | 7 | ms.topic: conceptual
|
8 | 8 | ms.subservice: spark
|
9 | 9 | ms.date: 05/08/2021
|
10 |
| -ms.author: ruxu |
| 10 | +ms.author: jingzh |
11 | 11 | ms.custom: devx-track-python
|
12 | 12 | ---
|
13 | 13 |
|
@@ -561,7 +561,7 @@ You can use familiar Jupyter magic commands in Synapse notebooks. Review the fol
|
561 | 561 |
|
562 | 562 |
|
563 | 563 | Available line magics:
|
564 |
| -[%lsmagic](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-lsmagic), [%time](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-time), [%timeit](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-timeit), [%history](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-history), [%run](#notebook-reference), [%load](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-load) |
| 564 | +[%lsmagic](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-lsmagic), [%time](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-time), [%timeit](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-timeit), [%history](#view-the-history-of-input-commands), [%run](#notebook-reference), [%load](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-load) |
565 | 565 |
|
566 | 566 | Available cell magics:
|
567 | 567 | [%%time](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-time), [%%timeit](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-timeit), [%%capture](https://ipython.readthedocs.io/en/stable/interactive/magics.html#cellmagic-capture), [%%writefile](https://ipython.readthedocs.io/en/stable/interactive/magics.html#cellmagic-writefile), [%%sql](#use-multiple-languages), [%%pyspark](#use-multiple-languages), [%%spark](#use-multiple-languages), [%%csharp](#use-multiple-languages), [%%html](https://ipython.readthedocs.io/en/stable/interactive/magics.html#cellmagic-html), [%%configure](#spark-session-configuration-magic-command)
|
@@ -652,6 +652,22 @@ customizedLogger.error("customized error message")
|
652 | 652 | customizedLogger.critical("customized critical message")
|
653 | 653 | ```
|
654 | 654 |
|
| 655 | +## View the history of input commands |
| 656 | + |
| 657 | +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. |
| 658 | + |
| 659 | +``` %history [-n] [range [range ...]] ``` |
| 660 | + |
| 661 | +For options: |
| 662 | +- **-n**: Print execution number. |
| 663 | + |
| 664 | +Where range can be: |
| 665 | +- **N**: Print code of **Nth** executed cell. |
| 666 | +- **M-N**: Print code from **Mth** to **Nth** executed cell. |
| 667 | + |
| 668 | +Example: |
| 669 | +- Print input history from 1st to 2nd executed cell: ``` %history -n 1-2 ``` |
| 670 | + |
655 | 671 | ## Integrate a notebook
|
656 | 672 |
|
657 | 673 | ### Add a notebook to a pipeline
|
|
0 commit comments