apache/dolphinscheduler · error · UnsupportedOperationException

SSH AdHocDataSourceClient is not supported

Error message

SSH AdHocDataSourceClient is not supported

What it means

Hard unsupported-operation sentinel in SSHDataSourceChannel.createAdHocDataSourceClient: the SSH datasource is only a credential holder for SSH/remote-execution tasks and cannot produce an ad-hoc query client. Any attempt to run ad-hoc SQL against an SSH datasource reaches this unconditional throw.

Source

Thrown at dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-ssh/src/main/java/org/apache/dolphinscheduler/plugin/datasource/ssh/SSHDataSourceChannel.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.ssh;

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 SSHDataSourceChannel implements DataSourceChannel {

    @Override
    public AdHocDataSourceClient createAdHocDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) {
        throw new UnsupportedOperationException("SSH AdHocDataSourceClient is not supported");
    }

    @Override
    public PooledDataSourceClient createPooledDataSourceClient(BaseConnectionParam baseConnectionParam, DbType dbType) {
        throw new UnsupportedOperationException("SSH PooledDataSourceClient is not supported");
    }
}

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Use SSH datasources only with task plugins that consume SSH channels (e.g. remote shell)
  2. Use a SQL-capable datasource for ad-hoc query features
  3. Implement AdHocDataSourceClient in SSHDataSourceChannel if support is required
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-ssh/src/main/java/org/apache/dolphinscheduler/plugin/datasource/ssh/SSHDataSourceChannel.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/a1dc41c8bc1f5165. Report an issue: GitHub.