Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from google.cloud import bigquery
- import sys
- bigquery_client = bigquery.Client(
- project = "my-project")
- query = bigquery_client.run_sync_query("select * from airflow.quotes_" + sys.argv[1])
- query.run()
- dataset = bigquery_client.dataset("airflow")
- table = dataset.table("quotes")
- table.reload()
- result = table.insert_data(query.rows)
- print(query.rows)
- print(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement