简体   繁体   English

Aws Athena View 列数限制?

[英]Aws Athena View column count limit?

I seem to run into an athena view construction limitation that I cannot find any documentation on it.我似乎遇到了 athena 视图构造限制,我找不到关于它的任何文档。 This is the query I run to generate the View:这是我运行以生成视图的查询:

CREATE OR REPLACE VIEW view1 AS
(
    SELECT * FROM table1
)

table1 only has 5 rows. table1 只有 5 行。 If the table1 has 9334 columns, the view construction is successful.如果table1有9334列,则视图构建成功。 But if table1 has 9335 columns, I get the following error:但是如果 table1 有 9335 列,我会收到以下错误:

Exception: com.facebook.presto.v217.spi.PrestoException: 1 validation error detected: Value '/* Presto View: 

Which is followed by a pages-long hash.后面跟着一个页长的散列。 Does anyone understand what the problem/error is?有谁明白问题/错误是什么?

The problem could be that the Glue API only allows the field that stores the view metadata to be 409600 bytes, and when you add that 9335th column it becomes truncated and no longer validates when read back.问题可能是 Glue API 只允许存储视图元数据的字段为 409600 字节,并且当您添加第 9335 列时,它会被截断并且在回读时不再验证。

What you call "a pages-long hash" is really a base 64 encoded JSON structure containing the internal Presto representation of the view.您所谓的“页面长哈希”实际上是包含视图的内部 Presto 表示的 Base 64 编码 JSON 结构。 You can figure out if my hunch is right by checking the size of the encoded string.您可以通过检查编码字符串的大小来确定我的预感是否正确。 If it's 409600 then the limit in the Glue API is the problem.如果是 409600,那么 Glue API 中的限制就是问题所在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM