Join Custom Condition - indexed

Joins two tables:
t1 the TOP input table and
t2 the BOTTOM input table

Specify the columns to be returned using the column filters.
Specify the condition, using SQL (H2 Database syntax)


e.g.
t1."name" = t2."name" or t1."name"=t2."alternative_name"

table column names are case-sensitive and will work without including the double-quotes only if the table column names are all upper case.

It is best to always wrap the column names in double-quotes!

If no condition is supplied, it will perform a cross join (resulting in a table that is the product of the rows of both input tables, with every row in t1 joined to every row in t2.

Internally this is an enhacement performance version of the Join Custom Condition component. It tries to build an index within the internal database on each of the columns specified in the condition. For this identification to work, it is important that the t1 and t2 prefixes are present and that the column names are surrounded by double quotes as in the example shown above. If it doesn't manage to identify any indexable columns, it will work without indexing in the same way that the original Join Custom Condition component works.

KNOWN LIMITATIONS
Column names must be compatible with an H2 SQL database. Where the column name contains spaces, this will be handled by converted to underscores for processing in the database. Column names must consist of Alphanumerics and underscores, and must not start with a numeric. Column names containing other characters will most likely fail.

The column names used in the condition must be for columns with datatypes compatible with an H2 database.

When comparing DATES, it is best to convert these to STRING format in YYYYMMDD format, and datetimes to be used for conversion should be converted first to STRING format in YYYYMMDDhhmmss format, for the most reliable results.


v1.1 2023-06-13 @takbb Brian Bates
v1.2 2023-07-17 patches:
- fix to prevent "collision" of underlying tables where more than one joiner component operates on the same workflow. The user can now specify a unique identifier per joiner, which is incorporated into the tables that are created on the H2 database.
- fix to prevent "collision" where joiners are included on multiple workflows that are running concurrently. The temporary H2 database is now allocated a name using the workflow name and (if running on server) the jobid from the context properties.

v1.3 2023-09-01 - fix to allow accented and other characters in column names. It no longer attempts to filter these out when creating h2 database table.

Options

Include Left unmatched rows
Tick this to include the rows from the Left (upper) input table that do not match with the Right (lower) input table.%%00010(Left Outer Join)
Columns to return from Source table on TOP/LEFT data port
Select the columns to be returned from the table on the TOP (LEFT) data port
Columns to return from Lookup/Enrichment table on BOTTOM/RIGHT data port
Select the columns to be returned from the table on the BOTTOM (RIGHT) data port
Unique Table ID
Specify a unique ID to be used for this joiner query. This is needed if you use more than one Custom Condition joiner within the same workflow, to prevent them potentially attempting to use the same table names in the H2 database. Any short alphanumeric sequence to make this joiner unique within the workflow can be used
Condition
Enter the condition to join, using the table names t1 and t2 to reference the input data on port 1 (top) and port 2 (bottom)

Input Ports

Icon
First table (t1) to be joined
Icon
Second table (t2) to be joined

Output Ports

Icon
The resultant output table from the joining of table t1 with table t2.

Nodes

Extensions

Links