Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I interpret an XML file with products. Each product has one or no image. The image is identified with an HTTPS URI.
"image1 (tJavaRow) prepares global variales for URI and filename so I can use them in tFileFetch.
The "run if" clause checks whether the URI is set. It yes I want to execute the tFileFetch.
tFileInputXML_1 iterates 2 products with 2 valid images.
The problem is that the tJavaRow componenten
The problem is that image1 (tJavaRow) is called twice (that's correct 🙂 but tFileFetch will only be called once for the second product.
In the following screenshot you see the trace output for each tJavaRow and only one Status entry for the tFileFetch.
Note:
If I replace the "Run if" with the "Main" connection all works fine. tFileFetch will be called twice.
The problem with that is, that if a product has no image than tFileFetch runs into an error because of an invalid URI.
What is the problem?
Thx,
Michael
Got an answer that using a 'run if' connection will only execute once regardless of how many rows are processed by your main connection.
Got an answer that using a 'run if' connection will only execute once regardless of how many rows are processed by your main connection.
The IF link will only fie once, on the completion of the component. I'm not sure about the data you are carrying through your job, but try adding a tFlowToIterate component, connect a tJava (as a dummy component) to that and then add your IF link from your tJava.
Your column data in your tJavaRow will be added to the globalMap using this method. So to retrieve it you will need to use a bit of Java. For a String column called URL on a row called row1, you would use the following code...
((String)globalMap.get("row1.URL"))
You will need to use the above method in your tFileFetch.
This works because the the tFlowToIterate converts rows to iterations. This means that the connected tJava (the dummy one) will be started and finished for every row in your data set. This will allow you to use the IF (which I assume is a conditional to decide whether to try and retrieve the file or not).
Hi @michaelsooonah michaelsooonah @Richard Hall
I want to download image from sharepoint. I have tried with tFileFatch & able to download .jpeg but when I'm trying to open it then its showing me error
Error:- It appears that we don't support this file format
do yo have any suggestions how I can resolved this
Thanks!!