How to push TZCOVERTOR function down to Oracle DB in TIBCO Data Virtualization?

How to push TZCOVERTOR function down to Oracle DB in TIBCO Data Virtualization?

book

Article ID: KB0070524

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions

Description

In TIBCO Data Virtualization (TDV), when using the TDV built-in TZCONVERTOR function with Oracle DB, the function is observed to get pushed down to the DB. 

 Sample query -   SELECT TZCONVERTOR (parse_timestamp('2023-03-29 00:30:00.000', 'yyyy-mm-dd hh24:mi:ss.ff3'), 'GMT', 'MST') a0001 FROM /shared/Oracle19c/TESTUSER/TT_03_120956_L
 



No Push reason in the SELECT node of the Query plan - 

No Push Reason:

Cannot push selectable because the data source Oracle does not support the function --TZCONVERTOR(parse_timestamp('2023-03-29 00:30:00.000', 'yyyy-mm-dd hh24:mi:ss.ff3'), 'GMT', 'MST')--

Screenshot for reference - 

User-added image
This article provides details how to push down TZCOVERTOR function to Oracle DB in TDV. 

Issue/Introduction

How to push TZCOVERTOR function down to Oracle DB in TIBCO Data Virtualization?

Environment

All Supported Operating System

Resolution

In this scenario, we have taken the example of Oracle19c adapter to push down the TZCONVERTOR function. Follow the below steps -

(1) Take a backup of the [TDV_Server_dir]\apps\dlm\cis_ds_oracle\conf\oracle.capabilities file. 
(2) Update the original file with the following -

 TZCONVERTOR(@timestamp,~string,~string): cast(from_tz($1, $2) at time zone $3 as TIMESTAMP)

Oracle documentation on FROM_TZ - https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/FROM_TZ.html#GUID-84384FF7-6462-480C-BC40-60087016857B

Here is an example of the Oracle capabilities file for reference - 

User-added image

(3) Restart TDV Server for the changes to take effect.
(4) Run the query. The function TZCONVERTOR is seen to be pushed down to Oracle DB in the FETCH node - 

User-added image

NOTE :