public static Connection getConnection(final String url, final String user, final String password)
            throws Exception {
        if (StringUtils.isBlank(url) || !url.startsWith(GREENPLUM_JDBC_PREFIX)) {
            throw new Exception("Greenplum server URL was invalid, it should start with jdbc:postgresql");
        }
        final Connection conn;
        try {
            Class.forName(GREENPLUM_DRIVER_CLASS);
            conn = DriverManager.getConnection(url, user, password);
        } catch (Exception e) {
            final String errorMsg = "get Greenplum connection error, please check postgres jdbc url,"
                    + " username or password!";
            LOG.error(errorMsg, e);
            throw new Exception(errorMsg + " other error msg: " + e.getMessage());
        }
        if (conn == null) {
            throw new Exception("get Greenplum connection failed, please contact administrator");
        }
        LOG.info("get Greenplum connection success, url={}", url);
        return conn;
    }
Get Greenplum connection from the url and user
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/greenplum/GreenplumJdbcUtils.java