Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection connect = DriverManager.getConnection("jdbc:hive2://localhost:10000/default", "", ""); //connecting to default database
- Statement state = connect.createStatement();
- System.out.println("!!!!!!!!!!Running 1st query!!!!!!!!!!");
- System.out.println("Listing tables in hive");
- ResultSet show_tables = state.executeQuery("show tables");
- while (show_tables.next()) {
- System.out.println(show_tables.getString(1));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement