大查询-从临时表创建表/视图 [英] Big Query - Create a table/view from a temp table
本文介绍了大查询-从临时表创建表/视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们在Big Query中有一个查询,如下所示:
We have a query in Big Query like below
CREATE temp table ttt as (
SELECT * FROM TABLE
);
EXECUTE IMMEDIATE (
---Dynamic query goes here---
);
以上查询将结果存储在查询中所写的临时表中.如何将这些结果存储到实际的表/视图中,以便将其用于进一步的数据建模?
The above query is storing the results in a temporary table as written in the query. How to store these results into an actual table/view so that it can be utilized for further data modelling?
推荐答案
尝试使用:
EXECUTE IMMEDIATE (concat('create table dataset.table as ',---Dynamic query goes here---)
);
这篇关于大查询-从临时表创建表/视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文