...
The Oracle
NUMBER
data type with undefined precision and scale is mapped to the CDAPdecimal(38,0)
data type.
While plugin versions 1.9.1, 1.8.4, and 1.8.5 are backward incompatible, pipelines working with earlier versions might not work after upgrading to versions 1.9.1, 1.8.5, and 1.8.4, if a downstream stage in the pipeline relies on the output schema of the source because the output schema has changed. When there is an output schema defined for the Oracle NUMBER
data type defined without precision and scale in the previous plugin version, then after upgrading to versions 1.9.1, 1.8.5, or 1.8.4, the Oracle batch source plugin throws a schema mismatch error for the such types stating: Schema field '<field name>' is expected to have type 'decimal with precision <precision> and scale <scale> but found 'string'. Change the data type of field <field name> to string.
...
The special case is when you use a macro for the database name, schema name, or table name, and if you haven't manually specified an output schema. Thus, the schema gets detected and mapped at runtime. The older version of the Oracle batch source plugin maps the Oracle NUMBER
data type defined without precision and scale to the CDAP decimal(38,0)
data type, while versions 1.9.1, 1.8.5, and 1.8.4 and higher will map such data types to string
at runtime.
Recommendation
To resolve the possible precision loss issue while working with Oracle NUMBER
data types with undefined precision and scale, upgrade your pipelines to use Oracle batch source plugin versions 1.9.1, 1.8.5, or 1.8.4.
...