PPM Schema report column data size / length mismatch
book
Article ID: 279937
calendar_today
Updated On:
Products
Clarity PPM SaaSClarity PPM On Premise
Issue/Introduction
When running the report PPM Schema, seeing a mismatch between attribute data size in Object and the table column length displayed in Jaspersoft report PPM Schema
Resolution
The report PPM Schema refers to the database table column length. This can be found by running DESCRIBE on the database table. The lengths for describe from the database will match correctly on what you are seeing in the PPM Schema report so this is expected.
Now where you see a difference is the size of attribute in Clarity Studio versus the database column length.
For example, the attribute INV_INVESTMENTS.NAME you referred to, which is 256 in Clarity UI and 768 as length in the database:
This is normal and expected as we use multibyte encoding AL32UTF8. The database column length is actually in Bytes, and the field INV_INVESTMENTS.NAME will hold 768 UTF-8 Bytes, which does not completely match the character amount in Clarity UI.
For example, special characters will take 1 character in Clarity and this character may take between 1-4 bytes in database. This is why we allow for additional database length that is not exposed to Clarity users.
Note this is not a very exact amount and varies per character.
As per Oracle documentation:
Character length and byte length semantics are supported to resolve potential ambiguity regarding column length and storage size. Multibyte encoding character sets are supported, such as UTF-8 or AL32UTF8. Multibyte encodings require varying amounts of storage per character depending on the character. For example, a UTF-8 character may require from 1 to 4 bytes. If, for example, a column is defined as CHAR (10), all 10 characters fit in this column regardless of character set encoding. However, for UTF-8 character set encoding, up to 40 bytes are required.
The PPM Schema report will only report on database column length, which is expected.
If you would like to report on attribute data size, you have to build a report on ODF_CUSTOM_ATTRIBUTES or other similar tables with PPM Bean Datasource.