Wildcard joining

<< Click to Display Table of Contents >>

ETL > 14.0 u1 > Implementation Guide > Tutorial and implementation guide > Steps > Joining 

Wildcard joining

If your source tables are already well-formed and you do not want to define the joining tables manually, you can use so called wildcard syntax. If the name of the table contains an asterisk, all tables matching the pattern will be used for joining. For example, the previous step were OS1 and OS2 was joined together could be also represented with the following syntax:

{

    "id": 1,

    "type": "join",

    "name": "join demo",

    "sources": "Table*",

    "on": ["Computer"],

    "strategy": "outer",

    "target": "joined_os_outer_coalesce"

}

 

This is a relatively easy to way to make big joins of several tables, provided that:

The match the pattern Table*

They all contain a column “Computer”

If you have some prior knowledge about the columns and their content, and based on that you want to define preferences for joining, you can do it on the column basis:

{

    "id": 1,

    "type": "join",

    "name": "join demo",

    "sources": "Table*",

    "on": ["Computer"],

    "strategy": "outer",

    "target": "joined_os_outer_coalesce",

    "conflicts":

    {

        "OperatingSystem": {

            "type": "coalesce",

            "priority": ["Table 2", "Table 1"],

        }

    }

}

 

In this case, all tables matching the pattern will be joined, and in case of conflict in the column OperatingSystem the value from Table 2 will be preferred over Table 1 over some other, not mentioned tables. Wildcards for joining priority are also supported (see Tables priority for more information)