cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple sources for single target - conditional transformation

bshanesky
New Contributor II

Hi All - explored other threads but could not find the right answer. Unsure if this should be one or two mappings and what type if they are a conditional rule or composite?

If value at SourceAccount MAIN has a value of 1, then: Source should be SourceAccount A for Target Account A and Source should be SourceAccount B for Target Account B

Otherwise,

Source should be SourceAccount C for Target Account A, Source should be SourceAccount D for Target Account B

Thanks!

 

6 REPLIES 6

chul
Contributor III

I'm reading this as target accounts driving source accounts based on an account value rather than the other way around. Please provide an example of each case.

cds

bshanesky
New Contributor II

Thanks @chul 

I'm realizing it may be more complicated than initially described since there are multiple other dimensions that need to match.

With some more context:

SourceAccountMAIN is a binary. So where all other dimensions match, if the binary value there is 1, there should be two distinct one to one mappings (A to B, C to D).

And in all other cases of the binary (0 or null), where other dimensions match, there are another two distinct one to one mappings (E to B, F to D).

chul
Contributor III

My understanding is that you essentially want to use a different set of transformation rules based on the value of one data point that exists in the imported data set. If that's the case, you'll have an issue because if the value is null, that line will be skipped. If the value is 0, that line will also be skipped if your zero suppression setting on your data source is set to True.

If you're able, I suggest using a different method for determining which set of transformation rules the imported data should use.

cds

It's not clear to me whether "SourceAccountMAIN" is a field that appears on each record or not. That makes all the difference.

I think it would be a bit clearer if you could actually post the structure of each record (i.e. row headers).

RobbSalzmann
Valued Contributor

Hi @bshanesky ,

While writing complex integration logic can meet this requirement, consider an approach that splits this out into source specific integrations, each with it's own simpler mapping.  This makes maintenance and future changes significantly easier.  And it removes the challenge of meeting multiple use cases in a single integration.

bshanesky
New Contributor II

I've managed to do this with multiple conditional mappings from inspiration on other threads/solutions. Thanks all!