AbsaOSS / AbsaOSS/enceladus

Case Clauses for Mapping Rules

Đang mở
#188 1 bình luận 0 reaction 1 người được giao Được @Zejnilovic nhận Xem trên GitHub
Conformance feature Menas priority: undecided request under discussion
Ngôn ngữ chính
Scala
Star
33
Fork
16
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Background
Currently, we have no functionality to do case clauses in the Menas UI:

The types of rules that require this functionality have been done through the API rather than the UI but we have gotten more requests for this to be a functionality in the UI.
## Problem
Some use cases need to do apply a case clause before being able to do a mapping rule.
### Example:
There is a dataset that holds client keys that are either an Source1 or Source2 in the same column.
When trying to conform this against a mapping table the joins would be as follows:

*Mapping Table : Dataset*
SourceSystem : SourceSystem (Needs to be a literal - either Source1 or Source2)
SystemCode : ClientKey

Currently, it is not possible to have both Source2 and Source1 as the literal so we would only be able to conform against Source1 or Source2 but not both.

## Proposed Solution
1. Dynamic Literal -
CASE
WHEN LEN(ClientKey) = 6 THEN “source1”
ELSE CASE
WHEN LEN(ClientKey) = 10 THEN “source2”
ELSE “UNKNOWN” END END
2. Extra Clause in Join Condition -
*Mapping Table : Dataset*
SourceSystem : in ("source1","source2")
SystemCode : ClientKey
3. Filter Mapping Table Before Executing Join -
*Mapping Table Filter Condition*
SELECT($"MappingTable.SourceSystem".isin("source1","source2"))

[Example](https://app.zenhub.com/files/154513089/6c6fdbd7-c48c-4b28-a9da-66f98821fd12/download)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.