Skip to content

Commit cdc31c5

Browse files
authored
Merge pull request #945 from VasuBhog/master
Parameterization Notebook Sample
2 parents 5d02093 + feef85c commit cdc31c5

2 files changed

Lines changed: 144 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<!-- Always leave the MS logo -->
2+
![](./media/solutions-microsoft-logo-small.png)
3+
4+
# Azure Data Studio Notebook Samples
5+
6+
Helpful notebooks for troubleshooting and new features in Azure Data Studio.
7+
8+
9+
### Contents
10+
11+
[About this sample](#about-this-sample)<br/>
12+
[Before you begin](#before-you-begin)<br/>
13+
[Run this sample](#run-this-sample)<br/>
14+
[Sample details](#sample-details)<br/>
15+
[Related links](#related-links)<br/>
16+
17+
18+
<a name=about-this-sample></a>
19+
20+
## About this sample
21+
22+
<!-- Delete the ones that don't apply -->
23+
- **Applies to:** Azure Data Studio
24+
- **Key features:** Notebook Samples
25+
- **Programming Language:** SQL & Python Notebooks
26+
- **Authors:** Vasu Bhog [vabhog]
27+
28+
<a name=before-you-begin></a>
29+
30+
## Before you begin
31+
32+
To run this sample, you need the following prerequisites.
33+
34+
**Software prerequisites:**
35+
36+
<!-- Examples -->
37+
1. Azure Data Studio 1.30.0
38+
2. Python
39+
40+
41+
## Run this sample
42+
43+
<!-- Step by step instructions. Here's a few examples -->
44+
45+
For Parameterization.ipynb Sample:
46+
1. From Azure Data Studio, open the **Notebook** file.
47+
2. Follow docs for paremeteization [here](https://docs.microsoft.com/en-us/sql/azure-data-studio/notebooks/parameterize-papermill).
48+
49+
50+
## Sample details
51+
52+
This Notebook allows users to follow along the docs as well as use a already parameterized notebook.
53+
54+
## Related Links
55+
<!-- Links to more articles. Remember to delete "en-us" from the link path. -->
56+
57+
For more information, see these articles:
58+
* [Notebooks Overview](https://docs.microsoft.com/en-us/sql/azure-data-studio/notebooks/notebooks-guidance)
59+
* [SQL Kernel](https://docs.microsoft.com/en-us/sql/azure-data-studio/notebooks/notebooks-sql-kernel)
60+
* [Python Kernel](https://docs.microsoft.com/en-us/sql/azure-data-studio/notebooks/notebooks-python-kernel)
61+
* [Kusto Kernel](https://docs.microsoft.com/en-us/sql/azure-data-studio/notebooks/notebooks-kusto-kernel)
62+
* [KqlMagic](https://docs.microsoft.com/en-us/sql/azure-data-studio/notebooks/notebooks-kqlmagic)
63+
* [Papermill Parameterization](https://docs.microsoft.com/en-us/sql/azure-data-studio/notebooks/parameterize-papermill)
64+
* [URI Parameterization](https://docs.microsoft.com/en-us/sql/azure-data-studio/notebooks/parameterize-uri)
65+
* [Run with Parameters](https://docs.microsoft.com/en-us/sql/azure-data-studio/notebooks/run-with-parameters)
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"metadata": {
3+
"kernelspec": {
4+
"name": "python3",
5+
"display_name": "Python 3",
6+
"language": "python"
7+
},
8+
"language_info": {
9+
"name": "python",
10+
"version": "3.6.8",
11+
"mimetype": "text/x-python",
12+
"codemirror_mode": {
13+
"name": "ipython",
14+
"version": 3
15+
},
16+
"pygments_lexer": "ipython3",
17+
"nbconvert_exporter": "python",
18+
"file_extension": ".py"
19+
}
20+
},
21+
"nbformat_minor": 2,
22+
"nbformat": 4,
23+
"cells": [
24+
{
25+
"cell_type": "markdown",
26+
"source": [
27+
"# Parameterization in Azure Data Studio"
28+
],
29+
"metadata": {
30+
"azdata_cell_guid": "de96a5d8-105e-403d-a284-134eef3d8533"
31+
}
32+
},
33+
{
34+
"cell_type": "code",
35+
"source": [
36+
"x = 2.0\n",
37+
"y = 5.0"
38+
],
39+
"metadata": {
40+
"azdata_cell_guid": "45afab06-c690-4c94-a67c-47690d93c28d",
41+
"tags": [
42+
"parameters"
43+
]
44+
},
45+
"outputs": [],
46+
"execution_count": 1
47+
},
48+
{
49+
"cell_type": "code",
50+
"source": [
51+
"addition = x + y\n",
52+
"multiply = x * y"
53+
],
54+
"metadata": {
55+
"azdata_cell_guid": "c962b295-06ee-4c1f-93c6-4d53fa347755"
56+
},
57+
"outputs": [],
58+
"execution_count": 2
59+
},
60+
{
61+
"cell_type": "code",
62+
"source": [
63+
"print(\"Addition: \" + str(addition))\n",
64+
"print(\"Multiplication: \" + str(multiply))"
65+
],
66+
"metadata": {
67+
"azdata_cell_guid": "d3c849f6-fd01-467d-9240-1e8831b5d19f"
68+
},
69+
"outputs": [
70+
{
71+
"name": "stdout",
72+
"text": "Addition: 7.0\nMultiplication: 10.0\n",
73+
"output_type": "stream"
74+
}
75+
],
76+
"execution_count": 3
77+
}
78+
]
79+
}

0 commit comments

Comments
 (0)