You can translate the question and the replies:

Issues Regarding Decimal datatype in denodo

Hi Team, I am very frustated with this decimal datatype related issue. Can someone from team solve or atleast clear if it is a denodo server behaviour. I am creating a table something like below, **Table I created using the below syntax:** create materialized table testdecimal(decimalCol : decimal); **After this I am inserting the following values:** insert into testdecimal values('1234.12345'); insert into testdecimal values('123456789123456.1111111111'); insert into testdecimal values('1234567891234567.111111111'); insert inot testdecimal values('12345678912345678.11111111111'); insert inot testdecimal values('12345678912345678.11'); **Result** I am seeing as 4 rows got updated but in reality if I perform select on that particular table by using** select * from testdecimal**, I was seeing only two values(i.e., 1234.12345, 123456789123456.1111111111) and the remaining three values I was unable to see. After carefully analysing I was able to find that, if the number of digits before decimal point is greater than 15 then whatever be the scale, the value is not getting inserted into the database. **Is this a known problem or is there any workaround that we could try?** **Note**: I am seeing decimal types **(precision,scale) = (38,20)** in getColumns() metadata call.
user
13-01-2023 07:16:44 -0500
code

1 Answer

Hi, It is my understanding that a materialized table requires a cache database to be configured to use with. By default, the cache module stores the cache data in the Apache Derby database embedded in Virtual DataPort. However, [Denodo strongly recommend using an external Database Management System (DBMSs) for this task, especially in production environments](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/general_architecture/logical_layer/data_module_cache). I have created two test cases with different types of databases as cache. With the test of the embedded derby database, I was able to reproduce the same as you mentioned. And with the test case of the external oracle database, all 5 records are successfully inserted and retrieved as the same value with precision. You can configure your VDP platform to use a different database than embedded Derby. In your design studio, simply go to Administration > Server configuration then find CACHE > Connection to configure external database. [More details can be found from this Denodo documentation](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/server_configuration/configuring_the_cache/configuring_the_cache). Hope this helps.
Denodo Team
19-01-2023 23:54:02 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here