Skip to content

Commit c75dcc2

Browse files
committed
Update nootebook
1 parent 3e47a61 commit c75dcc2

File tree

4 files changed

+342
-537
lines changed

4 files changed

+342
-537
lines changed

notebooks/notebook-style-guide/notebook.ipynb

Lines changed: 8 additions & 9 deletions
Large diffs are not rendered by default.

notebooks/python-udf-template/notebook.ipynb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
]
1818
},
1919
{
20-
"id": "bd0ae268",
20+
"id": "740cef75",
2121
"cell_type": "markdown",
2222
"metadata": {},
2323
"source": [
@@ -41,27 +41,26 @@
4141
{
4242
"attachments": {},
4343
"cell_type": "markdown",
44-
"id": "bcb6e6a7",
4544
"metadata": {},
4645
"source": [
4746
"This Jupyter notebook will help you build your first Python UDF using Notebooks, registering it with your database and calling it as part of SQL query."
48-
]
47+
],
48+
"id": "ffb6485e"
4949
},
5050
{
5151
"attachments": {},
5252
"cell_type": "markdown",
53-
"id": "5776ded1",
5453
"metadata": {},
5554
"source": [
5655
"## Create some simple tables\n",
5756
"\n",
5857
"This setup establishes a basic relational structure to store some reviews for restaurants. Ensure you have selected a database."
59-
]
58+
],
59+
"id": "e048901e"
6060
},
6161
{
6262
"cell_type": "code",
6363
"execution_count": 1,
64-
"id": "2bbf6a44",
6564
"metadata": {},
6665
"outputs": [],
6766
"source": [
@@ -74,7 +73,8 @@
7473
" store_name VARCHAR(255) NOT NULL,\n",
7574
" review TEXT NOT NULL\n",
7675
");"
77-
]
76+
],
77+
"id": "9da8c576"
7878
},
7979
{
8080
"attachments": {},
@@ -103,13 +103,13 @@
103103
{
104104
"attachments": {},
105105
"cell_type": "markdown",
106-
"id": "d58c8382",
107106
"metadata": {},
108107
"source": [
109108
"## Define Python UDF functions\n",
110109
"\n",
111110
"Next, we will be Python UDF function using the `@udf` annotation. We will be using the `VADER` model of `nltk` library to perform sentiment analysis on the review text."
112-
]
111+
],
112+
"id": "9797abdb"
113113
},
114114
{
115115
"cell_type": "code",
@@ -124,7 +124,6 @@
124124
{
125125
"cell_type": "code",
126126
"execution_count": 4,
127-
"id": "f3f3b047",
128127
"metadata": {},
129128
"outputs": [],
130129
"source": [
@@ -146,29 +145,30 @@
146145
" )\n",
147146
" print(\"sentiment:\" + sentiment)\n",
148147
" return sentiment"
149-
]
148+
],
149+
"id": "37e6d3e9"
150150
},
151151
{
152152
"attachments": {},
153153
"cell_type": "markdown",
154-
"id": "40e2ad59",
155154
"metadata": {},
156155
"source": [
157156
"## Start the Python UDF server\n",
158157
"\n",
159158
"This will start the server as well as register all the functions annotated with `@udf` as external user defined functions on your selected database."
160-
]
159+
],
160+
"id": "2f8feceb"
161161
},
162162
{
163163
"cell_type": "code",
164164
"execution_count": 5,
165-
"id": "ed4b22cd",
166165
"metadata": {},
167166
"outputs": [],
168167
"source": [
169168
"import singlestoredb.apps as apps\n",
170169
"connection_info = await apps.run_udf_app(replace_existing=True)"
171-
]
170+
],
171+
"id": "aace28b8"
172172
},
173173
{
174174
"attachments": {},
@@ -213,7 +213,6 @@
213213
{
214214
"attachments": {},
215215
"cell_type": "markdown",
216-
"id": "4a825f0d",
217216
"metadata": {},
218217
"source": [
219218
"## Publish Python UDF\n",
@@ -226,10 +225,11 @@
226225
"```\n",
227226
"\n",
228227
"enriching your data exploration experience seamlessly!"
229-
]
228+
],
229+
"id": "c94b087f"
230230
},
231231
{
232-
"id": "b6c75678",
232+
"id": "84415d55",
233233
"cell_type": "markdown",
234234
"metadata": {},
235235
"source": [

notebooks/upgrade-virtual-workspace/meta.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description="""\
77
Workspace Group.
88
"""
99
icon="browser"
10-
difficulty="medium"
10+
difficulty="intermediate"
1111
tags=["starter", "notebooks", "fusion"]
1212
lesson_areas=[]
1313
destinations=["spaces"]

0 commit comments

Comments
 (0)