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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to load only records within a specific range from a csv file into a oracle table

Hi Guys,

I have a requirement where there is a csv file as input for example consider its having 1000 records

with the below schema

 

emp_name,emp_sal,emp_city

xyz,1000,hyderabad

abc,2000,delhi

mnp,3000,bangalore

 

I have to load the data into a oracle table but only specific records within a range
(ex : 200 to 350,500 to 875,etc) I need to give the range at run time using context variables.

how can I achieve that?
does tFileRowCount supports that or is there any solution??

quick reply would be appreciated

 

 

Labels (3)
13 Replies
TRF
Champion II
Champion II

You don't need a tJavaRow. Just put the piece of code as the Range value for the tSampleRow component.
It works, I just tried it.
Anonymous
Not applicable
Author

Hi,

Thanks for your patience. it worked.

But my question is why it didn't work if we do in other way like

 

context.interval = context.from+".."+context.to; ----> in tJavaRow

and use the

context.interval -----> in tSampleRow ???

TRF
Champion II
Champion II

The variable used as Range must be set before the subjob including the tSampleRow starts.

So, if you have a tJava before this subjob, it works too:

tJava--(onComponentOK)-->tFileInputDelimited-->tSampleRow-->tLogRow
Anonymous
Not applicable
Author

Hi,

 

If it is on number range suppose source field of type double divided by lookup field of type double and the result should be in between the range 0.1 to 5.0 and should not be in the range 5.1 to 8.9 how to do this in the talend expression filter while mapping in tmap?