StreamBase JDBC data type conversions

StreamBase JDBC data type conversions

book

Article ID: KB0083347

calendar_today

Updated On:

Products Versions
TIBCO Streaming -

Description

Some database column types are not supported. What can we do to convert those to StreamBase types?

Resolution

The known type conversions used in JDBC SQL statements are documented in the StreamBase Help topic:
  TIBCO StreamBase Documentation > Authoring Guide > Using JDBC Data Sources > How the Query Operator Works with JDBC Tables
  
Section: "Result Set Column Type Conversions".

For other types supported by your database, in the SQL SELECT statement use a cast to one of the supported types.

For example, if database column "factor" is of Oracle type BINARY_DECIMAL, use:
  SELECT CAST(factor,NUMERIC) as factor from scaletable
which would become a double type in the StreamBase schema.

Besides CAST() there are other conversion functions available for most databases. Please refer to your database documentation.

Issue/Introduction

How to handle type conversions from database-specific types.