Datomic version = 0.9.5981
Presto cli version = 323
I have a currency entity that has a component attribute amount that is a bigdec.
I specified the scale as :currency/amount {:scale {:amount 4}}
in the meta schema, but I still get a Rounding necessary error. Appreciate any tips and pointers!
presto:my_db> select money__amount from ledger_balan
ce;
Query 20200303_184058_05353_wxc8b, FAILED, 1 node
Splits: 17 total, 0 done (0.00%)
0:01 [0 rows, 0B] [0 rows/s, 0B/s]
Query 20200303_184058_05353_wxc8b failed: Rounding necessary
Hi Ikuru,
This error indicates that you have data stored in Datomic with higher precision that you’re specifying for the :scale
option.
You need to provide a :scale
that is large enough to cover any values for that attribute in your Datomic system.
-Marshall
Hi Marshall, thanks for taking a look!
My coworker figured out that the attribute part needed to be fully qualified.
Incorrect = :currency/amount {:scale {:amount 4}}
correct :currency/amount {:scale {:currency/amount 4}}
My tiny feedback is the metaschema doc would be more helpful if it had concrete examples.
Anyhow, very excited with this feature and the avenues they open up!