sandeepmohan23 / yfai_data_migration

YFAI Data Migration
0 stars 0 forks source link

Chinese character length issue during import #8

Closed rajender2k closed 7 years ago

rajender2k commented 7 years ago

We noticed Chinese characters in yf5_CustomerPartName attribute on A9_PartCustomerInfoStorage class. yf5_CustomerPartName has MAX attribute length is 32 chars.

Each Chinese char takes 2 or 3 bytes in UTF8 database. So we are hitting MAX length.

SELECT * FROM NLS_DATABASE_PARAMETERS WHERE parameter IN ('NLS_NCHAR_CHARACTERSET','NLS_CHARACTERSET');

Results: TARGET: NLS_CHARACTERSET AL32UTF8 NLS_NCHAR_CHARACTERSET AL16UTF16

SOURCE: NLS_CHARACTERSET AL32UTF8 NLS_NCHAR_CHARACTERSET AL16UTF16

rajender2k commented 7 years ago

yf5_CustomerPartName/NG4_PARTCOMPANY lengths in source n target SRC: PNG4_PARTCOMPANY VARCHAR2(255)

TGT: PYF5_CUSTOMERPARTNAME VARCHAR2(32)

rajender2k commented 7 years ago

@premshankar1 find the script and input xml chinese_char_issue.zip

Siemens-PLM commented 7 years ago

GTAC updated the IR and I think the two options we have are somehow truncate the values by bytes or increase the target property length... I think it would be easier to just increase the field length.

rajender2k commented 7 years ago

All, Email thread going on with different teams on this IR... Below is from POM team All,

Again, I believe it is best to do the data alterations AFTER export and BEFORE import.

If you are not able to come up with a good solution using this approach let me know.

I/we (POM) team might be able to come up with some type of hack, but I would rather not do this if there is an alternative solution.

Let me know if there are any questions.

-Tim