Google bigquery BigQuery:无法创建视图。想不到的请再试一次

Google bigquery BigQuery:无法创建视图。想不到的请再试一次,google-bigquery,Google Bigquery,我正在尝试在BigQuery中保存视图,并不断收到相同的错误: Failed to create view. Unexpected. Please try again. 查询如下: SELECT interaction.id AS Interaction.ID, interaction.author.name AS Interaction.Author.Name, interaction.author.username AS Interaction.Author.Username, inter

我正在尝试在BigQuery中保存视图,并不断收到相同的错误:

Failed to create view. Unexpected. Please try again.
查询如下:

SELECT
interaction.id AS Interaction.ID,
interaction.author.name AS Interaction.Author.Name,
interaction.author.username AS Interaction.Author.Username,
interaction.content AS Interaction.Content,
interaction.created_at_timestamp AS Interaction.Created_At_Timestamp,
klout.score AS Klout.Score,
twitter.geo.latitude AS Twitter.Geo.Latitude,
twitter.geo.longitude AS Twitter.Geo.Longitude,
twitter.media.expanded_url AS Twitter.Media.ExpandedUrl,
twitter.media.type AS Twitter.Media.Type,
twitter.place.country AS Twitter.Place.Country,
twitter.user.followers_count AS Twitter.User.Followers,
twitter.user.friends_count AS Twitter.User.Friends,
twitter.user.listed_count AS Twitter.User.Listed,
twitter.retweet.count AS Twitter.Retweet.Count
FROM
[**DATASET_NAME_OMITTED**.main_table]
WHERE
(interaction.id IS NOT NULL)
AND (interaction.created_at_timestamp IS NOT NULL)
AND (interaction.created_at_timestamp >= DATE_ADD(USEC_TO_TIMESTAMP(UTC_USEC_TO_HOUR(NOW())), -1, "DAY"))
AND (interaction.created_at_timestamp < USEC_TO_TIMESTAMP(UTC_USEC_TO_HOUR(NOW())))
我确实注意到twitter.media是重复记录类型。尽管如此,删除twitter.media.*字段并不能解决这个问题

我已经能够成功地保存具有相同时间戳限制和命名约定的其他视图。试图保存此文件始终失败

对于上下文:此表由DataSift通过其BigQuery连接器填充(默认为catch all模式)。

这真的很奇怪。 我做了一个实验,取出了每个alias操作,结果都成功了。 然后,我慢慢地将其中的一些添加回,然后再次添加;它继续工作。然而,似乎某些别名不想工作(我不知道为什么)。 我最终得出以下结论,其中包含了您的大部分别名,并且似乎按照预期工作:

SELECT
interaction.id AS Interaction.ID,
interaction.author.name AS Interaction.Author.Name,
interaction.author.username AS Interaction.Author.Username,
interaction.content AS Interaction.Content,
interaction.created_at_timestamp AS Interaction.Created_At_Timestamp,
klout.score AS Klout.Score,
twitter.geo.latitude AS Twitter.Geo.Latitude,
twitter.geo.longitude AS Twitter.Geo.Longitude,
twitter.media.expanded_url,
twitter.media.type AS Twitter.Media.Type,
twitter.place.country AS Twitter.Place.Country,
twitter.user.followers_count,
twitter.user.friends_count,
twitter.user.listed_count,
twitter.retweet.count AS Twitter.Retweet.Count
FROM [**DATASET_NAME_OMITTED**.main_table] 
WHERE
(interaction.id IS NOT NULL)
AND (interaction.created_at_timestamp IS NOT NULL)
AND (interaction.created_at_timestamp >= DATE_ADD(USEC_TO_TIMESTAMP(UTC_USEC_TO_HOUR(NOW())), -1, "DAY"))
AND (interaction.created_at_timestamp < USEC_TO_TIMESTAMP(UTC_USEC_TO_HOUR(NOW())))
选择
interaction.id作为interaction.id,
interaction.author.name作为interaction.author.name,
interaction.author.username作为interaction.author.username,
interaction.content作为interaction.content,
interaction.created_at_时间戳作为interaction.created_at_时间戳,
klout.得分为klout.得分,
twitter.geo.latitude作为twitter.geo.latitude,
twitter.geo.longitude作为twitter.geo.longitude,
twitter.media.expanded_url,
twitter.media.type作为twitter.media.type,
twitter.place.country作为twitter.place.country,
twitter.user.followers\u计数,
twitter.user.friends\u计数,
twitter.user.listed_count,
twitter.retweet.count计算为twitter.retweet.count
从[**数据集\u名称\u省略**.main\u表]
哪里
(interaction.id不为空)
和(interaction.created_at_timestamp不为空)
和(interaction.created_at_timestamp>=DATE_ADD(USEC_TO_timestamp(UTC_USEC_TO_HOUR(NOW()),-1,“DAY”))
和(interaction.created_at_timestamp

看起来真正奇怪的是,什么会起作用,什么不会起作用之间没有模式。
twitter.user.*
字段是整数,但不接受别名,但是整数字段
klout.score
字段确实接受整数。

感谢您对此进行研究并缩小问题范围。我的别名不是一成不变的,因此这对我来说不是一个完全停止的问题。不过,最好让谷歌的人来看看,让我们知道潜在的问题是什么。
SELECT
interaction.id AS Interaction.ID,
interaction.author.name AS Interaction.Author.Name,
interaction.author.username AS Interaction.Author.Username,
interaction.content AS Interaction.Content,
interaction.created_at_timestamp AS Interaction.Created_At_Timestamp,
klout.score AS Klout.Score,
twitter.geo.latitude AS Twitter.Geo.Latitude,
twitter.geo.longitude AS Twitter.Geo.Longitude,
twitter.media.expanded_url,
twitter.media.type AS Twitter.Media.Type,
twitter.place.country AS Twitter.Place.Country,
twitter.user.followers_count,
twitter.user.friends_count,
twitter.user.listed_count,
twitter.retweet.count AS Twitter.Retweet.Count
FROM [**DATASET_NAME_OMITTED**.main_table] 
WHERE
(interaction.id IS NOT NULL)
AND (interaction.created_at_timestamp IS NOT NULL)
AND (interaction.created_at_timestamp >= DATE_ADD(USEC_TO_TIMESTAMP(UTC_USEC_TO_HOUR(NOW())), -1, "DAY"))
AND (interaction.created_at_timestamp < USEC_TO_TIMESTAMP(UTC_USEC_TO_HOUR(NOW())))