cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP HANA - Defining Function Mappings for a Remote Data Source

0 Kudos
155

I would like to define my own function mappings within a property_xxx.ini file for use with a remote data source. For example, if WEEKDAY is called in HANA I expect the following line in my property_xxx.ini to cause the query sent to my remote source to call DATE_PART:

SELECT WEEKDAY ("myDateField") from "myVirtualTable";

Line in question from property_xxx.ini

FUNC_WEEKDAY : DATE_PART(w,$1)

Instead I see the data is pulled in from my remote source to HANA, and then the function is applied.

I am using generic ODBC adapter and postgreSQL ODBC driver. I have created a remote data source using my property_xxx.ini file and verified pushdown occurs when calling ABS through the contents of the driver logs as shown below

SELECT ABS("myIntField") FROM "myVirtualTable";

Below I have included an excerpt from my property_xxx.ini file

CAP_TABLE_CAP: true
CAP_WHERE: true
CAP_SIMPLE_EXPR_IN_WHERE: true
CAP_NONEQUAL_COMPARISON: true
CAP_LIKE: true
CAP_AND_DIFFERENT_COLUMNS: true
CAP_TABLE_SELECT: true
CAP_SUBQUERY : true
CAP_SUBQUERY_GROUPBY : true
CAP_ORDERBY : true
CAP_JOINS : true
CAP_GROUPBY : true
CAP_AND : true
CAP_OR : true
CAP_TOP : true
CAP_LIMIT : true

FUNC_ABS : true
FUNC_TRIM_BOTH: TRIM($1)
TYPE_DATE : DATE
TYPE_DATETIME : TIMESTAMP
TYPE_INT : INTEGER
TYPE_INTEGER : INTEGER<br>

1. Can a function mapping be defined for all/any HANA functions? If not, for which ones can mappings be defined, and where can I find documentation stating this?

2. Is this the proper way to map a HANA function to a function from a remote source?

Accepted Solutions (0)

Answers (0)