Skip to content
v2.278.0

TableOptimizerConfigurationProperty Struct ​

Specifies configuration details of a table optimizer.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_glue as glue } from 'aws-cdk-lib';
const tableOptimizerConfigurationProperty: glue.CfnTableOptimizer.TableOptimizerConfigurationProperty = {
  enabled: false,
  roleArn: 'roleArn',

  // the properties below are optional
  compactionConfiguration: {
    icebergConfiguration: {
      deleteFileThreshold: 123,
      minInputFiles: 123,
      strategy: 'strategy',
    },
  },
  orphanFileDeletionConfiguration: {
    icebergConfiguration: {
      location: 'location',
      orphanFileRetentionPeriodInDays: 123,
    },
  },
  retentionConfiguration: {
    icebergConfiguration: {
      cleanExpiredFiles: false,
      numberOfSnapshotsToRetain: 123,
      snapshotRetentionPeriodInDays: 123,
    },
  },
  vpcConfiguration: {
    glueConnectionName: 'glueConnectionName',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

table_optimizer_configuration_property = glue.CfnTableOptimizer.TableOptimizerConfigurationProperty(
    enabled=False,
    role_arn="roleArn",

    # the properties below are optional
    compaction_configuration=glue.CfnTableOptimizer.CompactionConfigurationProperty(
        iceberg_configuration=glue.CfnTableOptimizer.IcebergCompactionConfigurationProperty(
            delete_file_threshold=123,
            min_input_files=123,
            strategy="strategy"
        )
    ),
    orphan_file_deletion_configuration=glue.CfnTableOptimizer.OrphanFileDeletionConfigurationProperty(
        iceberg_configuration=glue.CfnTableOptimizer.IcebergConfigurationProperty(
            location="location",
            orphan_file_retention_period_in_days=123
        )
    ),
    retention_configuration=glue.CfnTableOptimizer.RetentionConfigurationProperty(
        iceberg_configuration=glue.CfnTableOptimizer.IcebergRetentionConfigurationProperty(
            clean_expired_files=False,
            number_of_snapshots_to_retain=123,
            snapshot_retention_period_in_days=123
        )
    ),
    vpc_configuration=glue.CfnTableOptimizer.VpcConfigurationProperty(
        glue_connection_name="glueConnectionName"
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.glue.*;

TableOptimizerConfigurationProperty tableOptimizerConfigurationProperty = TableOptimizerConfigurationProperty.builder()
        .enabled(false)
        .roleArn("roleArn")

        // the properties below are optional
        .compactionConfiguration(CompactionConfigurationProperty.builder()
                .icebergConfiguration(IcebergCompactionConfigurationProperty.builder()
                        .deleteFileThreshold(123)
                        .minInputFiles(123)
                        .strategy("strategy")
                        .build())
                .build())
        .orphanFileDeletionConfiguration(OrphanFileDeletionConfigurationProperty.builder()
                .icebergConfiguration(IcebergConfigurationProperty.builder()
                        .location("location")
                        .orphanFileRetentionPeriodInDays(123)
                        .build())
                .build())
        .retentionConfiguration(RetentionConfigurationProperty.builder()
                .icebergConfiguration(IcebergRetentionConfigurationProperty.builder()
                        .cleanExpiredFiles(false)
                        .numberOfSnapshotsToRetain(123)
                        .snapshotRetentionPeriodInDays(123)
                        .build())
                .build())
        .vpcConfiguration(VpcConfigurationProperty.builder()
                .glueConnectionName("glueConnectionName")
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Glue;

var tableOptimizerConfigurationProperty = new TableOptimizerConfigurationProperty {
    Enabled = false,
    RoleArn = "roleArn",

    // the properties below are optional
    CompactionConfiguration = new CompactionConfigurationProperty {
        IcebergConfiguration = new IcebergCompactionConfigurationProperty {
            DeleteFileThreshold = 123,
            MinInputFiles = 123,
            Strategy = "strategy"
        }
    },
    OrphanFileDeletionConfiguration = new OrphanFileDeletionConfigurationProperty {
        IcebergConfiguration = new IcebergConfigurationProperty {
            Location = "location",
            OrphanFileRetentionPeriodInDays = 123
        }
    },
    RetentionConfiguration = new RetentionConfigurationProperty {
        IcebergConfiguration = new IcebergRetentionConfigurationProperty {
            CleanExpiredFiles = false,
            NumberOfSnapshotsToRetain = 123,
            SnapshotRetentionPeriodInDays = 123
        }
    },
    VpcConfiguration = new VpcConfigurationProperty {
        GlueConnectionName = "glueConnectionName"
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

tableOptimizerConfigurationProperty := &TableOptimizerConfigurationProperty{
	Enabled: jsii.Boolean(false),
	RoleArn: jsii.String("roleArn"),

	// the properties below are optional
	CompactionConfiguration: &CompactionConfigurationProperty{
		IcebergConfiguration: &IcebergCompactionConfigurationProperty{
			DeleteFileThreshold: jsii.Number(123),
			MinInputFiles: jsii.Number(123),
			Strategy: jsii.String("strategy"),
		},
	},
	OrphanFileDeletionConfiguration: &OrphanFileDeletionConfigurationProperty{
		IcebergConfiguration: &IcebergConfigurationProperty{
			Location: jsii.String("location"),
			OrphanFileRetentionPeriodInDays: jsii.Number(123),
		},
	},
	RetentionConfiguration: &RetentionConfigurationProperty{
		IcebergConfiguration: &IcebergRetentionConfigurationProperty{
			CleanExpiredFiles: jsii.Boolean(false),
			NumberOfSnapshotsToRetain: jsii.Number(123),
			SnapshotRetentionPeriodInDays: jsii.Number(123),
		},
	},
	VpcConfiguration: &VpcConfigurationProperty{
		GlueConnectionName: jsii.String("glueConnectionName"),
	},
}

Properties ​

compactionConfigurationoptionalIResolvable | CfnTableOptimizer.CompactionConfigurationPropertycompaction_configurationoptionaltyping.Union[IResolvable, CompactionConfigurationProperty]compactionConfigurationoptionalIResolvableCompactionConfigurationoptionalIResolvableCompactionConfigurationoptionalinterface{} #
enabledboolean | IResolvableenabledtyping.Union[bool, IResolvable]enabledBooleanEnabledboolEnabledinterface{} required #
Whether the table optimization is enabled.
orphanFileDeletionConfigurationoptionalIResolvable | CfnTableOptimizer.OrphanFileDeletionConfigurationPropertyorphan_file_deletion_configurationoptionaltyping.Union[IResolvable, OrphanFileDeletionConfigurationProperty]orphanFileDeletionConfigurationoptionalIResolvableOrphanFileDeletionConfigurationoptionalIResolvableOrphanFileDeletionConfigurationoptionalinterface{} #
`OrphanFileDeletionConfiguration` is a property that can be included within the TableOptimizer resource.

It controls the automatic deletion of orphaned files - files that are not tracked by the table metadata, and older than the configured age limit.

retentionConfigurationoptionalIResolvable | CfnTableOptimizer.RetentionConfigurationPropertyretention_configurationoptionaltyping.Union[IResolvable, RetentionConfigurationProperty]retentionConfigurationoptionalIResolvableRetentionConfigurationoptionalIResolvableRetentionConfigurationoptionalinterface{} #
The configuration for a snapshot retention optimizer for Apache Iceberg tables.
roleArnstringrole_arnstrroleArnStringRoleArnstringRoleArn*string required #
A role passed by the caller which gives the service permission to update the resources associated with the optimizer on the caller's behalf.
vpcConfigurationoptionalIResolvable | CfnTableOptimizer.VpcConfigurationPropertyvpc_configurationoptionaltyping.Union[IResolvable, VpcConfigurationProperty]vpcConfigurationoptionalIResolvableVpcConfigurationoptionalIResolvableVpcConfigurationoptionalinterface{} #
An object that describes the VPC configuration for a table optimizer.

This configuration is necessary to perform optimization on tables that are in a customer VPC.