Skip to content

Commit

Permalink
Notebooks modified with comments (#120)
Browse files Browse the repository at this point in the history
* Notebooks modified with comments

* Notebooks modified with comments

* Notebooks modified with comments

---------

Co-authored-by: chetan thote <[email protected]>
  • Loading branch information
chetanthote and chetan thote authored Nov 5, 2024
1 parent aeed378 commit ed421af
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 229 deletions.
234 changes: 22 additions & 212 deletions notebooks/basic-query-examples/notebook.ipynb

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions notebooks/getting-started-with-singlestore/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@
"DROP TABLE IF EXISTS customers;\n",
"DROP TABLE IF EXISTS orders;\n",
"\n",
"CREATE TABLE IF NOT EXISTS customers (\n",
"CREATE TABLE IF NOT EXISTS customers /* Creating table for sample data. */(\n",
" customer_id INT PRIMARY KEY,\n",
" customer_name VARCHAR(50),\n",
" country VARCHAR(50)\n",
");\n",
"\n",
"CREATE TABLE IF NOT EXISTS orders (\n",
"CREATE TABLE IF NOT EXISTS orders /* Creating table for sample data. */(\n",
" order_id INT PRIMARY KEY,\n",
" customer_id INT,\n",
" amount DECIMAL(10, 2),\n",
Expand Down Expand Up @@ -878,7 +878,7 @@
"%%sql\n",
"DROP TABLE IF EXISTS neighborhoods;\n",
"\n",
"CREATE TABLE IF NOT EXISTS neighborhoods (\n",
"CREATE TABLE IF NOT EXISTS neighborhoods /* Creating table for sample data. */(\n",
" id INT UNSIGNED NOT NULL,\n",
" name VARCHAR(64) NOT NULL,\n",
" population INT UNSIGNED NOT NULL,\n",
Expand Down Expand Up @@ -1360,6 +1360,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "d0ba2e40-19a1-4016-829d-e310417b9c37",
"metadata": {},
Expand Down
22 changes: 20 additions & 2 deletions notebooks/hybrid-search/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "d9f9e629-6eb9-4ca5-bcf2-1b8672b86725",
"metadata": {},
Expand All @@ -41,6 +42,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "532e8d3f-007d-48a4-8d36-44b561dd1109",
"metadata": {},
Expand Down Expand Up @@ -88,6 +90,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "0aa95a80-5683-4dc3-9e52-c3e890ab87af",
"metadata": {},
Expand Down Expand Up @@ -137,6 +140,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "f68e9407",
"metadata": {},
Expand All @@ -151,6 +155,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "0b6c6560-bc60-43ba-93a4-1b4aee933d5b",
"metadata": {},
Expand All @@ -159,6 +164,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "e1dd6296-54b0-4f8d-886a-13cacfc28163",
"metadata": {},
Expand All @@ -180,6 +186,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "fa49cc11",
"metadata": {},
Expand All @@ -202,7 +209,7 @@
"source": [
"%%sql\n",
"DROP TABLE IF EXISTS news_articles;\n",
"CREATE TABLE IF NOT EXISTS news_articles (\n",
"CREATE TABLE IF NOT EXISTS news_articles /* Creating table for sample data. */(\n",
" title TEXT,\n",
" description TEXT,\n",
" genre TEXT,\n",
Expand All @@ -212,6 +219,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "8bd97023-3d02-44d4-8bd3-59875cb22b6c",
"metadata": {},
Expand All @@ -234,6 +242,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "d74c544f-feea-4d48-84be-c62bf5cb4ea3",
"metadata": {},
Expand All @@ -253,6 +262,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "b37f2eac-c504-452b-90c2-0bb07e918b16",
"metadata": {},
Expand All @@ -271,6 +281,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "46b1628c-0ffc-4a84-ba8b-43e8df081b01",
"metadata": {},
Expand Down Expand Up @@ -312,6 +323,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "a2f3d567-eaf4-487a-a1f9-2eb7e1071991",
"metadata": {},
Expand All @@ -320,6 +332,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "7ad3b8f6-d3a8-4954-a737-f11c785ce9ce",
"metadata": {},
Expand Down Expand Up @@ -353,6 +366,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "6504f561-1ab1-4dbf-a523-0aef23b66e4b",
"metadata": {},
Expand Down Expand Up @@ -388,6 +402,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "2c8ff862-ea5b-4960-be5b-bcd530d6e918",
"metadata": {},
Expand All @@ -396,6 +411,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "d0b2cff3-76f8-4a35-a596-4f001a9b4c8c",
"metadata": {},
Expand Down Expand Up @@ -433,6 +449,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "b49c3ec8-ec70-48b8-bc2b-e387d7de0efc",
"metadata": {},
Expand All @@ -441,6 +458,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "0745143b",
"metadata": {},
Expand Down Expand Up @@ -498,7 +516,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.11.6"
}
},
"nbformat": 4,
Expand Down
16 changes: 14 additions & 2 deletions notebooks/image-matching-with-sql/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "7b2bd61f-bdc4-4aef-9ab3-feeb8a0138d3",
"metadata": {},
Expand All @@ -43,6 +44,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "b21735c2-31ad-4e38-9a5f-afae2c46de38",
"metadata": {},
Expand All @@ -53,6 +55,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "facd7889-eaed-44f8-ba7c-ac852c26e9f3",
"metadata": {},
Expand Down Expand Up @@ -89,6 +92,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "899100f0-bac6-4e56-a1e3-eaf5ba32d345",
"metadata": {},
Expand All @@ -104,6 +108,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "278053e8-7457-4655-a6fe-5c95ecb361de",
"metadata": {},
Expand Down Expand Up @@ -151,6 +156,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "3bb47d4f-d54d-4fcc-835e-6a5066fa84bc",
"metadata": {},
Expand All @@ -169,14 +175,15 @@
"outputs": [],
"source": [
"%%sql\n",
"CREATE TABLE people (\n",
"CREATE TABLE people /* Creating table for sample data. */(\n",
" filename VARCHAR(255),\n",
" vector BLOB,\n",
" SHARD(filename)\n",
");"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "41a990db-9e11-48e3-8011-8bd9770a27a2",
"metadata": {},
Expand Down Expand Up @@ -224,6 +231,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "168be056-17da-4f94-8252-3e5d79459a8b",
"metadata": {},
Expand All @@ -246,6 +254,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "1d0606a8-6503-4522-8a85-6366263e4b5e",
"metadata": {},
Expand Down Expand Up @@ -338,6 +347,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "cea04465-6a69-42f1-8249-4c49488506f6",
"metadata": {},
Expand Down Expand Up @@ -515,6 +525,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "f3f3c685-0335-46e2-9a8d-e46ec296f074",
"metadata": {},
Expand All @@ -523,6 +534,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "9c3c7c54",
"metadata": {},
Expand Down Expand Up @@ -574,7 +586,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.11.6"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions notebooks/load-s3-files-into-shared-tier/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"source": [
"%%sql\n",
"\n",
"CREATE TABLE stocks (\n",
"CREATE TABLE stocks /* Creating table for sample data. */(\n",
"\t`date` date NULL,\n",
"\t`open` double NULL,\n",
"\t`high` double NULL,\n",
Expand Down Expand Up @@ -131,7 +131,7 @@
"outputs": [],
"source": [
"%%sql\n",
"CREATE OR REPLACE PIPELINE stocks_pipeline\n",
"CREATE OR REPLACE PIPELINE stocks_pipeline /* Creating pipeline for sample data. */\n",
" AS LOAD DATA S3 'helios-self-poc-stockticker/all_stocks_5yr.csv'\n",
" CONFIG '{\"region\": \"us-east-1\"}'\n",
" CREDENTIALS '{\"aws_access_key_id\": \"<your_key>\",\n",
Expand Down
Loading

0 comments on commit ed421af

Please sign in to comment.