I have a flat file source(Sequential file) which contains more than 100 columns. Now I need to load the target,as same as structure of the source file. It means, the no. of columns in the source file will become the no. of rows in the target file.
For ex:
Source: eno ename sal
1 a 100
2 b 200
3 c 300
Target : field_name data_type length
eno number 10
ename char 2
sal number 10
Anybody can let me know how to do in datastage.
will DSSTAGEINFO work??
if possible can u give me hint regarding how to write in routine.
thanx n regards,
jagan
How to load column metadata into sequential file target
Moderators: chulett, rschirm, roy
Welcome Aboard :D
If so save the input metadata (DS manager can be used). Import back in target stage.
Do you really mean to acheive this. I hope you are tyring to import the same structure of the input to the target stage.the no. of columns in the source file will become the no. of rows in the target file.
If so save the input metadata (DS manager can be used). Import back in target stage.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Yeah Kumar you are right.
But the column name eno, ename, sal create some confusion and the way its writen in source and target.
eno ename sal
1 a 100
2 b 200
3 c 300
eno number 10
ename char 2
sal number 10
Regards
Ashwin
But the column name eno, ename, sal create some confusion and the way its writen in source and target.
eno ename sal
1 a 100
2 b 200
3 c 300
eno number 10
ename char 2
sal number 10
Regards
Ashwin
Last edited by ashwin141 on Fri Jun 02, 2006 4:50 am, edited 2 times in total.
Jagan has just given sample data for the input and metadata for the target. I dont find any pivoting in this.Source: eno ename sal
1 a 100
2 b 200
3 c 300
Target : field_name data_type length
eno number 10
ename char 2
sal number 10
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
How about "the no. of columns in the source file will become the no. of rows in the target file" in the original post? That sure looks like a pivot requirement to me.
Prior to the Pivot stage you can introduce a new column that contains the field names (which become column 1 in your output). Derive these as string constants. You can also do this for the "data type" and "precision" columns.
Make these generated columns pivot keys.
Prior to the Pivot stage you can introduce a new column that contains the field names (which become column 1 in your output). Derive these as string constants. You can also do this for the "data type" and "precision" columns.
Make these generated columns pivot keys.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.