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



Hi I have scenario like this s/r table T/r table ename,sal ..

Answer / pavan

Hi This is pavan u use surrogate key generator.

Is This Answer Correct ?    8 Yes 1 No

Hi I have scenario like this s/r table T/r table ename,sal ..

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

Hi I have scenario like this s/r table T/r table ename,sal ..

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

Hi I have scenario like this s/r table T/r table ename,sal ..

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

Hi I have scenario like this s/r table T/r table ename,sal ..

Answer / d

d

Is This Answer Correct ?    1 Yes 0 No

Hi I have scenario like this s/r table T/r table ename,sal ..

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

Hi I have scenario like this s/r table T/r table ename,sal ..

Answer / sindhu

row number column in sequential file

Is This Answer Correct ?    0 Yes 0 No

Hi I have scenario like this s/r table T/r table ename,sal ..

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

Post New Answer

More Data Stage Interview Questions

I have source like "abcdefghijklmnopqrs", how to change 10th character from j to z in datastage?

2 Answers  


hi my source is:: empno,deptno,salary 1, 10, 3.5 2, 20, 8 2, 10, 4.5 1, 30, 5 3, 10, 6 3, 20, 4 1, 20, 9 then target should be in below form... empno,max(salary),min(salary),deptno 1, 9, 3.5, 20 2, 8, 4.5, 20 3, 6, 4, 10 can anyone give data flow in data stage for the above scenario.... thanks in advance...

5 Answers  


What is the difference between datastage and informatica?

0 Answers  


how does work server jobs?

1 Answers  


guys pls tell me where we use sequence jobs exactly in realtime proj explain pls with example.

2 Answers   TCS,






WHAT ARE PERFORMANACE SETTINGS YOU HAVE IMPLEMENTES IN YOUR PROJECT?

2 Answers   GE,


1.what is repartionoing technique? 2.what deliverables transferred to client using datastage? 3.how to write loop statements using nested loop sequence?

0 Answers   IBM,


A job is having only 2 stages I/p dataset and target table.Job is taking very long time to load 50 million records.How to improve performance of this job.

3 Answers   IBM,


I am running a job with 1000 records.. If the job gots aborted after loading 400 records into target... In this case i want to load the records in the target with 401 record... How will we do it??? This scenario is not for sequence job it's only in the job Ex: Seq file--> Trans--> Dataset..

9 Answers   Cognizant, IBM, TCS, Virtusa,


if the source file is CID,CCODE,CONNDATE,CREATEDBY 0000000224,1000,20060601,CURA 0000000224,2000,20050517,AFGA 0000000224,3000,20080601,TUNE 0000000225,1000,20020601,CURA 0000000225,2000,20050617,AFGA 0000000225,3000,20080601,TONE AND TARGET is oracle following are the validations cid loaded with unique records leading zeors has to be deleted while loading cid in target load only customer who got early connected to company conn_date should be loaded into oracle date format cid datatype is varchar2 in target conn_date is data datatype ccode is varchar2 0000000224,1000,20060601,CURA 0000000224,1000,20060601,CURA

2 Answers  


I have a scenario like Deptno=10---->First record and last record Deptno=20---->First record and last record Deptno=30---->First record and last record I want those first and last records from each department in a single target. How to do this in DataStage, any one can assist me. Thanks in advance.

8 Answers  


can any 1 put a difference between datastage 7.5 and 8.0 all concepts plz r mail 2 me anu4u09@gmail.com

4 Answers   IBM,


Categories