This document describes how to configure the i18n maps in order to get a specified number of decimal places for FLOAT fields.
When dealing with FLOAT fields, it is important to notice that they are truncated following the Internationalization configuration for the query executed, the view or the VDP server.
The definition of the number of decimal positions in the Virtual DataPort server is defined in the i18n maps that are being used.
In order to know the number of decimal positions allowed by a specific i18n, the following command can be executed in the VQL Shell:
- desc map i18n i18n_used;
- Where i18n_used is the one selected for the VDP server or the base view (es_euro, us_pst, etc.)
- The following property displays the allowed decimal positions:
To change the number of allowed decimal positions, a new i18n map can be created and used by the query, view or the whole server. To do so:
- Execute the following command in the VQL Shell:
desc vql map i18n <name_of_the_i18n_map_used>;
For example, if the us_pst i18n map is used in the view, the following command should be executed:
- DESC VQL MAP i18n us_pst;
- Copy the CREATE command returned by the desc command. Don't use the DROP command.
- Replace the name with the desired one for the new i18n. In the first line of the CREATE command, the name is the string between the i18N and the parenthesis, for example:
- CREATE MAP i18N us_pst (
- Change the double decimal positions to the number required, for instance, to use 4 significant digits replace the line:
'doubledecimalposition' = '2'
'doubledecimalposition' = '4'
- Execute the modified CREATE command in the VQL Shell.
- Replace the old i18n with the new i18n map for the view. To do this, open the base view, go to the Options dialog of the view, click the tab Search Methods, select the new i18n and save the changes.
- Execute it in the VQL Shell to check that the view is using the new i18n map.
If this new i18n map is the one to be used for all the new views from now on, the default i18n of the server can be changed.
- To change the server i18n:
- Go to the Administration menu in the VDP Admin Tool and click on Server Configuration > Default i18n.
- Select the new i18n map as the default server i18n.
For versions prior to Denodo 7.0 version the i18n can also be changed at database level.
- To change the database i18n:
- Go to the Administration menu in the VDP Admin Tool and click on Database Management.
- Select the database to modify the i18n and click the button “i18N”.
- Select the new i18n map as the default database i18n.
To use this new 18n map for the old views, Go to the Options dialog of the view, click the tab Search Methods of the already created base views and select the new i18n.