Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to do this simple query in Talend, but until now (2 days later) I haven't make this query in Talend working. What I want is the amout of records with a where clause with only one parameter. This parameter is available in context, and I want to work with the result, the amout of records futher on in the flow. How can I do this.
I am new within Talend so I think it is an simple question four the experienced users among us but not fot me please help !!
Nikhil,
I have added an other picture witg information from a debug run, may be this will help.
Regards,
Frans
Nikhil,
Herewith more inofrmation, I think i saw some information wrong. In the query I do a 'select count(*) from ....' so I expect only 1 (one) colomn.
As you can see in the picture I think al the coloms are returned + the extra count(*) field in the name of AANTRECS. This is not what I expected and may this is the course of the problem?
Hi,
Could you please try like below?
I believe you are using On Component Ok instead of On SubJob Ok which is trigger the job before the previous job is getting completed fully. Please use On Component Ok only if you need (like in the case of condition check in iterative format).
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Hi Nikhil,
And what must I place in the 'IF condition' after tJava ?
context.AANTRECS.equals ("null") or context.AANTRECS.equals ("0") or context.AANTRECS.equals ('0') doesn't work.
I expect that in tJava something like:
context.AANTRECS = < result from query AANTRECS>
has to be placed because the value of AANRECS from the query has to be put in the variable 'context.AANTRECS'
I don't think a simple query like
select count(*) as context.AANTRECS
will work in Talend !!!
This is very dissapointing for me and my collegae's.
Hi,
Unfortunately you are thinking that its not possible in Talend without going through Talend learning path. There are lot of customers who do much complex things using Talend in seamless fashion. I would recommend to learn Talend in a structured way using Talend academy if you are not able to scale quickly using help documents alone.
Coming to your earlier query, since the context variable is Integer, you will have to use Integer operations within if condition. Right now, you are trying String operations in if conditions.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Hi Nikhil,
I have already have used the integer and String 'variant' and I know that in the example this is wrong. But my problem is that i can't validate the value of AANTRECS after the query is executed. With tLogrow i can see the result of the query but I want to use this result for a further decision so this has to put in context.AANTRES. I expect this value in context.AANTRECS but in debug-mode the value is always 'null' even if the result of count(*) is > zero. Is there an otherway the determine if a record already exits in a table, i have tried it with 'component error' and 'subjob-error' but that seems not to be working as I expect it.
And you're wright tah I have, and will, follow the courses of Talend.
best regards,
Frans
Hi Shong / Nikhil,
This is what needed great !!!
Can you advise me what course I can follow to learn more about Talend?
As you may have noticed I have a lot of experience but I am new with Talend so please advice.
many regards for all your help
Frans