- 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.
DeletePartitionCommand
Deletes a specified partition.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GlueClient, DeletePartitionCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, DeletePartitionCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // DeletePartitionRequest
CatalogId: "STRING_VALUE",
DatabaseName: "STRING_VALUE", // required
TableName: "STRING_VALUE", // required
PartitionValues: [ // ValueStringList // required
"STRING_VALUE",
],
};
const command = new DeletePartitionCommand(input);
const response = await client.send(command);
// {};
DeletePartitionCommand Input
See DeletePartitionCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DatabaseName Required | string | undefined | The name of the catalog database in which the table in question resides. |
PartitionValues Required | string[] | undefined | The values that define the partition. |
TableName Required | string | undefined | The name of the table that contains the partition to be deleted. |
CatalogId | string | undefined | The ID of the Data Catalog where the partition to be deleted resides. If none is provided, the Amazon Web Services account ID is used by default. |
DeletePartitionCommand Output
See DeletePartitionCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EntityNotFoundException | client | A specified entity does not exist |
InternalServiceException | server | An internal service error occurred. |
InvalidInputException | client | The input provided was not valid. |
OperationTimeoutException | client | The operation timed out. |
GlueServiceException | Base exception class for all service exceptions from Glue service. |