- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetTableOptimizerCommand
Returns the configuration of all optimizers associated with a specified table.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GlueClient, GetTableOptimizerCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, GetTableOptimizerCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // GetTableOptimizerRequest
CatalogId: "STRING_VALUE", // required
DatabaseName: "STRING_VALUE", // required
TableName: "STRING_VALUE", // required
Type: "compaction" || "retention" || "orphan_file_deletion", // required
};
const command = new GetTableOptimizerCommand(input);
const response = await client.send(command);
// { // GetTableOptimizerResponse
// CatalogId: "STRING_VALUE",
// DatabaseName: "STRING_VALUE",
// TableName: "STRING_VALUE",
// TableOptimizer: { // TableOptimizer
// type: "compaction" || "retention" || "orphan_file_deletion",
// configuration: { // TableOptimizerConfiguration
// roleArn: "STRING_VALUE",
// enabled: true || false,
// vpcConfiguration: { // TableOptimizerVpcConfiguration Union: only one key present
// glueConnectionName: "STRING_VALUE",
// },
// retentionConfiguration: { // RetentionConfiguration
// icebergConfiguration: { // IcebergRetentionConfiguration
// snapshotRetentionPeriodInDays: Number("int"),
// numberOfSnapshotsToRetain: Number("int"),
// cleanExpiredFiles: true || false,
// },
// },
// orphanFileDeletionConfiguration: { // OrphanFileDeletionConfiguration
// icebergConfiguration: { // IcebergOrphanFileDeletionConfiguration
// orphanFileRetentionPeriodInDays: Number("int"),
// location: "STRING_VALUE",
// },
// },
// },
// lastRun: { // TableOptimizerRun
// eventType: "starting" || "completed" || "failed" || "in_progress",
// startTimestamp: new Date("TIMESTAMP"),
// endTimestamp: new Date("TIMESTAMP"),
// metrics: { // RunMetrics
// NumberOfBytesCompacted: "STRING_VALUE",
// NumberOfFilesCompacted: "STRING_VALUE",
// NumberOfDpus: "STRING_VALUE",
// JobDurationInHour: "STRING_VALUE",
// },
// error: "STRING_VALUE",
// compactionMetrics: { // CompactionMetrics
// IcebergMetrics: { // IcebergCompactionMetrics
// NumberOfBytesCompacted: Number("long"),
// NumberOfFilesCompacted: Number("long"),
// NumberOfDpus: Number("int"),
// JobDurationInHour: Number("double"),
// },
// },
// retentionMetrics: { // RetentionMetrics
// IcebergMetrics: { // IcebergRetentionMetrics
// NumberOfDataFilesDeleted: Number("long"),
// NumberOfManifestFilesDeleted: Number("long"),
// NumberOfManifestListsDeleted: Number("long"),
// NumberOfDpus: Number("int"),
// JobDurationInHour: Number("double"),
// },
// },
// orphanFileDeletionMetrics: { // OrphanFileDeletionMetrics
// IcebergMetrics: { // IcebergOrphanFileDeletionMetrics
// NumberOfOrphanFilesDeleted: Number("long"),
// NumberOfDpus: Number("int"),
// JobDurationInHour: Number("double"),
// },
// },
// },
// },
// };
GetTableOptimizerCommand Input
See GetTableOptimizerCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
CatalogId Required | string | undefined | The Catalog ID of the table. |
DatabaseName Required | string | undefined | The name of the database in the catalog in which the table resides. |
TableName Required | string | undefined | The name of the table. |
Type Required | TableOptimizerType | undefined | The type of table optimizer. |
GetTableOptimizerCommand Output
See GetTableOptimizerCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
CatalogId | string | undefined | The Catalog ID of the table. |
DatabaseName | string | undefined | The name of the database in the catalog in which the table resides. |
TableName | string | undefined | The name of the table. |
TableOptimizer | TableOptimizer | undefined | The optimizer associated with the specified table. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | Access to a resource was denied. |
EntityNotFoundException | client | A specified entity does not exist |
InternalServiceException | server | An internal service error occurred. |
InvalidInputException | client | The input provided was not valid. |
ThrottlingException | client | The throttling threshhold was exceeded. |
GlueServiceException | Base exception class for all service exceptions from Glue service. |