Relationship#

class sdm.relational.Relationship(left_table: str, left_columns: tuple[str, ...], right_table: str, right_columns: tuple[str, ...])#

Bases: object

Join relationship between two tables.

Parameters:
  • left_table (str) – Name of the left table.

  • left_columns (tuple[str, ...]) – Column names from the left table.

  • right_table (str) – Name of the right table.

  • right_columns (tuple[str, ...]) – Column names from the right table.

classmethod from_mapping(mapping: Mapping[str, str | Sequence[str]]) → Self#

Create a Relationship from a mapping.

Parameters:

mapping (Mapping[str, str | Sequence[str]]) – The mapping with "left_table", "left_columns", "right_table", "right_columns" entries.

Return type:

Self