You are not logged in.
Add this code on tJava at the beginning of job, for example:
the rest of job
Is it clear for you?
1) Before each run of the job or I should put this tJava component before each tMap component with sequence function in my job?
2) Can I put this in to the tMap component not in tJava?
You need to use Numeric.resetSequence("s1",0) to restart the sequence before each run. You can put this in a tJava component.
Every time I'm using only sequence "s1"
Are you using different sequence in your job? "s1" is the sequence name of this function, it should start with 1 every time you execute the job. Please describe the problem with more information.
Every time when I use this function all my ID's are begins from different numbers, but not from 1 for example. Why it is so? Should i change any DB or Tables properties?
After you get the unique rows, you can use system function Numeric.sequence("s1",1,1) to generate a sequence number for each row on another tMap.
So what you really want is the unique month with a sequence number?
We have some months sales data. I need to deduplicate month before outputing it in to the database
We have such input Data:
1 03 September 200$
2 05 September 50$
3 07 September 70$
4 10 September 100$
5 12 September 280$
6 17 September 150$
7 01 October 20$
8 07 October 190$
9 09 October 205$
10 12 October 330$
11 15 October 120$
12 01 November 60$
14 11 November 220$
15 18 November 300$
Using tMap and tUniqRow for column MONTH. We have get such Output data in the table Month:
These ID's are not correct, and the result should be smth like this. Table MONTH:
I think you need to post some real data with a real result. What you are asking doesn't sound sensible/possible.
But then, after tUniqueRow output, data haven't consecutive id (identificators) For example:
But I need
How can I solve this problem?
You can't in tMap but tUniqueRow should solve your problem though you may need a component for each column you want to deduplicate.
How can I deduplicate data in tMap? Is there any function or method? Or how can I output to the database unique data.
Is there some elements, or only tUniqRow?
In our input xls file all our rows are unique!
We need to deduplicate columns and cells in output data.
Sorry, I don't understand your request well, can you give us an example to explain it?
What's your input data? What are your expected result?