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' )

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠