# \[Analytics\] Query big decimal column/scale option not working?

**URL:** <https://forum.datomic.com/t/analytics-query-big-decimal-column-scale-option-not-working/1376>\
**Category:** Troubleshooting\
**Created:** [March 3, 2020, 6:43pm UTC](https://forum.datomic.com/t/analytics-query-big-decimal-column-scale-option-not-working/1376 "2020-03-03T18:43:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iku000888](https://avatars.discourse-cdn.com/v4/letter/i/71c47a/32.png) [@iku000888](https://forum.datomic.com/u/iku000888)\
**Post date:** [March 3, 2020, 6:43pm UTC](https://forum.datomic.com/t/analytics-query-big-decimal-column-scale-option-not-working/1376/1 "2020-03-03T18:43:58Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![marshall](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/marshall/32/48_2.png) [@marshall](https://forum.datomic.com/u/marshall)\
**Post date:** [March 5, 2020, 2:38pm UTC](https://forum.datomic.com/t/analytics-query-big-decimal-column-scale-option-not-working/1376/2 "2020-03-05T14:38:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![iku000888](https://avatars.discourse-cdn.com/v4/letter/i/71c47a/32.png) [@iku000888](https://forum.datomic.com/u/iku000888)\
**Post date:** [March 6, 2020, 2:27am UTC](https://forum.datomic.com/t/analytics-query-big-decimal-column-scale-option-not-working/1376/3 "2020-03-06T02:27:35Z")

</div>

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!
