Skip to content

Instantly share code, notes, and snippets.

@cvalaas
cvalaas / spanner_sample.py
Last active December 9, 2020 19:52
sample spanner code
spanner_client = spanner.Client()
instance = spanner_client.instance("tfgen-spanid-20201027205143024") # <--spanner instance ID here. this is stage's. this should be a variable
database = instance.database("workday") # <-- this should probably also be a variable
TABLE_NAME = "workers"
#############################
# this part should be in a separate function, probably
import csv
workday_fieldnames = ""
worker_data = []

Keybase proof

I hereby claim:

  • I am cvalaas on github.
  • I am cvalaas (https://keybase.io/cvalaas) on keybase.
  • I have a public key ASC3BqN9KzbSgMaSH53MedX5wufanfr0dMIcPm6ihT3K3go

To claim this, I am signing this object: