Hi Experts,
IHAC moving data from Oracle to Vertica (using Dataiku DSS).
What is the best rule to convert varchar2(N CHAR) to a varchar(n bytes) in vertica.
From documentation :
When using multibyte UTF-8 characters, the fields must be sized to accommodate from 1 to 4 octets per character, depending on the data. If the data loaded into a VARCHAR/CHAR column exceeds the specified maximum size for that column, data is truncated on UTF-8 character boundaries to fit within the specified size.
https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/SQLReferenceManual/DataTypes/CharacterDataTypes.htm?TocPath=SQL Reference Manual|SQL%20Data%20Types|_____3
Is it a good solution to convert varchar2(N CHAR) in Oracle to varchar(4*N) in Vertica? any better way?
Example : the following Thai text that is 25 CHAR but 75 bytes "ผลิตและจำหน่ายระเบิดเพื่อ"
dbadmin=> create table test(a char(25));
CREATE TABLE
dbadmin=> insert into test values('ผลิตและจำหน่ายระเบิดเพื่อ');
ERROR 8682: String of 75 octets is too long for type Char(25) for column a
dbadmin=>
Many thanks.
mkheir