GoogleCloudPlatform / GoogleCloudPlatform/professional-services-data-validator

validate schema: Oracle NUMBER with negative scale not supported

Open
#898 2 comments 0 reactions 0 assignees View on GitHub
priority: p3
Dominant language
Python
Stars
524
Forks
171
Avg merge
5d 15h
Merged PRs (30d)
4

Description

Test table:
```
CREATE TABLE tab_mscale
( id NUMBER(8) NOT NULL PRIMARY KEY
, col_num_6_m2 NUMBER(6,-2)
);
INSERT INTO tab_mscale VALUES (1,123400);
COMMIT;
```

Test:
```
data-validation validate schema -sc=ora_local -tc=ora_local -tbls=dvt_test.tab_mscale
...
raise ValueError('Decimal type scale cannot be negative')
ValueError: Decimal type scale cannot be negative
```

Solution:

If we find an Oracle column with a negative scale then we can convert it to zero.

Negative scale is pretty rare and therefore this is a low priority issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.