Skip to content

Commit

Permalink
GF-13: Deploy functions environment and test bigquery
Browse files Browse the repository at this point in the history
  • Loading branch information
mfedorchuk committed Dec 26, 2023
1 parent e44f0f9 commit b3075d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ def record_data(temp: str) -> tuple:
print('record_data raw input:', temp)

# Init BigQuery
client = bigquery.Client()
bigquery_client = bigquery.Client()
dataset_ref = bigquery_client.dataset(os.environ.get('DATASET'))
client = bigquery.client.Client()
dataset_ref = client.dataset(os.environ.get('DATASET'))
table_ref = dataset_ref.table(os.environ.get('TABLE'))

print('table_ref:', table_ref, '\n')

# Insert rows
errors = client.insert_rows(
table_ref,
Expand Down

0 comments on commit b3075d0

Please sign in to comment.