How to set "compressionType" property in Glue Table via CDK

0

I'm using a Table resource to create a Glue Table like so:

    this.glueTable = new Table(scope, `${props.glueTableName}`, {
      database: this.glueDatabase,
      tableName: props.glueTableName,
      bucket: props.bucket,
      partitionKeys: props.partitionKeys,
      dataFormat: props.dataFormat,
      columns: props.columns
    });

I need to explicitly set the compressionType of this table to "none". I see there is a way to do it via the console, where we go to Edit Table, and then fill in the compressionType under Table properties.

Can anyone point me to the prop to use if I want to do it using cdk?

已提问 2 年前1123 查看次数
2 回答
1

You'll need to use the CFN escape hatch:

const table = new Table(...);
const cfnTable = table.node.defaultChild as CfnTable;
cfnTable.addPropertyOverride('TableInput.Parameters.compressionType', 'none');
pmh
已回答 2 年前
0

Latest Glue module(v2.12.0) supports compressed option when creating table.

AWS
已回答 2 年前
  • Still not clear how to set something like this for example

    TBLPROPERTIES ( 'compression_level'='9', 'write.compression'='ZSTD' )

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则