-
Configure the table lookup rules by creating an instance of
TableLookupConfiguration
. Within this
instance:
Add an instance of type AbstractTableLookupRule
. This
AbstractTableLookupRule
instance must be defined
using one of these classes: Standardize
,
Categorize
or Identify
,
corresponding to the desired table lookup rule category.
-
Set the details of the Reference Data path and location type by
creating an instance of
ReferenceDataPath
. See Enum ReferenceDataPathLocation.
-
Create an instance of
TableLookupDetail
, by passing an
instance of type JobConfig
, and the
TableLookupConfiguration
and
ReferenceDataPath
instances created earlier as the
arguments to its constructor.
The
JobConfig
parameter must be an instance of type
MRJobConfig.
-
Set the details of the input file using the
inputPath
field of the TableLookupDetail
instance.
For a text input file, create an
instance of FilePath
with the relevant details of the
input file by invoking the appropriate constructor. For an ORC input
file, create an instance of OrcFilePath
with the path
of the ORC input file as the argument.
-
Set the details of the output file using the
outputPath
field of the
TableLookupDetail
instance.
For a text output file, create an instance of
FilePath
with the relevant details of the output
file by invoking the appropriate constructor. For an ORC output file,
create an instance of OrcFilePath
with the path of the
ORC output file as the argument.
-
Set the name of the job using the
jobName
field of the
TableLookupDetail
instance.
-
Set the
compressOutput
flag of the
TableLookupDetail
instance to
true to compress the output of the job.