【问题标题】:Cloudformation create encrypted athena glue tableCloudformation 创建加密的雅典娜胶水表
【发布时间】:2018-01-27 03:55:07
【问题描述】:

我有一个 CF 模板来创建从 S3 CSV 文件读取的粘合表。

MyTableEncrypted:
    Type: AWS::Glue::Table
    Properties:
      DatabaseName:
        Ref: MyDatabase
      CatalogId:
        Ref: AWS::AccountId
      TableInput:
        Name:
          Fn::Sub: "my-table-encrypted"
        Parameters: { "classification" : "csv" }
        StorageDescriptor:
          Location:
            Fn::Sub: "s3://my-encrypted-bucket/"
          InputFormat: "org.apache.hadoop.mapred.TextInputFormat"
          OutputFormat: "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"
          SerdeInfo:
            Parameters: { "separatorChar" : "\t" }
            SerializationLibrary: "org.apache.hadoop.hive.serde2.OpenCSVSerde"
          StoredAsSubDirectories: false
          Columns:
            - Name: first_name
              Type: string
            - Name: last_name
              Type: string

我想将TBLPROPERTIES {has_encrypted_data : false} 添加到此表中。如何在 CF 模板中实现这一点?

文档中没有关于加密属性的提示 - https://docs.aws.amazon.com/glue/latest/webapi/API_StorageDescriptor.html

【问题讨论】:

    标签: amazon-cloudformation amazon-athena aws-glue


    【解决方案1】:

    has_encrypted_data 附加到 TableInput 参数有效。

    MyTableEncrypted:
        Type: AWS::Glue::Table
        Properties:
          DatabaseName:
            Ref: MyDatabase
          CatalogId:
            Ref: AWS::AccountId
          TableInput:
            Name:
              Fn::Sub: "my-table-encrypted"
            Parameters: { "classification" : "csv", "has_encrypted_data" : "true" }
            StorageDescriptor:
              Location:
                Fn::Sub: "s3://my-encrypted-bucket/"
              InputFormat: "org.apache.hadoop.mapred.TextInputFormat"
              OutputFormat: "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"
              SerdeInfo:
                Parameters: { "separatorChar" : "\t" }
                SerializationLibrary: "org.apache.hadoop.hive.serde2.OpenCSVSerde"
              StoredAsSubDirectories: false
              Columns:
                - Name: first_name
                  Type: string
                - Name: last_name
                  Type: string
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-18
      • 2018-10-19
      • 2021-01-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多