I am writting SQL in Teiid Designer. It looks like: "SELECT null as START_DATE, null as OT_ID, ab.C1 as DESCRIPTION from AAA.BBB as ab, AAA.CCC as ac".
I use "null as <COLUMN_NAME>" here since I do not want to set these values but Designer force me to set them otherwise error will prompt.
The error messages are:
The column 'START_DATE' with runtime type 'date' does not match the runtime type 'string' from the query transformation.
The column 'OT_ID' with runtime type 'biginteger' does not match the runtime type 'string' from the query transformation.
How should I write this SQL? I remember in the documentation, "null" can be converted into any types implicitly.
Use "cast(null as date) as START_DATE". While null is implicitly convertable, the desiger does not currently automatically change the types of the select clause to match the view. You can use the reconsiler dialog to have designer add the conversion functions for you.