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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

No rows return from procedure - Unexpected EOF in prolog

Hi everyone again. I am new in Open Studio, so I have many questions 0683p000009MACn.png
I created web-service, which calling stored procedure in Oracle and returns records set.
If my procedure returns even 1 row - everything is ok. But when the result is empty - there is a error (in attach).
What shall I do?
Thank you.

Labels (2)
14 Replies
Anonymous
Not applicable
Author

Please, help me. I can modify a stored procedure, that its return in anyway something, but its a bad decision.
Anonymous
Not applicable
Author

Hi, still no ideas?
Anonymous
Not applicable
Author

Hi Alexandr
Sorry if this is obvious, but your web service flow needs to return something to the tESBResponse. Right now the tParseRecordSet is not passing anything to the tXMLmap. So naturally the tXMLmap throws an error because there is an unexpected eof. You need to handle the edge condition.
Ed
Anonymous
Not applicable
Author

Ed, thank you very much! Please, can you give me a simple example? I am very very new in all this 0683p000009MACn.png
Anonymous
Not applicable
Author

Please, help me 0683p000009MACn.png
Anonymous
Not applicable
Author

Hi Alexander..

if your data flow may return no rows (e.g. they are filtered out), then you could try to use lookups in tmap / txmlmap. That way there is always a row returned, so XML is generated even with empty data
just next time pay attention - you see the "0 rows" at your flow debug information. If you are implementing web serivices using Talend jobs, you will get a row at the start (tESBRequest) and you need to pass a row (one row) to the tESBResponse or tESBFault on the same subjob.
lookup exmaples:
- http://techblog.appirio.com/2009/12/performing-lookups-and-transformations.html
- http://www.talendforge.org/tutorials/tutorial.php?idTuto=9#

good luck
gabriel
Anonymous
Not applicable
Author

There are global variables created for each available component. Each global variable includes certain properties depending on the type of component. Lookup the global variables for either the oracle stored procedure or the tParseRecordSet. Use a Run If condition for the connector based on the number of rows return in the record set. If there are no rows returned then throw a SOAP fault. If there are records then just execute as normal. See section 4.3 in the Studio User's Guide, or search for "Run If".
Anonymous
Not applicable
Author

Thank you for the answers! But I feel myself so stupid?
I decided to use Run If condition, how Edward wrote, and from tParseRecordSet try to connect row (Trigger ? Run If) to tLogRow_4 ? for normal work and to tXMLMap_4 ? for no data found. But I can?t connect this components 0683p000009MPcz.png
Anonymous
Not applicable
Author

Hi Alexander,
I believe you could try the tMap and lookups, I've uploaded screenshots of one of our data services. The iterator component (tFowToIterate) is there so you could parametrize the database output (e.g. as a parameter to your stored procedure). In case no data are returned, you will still got a reply with no data.
As Ed suggested using RunAs looks a little bit more complicated for me, on the other hand it allows you to handle edge situations much better and send faults or do something else if needed.
Gabriel