In this example, the SHOW for a SELECT request statement includes a function mapping definition and a foreign server definition that is part of the function mapping definition.
Below is the function mapping definition.
CREATE FUNCTION MAPPING appl_view_db.sessionize FOR sessionize SERVER coprocessor USING Timecolumn, timeout(100), clicklag(20), emitnull;
Following is the SHOW SELECT request.
SHOW SELECT * from test_db.sessionize ( ON test_user.t1 as InputTable PARTITION BY 1 USING TimeColumn('periodcol'), clicklag(200) ) as dt;
The SHOW request statement returns the definitions of the table, the function mapping, and the foreign server.
*** Text of DDL statement returned. ------------------------------------------------------------------- CREATE SET TABLE TEST_USER.t1 ,NO FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL, CHECKSUM = DEFAULT, DEFAULT MERGEBLOCKRATIO, MAP = TD_MAP1 ( userid INTEGER, periodcol TIMESTAMP(6), page VARCHAR(1000) CHARACTER SET LATIN NOT CASESPECIFIC) PRIMARY INDEX ( userid );
*** Text of DDL statement returned. ------------------------------------------------------------------- CREATE FUNCTION MAPPING appl_view_db.sessionize FOR sessionize SERVER coprocessor USING Timecolumn, timeout(100), clicklag(20), emitnull;
*** Text of DDL statement returned. ------------------------------------------------------------------- CREATE FOREIGN SERVER TD_SERVER_DB.opt_srv1 EXTERNAL SECURITY DEFINER TRUSTED TESTAUTH USING link ('sdlc4673sdlc4675') version ('active') DO IMPORT WITH TD_SYSFNLIB.QGINITIATORIMPORT , DO EXPORT WITH TD_SYSFNLIB.QGINITIATOREXPORT ;