Hi All, I’m working on integrating data with GoodD...
# gooddata-cloud
a
Hi All, I’m working on integrating data with GoodData, and I’m running into an issue with handling decimal values in the source column. Does anyone know what the source column data type should be to properly handle decimal values and integer in GoodData? cc. @Daniel Stourac (formFieldType(field.type) === 'NUMERIC') { formFieldArray.push(
CAST(nullif("customFields"::jsonb->> '${field.id}','') AS NUMERIC) AS "${label}"
) fact.push({ description: label, id: fieldId, sourceColumn: label, sourceColumnDataType: 'NUMERIC', tags: ['Custom Intake Responses'], title: label
👀 1
d
Hi Anjali, GoodData uses only two Source Types for numbers: INT and NUMERIC. As you would expect, NUMERIC is the one you want for decimal values. However ... GD extracts your data from your own database and databases can differ in their handling of numbers. I have tested it on Snowflake using the attached LDM. Snowflake specifically provides: • decimal numbers when cast as FLOAT and when not cast at all • rounded numbers when cast as INT or NUMERIC. So, if you use Snowflake, I'd recommend no casting in the SELECT statement and NUMERIC datatype in the LDM. But casting in SELECT can be different for a different database.
This is the LDM I've used for testing. I used it against the GoodData trial database, so you can test it yourself.