SAP Knowledge Base Article - Public

3545940 - Decimal Data Type Mismatch in Datasphere Graphical View

Symptom

  • The calculated column in the Datasphere graphical view has a mismatching Data Type value than SAC or Hana Database.
  • The issue causes values to be rounded off.
  • The issue can occur in different front end tools.

Environment

SAP Datasphere 2024.24 and beyond

Reproducing the Issue

  1. Open the view
  2. Open the Measure in the formula and check the Data Type. It will show as example Decimal (38, 21)
  3. Check the data definitions from the Database Explorer for this table, the Data type is displayed as Decimal(34)

Cause

The SQL view level in HANA decides the data type based on the formulas/functions used. This can lead to discrepancies between the data type displayed in the graphical view and the actual data type in the database.

Resolution

  • Modify the expression of the calculated column to include the TO_DECIMAL function as follows:
    TO_DECIMAL(<value> [, <precision>, <scale>])
  • This ensures that the data type remains consistent when exposed to Tableau / SAC, preventing rounding off of values

See Also

Keywords

Decimal Data Type, Graphical View, TO_DECIMAL function, rounding off, Tableau, SAC, precision, scale, calculated measure , KBA , DS-MD-VIW , Views , DS-MD , Modeling (Data Builder) , DS-MD-AM , Analytic Model , Problem

Product

SAP Datasphere all versions