Is there any way to create a temporary table in Google BigQuery through:
SELECT * INTO <temp table>
FROM <table name>
same as we can create in SQL?
For complex queries, I need to create temporary tables to store my data.
Temporary and permanent tables BigQuery uses temporary tables to cache query results that aren't written to a permanent table. The tables are created in a special dataset and named randomly. You can also create temporary tables for your own use.
You can create a table in BigQuery in the following ways: Manually using the Google Cloud console or the bq command-line tool bq mk command. Programmatically by calling the tables.
Create a table snapshot using time travel. In the console, go to the BigQuery page. In the Explorer pane, expand the project and dataset nodes of the table you want to snapshot. Click the name of the table you want to snapshot.
2019 update -- With BigQuery scripting (Beta now), CREATE TEMP TABLE is officially supported. See public documentation here.
2018 update: https://stackoverflow.com/a/50227484/132438
Every query in bigquery creates a temporary table with the results. Temporary unless you give a name to the destination table, then you are in control of its lifecycle.
Use the api to see the temporary table name, or name your tables when querying.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With