MSCEWI3093
NUMBER datatype smaller precision was increased to match scale
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Severity
Low
Description
This issue happens when a NUMBER has a smaller precision than its scale. Snowflake does not support this feature, and this message is used to indicate that the precision's value was increased to maintain equivalence.
Please consider that there are cases where this issue can either stack alongside other known transformations or not happen at all. For example, cases where the scale is replaced by 19 and the former precision is greater than 19; will NOT trigger this EWI.
Example Code
Input Code:
CREATE TABLE number_data_type_table(
col1 NUMBER(4, 5)
);
INSERT INTO number_data_type_table (COL1) VALUES(0.00009);
INSERT INTO number_data_type_table (COL1) VALUES(0.000021);
INSERT INTO number_data_type_table (COL1) VALUES(0.012678912);
SELECT * FROM number_data_type_table;
Output Code:
CREATE OR REPLACE TABLE PUBLIC.number_data_type_table(
col1 NUMBER (5,5) /*** MSC-WARNING - MSCEWI3093 - NUMBER DATATYPE SMALLER PRECISION WAS INCREASED TO MATCH SCALE ***/ /*** MSC-WARNING - MSCEWI1066 - NUMBER TYPE COLUMN MAY NOT BEHAVE SIMILARLY IN SNOWFLAKE ***/
INSERT INTO number_data_type_table (COL1) VALUES(0.00009);
INSERT INTO number_data_type_table (COL1) VALUES(0.000021);
INSERT INTO number_data_type_table (COL1) VALUES(0.012678912);
SELECT * FROM PUBLIC.number_data_type_table;
Recommendations
No end-user action is required.
If you need more support, you can email us at [email protected]
Last updated