You are not logged in.
Announcement
Unanswered posts
|
Hi
Add this code on tJava at the beginning of job, for example:
tJava
|
onsubjobok
|
the rest of job
on tJava:
Numeric.resetSequence("s1",0)
Is it clear for you?
Best regards
Shong
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?
Thank you.
Solosik,
You need to use Numeric.resetSequence("s1",0) to restart the sequence before each run. You can put this in a tJava component.
Thansk,
Ben
Every time I'm using only sequence "s1"
Hi
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.
Best regards
Shong
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?
Hi
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.
Best regards
Shong
Yes
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
FIRST
We have such input Data:
ID--DAY--MONTH------AMOUNT
-----------------------------------
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$
SECOND
Using tMap and tUniqRow for column MONTH. We have get such Output data in the table Month:
ID--MONTH
-----------------
1 September
7 October
12 November
PROBLEM
These ID's are not correct, and the result should be smth like this. Table MONTH:
ID--MONTH
-----------------
1 September
2 October
3 November
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:
1 September
7 October
12 November
But I need
1 September
2 October
3 November
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?
Thank you!
solosik wrote:
In our input xls file all our rows are unique!
We need to deduplicate columns and cells in output data.
Hi
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?
Best regards
Shong