apache/superset · error · InvalidEngineError

Engine "%(engine)s" cannot be configured through parameters.

Error message

Engine "%(engine)s" cannot be configured through parameters.

What it means

InvalidEngineError raised by ValidateDatabaseParametersCommand.run when the resolved engine spec class has no 'parameters_schema' attribute. Only engines that implement a marshmallow parameters_schema (host/port/database/username-style forms) can be configured through the parameter flow; engines driven solely by SQLAlchemy URLs or service-account config cannot, so Superset rejects the validation call with GENERIC_DB_ENGINE_ERROR 'Engine "<engine>" cannot be configured through parameters.'

Source

Thrown at superset/commands/database/validate.py:68

        engine = self._properties["engine"]
        driver = self._properties.get("driver")

        if engine in BYPASS_VALIDATION_ENGINES:
            # Skip engines that are only validated onCreate, but still surface
            # database_name uniqueness and SSH tunnel field errors so the
            # progressive validation flow stays consistent across engines.
            errors: list[SupersetError] = []
            if database_name_error := self._get_database_name_error():
                errors.append(database_name_error)
            errors.extend(self._get_ssh_tunnel_errors())
            if errors:
                event_logger.log_with_context(action="validation_error", engine=engine)
                raise InvalidParametersError(errors)
            return

        engine_spec = get_engine_spec(engine, driver)
        if not hasattr(engine_spec, "parameters_schema"):
            raise InvalidEngineError(
                SupersetError(
                    message=__(
                        'Engine "%(engine)s" cannot be configured through parameters.',
                        engine=engine,
                    ),
                    error_type=SupersetErrorType.GENERIC_DB_ENGINE_ERROR,
                    level=ErrorLevel.ERROR,
                ),
            )

        # perform initial validation (host, port, database, username)
        errors = engine_spec.validate_parameters(self._properties)  # type: ignore

        # Collect database_name errors along with parameter errors
        if database_name_error := self._get_database_name_error():
            errors.append(database_name_error)

        # Collect SSH tunnel errors

View on GitHub (pinned to f4587218dd)

Solutions

  1. For this engine, use the SQLAlchemy URI (Advanced) tab instead of the parameter form — validation via parameters is unsupported
  2. If you maintain a custom db_engine_spec, add a parameters_schema (marshmallow Schema) to enable the parameter flow
  3. Check the engine name spelling/resolution — an unknown alias may fall back to a spec without a schema
  4. Update Superset: newer specs gain parameters_schema over releases

Example fix

# before: parameter-mode validation for engine without schema
{"engine": "customdb", "parameters": {...}}
# after: configure by URI
{"engine": "customdb", "sqlalchemy_uri": "customdb://user:pw@host/db"}
Defensive patterns

Strategy: type-guard

Validate before calling

from superset.db_engine_specs import get_engine_spec

def engine_supports_parameters(engine: str, driver: str | None) -> bool:
    spec = get_engine_spec(engine, driver)
    return hasattr(spec, "parameters_schema")

Type guard

def supports_parameter_flow(spec) -> bool:
    return getattr(spec, "parameters_schema", None) is not None

Try / catch

from superset.commands.database.exceptions import InvalidEngineError
try:
    ValidateDatabaseParametersCommand(props).run()
except InvalidEngineError:
    # fall back to the SQLAlchemy URI (Advanced) configuration path
    configure_via_sqlalchemy_uri(props)

Prevention

When it happens

Trigger: Calling the database validation endpoint (or the UI modal's parameter form) for an engine whose spec lacks parameters_schema — commonly custom/third-party db_engine_specs or engines configured only via SQLAlchemy URI; passing an engine alias that resolves to a base/abstract spec.

Common situations: Custom engine plugins registered without a parameters_schema; older engine specs predating the parameter-driven modal; scripts hitting the validate API with engine names only supported in the 'Advanced' / URI tab of the connection form.

Related errors


AI-assisted analysis of apache/superset@f4587218dd (2026-08-14). Data as JSON: /api/errors/d5c887dddfa2bd25. Report an issue: GitHub.