gpt4 book ai didi

aws-cloudformation - 详细 :HIVE_METASTORE_ERROR: Error: name expected at the position 20 of 'struct' but ' ' is found

转载 作者:行者123 更新时间:2023-12-03 07:34:19 27 4
gpt4 key购买 nike

我有cloudformation模板:

AuditTable:
Type: AWS::Glue::Table
Properties:
CatalogId: !Ref AWS::<SomeRef>
DatabaseName: !Ref <someref>
TableInput:
Name: !Sub audit_logs_by_email
TableType: EXTERNAL_TABLE
StorageDescriptor:
Location:
Fn::Sub:
- s3://${LogsBucket}/
- LogsBucket: !ImportValue audit:logs:s3:bucket
InputFormat: org.apache.hadoop.mapred.TextInputFormat
OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
SerdeInfo:
SerializationLibrary: org.openx.data.jsonserde.JsonSerDe
Parameters: {
"serialization.format": 1
}
Columns:
- Name: id
Type: int
- Name: field2
Type: array<int>
- Name: field3
Type: string
- Name: field4
Type: string
- Name: field5
Type: string
- Name: metadata
Type: struct<email:string, name:string>

但是当我进行选择时:

select * from audit_logs_by_email limit 1

我收到此错误:

Your query has the following error(s):
[ErrorCategory:USER_ERROR, ErrorCode:QUERY_FAILED], Detail:HIVE_METASTORE_ERROR: Error: name expected at the position 20 of 'struct<email:string, ip:string>' but ' ' is found. (Service: null; Status Code: 0; Error Code: null; Request ID: null; Proxy: null)

当我运行时

SHOW CREATE TABLE audit_logs_by_email;

我得到了

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.IllegalArgumentException: Error: name expected at the position 56 of 'int:array<int>:string:string:string:struct<email:string, ip:string>' but ' ' is found.

最佳答案

问题出在内部空间

Type: struct<email:string, name:string>

应该是:

Type: struct<email:string,name:string>

关于aws-cloudformation - 详细 :HIVE_METASTORE_ERROR: Error: name expected at the position 20 of 'struct<email:string, name:string>' but ' ' is found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68921816/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com