You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
hello,
I need to add a new column in my schema, it s an ID field, but my problem is that this field must be unique... It identifies an alert for my application...
Can u help me please ???
Regards.
Hi
What about your generated language?Java or Perl? Can you show more detailed information about your job and what are your expected language?
Best regards
shong
Offline
I use TOS 2.2 with java...
My problem is that in my job I make some alerts that I put in a CSV file, but I want add a id column as unique number of alert for log... what I made now is to make a routine that returns an integer :
public class id {
public static int iden = 0;
public static int identifiant() {
iden ++;
int id = iden;
return id;
}
}
is there a better solution ???
The problem with using the java function is that for each job running the id is set to 0 in the beginning...

Hello,
I have not checked your method, but Talend Open Studio already provides his own sequence generator in a system routine.
Call Numeric.sequence("sequence_name", startvalue, step) in your job.
Regards,
Offline
Pages: 1