superset_database_test_connection
Test database connection details in Apache Superset to verify connectivity and configuration before deployment.
Instructions
Test a database connection
Makes a request to the /api/v1/database/test_connection endpoint to verify if the provided connection details can successfully connect to the database.
Args: database_data: Database connection details including sqlalchemy_uri and other parameters
Returns: A dictionary with connection test results
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_data | Yes |
Implementation Reference
- main.py:877-898 (handler)The handler function for the 'superset_database_test_connection' tool. It is decorated with @mcp.tool() for registration, @requires_auth to ensure authentication, and @handle_api_errors for error handling. The function tests a database connection by posting the database_data to Superset's /api/v1/database/test_connection API endpoint using the shared make_api_request helper.@mcp.tool() @requires_auth @handle_api_errors async def superset_database_test_connection( ctx: Context, database_data: Dict[str, Any] ) -> Dict[str, Any]: """ Test a database connection Makes a request to the /api/v1/database/test_connection endpoint to verify if the provided connection details can successfully connect to the database. Args: database_data: Database connection details including sqlalchemy_uri and other parameters Returns: A dictionary with connection test results """ return await make_api_request( ctx, "post", "/api/v1/database/test_connection", data=database_data )