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?

preguntada hace 2 años1123 visualizaciones
2 Respuestas
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
respondido hace 2 años
0

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

AWS
respondido hace 2 años
  • Still not clear how to set something like this for example

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

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas