cloudformation-coverage-roadmap icon indicating copy to clipboard operation
cloudformation-coverage-roadmap copied to clipboard

Glue Iceberg Table: Table is broken after any update

Open padaszewski opened this issue 5 months ago • 18 comments

Name of the resource

AWS::Glue::Table

Resource Name

No response

Issue Description

Hi there! When I try to update something on my iceberg table, the update causes the table to break and the table format to disappear. Basically, it's no longer an iceberg table and no operations on the table are possible.

Expected Behavior

When I update the table, the update does not remove the table input and I can work with the iceberg table as I should.

Observed Behavior

Before the update (after initial deployment): image

After any update: image

Notice the table format prop. Table management prop is also away.

Athena before update: Zrzut ekranu 2024-02-2 o 14 23 06

Athena after update: image image

Test Cases

Simple CDK Stack to reproduce this behavior (uncomment one column to update, or do any other update):

export class CdkTestingStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const myTestDatabase = new CfnDatabase(this, 'myTestDatabase', {
      catalogId: Aws.ACCOUNT_ID,
      databaseInput: {
        name: 'mytestdatabase'
      }
    })

    const myLocationBucket = new Bucket(this, 'myLocationBucket', {
      removalPolicy: RemovalPolicy.DESTROY,
      autoDeleteObjects: true
    })

    const myTestTable = new CfnTable(this, 'myTestTable', {
      databaseName: 'mytestdatabase',
      catalogId: Aws.ACCOUNT_ID,
      tableInput: {
        name: 'mytesttable',
        storageDescriptor: {
          columns: [
            {
              name: 'name',
              type: 'string'
            },
            // {
            //   name: 'ts',
            //   type: 'timestamp'
            // }
          ],
          location: `s3://${myLocationBucket.bucketName}/mytesttable/`,
        },
        tableType: 'EXTERNAL_TABLE',
      },
      openTableFormatInput: {
        icebergInput: {
          metadataOperation: 'CREATE',
          version: '2'
        }
      }
    })

  }
}

Other Details

No response

padaszewski avatar Feb 02 '24 13:02 padaszewski