Apply data formats in data view

Apply data formats in data view

Summary

Data formats make it possible to modify the values of data view columns and configure when the content is JSON type.

To apply a format you must select the option Configure data type and column format and you could select:
  1. The column on which you want to apply the format
  2. The type of column data



Format of numbers

You can modify the numerical formats of the columns and then put it in the API method in the way you want.

Example

In this example, a format is applied on column S to modify the original 1200.5 format to the desired output format 1.200.50.




Once the formats have been applied, they can be previewed in the last revision step.



When configuring numerical formats, you should take into account the following reference:
0: Dmitry
#: Day, zero absent
. (point): Decimal separator
, (coma): Thousand separator
- : Less sign
$: Currency sign

Format of origin

You should first identify what the source format (the one you see in the preview of the data view) and indicate this in the Source Format option.

Some examples of formats to be configured according to the source formats of the data.

Format of origin
Format configuration
Type
1,234
1.1234
11234
#,####
Predefined
$1,234
$1,234
$1234
$#,###
Predefined
1,234.99
1234.99
1.234,99
1234,99
123499
#,###.##
Predefined
$1,234.99
$1,234.99
$1234.99
$1234.99
$1,234.99
$####.##
Predefined
1,234.999999
1,234,999999
1234,999999
1234,999999
##############
Customized

When indicating the source format you must always enter the thousands and decimal separators in the Anglo-Saxony format, irrespective of the separators used in their data source.

Then you should select which the indicators of thousands and decimal places, the options are.
  1. , (coma)
  2. . (point)
For example, if its source format is 1,500.88 you should select as format #,####.###, as a separator of thousands the point and as decimal separator the comma.

Output format

To configure the output format, you must follow the same criteria indicated above for the source formats. The output format is as the numerical values would be displayed.

Format configuration
Type
Location
Output format
#,####
Predefined
Spain/Latam
1.234
#,####
Predefined
Usa
1,234
$#,###
Predefined
Spain/Latam
$1,234
$#,###
Predefined
Usa
$1,234
#,###.##
Predefined
Spain/Latam
1.234,99
#,###.##
Predefined
Usa
1,234.99
$####.##
Predefined
Spain/Latam
$1,234.99
$####.##
Predefined
Usa
$1,234.99
##############
Customized
Spain/Latam
1.234,99
##############
Customized
Usa
1.234,99
#,###.00000
Customized
Spain/Latam
1,234,99000
#,###.00000
Customized
Usa
1,234,99000

The selected location would define the separators of thousands and decimal. For example, location Spain/Latam would use the point as a separator of thousands, and the comma as decimal separator.
By adding "0" in the custom format, you would be forced to complete with 0 if no decimal places are found


Date format

You can modify the date formats of the columns and then set it in the API method as you want.

Example

This example applies a format on column D to modify the original format to the desired output format.



Once the formats have been applied, they can be previewed in the last revision step.




Format of origin


The first thing to do is select the source format pattern. The options are as follows:
  1. yyyy/MM/ddd
  2. yyy-MM-ddd
  3. dd/MM/yyyyyy
  4. dd-MM-yyyyyy
  5. M/dd/yyyyyy
  6. M-dd-yyyyyy
In the event that none of the above is the one you are looking for, you can customize the pattern of the date.

Output format

Once the source patron has already been completed, the output pattern must now be configured. The options are the same
  1. yyyy/MM/ddd
  2. yyy-MM-ddd
  3. dd/MM/yyyyyy
  4. dd-MM-yyyyyy
  5. M/dd/yyyyyy
  6. M-dd-yyyyyy
You also have the possibility to customize the output format if none of the above is the option sought.

Completed, you must now select the location used to represent the view output format.

JSON format

If the values in the column are JSON objects or lists, you should select this format. This JSON format definition of a column with JSON content would allow you to correctly manage the output format of your API method.



    • Related Articles

    • What is a data view

      Summary The platform does not require an off-line ETL process to extract data from the origins, but associated with the view, find a set of rules that the data engine interprets for check the source on demand or periodically, extract the data updated ...
    • Add filters and parameters in data view

      Summary Data views allow you to add fixed or dynamic filters, these are parameters. Fixed filters To add a filter you must click on the option Filter data. A form would be displayed where you should select the column on which the filter, the type of ...
    • Select data and headers

      Summary Data views allow you to select the data and define the headers or titles that would be available in APIs methods. It is possible to make selections from the entire table, columns, column intersections and rows. In addition, it is possible to ...
    • Add aliases in data view columns

      Summary APIs method templates allow you to obtain the values of the data view columns by position or alias name. Here we explain how to configure the aliases of the data view columns. Add alias To add aliases to the data view columns you must select ...
    • Data sources from REST/json web services

      Summary The REST/JSON web services connector offers all the capabilities needed to connect to such sources. This option allows you to collect data from REST/JSON web services or configure writing actions, and then create data views and exhibit them ...