Skip to main content
Solved

WHERE Clause can read text with macronated o, but fails to read a User Parameter with same text macronated o.


alicevdb
Contributor
Forum|alt.badge.img+4

Context: Feature Type with a WHERE clause
Purpose: To only read records relating to a user defined Iwi (Maori Tribe).

When the WHERE Clause is, for example: "IWI"='Whakatōhea', the transaction is successful and returns the expected records.


 

However, when the WHERE Clause is set with a User Parameter "IWI"='$(IWI)'
and the User Parameter is set with the value Whakatōhea, the transaction is successful but no records are found.


This behavior is only affecting records with macronated vowels, which is common in Maori language. 
 

Users need to be able to input their Iwi of interest for this workbench.
Can anyone suggest where the WHERE clause setup might fail?

Many thanks

 

 

Best answer by david_r

It could also be an encoding problem when referencing parameters with extended characters. I would try the workaround suggested by  @nielsgerrits. You could also insert a Logger just after the AttributeCreator to see if the special characters have been maintained.

Also, if you’re using FME < 2022, you may want to upgrade as there were a lot of improvements in how special characters are handled in 2022.

View original
Did this help you find an answer to your question?

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

Not sure if this still applies, but in 2021 using a parameter in a where clause directly did not work anymore for the FeatureReader in combination with SDE. We solved this by adding an AttributeCreator upstream of the FeatureReader which created an WhereClause attribute. This attribute was then used in the FeatureReader.


david_r
Celebrity
  • Best Answer
  • October 4, 2024

It could also be an encoding problem when referencing parameters with extended characters. I would try the workaround suggested by  @nielsgerrits. You could also insert a Logger just after the AttributeCreator to see if the special characters have been maintained.

Also, if you’re using FME < 2022, you may want to upgrade as there were a lot of improvements in how special characters are handled in 2022.


alicevdb
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • October 7, 2024

Thanks @nielsgerrits and @david_r , 
I have created an Attribute Creator upstream and used it in the WHERE clause instead of using the User parameter directly.
I also used a Logger to check my special characters (just in case) > they were maintained.

I am currently on FME 2021.2 and your solution works. Thanks very much.
Once I upgrade to a later version, I will be curious to see if this workaround is still needed.
Thanks very much :)!!


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