Sam Garvis
08/17/2022, 4:20 PM@task
def get_client(gcloud_auth):
try:
service_account_info = json.loads(gcloud_auth)
except:
service_account_info = json.loads(eval(gcloud_auth), strict=False)
creds = service_account.Credentials.from_service_account_info(
service_account_info
)
client = bigquery.Client(credentials=creds)
return client
PicklingError: Pickling client objects is explicitly not supported.
Clients have non-trivial state that is local and unpickleable.
alex
08/17/2022, 4:25 PM