Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

eno ename
1 qaz
1 wsx
1 edc
2 zxc
2 asd
3 qwe
3 wer
3 tru
4 rgj

Output:

eno ename count
1 qaz,wsx,edc 3
2 zxc,asd 2
3 qwe,wer,tru 3
4 rgj 1

I want the above output to be solved by DataStage as well and I have to write SQL query for the same output.

Answer Posted / msbharathi

Seq stg------>Sort stg--------> Trnsfrm stg-------->Tgt
1. read data in seq file stage.
2. In sort stage enable key column change as true.
3. In transformer stage define stage variable SV1 (if DSLink5.keyChange = 1 then 1 else SV1 +1) and SV2 (if DSLink5.keyChange = 1 then DSLink5.ENAME else SV2 : ',' : DSLink5.ENAME
) . In output tab link ENO, SV2 -> Ename and SV1 -> Count. Add a constraint LastRowInGroup(DSLink5.ENO) and mark the ENO as key in input column.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are stage variables and constants?

1127


What is quality stage?

973


whom do you report?

1913


Can you explain repository tables in datastage?

1383


What are the components of ascential data stage?

1165


What is ibm datastage?

954


for example You have One Table with 4 Columns (Mgr ID, Department ID, Salary, Employee ID). Can you find out the Average Salary and Number of Employee present per Department and Mgr

1357


how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.

3317


How you Implemented SCD Type 1 & Type 2 in your project?

4113


How to read the length of word in unix?

1362


Differentiate between data file and descriptor file?

1027


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

2231


What is process model?

1957


Explain Quality stage?

1141


What is the use of datastage director?

1000