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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

How to generate a sequence with a tMap

Hi everybody,
I read a lot of topic on this subject but I didn't suceed in what I wanted to do.
My goal is to generate a sequence for a delimited file.
For example, I have :
id_connexion, id_utilisateur, date_connexion,....
My delimited file is composed like this :
pierre;17/06/2008 11:11:15
jacques;17/06/2008 11:12:15
I'd like to generate a sequence to fill in the field id_connexion, this is what i'd like to have :
1;pierre;17/06/2008 11:11:15
2;jacques;17/06/2008 11:12:15
But not for a new delimited file but for a tOracleOutput. I've tried a lot of things, but I didn't find how to do.
My project is in java.
I have tOracleInput->tMap->tOracleOutput.
Could you please help me.
Thanks in advance.
Labels (3)
19 Replies
_AnonymousUser
Specialist III
Specialist III
Author

Thanks for your mapping but I don't understand why do you have 2 primary keys.
In my mapping, I have my delimited file on the left, my sequence in the "var" part (on the middle), and on the right side, my destination table. My sequence is link to the primary key of my destination table.
I still have an error, he doesn't want to raise my sequence because he always returns "null".
Do you have an idea please?
I use a FileDelimited->tMap->tOracleOutput and not tOracleInput->tMap->tOracleoutput like I said. I was wrong, sorry.
Thanks in advance for your answer.
Anonymous
Not applicable

In the Ecosystem, I saw a tAddSequence component -
Anonymous
Not applicable

Hi Megadeth2,
I just modified the existing job to show the sequence. We do not need to have two primary keys. Its an example.
-
sangi
Anonymous
Not applicable

Hi Megadeth2,
I just designed the job for sequence generator.
Here I am attaching the job and tMap.
This is my tsv file:
Organization City
Yahoo CA
Google NY
AOL NJ
Database MySQL:
1,Yahoo,CA
2,Google,NY
3,AOL,NJ

Var Expression:
Numeric.sequence("s1",1,1)

please upload images of your job if you still face any problem.
regards,
sangi
0683p000009MCOI.bmp 0683p000009MCOg.bmp 0683p000009MCVR.bmp
_AnonymousUser
Specialist III
Specialist III
Author

Hi Sangui,
Thanks for your answer, I did the same you show me but I still have the problem "null", I don't understand why he doesn't want to raise my sequence.
I can't upload images, so I'll keep on searching what is the problem.
Thanks a lot for yours advices.
Anonymous
Not applicable

I think it's a problem with my destination table because I do the same thing with an other job and it's ok.
Anonymous
Not applicable

are you able to generate the sequence?
_AnonymousUser
Specialist III
Specialist III
Author

My problem was my destination table because I did the same thing with an other job and it was ok. Now it's ok.
Thanks a lot for your help.
_AnonymousUser
Specialist III
Specialist III
Author

Hi all,can any body explain how to generate cyclic sequence values in talend bigdata.
EX
col1 col2
A 1
A 2
A 3
B 2
B 2
_AnonymousUser
Specialist III
Specialist III
Author

Hi all,can any body explain how to generate cyclic sequence values in talend bigdata.
EX
col1 col2
A 1
A 2
A 3
B 1
B 2