Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

1 input from a column on tmysqlinput to 2 output

I have a column that I need to extract on 2 parts, which having the same condition if I am right. But, I can't get the right values and what I get is instead of only the values I need, I got all the values from that column. And this is the expression I created.

 

1. The output on row1 in output should be if the values contains ABC123 then "NULL" else just keep the value.  

(String) (row1.ColumnName.contains(%ABC123%) ? "NULL" : row1.columnName.equalsIgnoreCase(row5.ADDRESS)) - i got all in output

 

row1.ColumnName.contains(%ABC123%) ? "NULL" : row1.ColumnName.valueOf(row1.ColumnName) - I got all in output

 

I also tried to use matches same output.

 

2.  The output on row2 in output should be  if the values contains ABC123 then keep it else set to NULL

 

My understanding on expression is that:

 

if condition mets then (?) NULL (0683p000009MACn.png same values, or did I miss something here?

 

 

 

 

Labels (1)
  • v7.x

5 Replies
manodwhb
Champion II
Champion II

@Moe,use the below conditions.

 

row2.test.contains("ABC123") ? "NULL" : row2.test 

 

row2.test.contains("ABC123") ? row2.test  : "NULL" 

vapukov
Master II
Master II

hi,

 

you are use wrong syntax:

for contain - you do not need %% it is not a SQL, it search for all substring

row1.str.contains("ABC123") ?
null 
: "false" 

next - if you want replace to null, it is null, "NULL" it is string

 

but in any case code from above is work:

.--------.
|tLogRow_1|
|=------=|
|filtered|
|=------=|
|null    |
|false   |
'--------'
Anonymous
Not applicable
Author

@vapukov weird, coz I still got the same issue. Maybe because, I'm extracting another data from the same column name. So, that would be 3 process for the 2 types of data that I'm extracting, is that possible?

manodwhb
Champion II
Champion II

@Moe,you can use the below and the data type should be sting.

 

row2.test.contains("ABC123") ? "NULL" : row2.test1

 

row2.test.contains("ABC123") ? row2.test1  : "NULL" 

manodwhb
Champion II
Champion II

@Moe,still do you have this issue?