apache/dolphinscheduler · error · IllegalArgumentException

sagemaker datasource param is not valid

Error message

sagemaker datasource param is not valid

What it means

Validation in SagemakerDataSourceProcessor.checkDatasourceParam: the SageMaker datasource definition is rejected when any of userName, password or awsRegion is empty — these three are the required AWS credential fields for the SageMaker task plugin, and missing awsRegion in particular means the client cannot target an AWS region.

Source

Thrown at dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-sagemaker/src/main/java/org/apache/dolphinscheduler/plugin/datasource/sagemaker/param/SagemakerDataSourceProcessor.java:53

import com.google.auto.service.AutoService;

@AutoService(DataSourceProcessor.class)
@Slf4j
public class SagemakerDataSourceProcessor extends AbstractDataSourceProcessor {

    @Override
    public BaseDataSourceParamDTO castDatasourceParamDTO(String paramJson) {
        return JSONUtils.parseObject(paramJson, SagemakerDataSourceParamDTO.class);
    }

    @Override
    public void checkDatasourceParam(BaseDataSourceParamDTO datasourceParamDTO) {
        SagemakerDataSourceParamDTO sageMakerDataSourceParamDTO = (SagemakerDataSourceParamDTO) datasourceParamDTO;
        if (StringUtils.isEmpty(sageMakerDataSourceParamDTO.getUserName())
                || StringUtils.isEmpty(sageMakerDataSourceParamDTO.getPassword())
                || StringUtils.isEmpty(sageMakerDataSourceParamDTO.getAwsRegion())) {
            throw new IllegalArgumentException("sagemaker datasource param is not valid");
        }
    }

    @Override
    public String getDatasourceUniqueId(ConnectionParam connectionParam, DbType dbType) {
        SagemakerConnectionParam baseConnectionParam = (SagemakerConnectionParam) connectionParam;
        return MessageFormat.format("{0}@{1}@{2}@{3}", dbType.getName(),
                PasswordUtils.encodePassword(baseConnectionParam.getUserName()),
                PasswordUtils.encodePassword(baseConnectionParam.getPassword()),
                PasswordUtils.encodePassword(baseConnectionParam.getAwsRegion()));
    }

    // SageMaker
    @Override
    public BaseDataSourceParamDTO createDatasourceParamDTO(String connectionJson) {
        SagemakerConnectionParam connectionParams = (SagemakerConnectionParam) createConnectionParams(connectionJson);
        SagemakerDataSourceParamDTO sagemakerDataSourceParamDTO = new SagemakerDataSourceParamDTO();

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Fill in userName and password (AWS access key/secret) in the datasource form
  2. Set awsRegion to a valid AWS region such as us-east-1
  3. Re-save the datasource and use the connection-test action to confirm
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-sagemaker/src/main/java/org/apache/dolphinscheduler/plugin/datasource/sagemaker/param/SagemakerDataSourceProcessor.java:53 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/3cf8a5921e318c6d. Report an issue: GitHub.