Skip to main content

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

 

 

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.


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.


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 🙂!!


Reply