-
1. Re: Division in MSSQL View materialization
rareddy Dec 13, 2016 1:35 PM (in response to mtawk)Try with importer property "widenUnsignedTypes", may be it will be double in both cases.
-
2. Re: Division in MSSQL View materialization
shawkins Dec 13, 2016 3:05 PM (in response to rareddy)> In MSSQL JDBC metadata,the type 8 refers to float not to double.
Can you clarify that? The 8 constant refers to java.sql.Types constants, where DOUBLE=8 and FLOAT=6
From float and real (Transact-SQL) real and float(1-24) would map to a java/Teiid float. And float(25-53) would map to a java/Teiid double.
Testing against SQL Server I see that float(1) will be reported as a FLOAT type and float(25) will be reported as a DOUBLE as expected.
-
3. Re: Division in MSSQL View materialization
mtawk Dec 14, 2016 2:47 AM (in response to rareddy)"widenUnsignedTypes" is already set to true, but it deals only with small int, tiny int and integer data types.
-
4. Re: Division in MSSQL View materialization
mtawk Dec 14, 2016 5:58 AM (in response to shawkins)When getting Teiid resultset metadata from the view query for the division column, it is returning the data type "7" and data type name "float".
So accordingly, the materialization table and stage table are created in mssql and the division column in the table is given the data type float.
To get the corresponding datatype in mssql, i'm using SQLServer2008Dialect.getTypeName(sqlType, length, precision, scale) and it is returning only "float" without the length.
The problem was solved when i have added manually the length to the float datatype in the view table creation script, in my case it was float(22).