Created 11-03-2017 11:13 PM
Tested simple Nifi flow ExecuteSQL -> PutDatabasRecord
ExecuteSQL reads data from table (named decimal_test) having columns with decimal data type (from Postgres database).
The output flowfile (avro file) from ExecuteSQL passed to PutDatabaseRecord which loads the data to the same table (decimal_test) in the Postgres database.
ExecuteSQL property 'user avro logical types' is set to true.
Here is the result:
Decimal column | Original Table values in Postgres database | Table migrated from Postgres to Postgres using Nifi |
decimal(18,0) | 123456789012345678 | 123456789012346000 |
decimal(18,4) | 12345678901234.1234 | 12345678901234.1000 |
decimal(36,0) | 123456789012345678901234567890123456 | 123456789012346000000000000000000000 |
decimal(36,4) | 12345678901234567890123456789012.1234 | 12345678901234600000000000000000.0000 |
Is is a bug in Nifi or am I missing something here..?
Please advice. Thanks.