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 f83bb36

Browse filesBrowse files
authored
updates tutorial to add datasets to to_delete before running (GoogleCloudPlatform#1579)
1 parent a28eca0 commit f83bb36
Copy full SHA for f83bb36

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+7
-4
lines changed

‎bigquery/cloud-client/authorized_view_tutorial.py

Copy file name to clipboardExpand all lines: bigquery/cloud-client/authorized_view_tutorial.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ def run_authorized_view_tutorial():
101101
source_dataset, ['access_entries']) # API request
102102
# [END bigquery_avt_source_dataset_access]
103103
# [END bigquery_authorized_view_tutorial]
104-
return (source_dataset, shared_dataset)
105104

106105

107106
if __name__ == '__main__':

‎bigquery/cloud-client/authorized_view_tutorial_test.py

Copy file name to clipboardExpand all lines: bigquery/cloud-client/authorized_view_tutorial_test.py
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ def to_delete(client):
3737

3838

3939
def test_authorized_view_tutorial(client, to_delete):
40-
source_dataset, shared_dataset = (
41-
authorized_view_tutorial.run_authorized_view_tutorial())
42-
to_delete.extend([source_dataset, shared_dataset])
40+
source_dataset_ref = client.dataset('github_source_data')
41+
shared_dataset_ref = client.dataset('shared_views')
42+
to_delete.extend([source_dataset_ref, shared_dataset_ref])
4343

44+
authorized_view_tutorial.run_authorized_view_tutorial()
45+
46+
source_dataset = client.get_dataset(source_dataset_ref)
47+
shared_dataset = client.get_dataset(shared_dataset_ref)
4448
analyst_email = 'example-analyst-group@google.com'
4549
analyst_entries = [entry for entry in shared_dataset.access_entries
4650
if entry.entity_id == analyst_email]

0 commit comments

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