Test existing catalog connection
POST/metalakes/:metalake/catalogs/:catalog/testConnection
Tests whether an existing catalog can connect to its source with its stored configuration, or with proposed changes applied for this test only and not saved. A failed test is reported as an error code in an HTTP 200 response, and testing with proposed changes requires the same access as updating the catalog.
Sign in with a bearer token or a local user's password; see Authentication.
Request
Path Parameters
The name of the metalake
The name of the catalog
- application/json
Body
Optional catalog changes to apply only to this connection test
Array [
- RenameCatalogRequest
- UpdateCatalogCommentRequest
- SetCatalogPropertyRequest
- RemoveCatalogPropertyRequest
]
updates
object[]
required
oneOf
Possible values: [rename]
The new name of the catalog
Possible values: [updateComment]
The new comment of the catalog
Possible values: [setProperty]
The property to set
The value to set
Possible values: [removeProperty]
The property to remove
Responses
- 200
- 400
- 403
- 5xx
The result of the connection test. code is 0 when the test passed; a failed test, including a missing or disabled catalog, is reported with its error code, exception type and message.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- TestConnectionSuccess
- TestConnectionFailed
- InvalidProbeTarget
- TestConnectionNotSupported
- CatalogNotFound
- CatalogDisabled
Schema
Application status code; 0 indicates success
Internal exception type when the test fails
Sanitized failure message
{
"code": 0,
"type": "string",
"message": "string"
}
{
"code": 0
}
{
"code": 1007,
"type": "ConnectionFailedException",
"message": "Failed to test Fileset catalog connection: location (access denied)"
}
{
"code": 1001,
"type": "IllegalArgumentException",
"message": "Fileset catalog has no catalog-level location to test"
}
{
"code": 1006,
"type": "UnsupportedOperationException",
"message": "Model catalogs do not define an external catalog-level connection probe"
}
{
"code": 1003,
"type": "NoSuchCatalogException",
"message": "Catalog my_metalake.my_catalog does not exist"
}
{
"code": 1009,
"type": "CatalogNotInUseException",
"message": "Catalog my_metalake.my_catalog is not in use"
}
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 caller cannot load the catalog, or supplied proposed changes without owning the metalake or the catalog.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
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"
}
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"
]
}