We have moved to www.dataGenX.net, Keep Learning with us.

Thursday, January 23, 2014

DataStage Scenario - Problem10


Goal :  Get the max salary from data file ( Seq file )

We know that max function is use to get the max value in a column of a table, but here you have to design a datastage job which get the max value from seq file.



Input Seq File :

Wednesday, January 22, 2014

DataStage Scenario - Problem9


Goal : Distribute the data is below requirement

Input file's data is distributed like 1st 3 row in file1, next 3 row in file2, next 3 rows in file3 again next 3 rows in file1 and continues.


Tuesday, January 21, 2014

DataStage Scenario - Problem8


Goal : Distribute the data as below condition -

Given : FileA and FileB contains some data in single column.
Target : File_A : Which contains the data which is available in A but not in B
Target : File_B : Which contains the data which is available in B but not in A
Target : File_AB : Which contains the data which is available in A and B Both

Monday, January 20, 2014

DataStage Scenario - Problem7


Goal : Divide the input into 3 columns


source  

c1      
c2      
c3      
c4
c5
c6
c7
c8

Tuesday, January 14, 2014

Removing last or more character of string


Want to remove last character from a string in Linux, We can do this with help of SED commands.

Use this

a) Remove last char
sed 's/.$//' input
or
sed 's/.\{1\}$//' input

i.e. -
echo 123456 | sed 's/.$//'
12345

echo 123456 | sed  's/.\{1\}$//'
12345

Friday, January 10, 2014

Datastage Common Errors and Solutions


1.
    
While running ./NodeAgents.sh start command... getting the following error: “LoggingAgent.sh process stopped unexpectedly”

SOL:   needs to kill LoggingAgentSocketImpl
              Ps –ef |  grep  LoggingAgentSocketImpl   (OR)
              PS –ef |               grep Agent  (to check the process id of the above)

2.     Warning: A sequential operator cannot preserve the partitioning of input data set on input port 0
SOL:    Clear the preserve partition flag before Sequential file stages.