sparse-planet-56664
02/03/2022, 12:27 PMmeta:
some_key: S1
meta:
some_key: S2
Is this possible? Currently we are doing the mapping ourselves, but wanted to test this out if we didn’t have to add our own logic/complexity. I can’t see in any documentation that we can reuse the actual value from the meta key. Or is it possible to use regexp match in the “match” field?orange-night-91387
02/04/2022, 12:06 AMmodern-monitor-81461
06/03/2022, 2:29 PMmeta_mapping is mapped to operation_defs: Dict[str, Dict] = {}, we cannot have something like this:
meta_mapping:
data_tier:
match: "Bronze"
operation: "add_term"
config:
term: "Bronze"
data_tier:
match: "Gold"
operation: "add_term"
config:
term: "Gold"
data_tier:
match: "Silver"
operation: "add_term"
config:
term: "Silver"
Only the last "block" is loaded in the config. What I would like to do is apply a different term depending on the value of data_tier. Is this a limitation of the current codebase, or I have overlooked something? I think the operation_key should map to an array of dict and not a dict... Thoughts?orange-night-91387
06/03/2022, 3:21 PMmodern-monitor-81461
06/03/2022, 7:11 PMmeta_mapping:
data_tier:
- match: "Bronze"
operation: "add_term"
config:
term: "Bronze"
- match: "Gold"
operation: "add_term"
config:
term: "Gold"
- match: "Silver"
operation: "add_term"
config:
term: "Silver"
term: "Silver"
where the first entry to match would have its operation executed and the others would be ignored. There are many ways to achieve the same thing, so that's why I think it would be worthwhile if the core team could spend some time and evaluate if this would inline with datahub 's vision. I can probably implement the array solution if needed.orange-night-91387
06/03/2022, 7:16 PMmammoth-bear-12532
meta_mapping:
data_tier:
match: "Bronze|Silver|Gold"
operation: "add_term"
config:
term: "{{ $match }}"