Thursday, April 3, 2014

Remove special characters from empno

Remove special characters from empno

Senario:Suppose  in flat_file  some special symbols like @,%,$,#,&  has added in empno column along with the actual data. How to  remove those special charcters ?
empno in source   
empno(in string format)
7@3%$,21
432#@1
324&*,$2
In target
empno
7321
4321
3242
Following are the steps for achieving this mapping

  1. Connect 0/p columns of SQF to an expression transformation.
  2. In expression make empno as input and create another port empno1 as output port with date datatype. And in empno1 write condition like this. and finally send it to target


1)Replace all special characters into NULL
REPLACESTR(1,Account_PK,';','?','!','#','$','%','^','*','_','=','"','`','|','~','>','<','{}','[]','...',NULL)


REPLACECHR(1,REPLACECHR(1,Account_Name,CHR(13),''),CHR(10),'')

No comments:

Post a Comment

Data engineering Interview Questions

1)  What all challenges you have faced and how did you overcome from it? Ans:- Challenges Faced and Overcome As a hypothetical Spark develop...