|
55 | 55 | }, |
56 | 56 | { |
57 | 57 | "cell_type": "code", |
58 | | - "execution_count": 4, |
| 58 | + "execution_count": 53, |
59 | 59 | "id": "a849f659-1892-4e49-b7d4-b8b315750e13", |
60 | 60 | "metadata": {}, |
61 | 61 | "outputs": [ |
|
64 | 64 | "output_type": "stream", |
65 | 65 | "text": [ |
66 | 66 | "INFO:BoilingDataConnection:Connecting\n", |
67 | | - "INFO:BoilingDataConnection:WS OPEN\n" |
| 67 | + "INFO:BoilingDataConnection:WS OPEN\n", |
| 68 | + "INFO:BoilingDataConnection:{'name': 'QUERY_RUN', 'value': 'starting'}\n", |
| 69 | + "INFO:BoilingDataConnection:{'name': 'QUERY_RUN', 'value': 'finished'}\n", |
| 70 | + "INFO:BoilingDataConnection:{'name': 'QUERY_RUN_MS', 'value': 59}\n" |
68 | 71 | ] |
69 | 72 | } |
70 | 73 | ], |
|
75 | 78 | "\n", |
76 | 79 | "load_dotenv() # take environment variables from .env\n", |
77 | 80 | "\n", |
78 | | - "boiling = BoilingData()\n", |
| 81 | + "boiling = BoilingData(log_level=\"INFO\")\n", |
79 | 82 | "await boiling.connect()\n", |
80 | 83 | "\n", |
81 | 84 | "async def bd(sql):\n", |
|
86 | 89 | " return resp" |
87 | 90 | ] |
88 | 91 | }, |
| 92 | + { |
| 93 | + "cell_type": "markdown", |
| 94 | + "id": "394d22ad-61bf-41a1-aee9-719914572359", |
| 95 | + "metadata": {}, |
| 96 | + "source": [ |
| 97 | + "To get a list of Data Sets shared to you, you can call:" |
| 98 | + ] |
| 99 | + }, |
89 | 100 | { |
90 | 101 | "cell_type": "code", |
91 | | - "execution_count": 5, |
92 | | - "id": "74792890-15e8-486a-b507-1603bd5a5c15", |
| 102 | + "execution_count": 48, |
| 103 | + "id": "62c41e1d-cfaf-4a05-9407-23fe8d523da6", |
93 | 104 | "metadata": {}, |
94 | 105 | "outputs": [ |
95 | 106 | { |
96 | | - "data": { |
97 | | - "text/html": [ |
98 | | - "<div>\n", |
99 | | - "<style scoped>\n", |
100 | | - " .dataframe tbody tr th:only-of-type {\n", |
101 | | - " vertical-align: middle;\n", |
102 | | - " }\n", |
103 | | - "\n", |
104 | | - " .dataframe tbody tr th {\n", |
105 | | - " vertical-align: top;\n", |
106 | | - " }\n", |
107 | | - "\n", |
108 | | - " .dataframe thead th {\n", |
109 | | - " text-align: right;\n", |
110 | | - " }\n", |
111 | | - "</style>\n", |
112 | | - "<table border=\"1\" class=\"dataframe\">\n", |
113 | | - " <thead>\n", |
114 | | - " <tr style=\"text-align: right;\">\n", |
115 | | - " <th></th>\n", |
116 | | - " <th>0</th>\n", |
117 | | - " </tr>\n", |
118 | | - " </thead>\n", |
119 | | - " <tbody>\n", |
120 | | - " <tr>\n", |
121 | | - " <th>0</th>\n", |
122 | | - " <td>demo_full</td>\n", |
123 | | - " </tr>\n", |
124 | | - " <tr>\n", |
125 | | - " <th>1</th>\n", |
126 | | - " <td>taxi_locations</td>\n", |
127 | | - " </tr>\n", |
128 | | - " <tr>\n", |
129 | | - " <th>2</th>\n", |
130 | | - " <td>taxi_locations_limited</td>\n", |
131 | | - " </tr>\n", |
132 | | - " </tbody>\n", |
133 | | - "</table>\n", |
134 | | - "</div>" |
135 | | - ], |
136 | | - "text/plain": [ |
137 | | - " 0\n", |
138 | | - "0 demo_full\n", |
139 | | - "1 taxi_locations\n", |
140 | | - "2 taxi_locations_limited" |
141 | | - ] |
142 | | - }, |
143 | | - "execution_count": 5, |
144 | | - "metadata": {}, |
145 | | - "output_type": "execute_result" |
| 107 | + "name": "stdout", |
| 108 | + "output_type": "stream", |
| 109 | + "text": [ |
| 110 | + " shareName fromEmail lifeTime schedule\n", |
| 111 | + "0 taxi_locations demo@boilingdata.com 1h * * * * * *\n", |
| 112 | + "1 taxi_locations_limited dforsber@gmail.com 1h * * * * * *\n", |
| 113 | + "2 taxi_locations dforsber@gmail.com 1h * * * * * *\n", |
| 114 | + "3 demo_full dforsber@gmail.com 1h * * * * * *\n" |
| 115 | + ] |
146 | 116 | } |
147 | 117 | ], |
148 | 118 | "source": [ |
149 | | - "await bd('SHOW TABLES')" |
| 119 | + "resp = await bd(\"SELECT shareName, fromEmail, lifeTime, schedule FROM boilingshares LIMIT 100\");\n", |
| 120 | + "print(resp)" |
150 | 121 | ] |
151 | 122 | }, |
152 | 123 | { |
153 | 124 | "cell_type": "code", |
154 | | - "execution_count": 6, |
155 | | - "id": "70bc3afc-d4a6-4eb3-8fb9-387d3a8ab40d", |
| 125 | + "execution_count": 49, |
| 126 | + "id": "6f294126-d81a-4e1c-bf6f-eec397759d1d", |
156 | 127 | "metadata": {}, |
157 | 128 | "outputs": [ |
158 | 129 | { |
|
176 | 147 | " <thead>\n", |
177 | 148 | " <tr style=\"text-align: right;\">\n", |
178 | 149 | " <th></th>\n", |
179 | | - " <th>first_name</th>\n", |
180 | | - " <th>email</th>\n", |
| 150 | + " <th>LocationID</th>\n", |
| 151 | + " <th>Borough</th>\n", |
| 152 | + " <th>Zone</th>\n", |
| 153 | + " <th>service_zone</th>\n", |
181 | 154 | " </tr>\n", |
182 | 155 | " </thead>\n", |
183 | 156 | " <tbody>\n", |
184 | 157 | " <tr>\n", |
185 | 158 | " <th>0</th>\n", |
186 | | - " <td>Amanda</td>\n", |
187 | | - " <td>ajordan0@com.com</td>\n", |
| 159 | + " <td>1</td>\n", |
| 160 | + " <td>EWR</td>\n", |
| 161 | + " <td>Newark Airport</td>\n", |
| 162 | + " <td>EWR</td>\n", |
188 | 163 | " </tr>\n", |
189 | 164 | " <tr>\n", |
190 | 165 | " <th>1</th>\n", |
191 | | - " <td>Albert</td>\n", |
192 | | - " <td>afreeman1@is.gd</td>\n", |
193 | | - " </tr>\n", |
194 | | - " <tr>\n", |
195 | | - " <th>2</th>\n", |
196 | | - " <td>Evelyn</td>\n", |
197 | | - " <td>emorgan2@altervista.org</td>\n", |
198 | | - " </tr>\n", |
199 | | - " <tr>\n", |
200 | | - " <th>3</th>\n", |
201 | | - " <td>Denise</td>\n", |
202 | | - " <td>driley3@gmpg.org</td>\n", |
203 | | - " </tr>\n", |
204 | | - " <tr>\n", |
205 | | - " <th>4</th>\n", |
206 | | - " <td>Carlos</td>\n", |
207 | | - " <td>cburns4@miitbeian.gov.cn</td>\n", |
208 | | - " </tr>\n", |
209 | | - " <tr>\n", |
210 | | - " <th>5</th>\n", |
211 | | - " <td>Kathryn</td>\n", |
212 | | - " <td>kwhite5@google.com</td>\n", |
213 | | - " </tr>\n", |
214 | | - " <tr>\n", |
215 | | - " <th>6</th>\n", |
216 | | - " <td>Samuel</td>\n", |
217 | | - " <td>sholmes6@foxnews.com</td>\n", |
218 | | - " </tr>\n", |
219 | | - " <tr>\n", |
220 | | - " <th>7</th>\n", |
221 | | - " <td>Harry</td>\n", |
222 | | - " <td>hhowell7@eepurl.com</td>\n", |
223 | | - " </tr>\n", |
224 | | - " <tr>\n", |
225 | | - " <th>8</th>\n", |
226 | | - " <td>Jose</td>\n", |
227 | | - " <td>jfoster8@yelp.com</td>\n", |
228 | | - " </tr>\n", |
229 | | - " <tr>\n", |
230 | | - " <th>9</th>\n", |
231 | | - " <td>Emily</td>\n", |
232 | | - " <td>estewart9@opensource.org</td>\n", |
| 166 | + " <td>2</td>\n", |
| 167 | + " <td>Queens</td>\n", |
| 168 | + " <td>Jamaica Bay</td>\n", |
| 169 | + " <td>Boro Zone</td>\n", |
233 | 170 | " </tr>\n", |
234 | 171 | " </tbody>\n", |
235 | 172 | "</table>\n", |
236 | 173 | "</div>" |
237 | 174 | ], |
238 | 175 | "text/plain": [ |
239 | | - " first_name email\n", |
240 | | - "0 Amanda ajordan0@com.com\n", |
241 | | - "1 Albert afreeman1@is.gd\n", |
242 | | - "2 Evelyn emorgan2@altervista.org\n", |
243 | | - "3 Denise driley3@gmpg.org\n", |
244 | | - "4 Carlos cburns4@miitbeian.gov.cn\n", |
245 | | - "5 Kathryn kwhite5@google.com\n", |
246 | | - "6 Samuel sholmes6@foxnews.com\n", |
247 | | - "7 Harry hhowell7@eepurl.com\n", |
248 | | - "8 Jose jfoster8@yelp.com\n", |
249 | | - "9 Emily estewart9@opensource.org" |
| 176 | + " LocationID Borough Zone service_zone\n", |
| 177 | + "0 1 EWR Newark Airport EWR\n", |
| 178 | + "1 2 Queens Jamaica Bay Boro Zone" |
250 | 179 | ] |
251 | 180 | }, |
252 | | - "execution_count": 6, |
| 181 | + "execution_count": 49, |
253 | 182 | "metadata": {}, |
254 | 183 | "output_type": "execute_result" |
255 | 184 | } |
256 | 185 | ], |
257 | 186 | "source": [ |
258 | | - "await bd(\"SELECT first_name, email FROM parquet_scan('s3://boilingdata-demo/test.parquet') LIMIT 10\")" |
| 187 | + "await bd(\"SELECT * FROM share('dforsber@gmail.com:taxi_locations') LIMIT 2\")" |
259 | 188 | ] |
260 | 189 | }, |
261 | 190 | { |
262 | 191 | "cell_type": "code", |
263 | | - "execution_count": 7, |
| 192 | + "execution_count": 52, |
264 | 193 | "id": "715e0451-4a18-4415-a0cb-73d68d248843", |
265 | 194 | "metadata": {}, |
266 | 195 | "outputs": [ |
|
503 | 432 | "9 1/28/1997 27234.28 Health Coach IV " |
504 | 433 | ] |
505 | 434 | }, |
506 | | - "execution_count": 7, |
| 435 | + "execution_count": 52, |
507 | 436 | "metadata": {}, |
508 | 437 | "output_type": "execute_result" |
509 | 438 | } |
|
0 commit comments