我在 S3 中有一些数据,在 Glue 目录中创建了一个模式,然后通过 Athena 将其公开给 QuickSight。当我通过单击控制台创建它时,所有这些都很好。
然后我将其转换为以下 CloudFormation:
AnalyticsDatabase:
Type: AWS::Glue::Database
Properties:
DatabaseInput:
Name: analytics
CatalogId: !Ref AWS::AccountId
RawAnalysisAnalyticsTable:
Type: AWS::Glue::Table
Properties:
DatabaseName: !Ref AnalyticsDatabase
CatalogId: !Ref AWS::AccountId
TableInput:
Name: analysis_raw
TableType: EXTERNAL_TABLE
Parameters:
classification: json
StorageDescriptor:
Columns:
- {Name: id, Type: string}
- {Name: treeid, Type: string}
- {Name: patientid, Type: string}
Compressed: false
InputFormat: org.apache.hadoop.mapred.TextInputFormat
OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
Location: s3://my-bucket/dynamodb/Analysis/
NumberOfBuckets: 0
SerdeInfo:
Parameters: {paths: 'id,patientid,treeid'}
SerializationLibrary: org.openx.data.jsonserde.JsonSerDe
SortColumns: []
StoredAsSubDirectories: false
但是,当我尝试将 CF 创建的表拉入 QuickSight 时,我得到:
Your database generated a SQL exception. This can be caused by query timeouts, resource constraints, unexpected DDL alterations before or during a query, and other database errors. Check your database settings and your query, and try again.
region: us-east-1
timestamp: 1544113019756
requestId: 5ab8f9a2-f972-11e8-b201-154c30728c75
sourceErrorCode: 0
sourceErrorMessage: [Simba][JDBC](11380) Null pointer exception.
sourceErrorState: HY000
sourceException: java.sql.SQLException
sourceType: ATHENA
有谁知道这个错误是什么意思或我如何解决它?我已经将手动创建的表的所有属性与 CloudFormation 创建的表进行了比较,它们看起来是相同的。