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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pass filename stored in CSV-File to tfileinputXML

Hi,
I would like to compare the content of two files. I have a list of pairs stored in csv file:

Example of pairs.csv
Filename_CSV;Filename_XML
/path/to/file/1.csv;/path/to/file/1.xml
/path/to/file/2.csv;/path/to/file2.xml

How can I passed the filenames of the "Filename_CSV" column to the tfileinputdelimeted component and the filenames of "Filename_XML" column to the ffileinputxml component?
Labels (3)
16 Replies
Anonymous
Not applicable
Author

I can reproduce the problem. I'm not sure if this is a limitation or a bug:
The lookup row is evaluated before flow to iteration starts. So you cant get the value out of the global map.
Alternatively you can split your functions in two jobs. The first one handles the file list and will call the second job via tRunJob. You can define in your compare job both files as context variables and pass this variables in the definition of tRunJob.
Bye
Volker
Anonymous
Not applicable
Author

Its frustrating, I can't get this job synchronized. I tried your idea with trunjob and I added an addition tMap (tMap_3), which just copy the flow, to get the "XML-Path" longer. That helps, so that the first iteration runs, but in the second iteration the job dies ...
Starte Job rettung am 09:35 21/03/2008.
1|0.0|0.0|true
2|0.0|0.0|true
3|12.0|0.0|false
4|123235.0|0.0|false
5|168.5|0.0|false
6|168.5|0.0|false
7|168.5|0.0|false
8|168.5|0.0|false
9|166.3|0.0|false
10|166.3|0.0|false
11|164.8|0.0|false
12|164.8|0.0|false
13|164.8|0.0|false
14|164.8|0.0|false
15|166.3|0.0|false
16|166.3|0.0|false
17|166.3|0.0|false
18|166.3|0.0|false
19|166.3|0.0|false
20|166.3|0.0|false
21|168.5|0.0|false
22|168.5|0.0|false
23|168.5|0.0|false
24|168.5|0.0|false
Exception in component tMap_2
java.lang.NullPointerException
at geschaeftsmodell.compare_content.compare_content.tFileInputDelimited_1Process(compare_content.java:477)
at geschaeftsmodell.compare_content.compare_content.runJobInTOS(compare_content.java:1257)
at geschaeftsmodell.compare_content.compare_content.runJob(compare_content.java:1182)
at geschaeftsmodell.rettung.rettung.tFileInputDelimited_1Process(rettung.java:235)
at geschaeftsmodell.rettung.rettung.runJobInTOS(rettung.java:416)
at geschaeftsmodell.rettung.rettung.main(rettung.java:335)
Exception in component tRunJob_1
java.lang.RuntimeException: Child job running failed
at geschaeftsmodell.rettung.rettung.tFileInputDelimited_1Process(rettung.java:246)
at geschaeftsmodell.rettung.rettung.runJobInTOS(rettung.java:416)
at geschaeftsmodell.rettung.rettung.main(rettung.java:335)
Job rettung endet am 09:35 21/03/2008.
Anonymous
Not applicable
Author

Hi,
could this be a problem with your file or you data? Does it run if you use your job with the second file-pair?
If so, can you give us some more information about your job (tMap2)
Anonymous
Not applicable
Author

Thanks Volker, that you still helps me ...
Okay I check the second pair and it works without problem, so I added a screenshot of tMap2
Anonymous
Not applicable
Author

I'm not sure I could help you really :-(
I can't see a problem in your tMap. The exception is thrown if you work with null values. I can't see (at first view) where the problems could happen.
I've for testing purposes written a job to. And it works.
I think that this is a problem of the data (or the job) and not of the multiple execution as a subjob.
Because I can't reproduce the problem I could only say what I should do to isolate it:
- Check the generated source code (switch from the designer into the code view) and take a look at the given line. Or better use the debugger.
- Reduce the files to check if the problems exist anymore. (Test only one pair, than another isolated, then both together, ...)
Hope this helps.
Bye
Volker
Anonymous
Not applicable
Author

Hi Everyone,
I created one job in TALEND and its running fine.I parsed one csv file and put in database.
Now i have one issue is that if i need to run that job by help of bactch file without open TALEND, then it searching for csv file.
Can anyone guide me that how can i provide the csv file path through command line and run the by batch process?
Anonymous
Not applicable
Author

Hello
Now i have one issue is that if i need to run that job by help of bactch file without open TALEND, then it searching for csv file.
Can anyone guide me that how can i provide the csv file path through command line and run the by batch process?

Please read this 1615 to learn how to specify a variable value from the command line.
PS: Please create a new topic for new questions next time.
Best regards

shong