Skip to content

Commit abce1d6

Browse files
author
awstools
committed
feat(client-s3tables): S3 Tables now supports sort and z-order compaction strategies for Iceberg tables in addition to binpack.
1 parent add0ab2 commit abce1d6

File tree

4 files changed

+61
-2
lines changed

4 files changed

+61
-2
lines changed

clients/client-s3tables/src/commands/GetTableMaintenanceConfigurationCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface GetTableMaintenanceConfigurationCommandOutput
3333
__MetadataBearer {}
3434

3535
/**
36-
* <p>Gets details about the maintenance configuration of a table. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html">S3 Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:GetTableMaintenanceConfiguration</code> permission to use this operation. </p> </dd> </dl>
36+
* <p>Gets details about the maintenance configuration of a table. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html">S3 Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <ul> <li> <p>You must have the <code>s3tables:GetTableMaintenanceConfiguration</code> permission to use this operation. </p> </li> <li> <p>You must have the <code>s3tables:GetTableData</code> permission to use set the compaction strategy to <code>sort</code> or <code>zorder</code>.</p> </li> </ul> </dd> </dl>
3737
* @example
3838
* Use a bare-bones client and the command you need to make an API call.
3939
* ```javascript
@@ -55,6 +55,7 @@ export interface GetTableMaintenanceConfigurationCommandOutput
5555
* // settings: { // TableMaintenanceSettings Union: only one key present
5656
* // icebergCompaction: { // IcebergCompactionSettings
5757
* // targetFileSizeMB: Number("int"),
58+
* // strategy: "auto" || "binpack" || "sort" || "z-order",
5859
* // },
5960
* // icebergSnapshotManagement: { // IcebergSnapshotManagementSettings
6061
* // minSnapshotsToKeep: Number("int"),

clients/client-s3tables/src/commands/PutTableMaintenanceConfigurationCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export interface PutTableMaintenanceConfigurationCommandOutput extends __Metadat
4848
* settings: { // TableMaintenanceSettings Union: only one key present
4949
* icebergCompaction: { // IcebergCompactionSettings
5050
* targetFileSizeMB: Number("int"),
51+
* strategy: "auto" || "binpack" || "sort" || "z-order",
5152
* },
5253
* icebergSnapshotManagement: { // IcebergSnapshotManagementSettings
5354
* minSnapshotsToKeep: Number("int"),

clients/client-s3tables/src/models/models_0.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,22 @@ export const TableMaintenanceType = {
991991
*/
992992
export type TableMaintenanceType = (typeof TableMaintenanceType)[keyof typeof TableMaintenanceType];
993993

994+
/**
995+
* @public
996+
* @enum
997+
*/
998+
export const IcebergCompactionStrategy = {
999+
AUTO: "auto",
1000+
BINPACK: "binpack",
1001+
SORT: "sort",
1002+
ZORDER: "z-order",
1003+
} as const;
1004+
1005+
/**
1006+
* @public
1007+
*/
1008+
export type IcebergCompactionStrategy = (typeof IcebergCompactionStrategy)[keyof typeof IcebergCompactionStrategy];
1009+
9941010
/**
9951011
* <p>Contains details about the compaction settings for an Iceberg table.</p>
9961012
* @public
@@ -1001,6 +1017,12 @@ export interface IcebergCompactionSettings {
10011017
* @public
10021018
*/
10031019
targetFileSizeMB?: number | undefined;
1020+
1021+
/**
1022+
* <p>The compaction strategy to use for the table. This determines how files are selected and combined during compaction operations.</p>
1023+
* @public
1024+
*/
1025+
strategy?: IcebergCompactionStrategy | undefined;
10041026
}
10051027

10061028
/**

codegen/sdk-codegen/aws-models/s3tables.json

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@
13761376
}
13771377
],
13781378
"traits": {
1379-
"smithy.api#documentation": "<p>Gets details about the maintenance configuration of a table. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html\">S3 Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:GetTableMaintenanceConfiguration</code> permission to use this operation. </p> </dd> </dl>",
1379+
"smithy.api#documentation": "<p>Gets details about the maintenance configuration of a table. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html\">S3 Tables maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <ul> <li> <p>You must have the <code>s3tables:GetTableMaintenanceConfiguration</code> permission to use this operation. </p> </li> <li> <p>You must have the <code>s3tables:GetTableData</code> permission to use set the compaction strategy to <code>sort</code> or <code>zorder</code>.</p> </li> </ul> </dd> </dl>",
13801380
"smithy.api#http": {
13811381
"uri": "/tables/{tableBucketARN}/{namespace}/{name}/maintenance",
13821382
"method": "GET"
@@ -1873,12 +1873,47 @@
18731873
"traits": {
18741874
"smithy.api#documentation": "<p>The target file size for the table in MB.</p>"
18751875
}
1876+
},
1877+
"strategy": {
1878+
"target": "com.amazonaws.s3tables#IcebergCompactionStrategy",
1879+
"traits": {
1880+
"smithy.api#documentation": "<p>The compaction strategy to use for the table. This determines how files are selected and combined during compaction operations.</p>"
1881+
}
18761882
}
18771883
},
18781884
"traits": {
18791885
"smithy.api#documentation": "<p>Contains details about the compaction settings for an Iceberg table.</p>"
18801886
}
18811887
},
1888+
"com.amazonaws.s3tables#IcebergCompactionStrategy": {
1889+
"type": "enum",
1890+
"members": {
1891+
"AUTO": {
1892+
"target": "smithy.api#Unit",
1893+
"traits": {
1894+
"smithy.api#enumValue": "auto"
1895+
}
1896+
},
1897+
"BINPACK": {
1898+
"target": "smithy.api#Unit",
1899+
"traits": {
1900+
"smithy.api#enumValue": "binpack"
1901+
}
1902+
},
1903+
"SORT": {
1904+
"target": "smithy.api#Unit",
1905+
"traits": {
1906+
"smithy.api#enumValue": "sort"
1907+
}
1908+
},
1909+
"ZORDER": {
1910+
"target": "smithy.api#Unit",
1911+
"traits": {
1912+
"smithy.api#enumValue": "z-order"
1913+
}
1914+
}
1915+
}
1916+
},
18821917
"com.amazonaws.s3tables#IcebergMetadata": {
18831918
"type": "structure",
18841919
"members": {

0 commit comments

Comments
 (0)