Skip to content

Commit c69660f

Browse files
committed
Update notebook, set log level to ERROR
1 parent 56d5f75 commit c69660f

1 file changed

Lines changed: 87 additions & 86 deletions

File tree

boilingdata.ipynb

Lines changed: 87 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -92,37 +92,27 @@
9292
},
9393
{
9494
"cell_type": "code",
95-
"execution_count": 2,
95+
"execution_count": 10,
9696
"id": "a849f659-1892-4e49-b7d4-b8b315750e13",
9797
"metadata": {},
98-
"outputs": [
99-
{
100-
"name": "stderr",
101-
"output_type": "stream",
102-
"text": [
103-
"INFO:BoilingDataConnection:Connecting\n",
104-
"INFO:BoilingDataConnection:WS OPEN\n",
105-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN', 'value': 'starting'}\n",
106-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN', 'value': 'finished'}\n",
107-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN_MS', 'value': 55}\n"
108-
]
109-
}
110-
],
98+
"outputs": [],
11199
"source": [
112100
"import pandas as pd\n",
113101
"from dotenv import load_dotenv\n",
114102
"from py_boilingdata import BoilingData\n",
115103
"\n",
116104
"load_dotenv() # take environment variables from .env\n",
117105
"\n",
118-
"boiling = BoilingData(log_level=\"INFO\")\n",
106+
"# You can turn off the messages by raising the log level to 'ERROR'\n",
107+
"boiling = BoilingData(log_level=\"ERROR\")\n",
119108
"await boiling.connect()\n",
120109
"\n",
121110
"async def bd(sql):\n",
122111
" resp = await boiling.execute(sql)\n",
123112
" try:\n",
124113
" return pd.DataFrame(resp)\n",
125114
" except:\n",
115+
" print(resp)\n",
126116
" return resp"
127117
]
128118
},
@@ -138,55 +128,98 @@
138128
},
139129
{
140130
"cell_type": "code",
141-
"execution_count": 3,
131+
"execution_count": 8,
142132
"id": "62c41e1d-cfaf-4a05-9407-23fe8d523da6",
143133
"metadata": {},
144134
"outputs": [
145135
{
146-
"name": "stderr",
147-
"output_type": "stream",
148-
"text": [
149-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN', 'value': 'starting'}\n"
150-
]
151-
},
152-
{
153-
"name": "stdout",
154-
"output_type": "stream",
155-
"text": [
156-
" shareName fromEmail lifeTime schedule\n",
157-
"0 taxi_locations demo@boilingdata.com 1h * * * * * *\n",
158-
"1 taxi_locations_limited dforsber@gmail.com 1h * * * * * *\n",
159-
"2 taxi_locations dforsber@gmail.com 1h * * * * * *\n",
160-
"3 demo_full dforsber@gmail.com 1h * * * * * *\n"
161-
]
162-
},
163-
{
164-
"name": "stderr",
165-
"output_type": "stream",
166-
"text": [
167-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN', 'value': 'finished'}\n",
168-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN_MS', 'value': 224}\n"
169-
]
136+
"data": {
137+
"text/html": [
138+
"<div>\n",
139+
"<style scoped>\n",
140+
" .dataframe tbody tr th:only-of-type {\n",
141+
" vertical-align: middle;\n",
142+
" }\n",
143+
"\n",
144+
" .dataframe tbody tr th {\n",
145+
" vertical-align: top;\n",
146+
" }\n",
147+
"\n",
148+
" .dataframe thead th {\n",
149+
" text-align: right;\n",
150+
" }\n",
151+
"</style>\n",
152+
"<table border=\"1\" class=\"dataframe\">\n",
153+
" <thead>\n",
154+
" <tr style=\"text-align: right;\">\n",
155+
" <th></th>\n",
156+
" <th>shareName</th>\n",
157+
" <th>fromEmail</th>\n",
158+
" <th>lifeTime</th>\n",
159+
" <th>schedule</th>\n",
160+
" </tr>\n",
161+
" </thead>\n",
162+
" <tbody>\n",
163+
" <tr>\n",
164+
" <th>0</th>\n",
165+
" <td>taxi_locations</td>\n",
166+
" <td>demo@boilingdata.com</td>\n",
167+
" <td>1h</td>\n",
168+
" <td>* * * * * *</td>\n",
169+
" </tr>\n",
170+
" <tr>\n",
171+
" <th>1</th>\n",
172+
" <td>taxi_locations_limited</td>\n",
173+
" <td>dforsber@gmail.com</td>\n",
174+
" <td>1h</td>\n",
175+
" <td>* * * * * *</td>\n",
176+
" </tr>\n",
177+
" <tr>\n",
178+
" <th>2</th>\n",
179+
" <td>taxi_locations</td>\n",
180+
" <td>dforsber@gmail.com</td>\n",
181+
" <td>1h</td>\n",
182+
" <td>* * * * * *</td>\n",
183+
" </tr>\n",
184+
" <tr>\n",
185+
" <th>3</th>\n",
186+
" <td>demo_full</td>\n",
187+
" <td>dforsber@gmail.com</td>\n",
188+
" <td>1h</td>\n",
189+
" <td>* * * * * *</td>\n",
190+
" </tr>\n",
191+
" </tbody>\n",
192+
"</table>\n",
193+
"</div>"
194+
],
195+
"text/plain": [
196+
" shareName fromEmail lifeTime schedule\n",
197+
"0 taxi_locations demo@boilingdata.com 1h * * * * * *\n",
198+
"1 taxi_locations_limited dforsber@gmail.com 1h * * * * * *\n",
199+
"2 taxi_locations dforsber@gmail.com 1h * * * * * *\n",
200+
"3 demo_full dforsber@gmail.com 1h * * * * * *"
201+
]
202+
},
203+
"execution_count": 8,
204+
"metadata": {},
205+
"output_type": "execute_result"
170206
}
171207
],
172208
"source": [
173-
"resp = await bd(\"SELECT shareName, fromEmail, lifeTime, schedule FROM boilingshares LIMIT 100;\")\n",
174-
"print(resp)"
209+
"await bd(\"SELECT shareName, fromEmail, lifeTime, schedule FROM boilingshares LIMIT 100;\")"
175210
]
176211
},
177212
{
178-
"cell_type": "code",
179-
"execution_count": null,
180-
"id": "7e56f5ef-6856-4caf-a347-779049cae17a",
213+
"cell_type": "markdown",
214+
"id": "89e9cca6-c3af-4ea3-b293-54898d338e7c",
181215
"metadata": {},
182-
"outputs": [],
183216
"source": [
184217
"In this run, I have data set called `taxi_locations` shared for me by `dforsber@gmail.com`. I can query it like this: "
185218
]
186219
},
187220
{
188221
"cell_type": "code",
189-
"execution_count": 3,
222+
"execution_count": 9,
190223
"id": "6f294126-d81a-4e1c-bf6f-eec397759d1d",
191224
"metadata": {},
192225
"outputs": [
@@ -242,7 +275,7 @@
242275
"1 2 Queens Jamaica Bay Boro Zone"
243276
]
244277
},
245-
"execution_count": 3,
278+
"execution_count": 9,
246279
"metadata": {},
247280
"output_type": "execute_result"
248281
}
@@ -263,7 +296,7 @@
263296
},
264297
{
265298
"cell_type": "code",
266-
"execution_count": 5,
299+
"execution_count": 11,
267300
"id": "715e0451-4a18-4415-a0cb-73d68d248843",
268301
"metadata": {},
269302
"outputs": [
@@ -411,7 +444,7 @@
411444
"4 NaN "
412445
]
413446
},
414-
"execution_count": 5,
447+
"execution_count": 11,
415448
"metadata": {},
416449
"output_type": "execute_result"
417450
}
@@ -432,18 +465,10 @@
432465
},
433466
{
434467
"cell_type": "code",
435-
"execution_count": 5,
468+
"execution_count": 12,
436469
"id": "012cfa74-8664-4398-87fa-c12dce698f86",
437470
"metadata": {},
438471
"outputs": [
439-
{
440-
"name": "stderr",
441-
"output_type": "stream",
442-
"text": [
443-
"INFO:BoilingDataConnection:Listing Buckets\n",
444-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN', 'value': 'starting'}\n"
445-
]
446-
},
447472
{
448473
"data": {
449474
"text/html": [
@@ -490,17 +515,9 @@
490515
"1 boilingdata-user 2021-12-06T12:06:12.060Z"
491516
]
492517
},
493-
"execution_count": 5,
518+
"execution_count": 12,
494519
"metadata": {},
495520
"output_type": "execute_result"
496-
},
497-
{
498-
"name": "stderr",
499-
"output_type": "stream",
500-
"text": [
501-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN', 'value': 'finished'}\n",
502-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN_MS', 'value': 74}\n"
503-
]
504521
}
505522
],
506523
"source": [
@@ -509,18 +526,10 @@
509526
},
510527
{
511528
"cell_type": "code",
512-
"execution_count": 6,
529+
"execution_count": 13,
513530
"id": "097a28c9-3424-47da-82a4-2daf2948de02",
514531
"metadata": {},
515532
"outputs": [
516-
{
517-
"name": "stderr",
518-
"output_type": "stream",
519-
"text": [
520-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN', 'value': 'starting'}\n",
521-
"INFO:BoilingDataConnection:Listing s3://boilingdata-demo/\n"
522-
]
523-
},
524533
{
525534
"data": {
526535
"text/html": [
@@ -743,17 +752,9 @@
743752
"14 test_folder2/ "
744753
]
745754
},
746-
"execution_count": 6,
755+
"execution_count": 13,
747756
"metadata": {},
748757
"output_type": "execute_result"
749-
},
750-
{
751-
"name": "stderr",
752-
"output_type": "stream",
753-
"text": [
754-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN', 'value': 'finished'}\n",
755-
"INFO:BoilingDataConnection:{'name': 'QUERY_RUN_MS', 'value': 103}\n"
756-
]
757758
}
758759
],
759760
"source": [

0 commit comments

Comments
 (0)