|
81 | 81 | "id": "2d22fd53-2c18-40e5-bb38-6d8ebc06f1b8",
|
82 | 82 | "metadata": {},
|
83 | 83 | "source": [
|
84 |
| - "## Create a database\n", |
| 84 | + "## Create a database (You can skip this Step if you are using Free Starter Tier)\n", |
85 | 85 | "\n",
|
86 | 86 | "We need to create a database to work with in the following examples."
|
87 | 87 | ]
|
|
161 | 161 | "START PIPELINE SalesData_Pipeline;"
|
162 | 162 | ]
|
163 | 163 | },
|
| 164 | + { |
| 165 | + "attachments": {}, |
| 166 | + "cell_type": "markdown", |
| 167 | + "id": "a402a924-5e09-4213-88f6-2723b39ee2aa", |
| 168 | + "metadata": {}, |
| 169 | + "source": [ |
| 170 | + "### It might take around 1 min to load data from S3 to SingleStore table" |
| 171 | + ] |
| 172 | + }, |
164 | 173 | {
|
165 | 174 | "cell_type": "code",
|
166 | 175 | "execution_count": 4,
|
|
169 | 178 | "outputs": [],
|
170 | 179 | "source": [
|
171 | 180 | "%%sql\n",
|
172 |
| - "SELECT * FROM SalesData LIMIT 10" |
| 181 | + "SELECT count(*) FROM SalesData" |
173 | 182 | ]
|
174 | 183 | },
|
175 | 184 | {
|
|
296 | 305 | "source": [
|
297 | 306 | "## Conclusion\n",
|
298 | 307 | "\n",
|
299 |
| - "<div class=\"alert alert-block alert-warning\">\n", |
300 |
| - " <b class=\"fa fa-solid fa-exclamation-circle\"></b>\n", |
301 |
| - " <div>\n", |
302 |
| - " <p><b>Action Required</b></p>\n", |
303 |
| - " <p> If you created a new database in your Standard or Premium Workspace, you can drop the database by running the cell below. Note: this will not drop your database for Free Starter Workspaces. To drop a Free Starter Workspace, terminate the Workspace using the UI. </p>\n", |
304 |
| - " </div>\n", |
305 |
| - "</div>\n", |
306 |
| - "\n", |
307 | 308 | "We have shown how to insert data from a Amazon S3 using `Pipelines` to SingleStoreDB. These techniques should enable you to\n",
|
308 | 309 | "integrate your Amazon S3 with SingleStoreDB."
|
309 | 310 | ]
|
310 | 311 | },
|
| 312 | + { |
| 313 | + "attachments": {}, |
| 314 | + "cell_type": "markdown", |
| 315 | + "id": "83b2d1e6-58b8-493e-a698-2fd46e2ac5a1", |
| 316 | + "metadata": {}, |
| 317 | + "source": [ |
| 318 | + "## Clean up" |
| 319 | + ] |
| 320 | + }, |
| 321 | + { |
| 322 | + "cell_type": "markdown", |
| 323 | + "id": "f028e26e-66c0-44dc-9024-221687334301", |
| 324 | + "metadata": {}, |
| 325 | + "source": [ |
| 326 | + "#### Drop Pipeline" |
| 327 | + ] |
| 328 | + }, |
311 | 329 | {
|
312 | 330 | "cell_type": "code",
|
313 | 331 | "execution_count": 10,
|
| 332 | + "id": "f1f7b94f-2018-464e-9a28-b71cb89d65e3", |
| 333 | + "metadata": {}, |
| 334 | + "outputs": [], |
| 335 | + "source": [ |
| 336 | + "%%sql\n", |
| 337 | + "STOP PIPELINE SalesData_Pipeline;\n", |
| 338 | + "\n", |
| 339 | + "DROP PIPELINE SalesData_Pipeline;" |
| 340 | + ] |
| 341 | + }, |
| 342 | + { |
| 343 | + "cell_type": "markdown", |
| 344 | + "id": "33a246bd-36a3-4027-b44d-8c46768ff96d", |
| 345 | + "metadata": {}, |
| 346 | + "source": [ |
| 347 | + "#### Drop Data" |
| 348 | + ] |
| 349 | + }, |
| 350 | + { |
| 351 | + "cell_type": "code", |
| 352 | + "execution_count": 11, |
314 | 353 | "id": "d5053a52-5579-4fea-9594-5250f6fcc289",
|
315 | 354 | "metadata": {},
|
316 | 355 | "outputs": [],
|
317 | 356 | "source": [
|
318 | 357 | "shared_tier_check = %sql show variables like 'is_shared_tier'\n",
|
319 | 358 | "if not shared_tier_check or shared_tier_check[0][1] == 'OFF':\n",
|
320 |
| - " %sql DROP DATABASE IF EXISTS SalesAnalysis;" |
| 359 | + " %sql DROP DATABASE IF EXISTS SalesAnalysis;\n", |
| 360 | + "else:\n", |
| 361 | + " %sql DROP TABLE SalesData;" |
321 | 362 | ]
|
322 | 363 | },
|
323 | 364 | {
|
|
0 commit comments