Test catalog connection
POST/metalakes/:metalake/catalogs/testConnection
Tests whether a catalog with the supplied configuration can connect to its source, by running a read-only catalog-level operation without creating the catalog. A failed test is reported as an error code in an HTTP 200 response, and a passing test does not guarantee that every object-level or write operation will succeed.
Sign in with a bearer token or a local user's password; see Authentication.
Request
Path Parameters
The name of the metalake
- application/json
Body
The name of the catalog
Possible values: [relational, fileset, messaging, model]
The type of the catalog
Possible values: [hive, lakehouse-iceberg, lakehouse-paimon, lakehouse-hudi, lakehouse-generic, glue, jdbc-mysql, jdbc-postgresql, jdbc-doris, jdbc-starrocks, jdbc-oracle, jdbc-sqlserver, jdbc-bigquery, jdbc-maxcompute, jdbc-oceanbase, jdbc-clickhouse, jdbc-hologres, fileset, kafka, model]
The provider of the catalog. Each provider serves one catalog type: fileset serves fileset, kafka serves messaging, model serves model, and every other provider serves relational. The provider is optional for fileset and model catalogs, where the server uses the catalog type as the provider. The legacy value hadoop is still accepted and is replaced by the catalog type, so a fileset catalog created with hadoop is stored with provider fileset.
A comment for the catalog
properties
object
nullable
A map of properties for the catalog
Responses
- 200
- 400
- 5xx
The result of the connection test. code is 0 when the test passed; a failed test, including a missing metalake or an existing catalog of the same name, is reported with its error code, exception type and message.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- TestConnectionSuccess
- TestConnectionFailed
- CatalogAlreadyExists
- MetalakeNotFound
Schema
Status code of the response
Internal type definition of the exception
The message of the exception
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 0,
"type": "string",
"message": "string"
}
{
"code": 0
}
{
"code": 1007,
"type": "ConnectionFailedException",
"message": "Failed to run getAllDatabases in Hive Metastore: Failed to connect to Hive Metastore",
"stack": [
"org.apache.gravitino.exceptions.ConnectionFailedException: Failed to run getAllDatabases in Hive Metastore: Failed to connect to Hive Metastore",
"..."
]
}
{
"code": 1004,
"type": "CatalogAlreadyExistsException",
"message": "Failed to operate catalog(s) [my_catalog] operation [CREATE], reason [CatalogAlreadyExistsException]",
"stack": [
"org.apache.gravitino.exceptions.CatalogAlreadyExistsException: Catalog my_catalog already exists",
"..."
]
}
{
"code": 1003,
"type": "NoSuchMetalakeException",
"message": "Failed to operate metalake(s) [test] operation [LOAD], reason [NoSuchMetalakeException]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchMetalakeException: Metalake test does not exist",
"..."
]
}
The request is malformed or fails validation, for example because of invalid JSON, a missing required field or an invalid parameter value. The body is normally an error model, although the server's middleware can return plain text instead.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1003,
"type": "BadRequestException",
"message": "Malformed request"
}
The server hit an internal error that the client usually cannot fix by changing the request.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1002,
"type": "RuntimeException",
"message": "Internal Server Error",
"stack": [
"java.lang.RuntimeException: Internal Server Error"
]
}