Skip to content

Commit

Permalink
reuse same spanner database in Cloud Function sample (#2763)
Browse files Browse the repository at this point in the history
  • Loading branch information
larkee authored Feb 3, 2020
1 parent 7f0be75 commit 8215f45
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions functions/spanner/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
database_id = 'example-db'

client = spanner.Client()
instance = client.instance(instance_id)
database = instance.database(database_id)


def spanner_read_data(request):
instance = client.instance(instance_id)
database = instance.database(database_id)

query = 'SELECT * FROM Albums'

outputs = []
Expand Down

0 comments on commit 8215f45

Please sign in to comment.