Iam using Dremio to query multiple data sources. I have a Source DB as SAPIQ with a ‘DateTime’ column as the datatype with value such as “2002-11-11 10:04:20” (FORMAT : YYYY-MM-DD hh:mm:ss).
The issue is when I query the tables “Select * from TableABC” then I get a nullpointer exception with Datetime not being able to convert to timestamp.
However the below query works when I specify the columns with cast function.
{
SELECT ColumnA, ColumnB, CAST(ColumnTS as VARCHAR), ColumnD FROM TableABC;
}
Please note source DataType is DATETIME in SAPIQ.
Dremio converts it to Timestamp but throws nullpointer and the query works only if i convert Timestamp to VARCHAR as shown above.
This above query works as I am having an explicit conversion. But my issue is i want the conversion to be implicit such that Select * from TableABC
is able to fetch me the results without any NullPointerException.
I have already tried the below in “src/main/resources/arp/implementation/sybase-arp.yaml” with no success. The below config throws me NullPointerException.
Source code at GitHub - dremioJonny/dremio-sybase-connector
{
…
…
- source:
name: “DATETIME”
max_scale: 8
dremio:
name: “varchar” (is “timestamp” by default)
default_cast_spec: true
…
…
}
Any help is appreciated.