When I generate a contract from an Oracle ddl, using datacontract-cli import command as:
datacontract import --format sql --source dummy.sql --dialect oracle --output dummy.yaml
and then run datacontract-cli test as:
datacontract-cli test --server prod dummy.yaml
the command fails with:
ERROR:root:Run operation failed: [lint] Check that data contract YAML is valid - None - ResultEnum.failed - data.schema[0].properties[4].logicalTypeOptions must not contain {'precision', 'scale'} properties - datacontract
WARNING:root:Data Contract YAML is invalid. Validation error: data.schema[0].properties[4].logicalTypeOptions must not contain {'precision', 'scale'} properties
Below is the related schema property from the generated yaml:
- name: CUSTOMER_NUMBER
physicalType: NUMBER(9, 0)
logicalType: number
logicalTypeOptions:
precision: 9
scale: 0
If I remove the precision and scale manually, the test commands now fails stating:
data contract is invalid, found the following errors:
- CUSTOMER_NUMBER Check that field CUSTOMER_NUMBER has type NUMBER(9, 0): Type Mismatch, Expected Type: NUMBER(9, 0);
Actual Type: NUMBER
When I generate a contract from an Oracle ddl, using datacontract-cli import command as:
datacontract import --format sql --source dummy.sql --dialect oracle --output dummy.yamland then run datacontract-cli test as:
datacontract-cli test --server prod dummy.yamlthe command fails with:
ERROR:root:Run operation failed: [lint] Check that data contract YAML is valid - None - ResultEnum.failed - data.schema[0].properties[4].logicalTypeOptions must not contain {'precision', 'scale'} properties - datacontract
WARNING:root:Data Contract YAML is invalid. Validation error: data.schema[0].properties[4].logicalTypeOptions must not contain {'precision', 'scale'} properties
Below is the related schema property from the generated yaml:
physicalType: NUMBER(9, 0)
logicalType: number
logicalTypeOptions:
precision: 9
scale: 0
If I remove the precision and scale manually, the test commands now fails stating:
data contract is invalid, found the following errors:
Actual Type: NUMBER