import java.sql.*;
public class PrestoJdbcExample {
public static void main(String[] args) {
String url = "jdbc:presto://localhost:8080/my_catalog/my_schema";
String query = "SELECT * FROM my_table";
try (Connection connection = DriverManager.getConnection(url);
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery(query)) {
while (resultSet.next()) {
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}
jdbc.driver=io.prestosql.jdbc.PrestoDriver
jdbc.url=jdbc:presto://localhost:8080/my_catalog/my_schema
jdbc.user=my_username
jdbc.password=my_password