Number of decimal places using i18n map

Applies to: Denodo 8.0 , Denodo 7.0 , Denodo 6.0
Last modified on: 26 May 2020
Tags: Type conversion i18n

Download document

You can translate the document:

Goal

This document describes how to configure the i18n maps in order to get a specified number of decimal places for FLOAT fields.

Content

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:
  • doubledecimalposition:2


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:

  1. 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:
  1. DESC VQL MAP i18n us_pst;
  1. Copy the CREATE command returned by the desc command. Don't use the DROP command.
  2. 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:
  1. CREATE MAP i18N us_pst (

);

  1. Change the double decimal positions to the number required, for instance, to use 4 significant digits replace the line:
            
    'doubledecimalposition' = '2'

with:
         'doubledecimalposition' = '4'

  1. Execute the modified CREATE command in the VQL Shell.
  2. 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.
  3. 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:
  1. Go to the Administration menu in the VDP Admin Tool and click on Server Configuration > Default i18n.
  2. 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:
  1. Go to the Administration menu in the VDP Admin Tool and click on Database Management.
  2. Select the database to modify the i18n and click the button “i18N”.
  3. 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.

Questions

Ask a question
You must sign in to ask a question. If you do not have an account, you can register here

Featured content

DENODO TRAINING

Ready for more? Great! We offer a comprehensive set of training courses, taught by our technical instructors in small, private groups for getting a full, in-depth guided training in the usage of the Denodo Platform. Check out our training courses.

Training