This command installs the data file or SQL-MapReduce function in the specified Aster Database schema. The filename and the schema name cannot be the same. An error will result if the names are the same.
INSTALL FILE filename [[schema/]alias]
This is an example:
public void testInstallWithSchema() { String stmt1 = "install file 'd:\\odbcng.tar.gz' "; String stmt2 = "install file 'd:\\odbcng.tar.gz' uploadfile/'odbcng.zip'"; String stmt3 = "install file 'd:\\abc.txt' uploadfile/'abc.txt'"; try { conn_.setAutoCommit(false); Statement s = conn_.createStatement(); s.executeUpdate(stmt1); s.executeUpdate(stmt2); s.executeUpdate(stmt3); conn_.commit(); s.close(); } catch (Exception e) { try { conn_.rollback(); } catch (SQLException e1) { e1.printStackTrace(); } fail(e.getMessage()); } }