DeleteDataCatalogCommand

Deletes a data catalog.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { AthenaClient, DeleteDataCatalogCommand } from "@aws-sdk/client-athena"; // ES Modules import
// const { AthenaClient, DeleteDataCatalogCommand } = require("@aws-sdk/client-athena"); // CommonJS import
const client = new AthenaClient(config);
const input = { // DeleteDataCatalogInput
  Name: "STRING_VALUE", // required
  DeleteCatalogOnly: true || false,
};
const command = new DeleteDataCatalogCommand(input);
const response = await client.send(command);
// { // DeleteDataCatalogOutput
//   DataCatalog: { // DataCatalog
//     Name: "STRING_VALUE", // required
//     Description: "STRING_VALUE",
//     Type: "LAMBDA" || "GLUE" || "HIVE" || "FEDERATED", // required
//     Parameters: { // ParametersMap
//       "<keys>": "STRING_VALUE",
//     },
//     Status: "CREATE_IN_PROGRESS" || "CREATE_COMPLETE" || "CREATE_FAILED" || "CREATE_FAILED_CLEANUP_IN_PROGRESS" || "CREATE_FAILED_CLEANUP_COMPLETE" || "CREATE_FAILED_CLEANUP_FAILED" || "DELETE_IN_PROGRESS" || "DELETE_COMPLETE" || "DELETE_FAILED",
//     ConnectionType: "DYNAMODB" || "MYSQL" || "POSTGRESQL" || "REDSHIFT" || "ORACLE" || "SYNAPSE" || "SQLSERVER" || "DB2" || "OPENSEARCH" || "BIGQUERY" || "GOOGLECLOUDSTORAGE" || "HBASE" || "DOCUMENTDB" || "CMDB" || "TPCDS" || "TIMESTREAM" || "SAPHANA" || "SNOWFLAKE" || "DATALAKEGEN2" || "DB2AS400",
//     Error: "STRING_VALUE",
//   },
// };

DeleteDataCatalogCommand Input

See DeleteDataCatalogCommandInput for more details

Parameter
Type
Description
Name
Required
string | undefined

The name of the data catalog to delete.

DeleteCatalogOnly
boolean | undefined

Deletes the Athena Data Catalog. You can only use this with the FEDERATED catalogs. You usually perform this before registering the connector with Glue Data Catalog. After deletion, you will have to manage the Glue Connection and Lambda function.

DeleteDataCatalogCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
DataCatalog
DataCatalog | undefined

Contains information about a data catalog in an Amazon Web Services account.

In the Athena console, data catalogs are listed as "data sources" on the Data sources page under the Data source name column.

Throws

Name
Fault
Details
InternalServerException
server

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException
client

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

AthenaServiceException
Base exception class for all service exceptions from Athena service.