i have input like this
Column 1 ,column 2
3,a
4,b
5.c
i want output
aaa
bbbb
ccccc
Ple help any one?
Answers were Sorted based on User's Feedback
Answer / satish
Hi
First read the data in sequential file,
then take transformer stage create a stage variable.
In stage variable
Str( DSLink2.column_2, DSLink2.Column_1).
Drag and drop the stage variable to required output column,
finally load the data in target.
| Is This Answer Correct ? | 15 Yes | 1 No |
Ex:
Str( "a", 3)---->aaa
Str( "b", 4)---->bbbb
Solution:
use below transformer Logic in Output Col Derivation:
Str(DSLink2.col2, DSLink2.Col1)--->Output_Col(Output Column)
Output:
Output_Col
aaa
bbbb
ccccc
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / naresh
Hi All plz saw the blow
first we read the data in seqential file
then taken transformer stage in tr stage we are create the two stage variable first stage variable like
column2 : colum1
then stage variable like
str(left(stage1,1),Right(stage1,1))
out put dragan drop the stage variable
finally load the data in target.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / geetha
use str function in datastage. str(dslink.column1,dslinkcolumkn2). In the output we get the required data . str function is used to repeat the column number of times.
| Is This Answer Correct ? | 2 Yes | 2 No |
Emp login_timestamp Logout_timestamp A,2019-02-01 02:24:15,2019-02-01 04:59:42 B,2019-03-29 14:43:30,2019-03-29 20:22:00 ABC,2019-03-29 12:43:00,2019-03-29 23:22:59 In the above calculate the duration of hours spent in office for each emp in datastage.
HOW CAN WE ABORT THE JOB IF THE RECORDS OF SOURCE FILE CONTAINS VALUE AS 'VIJAY'?
1.How to read multiple file from sequential stage. 2.If a file doesn't arrive or doesn't exists in sequential stage how do u handle this. 3.What do you do before taking data from source to staging area. 4. I have a remove duplicate stage and transformer stage.what will u do for optimizeing the performance of the job.
What is a delta record? How you will read it?
What are constraints and derivations?
What all the types of jobs you developed?
I have 5 different sources i want same records in 5 different targets Can you any body send me this question answer rathdsetl@gmail.com
Hi All, Could you please let me know whether Datastage server and px supports oredb? OREDB:It's a Oracle Retail Embedded Database.Previousely It was called as Acumate data base. It's a multidimensional database. Please help me on this issue ASAP. Thanks in advance Ashok
In a batch if a job fails in between and you want to restart the batch from that particular job and not from the scratch then what will you do?
what is operator combinality in datastage?
Source flat file contains src --- 1 2 ' ' ' 18 we had 3 targets T1 T2 T3 -- -- -- 1 4 7 2 5 8 3 6 9 10 13 16 11 14 17 12 15 18 How can i get? **Using only datastage, but not unix or any other. I am expecting the answer soon.. Thanks in advance.
When we will go for Data elements?