RelationalJoin

Commercial Component

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.

Short Summary

Joiner that merges sorted data from two or more data sources on a common key whose values must differ in these data sources.

Component Same input metadata Sorted inputs Slave inputs Outputs Output for drivers without slave Output for slaves without driver Joining based on equality
RelationalJoinnoyes11nonono

Abstract

This is a joiner usable in situation when data records with different field values should be joined. It requires the input to be sorted and is very fast as it is processed in memory.

The data attached to the first input port is called the master as it is also in the other Joiners. The other connected input port is called slave. Each master record is matched to all slave records on one or more fields known as a join key. The slave records whose values of this join key do not equal to their slave counterparts are joined together with such slaves. The output is produced by applying a transformation that maps joined inputs to the output.

All slave input data is stored in memory, however, the master data is not. Therefore you only need to consider the size of your slave data for memory requirements.

Icon

Ports

RelationalJoin receives data through two input ports, each of which may have a distinct metadata structure.

The joined data is then sent to the single output port.

Port typeNumberRequiredDescriptionMetadata
Input0yesMaster input portAny
1yesSlave input portAny
Output0yesOutput port for the joined dataAny

RelationalJoin Attributes

AttributeReqDescriptionPossible values
Basic
Join keyyesKey according to which the incoming data flows are joined. See Join key. 
Join relationyesDefines the way of joining driver (master) and slave records. See Join relation.master != slave | master(D) < slave(D) | master(D) <= slave(D) | master(A) > slave(A) | master(A) >= slave(A)
Join type Type of the join. See Join Types.Inner (default) | Left outer | Full outer
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)

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