如何解决将查询结果从表写入到BigQuery中的分区集群表
我有一个临时表,其中的数据是从云存储中加载的,还有一个主表,该主表由“ tdate” 分区,并由“ serid ”
聚集 临时表中存在tdate 和 serid 列,并且tdate类似于这种格式“ YYYY-MM-DD”,而serid是整数
我知道如何编写如下查询结果。
CREATE TABLE `[project].[dataset].[dest table]`
PARTITION BY tdate
CLUSTER BY serid
AS
SELECT * FROM `[project].[dataset].[table]`;
有人可以告诉我如何使用 bq 命令或在 python
中将临时表中的数据追加到主表中p:s我是gcp的新手,今天才开始
解决方法
您尝试使用script吗?我的意思是要在同一调用中运行多个查询,并用分号隔开;
EXPLANATION
--------------------------------------------------------------------------------
^ the beginning of the string
--------------------------------------------------------------------------------
The thing is 'The thing is'
--------------------------------------------------------------------------------
.* any character except \n (0 or more times
(matching the most amount possible))
--------------------------------------------------------------------------------
\b the boundary between a word char (\w) and
something that is not a word char
--------------------------------------------------------------------------------
( group and capture to \1:
--------------------------------------------------------------------------------
S 'S'
--------------------------------------------------------------------------------
\d digits (0-9)
--------------------------------------------------------------------------------
) end of \1
--------------------------------------------------------------------------------
(?! look ahead to see if there is not:
--------------------------------------------------------------------------------
.* any character except \n (0 or more times
(matching the most amount possible))
--------------------------------------------------------------------------------
\b the boundary between a word char (\w)
and something that is not a word char
--------------------------------------------------------------------------------
(?: group,but do not capture:
--------------------------------------------------------------------------------
blue 'blue'
--------------------------------------------------------------------------------
| OR
--------------------------------------------------------------------------------
red 'red'
--------------------------------------------------------------------------------
) end of grouping
--------------------------------------------------------------------------------
\b the boundary between a word char (\w)
and something that is not a word char
--------------------------------------------------------------------------------
) end of look-ahead
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。