datavault4dbt icon indicating copy to clipboard operation
datavault4dbt copied to clipboard

[FEATURE] Condition Parameter for Prejoining

Open lorogno opened this issue 1 year ago • 0 comments

What additional value does this feature bring to the project? Currently, prejoining only supports the static condition ‘=’ by default. The integration of a new parameter ‘condition’ allows broader prejoin cases to be covered. An example of a prejoin based on a restriction of time periods -> necessary if, for example, histories exist.

Describe the solution you'd like

Introduction of the new Parameter 'condition'. Parameter allows string and list for definition of multiple conditions.

Example:

prejoined_columns:
    - extract_columns: 
         - account_id
      aliases:
         - acc_id
      ref_model: account_sap
      this_column_name: 
        - acc_code
        - active_date
        - active_date
      ref_column_name: 
        - account_kuerze
        - acc_valid_from
        - acc_valid_to
      condition:
        - '='
        - '>='
        - '<='

Additional context

The Parameter should be optional, if conditions parameter is not set it should be set '=' as default. Additionally a check should be implemented which guarantees that the number of conditions aligns with number of target/ref-columns.

lorogno avatar Sep 29 '25 10:09 lorogno