Hi Prateem,
Sorry for the late reply.
Yes, there is a way to avoid having Ontop connecting to the data source. First, you can pass the DB metadata as a JSON document. If this metadata is sufficient (all the SQL queries are parsed by Ontop and the metadata is complete), Ontop won't fetch metadata from the data source directly.
Please enable ontop.reformulateToFullNativeQuery. That way the SQL query will use the same variables as the SPARQL one.
Note that we may refactor this reformulation mechanism in the future and deprecate this configuration entry.
For the JDBC URL, you can create a fake one. Just make sure to URLs of the correct SQL dialect, as this information is used by Ontop for recognizing the dialect.
Best,
Benjamin