Condtional Mapping in Data Prep based on data value | Community
Skip to main content
Level 2
January 22, 2026

Condtional Mapping in Data Prep based on data value

  • January 22, 2026
  • 2 replies
  • 80 views

When doing RAW ingestion via the HTTP API Streaming Source Connector, a source field can be mappend to multiple target field. However, there is no option to condition the mapping based on the value of the field. 

A case in point. 

If value of source field A eqauls yes, map to target field A

if value of source field A equals no, map to target field B

This cannot, to my understand, be done via calculated fields either, as you can only do if statements manipulating the value of said field, but not the mapping itself. 

2 replies

FrederikWerner
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 22, 2026

Good idea! As a workaround, you could still put that logic into a calculated field to only populate it in the right cases or leave empty otherwise.

Learn more about Adobe Analytics and Customer Journey Analytics on my blogNeed help with Adobe Analytics or Customer Journey Analytics? Let's talk!
Level 4
January 22, 2026

Hi ​@j_goetze_5000 ,

 

You could try to have two mapping functions for target field A and B, and in each case the value should be a Calculated Field. In the calculated field, check if the value meets the condition for field A or B, if yes, then return, otherwise return nullify(). As per my understanding, the nullify() doesn't ingest the field/value.

You might want to try this before releasing in production.

 

Thanks!

Level 2
January 22, 2026

Hi Abie, thank you for your suggestion.

I did some digging into this, and as far as I can tell, it will not solve the issue, for two reasons. 
If nothing in the schema validation prevents null values, then it will still ingest, and potentially overwrite value that should not be overwritten. If null value causes validation to fail, the entire record will fail, which is not the desired outcome.  

Level 4
January 22, 2026

@j_goetze_5000 
Wondering if you tried this? I read some more documentation and this seems feasible.
At the same time, to make sure your previous value is not overwritten, read that value and reassign instead of setting empty or nullify().

Also, there is no real out of the box solution for this. Practically, every calculated field maps to a particular field. Above solution is also sort of a tweak, instead of official suggestion.

 

Thanks!