Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have to map EDI file to Text file. I am getting issue in mapping using Hierarchical mapper.
I am getting below error "Change loop Specification" -
The output map element: /root/Loop-NP17/NP34/Starttidspunkt_for_fapportperiode
is already looping using: in$/Transaction-SLSRPT/Loop-UNB/Loop-UNH/Loop-S005 (SimpleLoop)
which is not compatible with: in$/Transaction-SLSRPT/Loop-UNB/Loop-UNH/Loop-S005/DTM
Do you want to change the output map element looping?
Can anyone help me in this issue fix.
I'm afraid I can't tell you how to fix this using a variable. I would have to use an element of trial and error on this even if I had your data. My suggestion is to go back to try using the IF condition that you tried, but change the outputs to true or false. The errors you had trying that were because you were not outputting true or false.
Can you share a screenshot of your map? Also, is this error caused by adding the IFThenElse function?
Hi,
Thanks for your reply. I have attached map screenshot.
I have progressed in map output.
Now ,the issue is I am getting NULL values too in output,which I do not want. Can you please let me know how to remove NULL values from output.
like output is coming as -
NP34
NP34
NP34 201910012300201910022300
But I want output only asNP34 201910012300201910022300
Please suggest.
Do you get the looping on this field if you remove the IF condition?
yes, get the looping on this field if you remove the IF condition.
I only want the fields where source field is 51 or 52. Others are coming as NULL now, but we do not want to come those as NULL too.
It's really difficult to think about this without having access to the actual mapper. But have you tried using the EMIT tab? This should help you conditionally remove the field.
Hi,
Thanks for your replies.
I tried emit tab. but my target node NP34 requires a Null value coming to source to Emit. But, I have condition to check 51 or 52 value,otherwise its giving null value as output.
How to put these condition in Emit. Can you please try to give any example in screenshot from talend studio. The example should check all values of incoming node and emit only values like 51,52 or any other constant.
One of the error I am getting while emit usage is -
Overall: Error
1: Error - The referenced map element loops but there is no looping function that specifies how to handle this loop. (222) (INPUT)
Expression: Emit
Referenced Element : Map: Maps/SLSRPT_Recognition.xml - Map Element: in$/Transaction-SLSRPT/Loop-UNB/Loop-UNH/Loop-S005/DTM
Enclosing [Map] Element : Map: Maps/SLSRPT_Recognition.xml - Map Element: out$/root/Loop-NP17/NP34
First of all, the values that are being returned (which aren't null) are they the correct aggregate values? If this is the case, you should be able to apply the same logic in your EMIT logic. Alternatively you could try setting a variable with this aggregate logic and checking the variable value to see if it is null or holds a value.
Hi,
Thanks for your reply.
If i copy the same logic in NP34 node in emit, I am getting error. Error attached in Map_3.jpg
regarding variable, can you please let me know how and where can I create variable and access it in Hierarchical mapper.