Details
-
Bug
-
Status: Done
-
Major
-
Resolution: Done
-
0.4.2
-
None
-
None
Description
I had the following code in my Sensor Enrichment Config:
{ "enrichment": { "fieldMap": { "stellar": { "config": { "AWSEventSourceAccount": "match{recipientAccountID == 1111111111L => 'account1', recipientAccountID == 2222222222L => 'account2', recipientAccountID == 333333333L => 'account3', recipientAccountID == 4444444444L => 'account4', recipientAccountID == 5555555555L => 'account4', recipientAccountID == 6666666666L => 'account6', default => 'Unknown Account.'}" } } }, "fieldToTypeMap": {}, "config": {} },
However, this did not work as expected and the AWSEventSourceAccount field would always return "Unknown Account" in my events.
According to ottobackwards, this does work in the Stellar shell. He asked me to test with "_source.recipientAccountID" instead of "recipientAccountID" and make sure that mapStrategy is set to UNFOLD (this was already the case).
However, using this in my enrichment config does not resolve the issue. I used:
{ "enrichment": { "fieldMap": { "stellar": { "config": { "AWSEventSourceAccount": "match{_source.recipientAccountID == 1111111111L => 'account1', _source.recipientAccountID == 2222222222L => 'account2', _source.recipientAccountID == 333333333L => 'account3', _source.recipientAccountID == 4444444444L => 'account4', _source.recipientAccountID == 5555555555L => 'account4', _source.recipientAccountID == 6666666666L => 'account6', default => 'Unknown Account.'}" } } }, "fieldToTypeMap": {}, "config": {} },