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: 
_AnonymousUser
Specialist III
Specialist III

context variable

Hi,
I am working on incremental Talend Job and looking for Incremental Extract logic. I did the following steps to achieve this (DB:- Oracle)
Step1. Took Max (HEADER_ID) FROM TARGET_TABLE. (header_id datatype is Number)
Step2. Then I took tJavaRow component for to assign Step1 value context variable. My Context variable name is HEADER_ID (Datatype is BigDecimal) So the assignment syntax is as below
context.HEADER_ID=input_row.HEADER_ID;
Step3. Next I have my source extract component and have below Query.
"select C1, C2, HEADER_ID FROM SOURCE_TABLE WHERE HEADER_ID > '+context.HEADER_ID+'"
Step4. Then i have tMap
Ste5.  Then i have Target Objects
I am getting Error message on Step3. like '(java.sql.SQLSyntaxErrorException: ORA-01722: invalid number  ....)
It seems that there is datatype mismatch but I am not sure where to Fix.
Regards
Saket Krishna

Labels (2)
13 Replies
Anonymous
Not applicable

Hi Saket Krishna,

Can you please upload  screenshots of your job settings? It will be useful for us to find out the problem.


Best regards
Sabrina
Anonymous
Not applicable

Hi Sabrina,
Uploaded screenshots of the job. For your information I created this job to look how we can perform incremental extract logic. So focus is only on extraction not on other logic.
Regards
Saket Krishna
Anonymous
Not applicable

Hi Sabrina,
Did you get chance to look on the screenshots attached.
Thanks
Saket Krishna
Anonymous
Not applicable

Hi,


Can you upload again the screenshots you wanted to show, please? For some reason it didn't make it to your post.


Best regards
Sabrina

0683p000009MGmX.png
Anonymous
Not applicable

Hi Sabrina,
Attaching screen .zip file again kindly have a look.
Thanks
Saket Krishna
Anonymous
Not applicable

Please upload images (jpg, png o gif).   

I don't find screen.zip 

Best regards,


Alfonso Borre
Anonymous
Not applicable

Hi,
Uploaded Screenshots in .png format.
Regards
Saket Krishna
Anonymous
Not applicable

 

Hi,

I am not sure if there is any issue with the uploaded screenshots. Meanwhile I mentioning below the issue

I have below SQL in tOracleInput. Where Creation Date is Date column and context.CREATION_DT is the context variable defined as date datatype.

[font=Times New Roman] Select C1, C2, C3 FROM <TABLE> WHERE <TABLE>.CREATION_DATE > TO_DATE('" + context.CREATION_DT + "','dd - MM - yyyy').[/font]

But above SQL is throwing error like  “ORA-01858 : a non-numeric character was found where numeric was expected"

Thanks

[size=3][font=Times New Roman] Saket Krishna  [/font][/size]
Anonymous
Not applicable

Hi,
A column defined as String and am trying to handle null by adding String function like StringHandling(TRIM(Column).equals(""). But it is giving me "Null Pointer exception" error.
Chitra.