{"record":{"id":"372b297ef6676657","repo":"apache/dolphinscheduler","slug":"sagemaker-adhocdatasourceclient-is-not-supported","errorCode":null,"errorMessage":"Sagemaker AdHocDataSourceClient is not supported","messagePattern":"Sagemaker AdHocDataSourceClient is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-sagemaker/src/main/java/org/apache/dolphinscheduler/plugin/datasource/sagemaker/SagemakerDataSourceChannel.java","lineNumber":30,"sourceCode":" * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.dolphinscheduler.plugin.datasource.sagemaker;\n\nimport org.apache.dolphinscheduler.spi.datasource.AdHocDataSourceClient;\nimport org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam;\nimport org.apache.dolphinscheduler.spi.datasource.DataSourceChannel;\nimport org.apache.dolphinscheduler.spi.datasource.PooledDataSourceClient;\nimport org.apache.dolphinscheduler.spi.enums.DbType;\n\npublic class SagemakerDataSourceChannel implements DataSourceChannel {\n\n    @Override\n    public AdHocDataSourceClient createAdHocDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) {\n        throw new UnsupportedOperationException(\"Sagemaker AdHocDataSourceClient is not supported\");\n    }\n\n    @Override\n    public PooledDataSourceClient createPooledDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) {\n        throw new UnsupportedOperationException(\"Sagemaker AdHocDataSourceClient is not supported\");\n    }\n}\n","sourceCodeStart":12,"sourceCodeEnd":38,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-sagemaker/src/main/java/org/apache/dolphinscheduler/plugin/datasource/sagemaker/SagemakerDataSourceChannel.java#L12-L38","documentation":"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.","triggerScenarios":"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.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}