apache/dolphinscheduler · error · UnsupportedOperationException
Sagemaker AdHocDataSourceClient is not supported
Error message
Sagemaker AdHocDataSourceClient is not supported
What it means
Hard unsupported-operation sentinel in SagemakerDataSourceChannel.createAdHocDataSourceClient: the SageMaker datasource plugin only stores AWS credentials for the SageMaker task plugin and has no JDBC/query capability, so no ad-hoc (direct query) datasource client can ever be created for it. Any code path attempting ad-hoc SQL execution against a SageMaker datasource hits this.
Source
Thrown at dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-sagemaker/src/main/java/org/apache/dolphinscheduler/plugin/datasource/sagemaker/SagemakerDataSourceChannel.java:30
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.plugin.datasource.sagemaker;
import org.apache.dolphinscheduler.spi.datasource.AdHocDataSourceClient;
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam;
import org.apache.dolphinscheduler.spi.datasource.DataSourceChannel;
import org.apache.dolphinscheduler.spi.datasource.PooledDataSourceClient;
import org.apache.dolphinscheduler.spi.enums.DbType;
public class SagemakerDataSourceChannel implements DataSourceChannel {
@Override
public AdHocDataSourceClient createAdHocDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) {
throw new UnsupportedOperationException("Sagemaker AdHocDataSourceClient is not supported");
}
@Override
public PooledDataSourceClient createPooledDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) {
throw new UnsupportedOperationException("Sagemaker AdHocDataSourceClient is not supported");
}
}
View on GitHub (pinned to 02eac45a1b)
Solutions
- Do not use a SageMaker datasource with features that require ad-hoc querying (SQL task, data lineage, query preview); use it only with the SageMaker task plugin
- If ad-hoc querying is needed, configure a real SQL datasource (e.g. MySQL/PostgreSQL) instead
- To add support, implement AdHocDataSourceClient in SagemakerDataSourceChannel
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-sagemaker/src/main/java/org/apache/dolphinscheduler/plugin/datasource/sagemaker/SagemakerDataSourceChannel.java:30 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/372b297ef6676657.
Report an issue: GitHub.