Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2025 04:09 AM - edited 09-19-2025 04:15 AM
Thank you for the suggestion, but useNativeQuery=1 doesn't seem to reduce CPU usage. Usage example:
String sql = Files.readString(Path.of("insert.sql"));
String url = "jdbc:databricks://host.cloud.databricks.com:443/data;connschema=schema;transportMode=http;ssl=1;AuthMech=3;httpPath=/path;useNativeQuery=1";
Properties props = new Properties();
props.setProperty("user", "token");
props.setProperty("password", "<token>");
props.setProperty("useNativeQuery", "1");
Driver driver = DriverManager.getDriver(url);
try (Connection conn = driver.connect(url, props);
Statement st = conn.createStatement()) {
st.execute(sql);
}Any other suggestions?