Install File - Aster Client

Teradata Aster® Client Guide

Product
Aster Client
Release Number
7.00
Published
May 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
hki1475000360386.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
B700-2005
lifecycle
previous
Product Category
Software

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());
}
}