When you compile high-level integration language scripts, the output is a set of Jaql scripts, which are required for execution in the InfoSphere® BigInsights™ environment. Use the hil.sh script to run the language compiler.
The example command compiles program.hil into a Jaql program called program.jaql.
$HIL_HOME/bin/hil.sh -f program1.hil program2.hil -g program.jaql \
-i \"/user/$USER/input\" -o \"/user/$USER/output\"
By default, if no -t option is used, the temporary files go to a temp directory under the output directory. In the case of this example, the temporary files go to the /user/me/output/temp directory.
// The path to the input directory
HILInputDirPath = "/user/me/input";
HILOutputDirPath = "/user/me/output";
HILTempDirPath = "/user/me/output" + "/temp";
// Then, in the jaql code, you will find:
...
... read(hdfs( HILInputDirPath + '/' + ... ))
... write(hdfs( HILOutputDirPath + '/' + ... ))
This method
provides the flexibility of using a valid Jaql expression to compute
the path. However, if an existing path must be used, then it must
be a valid Jaql string expression.The generate command is the default command in hil.sh. The examples that are shown will work without using generate after hil.sh.
$HIL_HOME/bin/hil.sh -f program.hil -g program.jaql
catprogram.hil | $HIL_HOME/bin/hil.sh generate -g program.jaql
Generation properties (-p) control how the Jaql input and output statements are generated by the language for different objects in a program. The format and usage of the generation properties in Generation properties. The tutorial also contains some examples of these property files.