souce file having the columns like
name company
krish IBM
pooja TCS
nandini WIPRO
krish IBM
pooja TCS
if first row will be repeat i want the result like this
name company count
krish IBM 1
pooja TCS 1
nandini WIPRO 1
krish IBM 2
pooja TCS 2
Answer Posted / pushparaj
Just modified the last post with minor changes
First sort the both name and compamy and then,
using stage variable in transformer:
sv1= name:company
sv3=if sv1=sv2 then sv3+1 else sv3(initial value of sv3=1)
sv2=sv1(initial value of sv2 =XXXXXXX)
OP
name company count=sv3
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What a datastage macro?
how to get sum of sal based on dept_no and then sum of all sal irrespective of dept_no in same sql. output:- 10, 200(sum of sal for dept_no 10), 5000(sum of all sal)
Differentiate between Join, Merge and Lookup stage?
How a routine is called in datastage job?
What are the benefits of datastage?
Difference between data warehousing and olap?
CHANGE CAPTURE
how to add a new records into source?
Define project in datastage?
if i have two tables table1 table2 1a 1a,b,c,d 1b 2a,b,c,d,e 1c 1d 2a 2b 2c 2d 2e how can i get data as same as in tables? how can i implement scd typ1 and type2 in both server and in parallel? field1 field2 field3 suresh , 10,324 , 355 , 1234 ram , 23,456 , 450 , 456 balu ,40,346,23 , 275, 5678 how to remove the duplicate rows,inthe fields?
How do you generate sequence number in datastage?
why do u need the IOS upgradation in a FC switch
How rejected rows are managed in datastage?
What is the difference between validated and compiled in the datastage?
There are two file are there .1st file contains 5 records and 2nd file contain 10 records in target they want 50 records.how can achieve this