title: Need to access Hive metadata tables using Jdbc program
body: <p>Need to access Hive metadata tables using Jdbc program.What exactly does the Metastore actually store and how can I access it?</p>
  
  <p>I tried doing this:</p>
  
  <pre><code>    sql="show tables";
  Statement stmt = con.createStatement();
  
  System.out.println("Running: " + sql);
  res = stmt.executeQuery(sql);
  while (res.next()) {
  System.out.println(res.getString(1));
  }
  </code></pre>
  
  <p>So I get the list of tables, but I want to know which table is this information stored in so that I can Directly Select from that table instead of firing a Hive command.</p>
  
  <p>Also my Metastore is configured in PostGreSQL.(if that helps!)
  Thanks
  Hitz</p>