Unicode Session Charset Support

Teradata® Python Package User Guide

brand
Teradata Vantage
prodname
Teradata Python Package
vrm_release
16.20
category
User Guide
featnum
B700-4006-098K

The Teradata Python package uses Teradata SQL Driver which defaults to, and only supports, the UTF-8 session character set while connecting to Vantage. No other session character sets are supported.

To work around this limitation, users can set the charset by using the following SQL's after connection is established using create_context or set_context.

get_connection().execute(‘SET SESSION CHARSET ‘utf-8’ ’)
Or
get_connection().execute(‘SET SESSION CHARSET ‘utf-16’ ’)