Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'Create Table As' in BigQuery

How to create a table on the basis of result of select query in BigQuery?

For example:

create table abc as select x,y,z from mnp;

Is there any way or workaround to achieve the same in BigQuery?

Any leads?

like image 427
Balajee Venkatesh Avatar asked Nov 02 '17 06:11

Balajee Venkatesh


People also ask

Can we change datatype in BigQuery?

You can modify the data type in a table with the ALTER COLUMN SET DATA TYPE statement in BigQuery. For example, an INT64 data type can be changed into a FLOAT64 type, but not the other way around.

How to CLONE a table in BigQuery?

In the BigQuery UI, select the table you wish to copy, then push the Copy Table button. Enter the desired new table name. BigQuery documentation lists additional methods for copying a table (via API, with Python, PHP, etc).


1 Answers

Just try giving the GCP folder name before table name in create table statement.

Example:

create table [GCP_Folder].abc as select x,y,z from mnp

like image 161
karthick Avatar answered Oct 01 '22 12:10

karthick