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 |
What is the diff between sort performed at sort stage and the stream sort performed at the input of few stages in DS Enterprise edition?
5) A file contains 10 (1-10) I want trgt like Trgt 1 trgt 2 trgt 3 1 2 3 4 5 6 7 8 9 10
What are the various kinds of containers available in datastage?
IS FILE SET CAN SUPPORT I/P AND O/P LINK AT A TIME?
root tree will find which is server job and which is parallel job?
Hi friends, I am new to datastage, i have one query in datastage any one you please give reply to my post. I have a workbook (excel sheet) named as eg: xxxx, in that i have two tables emp(eid, ename, salary, deptno) and dep(deptno, name, state). in my source i have ODBC enterprise stage read the emp table and dept table join the two table and write the dept no 10(eid,ename,salary,name,state) values in target(). Thanks, Badari
What is RCP?
if a column contains data like abc,aaa,xyz,pwe,xok,abc,xyz,abc,pwe,abc,pwe,xok,xyz,xxx,abc, roy,pwe,aaa,xxx,xyz,roy,xok.... how to send the unique data to one source and remaining data to another source????
what is diff b/w datastage 8.1,8.5,8.7?
1.What is a delta record? How you will read it? 2.What are the different types of sorting?
data stores in which location while using data set stage as the target?
How to create user defined environment varibale(parameter)?