ok, so we're using Google BigQuery via python API, my question is how to create a table (new one or overwrite old one) from a query results ? Some docs are here, but I can't find it usefull.
basically, we want to simulate
"SELEC ... INTO ..." from ANSI SQL.
Take the SQL sample of
SELECT name,count FROM mydataset.babynames
WHERE gender = 'M' ORDER BY count DESC LIMIT 6 INTO mydataset.happyhalloween;
The easiest command line equivalent is
bq query --destination_table=mydataset.happyhalloween \
"SELECT name,count FROM mydataset.babynames WHERE gender = 'M' \
ORDER BY count DESC LIMIT 6"
See the documentation here: https://cloud.google.com/bigquery/bq-command-line-tool#createtablequery