0

Where can I set the locale for translators and what is the accepted format. E.g. I have seen instances where the locale is set as nl_NL, nl-NL. I want to force the locale of Teiid Springboot to be UTF-8 in order to make sure that ORDER BY clauses are correctly pushed down to the source. I figured that I have to set org.teiid.collationLocale, but the documentation for the correct locale points to an outdated Java 6 page. https://teiid.github.io/teiid-documents/master/sb/admin/System_Properties.html

We use the default Teiid Oracle translator and use Hikari for our datasources. The documentation of the translators points to setting the collation for translators in the execution factory; As far as I know we don't use those right now. https://teiid.github.io/teiid-documents/master/sb/dev/Translator_Capabilities.html

What are the steps I should take to force the locale for the engine to UTF-8 and do the same for the translators?

Note: we use a DDL with data wrappers to specify our connection to our Oracle sources.

Kusters
  • 28
  • 1

1 Answers1

0

There is no collation support directly on order by clauses. The best you can do is inform the engine (org.teiid.collationLocale property) what collation it should be using and set a collation execution property on each translator to inform the engine as to what the translator will use, then Teiid can choose not to push orderings if there is a mismatch.

Steven Hawkins
  • 538
  • 1
  • 4
  • 7
  • What would be a good value for org.teiid.collationLocale? Is nl_NL or nl-NL for the Netherlands or something else? How do I set a translator collation? Can I do that with a translator override in the DDL? – Kusters Feb 15 '21 at 11:45
  • The value is expected in the Java format see https://www.oracle.com/java/technologies/javase/jdk8-jre8-suported-locales.html nl-NL is probably what you want. On the translator it's the CollationLocale execution property, which yes can be set as DDL in the options clause of your create foreign data wrapper statement. – Steven Hawkins Feb 16 '21 at 13:31