Feature: extract multiple columns from one prejoined object #290
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Change prejoin-processing to only produce one left join for each unique combination of relation, columns and operator.
Also add new syntax for prejoins, allowing extraction of multiple columns from the same prejoin-source:
In this example we join the source model with
business_raw
and extractid
andnumber
and assign an alias for each column.Assigning an alias is optional, but if done, the number of
extract_columns
has to match the amount ofaliases
.For each prejoin-target a new list, containing at least a dictionary for extract_columns and values for ref_model(or source_name & source_table) and the column names, needs to be defined.
The old syntax is still valid and can be used if desired.
Fixes #287
Type of change
Please delete options that are not relevant.
Checklist:
ToDO: Update Docs to include the new syntax and additionally include information about
aliases