小编Zam*_*lli的帖子

HIVE_METASTORE_ERROR 预期为“STRING”,但找到“STRING”

我一直无法获得针对我的 AWS Glue 分区表的任何查询。我得到的错误是

HIVE_METASTORE_ERROR:com.facebook.presto.spi.PrestoException:错误:在“STRING”的位置 0 处应输入类型,但找到“STRING”。(服务:空;状态码:0;错误码:空;请求 ID:空)

我发现另一个线程提出了这样一个事实:数据库名称和表不能包含字母数字和下划线以外的字符。因此,我确保数据库名称、表名称和所有列名称都遵守此限制。唯一不遵守此限制的对象是我的 s3 存储桶名称,该名称很难更改。

以下是数据的表定义和 parquet-tools 转储。

AWS Glue 表定义

{
    "Table": {
        "UpdateTime": 1545845064.0, 
        "PartitionKeys": [
            {
                "Comment": "call_time year", 
                "Type": "INT", 
                "Name": "date_year"
            }, 
            {
                "Comment": "call_time month", 
                "Type": "INT", 
                "Name": "date_month"
            }, 
            {
                "Comment": "call_time day", 
                "Type": "INT", 
                "Name": "date_day"
            }
        ], 
        "StorageDescriptor": {
            "OutputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat", 
            "SortColumns": [], 
            "InputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat", 
            "SerdeInfo": {
                "SerializationLibrary": "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe", 
                "Name": "ser_de_info_system_admin_created", 
                "Parameters": {
                    "serialization.format": "1"
                }
            }, 
            "BucketColumns": [], 
            "Parameters": {}, 
            "Location": "s3://ph-data-lake-cududfs2z3xveg5t/curated/system/admin_created/", 
            "NumberOfBuckets": 0, …
Run Code Online (Sandbox Code Playgroud)

presto amazon-athena

5
推荐指数
2
解决办法
4190
查看次数

如何在 AWS Glue 中设置多个 --conf 表参数?

AWS Glue 的 stackoverflow 上的多个答案说要设置 --conf 表参数。但是,有时在一个作业中我们需要在 1 个作业中设置多个 --conf 键值对。

我尝试了以下方法来设置多个 --conf 值,从而导致错误:

  • 添加另一个名为 --conf 的表参数。这会导致 AWS 仪表板删除名为 --conf 的第二个参数,并将焦点设置为名为 --conf 的第一个参数的值。Terraform 也只认为带有键的两个表参数--conf相等,并用第二个参数覆盖第一个参数中的值。
  • 在表 --conf 参数的值中用空格分隔配置键值参数。EG spark.yarn.executor.memoryOverhead=1024 spark.yarn.executor.memoryOverhead=7g spark.yarn.executor.memory=7g。这会导致无法启动作业。
  • 在表 --conf 参数的值中用逗号分隔配置键值参数。EG spark.yarn.executor.memoryOverhead=1024, spark.yarn.executor.memoryOverhead=7g, spark.yarn.executor.memory=7g。这会导致无法启动作业。
  • 将 --conf 的值设置为--conf字符串分隔每个键值。EG spark.yarn.executor.memoryOverhead=1024 --conf spark.yarn.executor.memoryOverhead=7g --conf spark.yarn.executor.memory=7g。这会导致胶水作业挂起。

如何在 AWS Glue 中设置多个 --conf 表参数?

amazon-web-services aws-glue

5
推荐指数
1
解决办法
1611
查看次数