Is there a way to retrieve the DISTRIBUTE clause from a Netezza table using JDBC MetaData?
Asked
Active
Viewed 163 times
1 Answers
2
After some searching, I found a temporary work around based on the link below:
http://pic.dhe.ibm.com/infocenter/ntz/v7r0m3/topic/com.ibm.nz.adm.doc/r_sysadm_user_views.html
The code below does the job, however not through DatabaseMetaData
String SQLString = "SELECT ATTNAME FROM _V_TABLE_DIST_MAP\n";
SQLString += "WHERE TABLENAME = '" + table + "'\n";
SQLString += "ORDER BY DISTSEQNO";
Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery(SQLString);
while( rs.next() ) {
System.out.println(rs.getString(1));
}
rs.close();

Constantin
- 1,506
- 10
- 16