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 b3075d0 commit 5f9df11
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
--trigger-http \
--allow-unauthenticated \
--clear-secrets \
--set-env-vars 'DATASET=${{ secrets.TABLE }}','TABLE=${{ secrets.DATASET }}'
--set-env-vars 'DATASET=${{ secrets.DATASET }}','TABLE=${{ secrets.TABLE }}'
4 changes: 0 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@

def record_data(temp: str) -> tuple:
try:
print('record_data raw input:', temp)

# Init BigQuery
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 5f9df11

Please sign in to comment.