Skip to content

Commit 96b29be

Browse files
committed
Add project to context
1 parent e5973d5 commit 96b29be

File tree

1 file changed

+7
-63
lines changed

1 file changed

+7
-63
lines changed

2020/bigquery-python/user-credentials-magics.ipynb

Lines changed: 7 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": null,
66
"metadata": {},
77
"outputs": [],
88
"source": [
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"cell_type": "code",
15-
"execution_count": 3,
15+
"execution_count": null,
1616
"metadata": {},
1717
"outputs": [],
1818
"source": [
@@ -21,16 +21,17 @@
2121
},
2222
{
2323
"cell_type": "code",
24-
"execution_count": 4,
24+
"execution_count": null,
2525
"metadata": {},
2626
"outputs": [],
2727
"source": [
28+
"google.cloud.bigquery.magics.context.project = \"my-project-id\"\n",
2829
"google.cloud.bigquery.magics.context.credentials = credentials"
2930
]
3031
},
3132
{
3233
"cell_type": "code",
33-
"execution_count": 5,
34+
"execution_count": null,
3435
"metadata": {},
3536
"outputs": [],
3637
"source": [
@@ -39,66 +40,9 @@
3940
},
4041
{
4142
"cell_type": "code",
42-
"execution_count": 7,
43+
"execution_count": null,
4344
"metadata": {},
44-
"outputs": [
45-
{
46-
"data": {
47-
"text/html": [
48-
"<div>\n",
49-
"<style scoped>\n",
50-
" .dataframe tbody tr th:only-of-type {\n",
51-
" vertical-align: middle;\n",
52-
" }\n",
53-
"\n",
54-
" .dataframe tbody tr th {\n",
55-
" vertical-align: top;\n",
56-
" }\n",
57-
"\n",
58-
" .dataframe thead th {\n",
59-
" text-align: right;\n",
60-
" }\n",
61-
"</style>\n",
62-
"<table border=\"1\" class=\"dataframe\">\n",
63-
" <thead>\n",
64-
" <tr style=\"text-align: right;\">\n",
65-
" <th></th>\n",
66-
" <th>name</th>\n",
67-
" <th>count</th>\n",
68-
" </tr>\n",
69-
" </thead>\n",
70-
" <tbody>\n",
71-
" <tr>\n",
72-
" <td>0</td>\n",
73-
" <td>James</td>\n",
74-
" <td>5015584</td>\n",
75-
" </tr>\n",
76-
" <tr>\n",
77-
" <td>1</td>\n",
78-
" <td>John</td>\n",
79-
" <td>4885284</td>\n",
80-
" </tr>\n",
81-
" <tr>\n",
82-
" <td>2</td>\n",
83-
" <td>Robert</td>\n",
84-
" <td>4749154</td>\n",
85-
" </tr>\n",
86-
" </tbody>\n",
87-
"</table>\n",
88-
"</div>"
89-
],
90-
"text/plain": [
91-
" name count\n",
92-
"0 James 5015584\n",
93-
"1 John 4885284\n",
94-
"2 Robert 4749154"
95-
]
96-
},
97-
"execution_count": 7,
98-
"metadata": {},
99-
"output_type": "execute_result"
100-
}
101-
],
45+
"outputs": [],
10246
"source": [
10347
"%%bigquery\n",
10448
"SELECT name, SUM(number) as count\n",

0 commit comments

Comments
 (0)