hschildberg commented on issue #7450:
URL: https://github.com/apache/hop/issues/7450#issuecomment-4905037352

   Mmh, no, I think that is a misunderstanding.
   
   The JDBC URL still points to the local part of the SSH tunnel - just as 
today. But the JDBC URL can be more complex than just 
`localhost:<localPort>/<database>` if the dynamically allocated local port 
could be resolved at runtime in the manually specified URL.
   
   From a metadata perspective I would imagine something like this:
   
   ```
   {
     "rdbms": {
       "ORACLE": {
         "pluginId": "ORACLE",
         "accessType": 0,
         "hostname": "${db_host_behind_bastion}",
         "port": "${db_port}",
         "username": "${db_user}",
         "password": "${db_password}",
         "manualUrl": 
"jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(HOST=localhost)(PORT=<localPortOFSShTunnel>))(CONNECT_DATA=(SID=XYZ))",
         "databaseName": "",
         "pluginName": "Oracle",
         "attributes": {
           "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
           "QUOTE_ALL_FIELDS": "N",
           "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
           "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
           "PRESERVE_RESERVED_WORD_CASE": "Y",
           "SQL_CONNECT": "",
           "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
           "PREFERRED_SCHEMA_NAME": ""
         }
       }
     },
     "name": "DB via SSH tunnel"
   }
   ```
   
   `hostname` and `port` still define the remote end of the SSH tunnel. The 
`manualUrl` points to the local part of the SSH tunnel, but uses a more complex 
format.
   
   In this Oracle sample it would be required in case you need to specify a 
connection protocol of TCPS, for example.
   
   Since the host is always known (localhost) it can be fixed, but the port is 
dynamically allocated and needs to be resolved at runtime.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to