Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0bcf9b1

Browse filesBrowse files
author
Jon Wayne Parrott
committed
Move imports into bigquery samples
Change-Id: I0be8d3e0778352a8b814258f83d13d131cb5054e
1 parent 84d5feb commit 0bcf9b1
Copy full SHA for 0bcf9b1

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed

‎bigquery/cloud-client/user_credentials.py

Copy file name to clipboardExpand all lines: bigquery/cloud-client/user_credentials.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@
2222

2323
import argparse
2424

25-
from google.cloud import bigquery
26-
from google_auth_oauthlib import flow
27-
2825

2926
def run_query(credentials, project, query):
27+
from google.cloud import bigquery
28+
3029
client = bigquery.Client(project=project, credentials=credentials)
3130
query_job = client.query(query)
3231

@@ -36,6 +35,8 @@ def run_query(credentials, project, query):
3635

3736

3837
def authenticate_and_query(project, query, launch_browser=True):
38+
from google_auth_oauthlib import flow
39+
3940
appflow = flow.InstalledAppFlow.from_client_secrets_file(
4041
'client_secrets.json',
4142
scopes=['https://www.googleapis.com/auth/bigquery'])

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.