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

transform N columns into N lines

Can anybody help me how to go about this.I am a complete beginner to Talend even to any ETL tool..Need to implement batch loading using talend.
Can anybody help me in the below
My input will be a complex join between different tables(oracle databse)
My output is a delimited file(which needs to be ftpd)
My problem is the structure of the output file is as below
id 9429979F6
value 96.5
sectype XYZ
secsubtype XYZ
secsubtyp2 XYZ
Coup 3.32
descript "ABC"
rating1 A
rating1id X97886
id 9229979F6
value 26.5
sectype X2YZ
secsubtype X2Z
secsubtyp2 X2YZ
Coup 3.32
descript "ABC"
rating2 A
rating2id Y9789-78
and so on
The column names are at the left handside(dynamically generated from database eg rating1 exists in database so is present in the first data)
Can anybody help me how to go about this
Labels (2)
21 Replies
c0utta
Creator
Creator

Hi abrar,
I would do this exactly the way amaumont has explained. My only change would be to include the "rating number" in the data coming back from Oracle. Your schema should be:
id
value
sectype
secsubtype
secsubtyp2
Coup
descript
ratingNumber
rating
ratingID

then the output column in tMap would be the same as amaumont, except for:
...
"rating" + row1.ratingNumber + separator + row1.rating + "\n"
"rating" + row1.ratingNumber + "id" + separator + row1.ratingid + "\n"
+ "\n"

Hope that helps,
c0utta
amaumont
Contributor III
Contributor III

Thank you cOutta 😉
amaumont
Contributor III
Contributor III

I created the job which realize your need, the valid expression to set should be :
"id" + Var.separator + row1.id 
+ "\n" + "value" + Var.separator + row1.value
+ "\n" + "sectype" + Var.separator + row1.sectype
+ "\n" + "secsubtype" + Var.separator + row1.secsubtype
+ "\n" + "secsubtyp2" + Var.separator + row1.secsubtyp2
+ "\n" + "Coup" + Var.separator + row1.Coup
+ "\n" + "descript" + Var.separator + row1.descript
+ "\n" + "rating" + row1.ratingNumber + Var.separator + row1.rating
+ "\n" + "rating" + row1.ratingNumber + "id" + Var.separator + row1.ratingid
+ "\n"
Anonymous
Not applicable

Thanks a lot 0683p000009MACn.png
Anonymous
Not applicable

If i want to ftp the output file to some loacation ??
amaumont
Contributor III
Contributor III

To send your file output you can use this component :
> Internet > FTP > tFTPPut
Anonymous
Not applicable

But the file shoule be ftp'd after its fully written .If i add a tFtpput to my tOutputDelimited,its placing an empty file without the contents
amaumont
Contributor III
Contributor III

You can use a "ThenRun" connection from your first Start component (with green background) to the tFTPPut. So the tFTPPut component will be processed only when your first processing will ended.
You can read the documentation TalendOpenStudio_UG_v2.2_b_EN.pdf at page 44 and 388.
Anonymous
Not applicable

Thanks a lot amaumont ,it worked ...
One more help
How do i define a database schema using multiple tables. ie if my input comes from a join over multiple tables ,how do i create my tOracleInputScema ??
amaumont
Contributor III
Contributor III

Maybe you could create a new topic for this subject and precise your request ?