Skip to main content
Question

Which Tester operators are case sensitive?


tim_wood
Contributor
Forum|alt.badge.img+8

At the excellent FME conference in London yesterday, I thought @1spatialdave said he used Contains in a Tester because it wasn't case sensitive. I've been doing @LowerCase(@Value(myAttr)) for some tests where I'm not confident of the case of the value I'm testing. So I'm interested to know which Operators are case sensitive and which are not. For example, if my value is "COMPLETED", I presume that myAttr = "completed" will not match. But will myAttr LIKE "completed" match?

It would be great not to have to worry about doing @LowerCase()...

If some operators are case sensitive and some aren't, please can we have this on the Tester help page. If it's already available, please it be linked to from the Tester helop page.

Depending on the answer to this, I'll vote on

https://knowledge.safe.com/idea/24357/case-sensitive-option-when-testing-attribute-value.html

21 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • March 24, 2017

Let's test one by one!

The = operator works with case sensitive, in FME 2016 and 2017.

 

Next please :-)


david_r
Evangelist
  • March 24, 2017

Great idea making this a group effort, @takashi. I'm also looking forward to a contribution from @tim_wood ;-)

The "Like" operator is case INsensitive, in FME 2016 and 2017.

Next!


tim_wood
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 24, 2017

Ha ha! I kind of thought someone at Safe or one of the resellers would just know...

My contribution is that LIKE is not case sensitive (tested with attribute (Left) Values of "Completed", "COMPLETED" and "completed"; and Tester Right Values of "Completed", "COMPLETED" and "completed"). So that will do me for now.

It would still be good to have it in the Operators section of the Tester help page.


david_r
Evangelist
  • March 24, 2017
tim_wood wrote:

Ha ha! I kind of thought someone at Safe or one of the resellers would just know...

My contribution is that LIKE is not case sensitive (tested with attribute (Left) Values of "Completed", "COMPLETED" and "completed"; and Tester Right Values of "Completed", "COMPLETED" and "completed"). So that will do me for now.

It would still be good to have it in the Operators section of the Tester help page.

Hey, that's cheating, you did the same operator as I did ;-)

tim_wood
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 24, 2017
david_r wrote:

Great idea making this a group effort, @takashi. I'm also looking forward to a contribution from @tim_wood ;-)

The "Like" operator is case INsensitive, in FME 2016 and 2017.

Next!

Snap! Although I only tested in FME 2016.1.

 

@sander_s I think LIKE is the solution you want.

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • March 24, 2017

[regexp -nocase {regexp} {teststring}] = 1

and LIKE is indeed not cs.


tim_wood
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 24, 2017
david_r wrote:
Hey, that's cheating, you did the same operator as I did ;-)
Sorry - I posted before I received the email and hadn't refreshed the page either! As @1spatialdave said yesterday it's an average of 2 mins before a response here.

 

Technically my post wasn't identical to yours i.e. my post LIKE your post rather than my post = your post!

 


david_r
Evangelist
  • March 24, 2017
tim_wood wrote:
Sorry - I posted before I received the email and hadn't refreshed the page either! As @1spatialdave said yesterday it's an average of 2 mins before a response here.

 

Technically my post wasn't identical to yours i.e. my post LIKE your post rather than my post = your post!

 

Yes, you have to be quick around here!

tim_wood
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 24, 2017

Contains is not case sensitive.


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • March 24, 2017

It would be so nice if this information is included in the HELP for the transformer!!!!


tim_wood
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 24, 2017
erik_jan wrote:

It would be so nice if this information is included in the HELP for the transformer!!!!

I've emailed Safe

 


geosander
Forum|alt.badge.img+7
  • March 24, 2017
tim_wood wrote:
Snap! Although I only tested in FME 2016.1.

 

@sander_s I think LIKE is the solution you want.
Maybe, yes! Although I'd like to do some tests first. But thanks for the heads up :)

 


brianatsafe
Safer
Forum|alt.badge.img+11

Thanks @erik_jan for the suggestion and everyone else in this thread for your dedication to finding the answers. I've filed a request for our doc team to take a look at adding this information. Your crowdsourcing will be a wonderful help.

 

 

I will let you know when the documentation has been updated.

tim_wood
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 24, 2017
geosander wrote:
Maybe, yes! Although I'd like to do some tests first. But thanks for the heads up :)

 

I guess it depends what sort of LIKE LIKE is like? Is it like T-SQL LIKE?

 


geosander
Forum|alt.badge.img+7
  • March 24, 2017
tim_wood wrote:
I guess it depends what sort of LIKE LIKE is like? Is it like T-SQL LIKE?

 

Wow, that's a lot of likes in one sentence! :)

 

But yes, my point exactly.

Forum|alt.badge.img+7

'In' is case sensitive in FME 2016 and 2017


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • March 25, 2017
jeroenstiers wrote:

'In' is case sensitive in FME 2016 and 2017

Yes, the In operator is case sensitive if the right operand is a comma separated values. However, interestingly, it is not case sensitive if the right operand is a range expression (min-max).

 

"String ranges (i.e. a-d) can also be specified." -- Help on the Tester

 

 

Case Sensitive

 

Left ValueOperatorRight ValueOutputbIna,b,cPassedBIna,b,cFailedbInA,B,CFailedBInA,B,CPassedCase Insensitive

 

Left ValueOperatorRight ValueOutputbIna-cPassedBIna-cPassedbInA-CPassedBInA-CPassed

 


Forum|alt.badge.img+7
takashi wrote:
Yes, the In operator is case sensitive if the right operand is a comma separated values. However, interestingly, it is not case sensitive if the right operand is a range expression (min-max).

 

"String ranges (i.e. a-d) can also be specified." -- Help on the Tester

 

 

Case Sensitive

 

Left ValueOperatorRight ValueOutputbIna,b,cPassedBIna,b,cFailedbInA,B,CFailedBInA,B,CPassedCase Insensitive

 

Left ValueOperatorRight ValueOutputbIna-cPassedBIna-cPassedbInA-CPassedBInA-CPassed

 

Well, that is confusing....

 


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • March 29, 2017

OK. I shall complete the work.

!= > < >= <= are all case sensitive.

Begins With and Ends With are case INsensitive.

Contains Regex (FME 2016.1+) and Matches Regex (FME 2016.0) are case sensitive, although the Regular Expression Editor for them works always with case INsensitive...


brianatsafe
Safer
Forum|alt.badge.img+11

Hi All,

 

 

We have updated the documentation as of b17460. Thanks for all your help.

"The operators Like, Contains, Begins With, and Ends With are not case sensitive. The other operators are case sensitive."

 

 

Thanks!

 


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • May 3, 2017
brianatsafe wrote:

Hi All,

 

 

We have updated the documentation as of b17460. Thanks for all your help.

"The operators Like, Contains, Begins With, and Ends With are not case sensitive. The other operators are case sensitive."

 

 

Thanks!

 

Hi @BrianAtSafe, thanks for the update on the help doc.

 

It would be better if the Regular Expression Editor for the Contains Regex opertor could work in case sensitive so that it would be consistent with case sensitivity of the operator.

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings