L2 Hub
Pontus
etl
Join

L2 Construct: join

etl join

Description

JoinTablesEndpoint joins two input Tables based on specified columns. It takes two Tables and two column names, one from each Table, to join on. The endpoint returns a new Table containing the rows from the left and right Tables that match on the specified columns.

L2 Data

  1. Provider: pontus
  2. Module: etl
  3. Action: join

Example Step

{
  "name": "insert-your-step-name",
  "type": "l2",
  "l2_data": {
    "provider": "pontus",
    "module": "etl",
    "action": "join",
    "metadata": {}
  }
}
 

Input

Example

 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/l2/pontus/etl/join-tables-input",
  "$ref": "#/$defs/JoinTablesInput",
  "$defs": {
    "JoinTablesInput": {
      "properties": {
        "left": {
          "$ref": "#/$defs/Table"
        },
        "right": {
          "$ref": "#/$defs/Table"
        },
        "left_on": {
          "type": "string"
        },
        "right_on": {
          "type": "string"
        },
        "how": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["left", "right", "left_on", "right_on", "how"]
    },
    "Table": {
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "headers": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "rows": {
          "items": {
            "items": true,
            "type": "array"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["headers", "rows"]
    }
  }
}
 

Output

Example

 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/l2/pontus/etl/join-tables-output",
  "$ref": "#/$defs/JoinTablesOutput",
  "$defs": {
    "JoinTablesOutput": {
      "properties": {
        "result_table": {
          "$ref": "#/$defs/Table"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["result_table"]
    },
    "Table": {
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "headers": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "rows": {
          "items": {
            "items": true,
            "type": "array"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["headers", "rows"]
    }
  }
}