LookupJoin

We assume that you have already learned what is described in:

If you want to find the right Joiner for your purposes, see Joiners Comparison.

For information about lookup tables see Chapter 35, Lookup Tables.

Short Summary

General purpose joiner, merges potentionally unsorted data from one data source incoming through the single input port with another data source from lookup table based on a common key.

Component Same input metadata Sorted inputs Slave inputs Outputs Output for drivers without slave Output for slaves without driver Joining based on equality
LookupJoinnono1 (virtual)1-2yesnoyes

Abstract

This is a general purpose joiner used in most common situations. It does not require that the input be sorted and is very fast as it is processed in memory.

The data attached to the first input port is called the master, the second data source is called the slave. Its data is considered as if it were coming through the second (virtual) input port. Each master record is matched to the slave record on one or more fields known as the join key. The output is produced by applying a transformation which maps joined inputs to the output.

Slave data is pulled out from a lookup table, so depending on the lookup table the data can be stored in the memory. That also depends on the lookup table type - e.g. Database lookup stores only the values which have already been queried. Master data is not stored in the memory.

Icon

Ports

LookupJoin receives data through a single input port and joins it with data from lookup table. Either data source may potentially have different metadata structure.

The joined data is then sent to the first output port. The second output port can optionally be used to capture unmatched master records.

Port typeNumberRequiredDescriptionMetadata
Input0yesMaster input portAny
1 (virtual)yesSlave input portAny
Output0yesOutput port for the joined dataAny
1noOptional output port for master data records without slave matches. (Only if the Join type attribute is set to Inner join.) This applies only to LookupJoin and DBJoin.Input 0

LookupJoin Attributes

AttributeReqDescriptionPossible values
Basic
Join keyyesKey according to which the incoming data flows are joined. See Join key. 
Left outer join If set to true, also driver records without corresponding slave are parsed. Otherwise, inner join is performed.false (default) | true
Lookup tableyesID of the lookup table to be used as the resource of slave records. Number of lookup key fields and their data types must be the same as those of Join key. These fields values are compared and matched records are joined. 
Transform1)Transformation in CTL or Java defined in the graph. 
Transform URL1)External file defining the transformation in CTL or Java. 
Transform class1)External transformation class. 
Transform source charset Encoding of external file defining the transformation.ISO-8859-1 (default)
Advanced
Free lookup table after finishing If set to true, lookup table is emptied after the parsing finishes.false (default) | true
Deprecated
Error actions Definition of the action that should be performed when the specified transformation returns some Error code. See Return Values of Transformations. 
Error log URL of the file to which error messages for specified Error actions should be written. If not set, they are written to Console. 

Legend:

1) One of these must be set. These transformation attributes must be specified. Any of these transformation attributes must use a common CTL template for Joiners or implement a RecordTransform interface.

See CTL Scripting Specifics or Java Interfaces for more information.

See also Defining Transformations for detailed information about transformations.

Advanced Description

CTL Scripting Specifics

When you define your join attributes you must specify a transformation that maps fields from input data sources to the output. This can be done using the Transformations tab of the Transform Editor. However, you may find that you are unable to specify more advanced transformations using this easist approach. This is when you need to use CTL scripting.

For detailed information about CloudConnect Transformation Language see Part XI, CTL - CloudConnect Transformation Language. (CTL is a full-fledged, yet simple language that allows you to perform almost any imaginable transformation.)

CTL scripting allows you to specify custom field mapping using the simple CTL scripting language.

All Joiners share the same transformation template which can be found in CTL Templates for Joiners.

Java Interfaces

If you define your transformation in Java, it must implement the following interface that is common for all Joiners:

Java Interfaces for Joiners