When we ingest the Data from MSSQL Database and update the MSSQL.xml file from Talend Project-->General-->Metadata Talend Type as follow,
<dbType type="FLOAT">
<talendType type="id_Float" default="true" />
the output looks like below, which is we desired.
348|39.2
349|15.4
350|8.8
351|46.8
352|47.2
353|7.2
354|25.2
when using dynamic data mapping, it is unable to replicate the same result, and the data looks like below
348 - 39.2
349 - 15.400000000000006
350 - 8.799999999999997
351 - 46.8
352 - 47.2
353 - 7.200000000000003
354 - 25.200000000000003
workaround: is to use STR in the SQL queries and it will give desired result.
"SELECT dbo.FLOAT_TEST.Col1,
STR(dbo.FLOAT_TEST.Col2,6,1) strCol2
FROM dbo.FLOAT_TEST"
https://learn.microsoft.com/en-us/sql/t-sql/functions/str-transact-sql?view=sql-server-ver16