在Views中使用TABLE_DATE_RANGE函数 [英] Use of TABLE_DATE_RANGE function in Views

查看:134
本文介绍了在Views中使用TABLE_DATE_RANGE函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对本周早些时候发布的新功能感到兴奋。



我去创建一个视图,联盟我的过去90天表。这样的视图可能非常有用,并且显着简化了任何编码。我使用了新的TABLE_DATE_RANGE函数。



我写道:

  SELECT 
*
FROM
(TABLE_DATE_RANGE(mydataset.mytableprefix,
DATE_ADD(CURRENT_TIMESTAMP(),-90,'DAY'),
CURRENT_TIMESTAMP()))

运行查询时,它运行正常,当我点击保存视图时,我收到一条红色的错误消息:

 无法创建视图。未找到:表myproject:mydataset.mytableprefix 

如果使用特定字段而不是使用Select * 。



TABLE_DATE_RANGE在视图中的使用是否有限制?

解决方案

Views很长一段时间不适用于 table_date_range() table_query()。不过,截至今天下午(2015-01-22)这一点已经确定。

I am excited about the new featured released earlier this week.

I went to create a view that Unions my "last 90 days" tables. such view can be very useful and simplifies any coding significantly. I used the new TABLE_DATE_RANGE function.

I wrote:

SELECT 
 *
FROM 
(TABLE_DATE_RANGE(mydataset.mytableprefix, 
                    DATE_ADD(CURRENT_TIMESTAMP(), -90, 'DAY'),
                    CURRENT_TIMESTAMP()))

When running the query it runs fine, when I clicked "Save View" I got a red error message saying:

Failed to create view. Not Found: Table myproject:mydataset.mytableprefix

this happens also if use use specific fields instead of Select *.

Are there limits of usage of the TABLE_DATE_RANGE in views?

解决方案

Views didn't work with table_date_range() or table_query() for a long time. However, this was fixed as of this afternoon (2015-01-22).

这篇关于在Views中使用TABLE_DATE_RANGE函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆