Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
FMartellucci1599461942
Contributor III
Contributor III

COmponent tXMLAdvancedOutput in flow 0 Row and create path /null/null why ?

Hey,

Im very surprised how the component reacts when run flow, and branch have 0 Row. (for me it is a bug on 7.2.1.20190620)

with config :

0693p00000AYgOoAAL.png

Advance :

0693p00000AYgOtAAL.png

FLOW :

0693p00000AYgOyAAL.png

RESULT :

0693p00000AYgP8AAL.png

Labels (2)
5 Replies
Anonymous
Not applicable

Hi

Can you share a screenshot of basic setting of tAdvancedFileOutputXML component? I guess you are using global variables in the file path.

 

Regards

Shong

FMartellucci1599461942
Contributor III
Contributor III
Author

plz see my first screenshot it is the basic setting 😞

yes i use the globalVar with component FlowToIterate. But in tMap_4 output with 0 ROW i dont understand why my component tAdvancedFileOutputXML want create empty file and generate path with 0 ROW (and globalVar are null because 0 ROW) and create /null/null/ (with my end path with globalVar).

 

why the generate path for the file of tAdvancedFileOutpoutXML only if minimum 1 row in the flow line ?

 

thanks

Anonymous
Not applicable

Hi

Please refer to this documentation about the component code generated model. In a main flow, the begin part code (initializes variables, such as filepath, opens an output stream) of tAdvancedFileOutputXML executes before other components. In this case, you are using the global variable before it is assigned value, that's why it is null.

If you want to create the XML file only when the output of tMap has data, then store the output into memory using tHashOutput, use runIf connector to trigger next processing if the global variable (Integer)globalMap.get("tHashOutput_1_NB_LINE") is bigger than 0.

for example:

....tMap--tHashOutput_1

-runIf-tHashInput--main-->tFlowToIterate--tFixedFlowInput--main--balabala-->tAdvancedFileOuutput

 

set the condition of runif as;

((Integer)globalMap.get("tHashOutput_1_NB_LINE"))>0

 

Regards

Shong

FMartellucci1599461942
Contributor III
Contributor III
Author

sorry if I speak poorly in English.

 

this effectively works with an if, but the tAdvancedFileOutputXML component then no longer consolidates the xmls in the same file, it overwrites the file per row received and no longer adds in the groups and loops defined in the xml tree.

And so I have a file with only the last xml in the loop 😞

Anonymous
Not applicable

Do you check the 'Append the source xml file' box on tAdvancedFileOutputXML? Can you take a look at the tUnite component? This component merges all the data, in your case, you can use this component to merge all data before writing them to XML file, let me know if I don't understand your requirement well.