Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 SMahadevan16080
		
			SMahadevan16080Hi,
While reading the source file the below 2 column appear as below data type in output table as well schema editor in tmap.
row4.Department_id (Integer)
row4.Department_name (String)
My requirement is
if
Department_name
is empty I should bring theDepartment_id
value inDepartment_name
column. So I have written the below logic,row4.
Department_name
.isEmpty()?row4.Department_id
:row4.Department_name
It's causing the error cannot convert from Integer to String.
But the same logic works fine if the both column has String Datatype.I have some of the column were both are string.
 CLi1594691515
		
			CLi1594691515
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You need to parse row4.Department_id to String. String.valueOf(row4.Department_id)
 SMahadevan16080
		
			SMahadevan16080Thanks for your email on this,
I have tried with the below way in output table for the dept_id column and change the datatype as String,
String.valueOf(row4.Dept_id)
**************
The same way I have tried with Var in tMap,
(string)String.valueOf(row4.Dept_id) - String datatype and point this into one new column in output table name it as (Dept_id)
But both case am facing the same issue. Is anything wrong am doing here ?
 SMahadevan16080
		
			SMahadevan16080Can some one help me on this if this my logic is correct ?
 CLi1594691515
		
			CLi1594691515
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Your logic seems okay.
Can you screen cap your actual setting?
Actual coding
Var: String.valueOf(row3.dept_id)
Output: row3.dept_name.isEmpty() ? Var.dept_id_String : row3.dept_name
 SMahadevan16080
		
			SMahadevan16080It's working fine and got the result. Thanks for help.
