Hi I have scenario like this
s/r table T/r table
ename,sal empno,ename,sal
vijay,2000 1 , vijay, 2000
kumar,3000 2 ,kumar , 3000
ravi ,4000 3 ,ravi , 4000
How can i get target table like that without using
Transformer stage?
Answers were Sorted based on User's Feedback
Answer / ramachandra rao
first of all question is not clear
ok fine
if u take source as sequential file there is one option is
there i.e rownumcolumn use this option it will create
sequnce number.
2.use columngenerator also we used
Thanks
chandu-09538627859
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / surya
you can generate surrogate key in the transformer itself.
right click on the stage variables. tre you can find surrrogate key.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / krishna evsg
Hi Vijay
Actually I don't Know Transformer stage, But we can do the
above scnario in SQLSERVER2005. In SQLSERVER2005 we have a
built in function for Row_Number().
create table Source_Tab
(
ename varchar(max)
,sal money
)
GO
create table Target_Tab
(
eno int
,ename varchar(max)
,sal money
)
GO
insert into Source_Tab values('vijay',2000)
GO
insert into Source_Tab values('kumar ',3000)
GO
insert into Source_Tab values('ravi ',4000)
GO
insert into Target_Tab
(
eno
,ename
,sal
)
select ROW_NUMBER() OVER (ORDER BY ename)
AS 'RowNumber',ename,sal from source_Tab
SELECT * FROM Target_Tab
GO
SELECT * FROM source_Tab
GO
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / srinivasu
This is an optional property. It adds an extra column of type unsigned BigInt to the output of the stage, containing the row number. You must also add the column to the columns tab, unless runtime column propagation is enabled.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / kiran
ok well vijay.ur quetion not proper k.
see u can use s_key,column genaretor stage.
and u can define user define query in source level and
populated to target like dbl click on source and set read
method is user deine and write query=select
rownum,ename,sal from emp(s/r table name).k
Thanks&Regards
kiran
9393363309
Is This Answer Correct ? | 1 Yes | 5 No |
Does datastage support slowly changing dimensions ?
why do we need a datawarehouse when we have databases to store data?
Difference between data warehousing and olap?
how many dimentions and fact tables used in your project and what are names of it?
Explain how a source file is populated?
what is the use of DSattchJob?DetachJob? where can we find it?
What is the Environment Variable need to Set to TRIM in Project Level?(In transfermer, we TRIM function but I need to impliment this project level using Environment variable)
Hi All, I have a file. i need to fetch the records between first and last records by using transform stage. EX:- Source: EMPNO EMPNAME 4567 shree 6999 Ram 3265 Venkat 2655 Abhi 3665 Vamsi 5852 Amit 3256 Sagar 3265 Vishnu Target: EMPNO EMPNAME 6999 Ram 3265 Venkat 2655 Abhi 3665 Vamsi 5852 Amit 3256 Sagar I dont wan't to Shree and vishnu records.we can fetch another way also but How can I write the function in transform stage?
Converting Vertical PIVOTing without using PIVOT stage in DataStage. Ex: DEPT_NO EMPNAME 10 Subhash 10 Suresh 10 sravs Output: DEPT_NO EMP1 EMP2 EMP3 10 subhash suresh sravs 2) How to implement Horizontal PIVOTing without using PIVOT stage.
How can you write parallel routines in datastage PX?
Give an idea of system variables.
1)How to Duplicate Records Delete in Sequential file?