Query service warnings related to unknown data types

When the query service encounters the Unknown data type while processing queries, it might return a warning.

The query service allows expressions to reference in-database functions whose signature (input and output types) is unknown to IBM® Cognos® Analytics. As queries are validated and planned, the query service checks the data type information. If the data type is Unknown, a warning might be returned.

A known issue exists with the IBM JCC (JDBC) driver and Db2 where the expected response from JDBC DatabaseMetadata.getFunctionColumns method is not returned. Consequentially, the return type of the function is unknown to the query service from the model, which results in a warning.

To work around this issue, you can enclose the in-database function in another function that is known to the query service, such as CAST. For example, CAST( myUDF ( ... ) , integer ). Then, the query service uses the data type information that is returned by that function.

Note: It's not mandatory to import a function into a Framework Manager model before a function can be referenced in an expression. By importing a function, the metadata, including the data type, about the function is made available to the query service.