/*
CREATE FOREIGN TABLE "_SYS_AFL.ERPA_DATE_ADD_DURATION_PROC__TT_P3" (
    StartDate string(8) OPTIONS (NAMEINSOURCE '"StartDate"', NATIVE_TYPE 'VARCHAR'),
    EndDate string(8) OPTIONS (NAMEINSOURCE '"EndDate"', NATIVE_TYPE 'VARCHAR'),
    FactoryCalendarId string(2) OPTIONS (NAMEINSOURCE '"FactoryCalendarId"', NATIVE_TYPE 'VARCHAR'),
    Duration integer OPTIONS (NAMEINSOURCE '"Duration"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_AFL"."ERPA_DATE_ADD_DURATION_PROC__TT_P3"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_AFL.ERPA_DATE_ADD_DURATION_PROC__TT_P4" (
    StartDate string(8) OPTIONS (NAMEINSOURCE '"StartDate"', NATIVE_TYPE 'VARCHAR'),
    EndDate string(8) OPTIONS (NAMEINSOURCE '"EndDate"', NATIVE_TYPE 'VARCHAR'),
    FactoryCalendarId string(2) OPTIONS (NAMEINSOURCE '"FactoryCalendarId"', NATIVE_TYPE 'VARCHAR'),
    Duration integer OPTIONS (NAMEINSOURCE '"Duration"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_AFL"."ERPA_DATE_ADD_DURATION_PROC__TT_P4"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_AFL.ERPA_DATE_COUNT_BACK_DURATION_PROC__TT_P3" (
    StartDate string(8) OPTIONS (NAMEINSOURCE '"StartDate"', NATIVE_TYPE 'VARCHAR'),
    EndDate string(8) OPTIONS (NAMEINSOURCE '"EndDate"', NATIVE_TYPE 'VARCHAR'),
    FactoryCalendarId string(2) OPTIONS (NAMEINSOURCE '"FactoryCalendarId"', NATIVE_TYPE 'VARCHAR'),
    Duration integer OPTIONS (NAMEINSOURCE '"Duration"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_AFL"."ERPA_DATE_COUNT_BACK_DURATION_PROC__TT_P3"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_AFL.ERPA_DATE_COUNT_BACK_DURATION_PROC__TT_P4" (
    StartDate string(8) OPTIONS (NAMEINSOURCE '"StartDate"', NATIVE_TYPE 'VARCHAR'),
    EndDate string(8) OPTIONS (NAMEINSOURCE '"EndDate"', NATIVE_TYPE 'VARCHAR'),
    FactoryCalendarId string(2) OPTIONS (NAMEINSOURCE '"FactoryCalendarId"', NATIVE_TYPE 'VARCHAR'),
    Duration integer OPTIONS (NAMEINSOURCE '"Duration"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_AFL"."ERPA_DATE_COUNT_BACK_DURATION_PROC__TT_P4"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_AFL.ERPA_DATE_SUBTRACT_DURATION_PROC__TT_P3" (
    StartDate string(8) OPTIONS (NAMEINSOURCE '"StartDate"', NATIVE_TYPE 'VARCHAR'),
    EndDate string(8) OPTIONS (NAMEINSOURCE '"EndDate"', NATIVE_TYPE 'VARCHAR'),
    FactoryCalendarId string(2) OPTIONS (NAMEINSOURCE '"FactoryCalendarId"', NATIVE_TYPE 'VARCHAR'),
    Duration integer OPTIONS (NAMEINSOURCE '"Duration"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_AFL"."ERPA_DATE_SUBTRACT_DURATION_PROC__TT_P3"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_AFL.ERPA_DATE_SUBTRACT_DURATION_PROC__TT_P4" (
    StartDate string(8) OPTIONS (NAMEINSOURCE '"StartDate"', NATIVE_TYPE 'VARCHAR'),
    EndDate string(8) OPTIONS (NAMEINSOURCE '"EndDate"', NATIVE_TYPE 'VARCHAR'),
    FactoryCalendarId string(2) OPTIONS (NAMEINSOURCE '"FactoryCalendarId"', NATIVE_TYPE 'VARCHAR'),
    Duration integer OPTIONS (NAMEINSOURCE '"Duration"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_AFL"."ERPA_DATE_SUBTRACT_DURATION_PROC__TT_P4"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_AFL.ERPA_FACTORY_DAYS_BETWEEN_DATES_PROC__TT_P3" (
    StartDate string(8) OPTIONS (NAMEINSOURCE '"StartDate"', NATIVE_TYPE 'VARCHAR'),
    EndDate string(8) OPTIONS (NAMEINSOURCE '"EndDate"', NATIVE_TYPE 'VARCHAR'),
    FactoryCalendarId string(2) OPTIONS (NAMEINSOURCE '"FactoryCalendarId"', NATIVE_TYPE 'VARCHAR'),
    Duration integer OPTIONS (NAMEINSOURCE '"Duration"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_AFL"."ERPA_FACTORY_DAYS_BETWEEN_DATES_PROC__TT_P3"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_AFL.ERPA_FACTORY_DAYS_BETWEEN_DATES_PROC__TT_P4" (
    StartDate string(8) OPTIONS (NAMEINSOURCE '"StartDate"', NATIVE_TYPE 'VARCHAR'),
    EndDate string(8) OPTIONS (NAMEINSOURCE '"EndDate"', NATIVE_TYPE 'VARCHAR'),
    FactoryCalendarId string(2) OPTIONS (NAMEINSOURCE '"FactoryCalendarId"', NATIVE_TYPE 'VARCHAR'),
    Duration integer OPTIONS (NAMEINSOURCE '"Duration"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_AFL"."ERPA_FACTORY_DAYS_BETWEEN_DATES_PROC__TT_P4"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_AUDIT.CS_AUDIT_LOG_" (
    "TIMESTAMP" timestamp OPTIONS (NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CLIENT_HOST string(64) OPTIONS (NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_IP string(16) OPTIONS (NAMEINSOURCE '"CLIENT_IP"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLIENT_PORT integer OPTIONS (NAMEINSOURCE '"CLIENT_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AUDIT_POLICY_NAME string(256) OPTIONS (NAMEINSOURCE '"AUDIT_POLICY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    EVENT_STATUS string(32) OPTIONS (NAMEINSOURCE '"EVENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    EVENT_LEVEL string(16) OPTIONS (NAMEINSOURCE '"EVENT_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    EVENT_ACTION string(32) OPTIONS (NAMEINSOURCE '"EVENT_ACTION"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRIVILEGE_NAME string(256) OPTIONS (NAMEINSOURCE '"PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROLE_NAME string(256) OPTIONS (NAMEINSOURCE '"ROLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE string(256) OPTIONS (NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    GRANTABLE string(16) OPTIONS (NAMEINSOURCE '"GRANTABLE"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME string(256) OPTIONS (NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SECTION string(128) OPTIONS (NAMEINSOURCE '"SECTION"', NATIVE_TYPE 'VARCHAR'),
    KEY string(128) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    PREV_VALUE string(5000) OPTIONS (NAMEINSOURCE '"PREV_VALUE"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_STRING clob(24) OPTIONS (NAMEINSOURCE '"STATEMENT_STRING"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    COMMENT string(5000) OPTIONS (NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'VARCHAR'),
    APPLICATION_USER_NAME string(256) OPTIONS (NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_AUDIT"."CS_AUDIT_LOG_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.BIMC_ALL_CUBES" (
    CUBE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"CUBE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CATALOG_NAME string(512) OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CUBE_NAME string(512) OPTIONS (NAMEINSOURCE '"CUBE_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUBE_TYPE string(512) OPTIONS (NAMEINSOURCE '"CUBE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CUBE_GUID string(36) OPTIONS (NAMEINSOURCE '"CUBE_GUID"', NATIVE_TYPE 'VARCHAR'),
    CREATED_ON timestamp OPTIONS (NAMEINSOURCE '"CREATED_ON"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_SCHEMA_UPDATE timestamp OPTIONS (NAMEINSOURCE '"LAST_SCHEMA_UPDATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCHEMA_UPDATED_BY string(512) OPTIONS (NAMEINSOURCE '"SCHEMA_UPDATED_BY"', NATIVE_TYPE 'VARCHAR'),
    LAST_DATA_UPDATE timestamp OPTIONS (NAMEINSOURCE '"LAST_DATA_UPDATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_UPDATED_BY string(512) OPTIONS (NAMEINSOURCE '"DATA_UPDATED_BY"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(512) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR'),
    ANNOTATIONS string(512) OPTIONS (NAMEINSOURCE '"ANNOTATIONS"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_OBJECT string(512) OPTIONS (NAMEINSOURCE '"COLUMN_OBJECT"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_SCHEMA string(512) OPTIONS (NAMEINSOURCE '"DEFAULT_SCHEMA"', NATIVE_TYPE 'VARCHAR'),
    INTERNAL_CUBE integer OPTIONS (NAMEINSOURCE '"INTERNAL_CUBE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VIEW_NAME string(256) OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_ENABLED integer OPTIONS (NAMEINSOURCE '"HISTORY_ENABLED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."BIMC_ALL_CUBES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.BIMC_CONFIGURATION" (
    NAME string(100) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(100) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."BIMC_CONFIGURATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.BIMC_CUBES" (
    CUBE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"CUBE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CATALOG_NAME string(512) OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CUBE_NAME string(512) OPTIONS (NAMEINSOURCE '"CUBE_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUBE_TYPE string(512) OPTIONS (NAMEINSOURCE '"CUBE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CUBE_GUID string(36) OPTIONS (NAMEINSOURCE '"CUBE_GUID"', NATIVE_TYPE 'VARCHAR'),
    CREATED_ON timestamp OPTIONS (NAMEINSOURCE '"CREATED_ON"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_SCHEMA_UPDATE timestamp OPTIONS (NAMEINSOURCE '"LAST_SCHEMA_UPDATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCHEMA_UPDATED_BY string(512) OPTIONS (NAMEINSOURCE '"SCHEMA_UPDATED_BY"', NATIVE_TYPE 'VARCHAR'),
    LAST_DATA_UPDATE timestamp OPTIONS (NAMEINSOURCE '"LAST_DATA_UPDATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_UPDATED_BY string(512) OPTIONS (NAMEINSOURCE '"DATA_UPDATED_BY"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(512) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR'),
    ANNOTATIONS string(512) OPTIONS (NAMEINSOURCE '"ANNOTATIONS"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_OBJECT string(512) OPTIONS (NAMEINSOURCE '"COLUMN_OBJECT"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_SCHEMA string(512) OPTIONS (NAMEINSOURCE '"DEFAULT_SCHEMA"', NATIVE_TYPE 'VARCHAR'),
    VIEW_NAME string(256) OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_ENABLED integer OPTIONS (NAMEINSOURCE '"HISTORY_ENABLED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."BIMC_CUBES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.BIMC_DIMENSIONS" (
    DIMENSION_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"DIMENSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CATALOG_NAME string(512) OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(512) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUBE_NAME string(512) OPTIONS (NAMEINSOURCE '"CUBE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DIMENSION_NAME string(512) OPTIONS (NAMEINSOURCE '"DIMENSION_NAME"', NATIVE_TYPE 'VARCHAR'),
    DIMENSION_UNIQUE_NAME string(512) OPTIONS (NAMEINSOURCE '"DIMENSION_UNIQUE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DIMENSION_GUID string(36) OPTIONS (NAMEINSOURCE '"DIMENSION_GUID"', NATIVE_TYPE 'VARCHAR'),
    DIMENSION_CAPTION string(512) OPTIONS (NAMEINSOURCE '"DIMENSION_CAPTION"', NATIVE_TYPE 'VARCHAR'),
    DIMENSION_ORDINAL integer OPTIONS (NAMEINSOURCE '"DIMENSION_ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DIMENSION_TYPE integer OPTIONS (NAMEINSOURCE '"DIMENSION_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DIMENSION_CARDINALITY integer OPTIONS (NAMEINSOURCE '"DIMENSION_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEFAULT_HIERARCHY string(512) OPTIONS (NAMEINSOURCE '"DEFAULT_HIERARCHY"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(512) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR'),
    ANNOTATIONS string(512) OPTIONS (NAMEINSOURCE '"ANNOTATIONS"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_OBJECT string(512) OPTIONS (NAMEINSOURCE '"COLUMN_OBJECT"', NATIVE_TYPE 'VARCHAR'),
    DIMENSION_CATALOG_NAME string(512) OPTIONS (NAMEINSOURCE '"DIMENSION_CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    IS_PRIVATE_ATTRIBUTE integer OPTIONS (NAMEINSOURCE '"IS_PRIVATE_ATTRIBUTE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."BIMC_DIMENSIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.BIMC_MEASURES" (
    CATALOG_NAME string(512) OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(512) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUBE_NAME string(512) OPTIONS (NAMEINSOURCE '"CUBE_NAME"', NATIVE_TYPE 'VARCHAR'),
    MEASURE_NAME string(512) OPTIONS (NAMEINSOURCE '"MEASURE_NAME"', NATIVE_TYPE 'VARCHAR'),
    MEASURE_UNIQUE_NAME string(512) OPTIONS (NAMEINSOURCE '"MEASURE_UNIQUE_NAME"', NATIVE_TYPE 'VARCHAR'),
    MEASURE_CAPTION string(512) OPTIONS (NAMEINSOURCE '"MEASURE_CAPTION"', NATIVE_TYPE 'VARCHAR'),
    MEASURE_GUID string(1) OPTIONS (NAMEINSOURCE '"MEASURE_GUID"', NATIVE_TYPE 'VARCHAR'),
    MEASURE_AGGREGATOR integer OPTIONS (NAMEINSOURCE '"MEASURE_AGGREGATOR"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE integer OPTIONS (NAMEINSOURCE '"DATA_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUMERIC_PRECISION integer OPTIONS (NAMEINSOURCE '"NUMERIC_PRECISION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUMERIC_SCALE integer OPTIONS (NAMEINSOURCE '"NUMERIC_SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEASURE_UNITS string(512) OPTIONS (NAMEINSOURCE '"MEASURE_UNITS"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(512) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR'),
    UNIT_TYPE string(512) OPTIONS (NAMEINSOURCE '"UNIT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    UNIT_COLUMN_NAME string(512) OPTIONS (NAMEINSOURCE '"UNIT_COLUMN_NAME"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_NAME string(512) OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'VARCHAR'),
    MEASUREGROUP_NAME string(1) OPTIONS (NAMEINSOURCE '"MEASUREGROUP_NAME"', NATIVE_TYPE 'VARCHAR'),
    MEASURE_DISPLAY_FOLDER string(512) OPTIONS (NAMEINSOURCE '"MEASURE_DISPLAY_FOLDER"', NATIVE_TYPE 'VARCHAR'),
    MEASURE_AGGREGATABLE integer OPTIONS (NAMEINSOURCE '"MEASURE_AGGREGATABLE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."BIMC_MEASURES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.BIMC_PROPERTIES" (
    PROPERTY_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"PROPERTY_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CATALOG_NAME string(512) OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(512) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUBE_NAME string(512) OPTIONS (NAMEINSOURCE '"CUBE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DIMENSION_UNIQUE_NAME string(512) OPTIONS (NAMEINSOURCE '"DIMENSION_UNIQUE_NAME"', NATIVE_TYPE 'VARCHAR'),
    HIERARCHY_UNIQUE_NAME string(512) OPTIONS (NAMEINSOURCE '"HIERARCHY_UNIQUE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LEVEL_UNIQUE_NAME string(512) OPTIONS (NAMEINSOURCE '"LEVEL_UNIQUE_NAME"', NATIVE_TYPE 'VARCHAR'),
    MEMBER_UNIQUE_NAME string(512) OPTIONS (NAMEINSOURCE '"MEMBER_UNIQUE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PROPERTY_TYPE integer OPTIONS (NAMEINSOURCE '"PROPERTY_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PROPERTY_NAME string(512) OPTIONS (NAMEINSOURCE '"PROPERTY_NAME"', NATIVE_TYPE 'VARCHAR'),
    PROPERTY_CAPTION string(512) OPTIONS (NAMEINSOURCE '"PROPERTY_CAPTION"', NATIVE_TYPE 'VARCHAR'),
    DATA_TYPE integer OPTIONS (NAMEINSOURCE '"DATA_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CHARACTER_MAXIMUM_LENGTH integer OPTIONS (NAMEINSOURCE '"CHARACTER_MAXIMUM_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CHARACTER_OCTET_LENGTH integer OPTIONS (NAMEINSOURCE '"CHARACTER_OCTET_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUMERIC_PRECISION integer OPTIONS (NAMEINSOURCE '"NUMERIC_PRECISION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUMERIC_SCALE integer OPTIONS (NAMEINSOURCE '"NUMERIC_SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESCRIPTION string(512) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR'),
    COLUMNOBJECT_NAME string(512) OPTIONS (NAMEINSOURCE '"COLUMNOBJECT_NAME"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_NAME string(512) OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_TYPE integer OPTIONS (NAMEINSOURCE '"COLUMN_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLUMN_FLAG string(512) OPTIONS (NAMEINSOURCE '"COLUMN_FLAG"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_SQL_TYPE string(512) OPTIONS (NAMEINSOURCE '"COLUMN_SQL_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HIERARCHY_ID integer OPTIONS (NAMEINSOURCE '"HIERARCHY_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NUMBER integer OPTIONS (NAMEINSOURCE '"LEVEL_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEASURE_AGGREGATOR integer OPTIONS (NAMEINSOURCE '"MEASURE_AGGREGATOR"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NAME string(512) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    CAPTION string(512) OPTIONS (NAMEINSOURCE '"CAPTION"', NATIVE_TYPE 'VARCHAR'),
    TYPE integer OPTIONS (NAMEINSOURCE '"TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STRUCTURE integer OPTIONS (NAMEINSOURCE '"STRUCTURE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CARDINALITY integer OPTIONS (NAMEINSOURCE '"CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEFAULT_MEMBER string(512) OPTIONS (NAMEINSOURCE '"DEFAULT_MEMBER"', NATIVE_TYPE 'VARCHAR'),
    UNIT_TYPE string(512) OPTIONS (NAMEINSOURCE '"UNIT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    UNIT_COLUMN_NAME string(512) OPTIONS (NAMEINSOURCE '"UNIT_COLUMN_NAME"', NATIVE_TYPE 'VARCHAR'),
    ALTERNATIVE_PROPERTY_NAME string(512) OPTIONS (NAMEINSOURCE '"ALTERNATIVE_PROPERTY_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUSTOM_FLAG integer OPTIONS (NAMEINSOURCE '"CUSTOM_FLAG"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HIERARCHY_VIEW string(512) OPTIONS (NAMEINSOURCE '"HIERARCHY_VIEW"', NATIVE_TYPE 'VARCHAR'),
    "ORDER" string(10) OPTIONS (NAMEINSOURCE '"ORDER"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_NAME_2 string(512) OPTIONS (NAMEINSOURCE '"COLUMN_NAME_2"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_TYPE_D string(512) OPTIONS (NAMEINSOURCE '"COLUMN_TYPE_D"', NATIVE_TYPE 'VARCHAR'),
    DESC_ATTRIBUTE_NAME string(512) OPTIONS (NAMEINSOURCE '"DESC_ATTRIBUTE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DESC_ATTRIBUTE_OBJECT_NAME string(512) OPTIONS (NAMEINSOURCE '"DESC_ATTRIBUTE_OBJECT_NAME"', NATIVE_TYPE 'VARCHAR'),
    DESC_ATTRIBUTE_DIMENSION_NAME string(512) OPTIONS (NAMEINSOURCE '"DESC_ATTRIBUTE_DIMENSION_NAME"', NATIVE_TYPE 'VARCHAR'),
    DESC_ATTRIBUTE_COLUMN_TYPE integer OPTIONS (NAMEINSOURCE '"DESC_ATTRIBUTE_COLUMN_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESC_ATTRIBUTE_COLUMN_TYPE_D string(512) OPTIONS (NAMEINSOURCE '"DESC_ATTRIBUTE_COLUMN_TYPE_D"', NATIVE_TYPE 'VARCHAR'),
    DESC_ATTRIBUTE_COLUMN_SQL_TYPE string(512) OPTIONS (NAMEINSOURCE '"DESC_ATTRIBUTE_COLUMN_SQL_TYPE"', NATIVE_TYPE 'VARCHAR'),
    KEY_COLUMN_NAME string(512) OPTIONS (NAMEINSOURCE '"KEY_COLUMN_NAME"', NATIVE_TYPE 'VARCHAR'),
    DISPLAY_COLUMN_NAME string(512) OPTIONS (NAMEINSOURCE '"DISPLAY_COLUMN_NAME"', NATIVE_TYPE 'VARCHAR'),
    MEASURE_DISPLAY_FOLDER string(512) OPTIONS (NAMEINSOURCE '"MEASURE_DISPLAY_FOLDER"', NATIVE_TYPE 'VARCHAR'),
    MEASURE_AGGREGATABLE integer OPTIONS (NAMEINSOURCE '"MEASURE_AGGREGATABLE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEASURE_TYPE string(512) OPTIONS (NAMEINSOURCE '"MEASURE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_TYPE string(512) OPTIONS (NAMEINSOURCE '"SEMANTIC_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CURRENCY_CONVERSION integer OPTIONS (NAMEINSOURCE '"CURRENCY_CONVERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DIMENSION_CAPTION string(512) OPTIONS (NAMEINSOURCE '"DIMENSION_CAPTION"', NATIVE_TYPE 'VARCHAR'),
    DIMENSION_TYPE integer OPTIONS (NAMEINSOURCE '"DIMENSION_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_PRIVATE_ATTRIBUTE integer OPTIONS (NAMEINSOURCE '"IS_PRIVATE_ATTRIBUTE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."BIMC_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.BIMC_VARIABLE" (
    CATALOG_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUBE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CUBE_NAME"', NATIVE_TYPE 'VARCHAR'),
    VARIABLE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"VARIABLE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_TYPE integer OPTIONS (NAMEINSOURCE '"COLUMN_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLUMN_TYPE_D string(512) OPTIONS (NAMEINSOURCE '"COLUMN_TYPE_D"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_SQL_TYPE string(512) OPTIONS (NAMEINSOURCE '"COLUMN_SQL_TYPE"', NATIVE_TYPE 'VARCHAR'),
    VALUE_TYPE string(512) OPTIONS (NAMEINSOURCE '"VALUE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    VALUE_ATTRIBUTE string(512) OPTIONS (NAMEINSOURCE '"VALUE_ATTRIBUTE"', NATIVE_TYPE 'VARCHAR'),
    SELECTION_TYPE string(512) OPTIONS (NAMEINSOURCE '"SELECTION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    MULTILINE integer OPTIONS (NAMEINSOURCE '"MULTILINE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MANDATORY integer OPTIONS (NAMEINSOURCE '"MANDATORY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "ORDER" integer OPTIONS (NAMEINSOURCE '"ORDER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESCRIPTION string(512) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'VARCHAR'),
    VALUE_ENTITY string(512) OPTIONS (NAMEINSOURCE '"VALUE_ENTITY"', NATIVE_TYPE 'VARCHAR'),
    IS_EXPRESSION integer OPTIONS (NAMEINSOURCE '"IS_EXPRESSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEMANTIC_TYPE string(512) OPTIONS (NAMEINSOURCE '"SEMANTIC_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."BIMC_VARIABLE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.BIMC_VARIABLE_ASSIGNMENT" (
    CATALOG_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUBE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CUBE_NAME"', NATIVE_TYPE 'VARCHAR'),
    VARIABLE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"VARIABLE_NAME"', NATIVE_TYPE 'VARCHAR'),
    MODEL_ELEMENT_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"MODEL_ELEMENT_NAME"', NATIVE_TYPE 'VARCHAR'),
    MODEL_ELEMENT_TYPE string(512) NOT NULL OPTIONS (NAMEINSOURCE '"MODEL_ELEMENT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PLACEHOLDER_NAME string(512) OPTIONS (NAMEINSOURCE '"PLACEHOLDER_NAME"', NATIVE_TYPE 'VARCHAR'),
    HISTORY_PARAMETER integer OPTIONS (NAMEINSOURCE '"HISTORY_PARAMETER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."BIMC_VARIABLE_ASSIGNMENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.BIMC_VARIABLE_MAPPING" (
    CATALOG_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUBE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CUBE_NAME"', NATIVE_TYPE 'VARCHAR'),
    MAPPING_TYPE string(512) NOT NULL OPTIONS (NAMEINSOURCE '"MAPPING_TYPE"', NATIVE_TYPE 'VARCHAR'),
    VARIABLE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"VARIABLE_NAME"', NATIVE_TYPE 'VARCHAR'),
    TARGET_VIEW string(512) NOT NULL OPTIONS (NAMEINSOURCE '"TARGET_VIEW"', NATIVE_TYPE 'VARCHAR'),
    TARGET_VARIABLE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"TARGET_VARIABLE_NAME"', NATIVE_TYPE 'VARCHAR'),
    TARGET_ATTRIBUTE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"TARGET_ATTRIBUTE_NAME"', NATIVE_TYPE 'VARCHAR'),
    TARGET_DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"TARGET_DEFAULT_VALUE"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_VARIABLE_NAME string(512) OPTIONS (NAMEINSOURCE '"SOURCE_VARIABLE_NAME"', NATIVE_TYPE 'VARCHAR'),
    CONSTANT_VALUE string(512) OPTIONS (NAMEINSOURCE '"CONSTANT_VALUE"', NATIVE_TYPE 'VARCHAR'),
    TARGET_PLACEHOLDER_NAME string(512) OPTIONS (NAMEINSOURCE '"TARGET_PLACEHOLDER_NAME"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."BIMC_VARIABLE_MAPPING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.BIMC_VARIABLE_VALUE" (
    CATALOG_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUBE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CUBE_NAME"', NATIVE_TYPE 'VARCHAR'),
    VARIABLE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"VARIABLE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "ORDER" integer NOT NULL OPTIONS (NAMEINSOURCE '"ORDER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NAME string(512) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(512) NOT NULL OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."BIMC_VARIABLE_VALUE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.BIMC_VARIABLE_VIEW" (
    CATALOG_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUBE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CUBE_NAME"', NATIVE_TYPE 'VARCHAR'),
    VARIABLE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"VARIABLE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_TYPE integer OPTIONS (NAMEINSOURCE '"COLUMN_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLUMN_TYPE_D string(512) OPTIONS (NAMEINSOURCE '"COLUMN_TYPE_D"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_SQL_TYPE string(512) OPTIONS (NAMEINSOURCE '"COLUMN_SQL_TYPE"', NATIVE_TYPE 'VARCHAR'),
    VALUE_TYPE string(512) OPTIONS (NAMEINSOURCE '"VALUE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    VALUE_ATTRIBUTE string(512) OPTIONS (NAMEINSOURCE '"VALUE_ATTRIBUTE"', NATIVE_TYPE 'VARCHAR'),
    SELECTION_TYPE string(512) OPTIONS (NAMEINSOURCE '"SELECTION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    MULTILINE integer OPTIONS (NAMEINSOURCE '"MULTILINE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MANDATORY integer OPTIONS (NAMEINSOURCE '"MANDATORY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "ORDER" integer OPTIONS (NAMEINSOURCE '"ORDER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESCRIPTION string(512) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR'),
    MODEL_ELEMENT_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"MODEL_ELEMENT_NAME"', NATIVE_TYPE 'VARCHAR'),
    MODEL_ELEMENT_TYPE string(512) NOT NULL OPTIONS (NAMEINSOURCE '"MODEL_ELEMENT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PLACEHOLDER_NAME string(512) OPTIONS (NAMEINSOURCE '"PLACEHOLDER_NAME"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'VARCHAR'),
    IS_EXPRESSION integer OPTIONS (NAMEINSOURCE '"IS_EXPRESSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VALUE_ENTITY string(512) OPTIONS (NAMEINSOURCE '"VALUE_ENTITY"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_TYPE string(512) OPTIONS (NAMEINSOURCE '"SEMANTIC_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HISTORY_PARAMETER integer OPTIONS (NAMEINSOURCE '"HISTORY_PARAMETER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."BIMC_VARIABLE_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.GET_BWAUTHS4HANA/tabletype/VALTAB" (
    "VALUE" string(1) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."GET_BWAUTHS4HANA/tabletype/VALTAB"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.M_CONTENT_MAPPING" (
    SOURCE_PACKAGE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SOURCE_PACKAGE"', NATIVE_TYPE 'VARCHAR'),
    TARGET_PACKAGE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TARGET_PACKAGE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."M_CONTENT_MAPPING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.M_FISCAL_CALENDAR" (
    CALENDAR_VARIANT string(2) NOT NULL OPTIONS (NAMEINSOURCE '"CALENDAR_VARIANT"', NATIVE_TYPE 'VARCHAR'),
    "DATE" string(8) NOT NULL OPTIONS (NAMEINSOURCE '"DATE"', NATIVE_TYPE 'VARCHAR'),
    DATE_SQL date OPTIONS (NAMEINSOURCE '"DATE_SQL"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    FISCAL_YEAR string(4) OPTIONS (NAMEINSOURCE '"FISCAL_YEAR"', NATIVE_TYPE 'VARCHAR'),
    FISCAL_PERIOD string(3) OPTIONS (NAMEINSOURCE '"FISCAL_PERIOD"', NATIVE_TYPE 'VARCHAR'),
    CURRENT_YEAR_ADJUSTMENT string(2) OPTIONS (NAMEINSOURCE '"CURRENT_YEAR_ADJUSTMENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."M_FISCAL_CALENDAR"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.M_IMPORT_SERVER_CONFIG" (
    SYSTEM_IP string(128) NOT NULL OPTIONS (NAMEINSOURCE '"SYSTEM_IP"', NATIVE_TYPE 'VARCHAR'),
    REPO_NAME string(60) NOT NULL OPTIONS (NAMEINSOURCE '"REPO_NAME"', NATIVE_TYPE 'VARCHAR'),
    DEF_PORT integer OPTIONS (NAMEINSOURCE '"DEF_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PASSPHRASE string(60) OPTIONS (NAMEINSOURCE '"PASSPHRASE"', NATIVE_TYPE 'VARCHAR'),
    ODBC_DATASOURCE string(60) OPTIONS (NAMEINSOURCE '"ODBC_DATASOURCE"', NATIVE_TYPE 'VARCHAR'),
    USE_EXISTING_TABLES string(1) OPTIONS (NAMEINSOURCE '"USE_EXISTING_TABLES"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_TABLES_SCHEMA string(60) OPTIONS (NAMEINSOURCE '"DEFAULT_TABLES_SCHEMA"', NATIVE_TYPE 'VARCHAR'),
    GEN_DF_EXT string(1) OPTIONS (NAMEINSOURCE '"GEN_DF_EXT"', NATIVE_TYPE 'VARCHAR'),
    GEN_DF_TABLES string(1) OPTIONS (NAMEINSOURCE '"GEN_DF_TABLES"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."M_IMPORT_SERVER_CONFIG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.M_PACKAGE_DEFAULT_SCHEMA" (
    PACKAGE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DEFAULT_SCHEMA"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."M_PACKAGE_DEFAULT_SCHEMA"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.M_REPLICATION_EXCEPTIONS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE_CODE string(1) OPTIONS (NAMEINSOURCE '"TABLE_TYPE_CODE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."M_REPLICATION_EXCEPTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.M_SCHEMA_MAPPING" (
    AUTHORING_SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"AUTHORING_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    PHYSICAL_SCHEMA string(256) OPTIONS (NAMEINSOURCE '"PHYSICAL_SCHEMA"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."M_SCHEMA_MAPPING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.M_TIME_DIMENSION" (
    DATETIMESTAMP timestamp NOT NULL OPTIONS (NAMEINSOURCE '"DATETIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATE_SQL date OPTIONS (NAMEINSOURCE '"DATE_SQL"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    DATETIME_SAP string(14) OPTIONS (NAMEINSOURCE '"DATETIME_SAP"', NATIVE_TYPE 'VARCHAR'),
    DATE_SAP string(8) OPTIONS (NAMEINSOURCE '"DATE_SAP"', NATIVE_TYPE 'VARCHAR'),
    "YEAR" string(4) OPTIONS (NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'VARCHAR'),
    QUARTER string(2) OPTIONS (NAMEINSOURCE '"QUARTER"', NATIVE_TYPE 'VARCHAR'),
    "MONTH" string(2) OPTIONS (NAMEINSOURCE '"MONTH"', NATIVE_TYPE 'VARCHAR'),
    WEEK string(2) OPTIONS (NAMEINSOURCE '"WEEK"', NATIVE_TYPE 'VARCHAR'),
    WEEK_YEAR string(4) OPTIONS (NAMEINSOURCE '"WEEK_YEAR"', NATIVE_TYPE 'VARCHAR'),
    DAY_OF_WEEK string(2) OPTIONS (NAMEINSOURCE '"DAY_OF_WEEK"', NATIVE_TYPE 'VARCHAR'),
    "DAY" string(2) OPTIONS (NAMEINSOURCE '"DAY"', NATIVE_TYPE 'VARCHAR'),
    "HOUR" string(2) OPTIONS (NAMEINSOURCE '"HOUR"', NATIVE_TYPE 'VARCHAR'),
    "MINUTE" string(2) OPTIONS (NAMEINSOURCE '"MINUTE"', NATIVE_TYPE 'VARCHAR'),
    "SECOND" string(2) OPTIONS (NAMEINSOURCE '"SECOND"', NATIVE_TYPE 'VARCHAR'),
    CALQUARTER string(5) OPTIONS (NAMEINSOURCE '"CALQUARTER"', NATIVE_TYPE 'VARCHAR'),
    CALMONTH string(6) OPTIONS (NAMEINSOURCE '"CALMONTH"', NATIVE_TYPE 'VARCHAR'),
    CALWEEK string(6) OPTIONS (NAMEINSOURCE '"CALWEEK"', NATIVE_TYPE 'VARCHAR'),
    YEAR_INT integer OPTIONS (NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUARTER_INT byte OPTIONS (NAMEINSOURCE '"QUARTER_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MONTH_INT byte OPTIONS (NAMEINSOURCE '"MONTH_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_INT byte OPTIONS (NAMEINSOURCE '"WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_YEAR_INT integer OPTIONS (NAMEINSOURCE '"WEEK_YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DAY_OF_WEEK_INT byte OPTIONS (NAMEINSOURCE '"DAY_OF_WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DAY_INT byte OPTIONS (NAMEINSOURCE '"DAY_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    HOUR_INT byte OPTIONS (NAMEINSOURCE '"HOUR_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MINUTE_INT byte OPTIONS (NAMEINSOURCE '"MINUTE_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SECOND_INT byte OPTIONS (NAMEINSOURCE '"SECOND_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MONTH_LAST_DAY byte OPTIONS (NAMEINSOURCE '"MONTH_LAST_DAY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TZNTSTMPS bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TZNTSTMPS"', NATIVE_TYPE 'DECIMAL'),
    TZNTSTMPL bigdecimal(21,2147483647) OPTIONS (NAMEINSOURCE '"TZNTSTMPL"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."M_TIME_DIMENSION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.M_TIME_DIMENSION_MONTH" (
    "YEAR" string(4) NOT NULL OPTIONS (NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'VARCHAR'),
    HALFYEAR string(2) OPTIONS (NAMEINSOURCE '"HALFYEAR"', NATIVE_TYPE 'VARCHAR'),
    QUARTER string(2) OPTIONS (NAMEINSOURCE '"QUARTER"', NATIVE_TYPE 'VARCHAR'),
    "MONTH" string(2) NOT NULL OPTIONS (NAMEINSOURCE '"MONTH"', NATIVE_TYPE 'VARCHAR'),
    YEAR_INT integer OPTIONS (NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HALFYEAR_INT byte OPTIONS (NAMEINSOURCE '"HALFYEAR_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    QUARTER_INT byte OPTIONS (NAMEINSOURCE '"QUARTER_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MONTH_INT byte OPTIONS (NAMEINSOURCE '"MONTH_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."M_TIME_DIMENSION_MONTH"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.M_TIME_DIMENSION_WEEK" (
    "YEAR" string(4) NOT NULL OPTIONS (NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'VARCHAR'),
    HALFYEAR string(2) OPTIONS (NAMEINSOURCE '"HALFYEAR"', NATIVE_TYPE 'VARCHAR'),
    QUARTER string(2) OPTIONS (NAMEINSOURCE '"QUARTER"', NATIVE_TYPE 'VARCHAR'),
    "MONTH" string(2) OPTIONS (NAMEINSOURCE '"MONTH"', NATIVE_TYPE 'VARCHAR'),
    WEEK string(2) NOT NULL OPTIONS (NAMEINSOURCE '"WEEK"', NATIVE_TYPE 'VARCHAR'),
    YEAR_INT integer OPTIONS (NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HALFYEAR_INT byte OPTIONS (NAMEINSOURCE '"HALFYEAR_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    QUARTER_INT byte OPTIONS (NAMEINSOURCE '"QUARTER_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MONTH_INT byte OPTIONS (NAMEINSOURCE '"MONTH_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_INT byte OPTIONS (NAMEINSOURCE '"WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."M_TIME_DIMENSION_WEEK"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.M_TIME_DIMENSION_YEAR" (
    "YEAR" string(4) NOT NULL OPTIONS (NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'VARCHAR'),
    YEAR_INT integer OPTIONS (NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAP_YEAR byte OPTIONS (NAMEINSOURCE '"IS_LEAP_YEAR"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."M_TIME_DIMENSION_YEAR"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BI.M_USER_PERSONALIZATION" (
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CATALOG_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'VARCHAR'),
    CUBE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"CUBE_NAME"', NATIVE_TYPE 'VARCHAR'),
    VARIABLE_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"VARIABLE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LINE_NUMBER integer NOT NULL OPTIONS (NAMEINSOURCE '"LINE_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOW string(256) OPTIONS (NAMEINSOURCE '"LOW"', NATIVE_TYPE 'VARCHAR'),
    HIGH string(256) OPTIONS (NAMEINSOURCE '"HIGH"', NATIVE_TYPE 'VARCHAR'),
    "OPTION" string(256) OPTIONS (NAMEINSOURCE '"OPTION"', NATIVE_TYPE 'VARCHAR'),
    SIGN string(256) OPTIONS (NAMEINSOURCE '"SIGN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BI"."M_USER_PERSONALIZATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY" (
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERCOMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"PARTNERCOMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERCITY string(40) OPTIONS (NAMEINSOURCE '"PARTNERCITY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERPOSTALCODE string(10) OPTIONS (NAMEINSOURCE '"PARTNERPOSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    "PURCHASEORDERID.PURCHASEORDERID" string(10) OPTIONS (NAMEINSOURCE '"PURCHASEORDERID.PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERITEM string(10) OPTIONS (NAMEINSOURCE '"PURCHASEORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTCATEGORY string(40) OPTIONS (NAMEINSOURCE '"PRODUCTCATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    POCREATEDAT date OPTIONS (NAMEINSOURCE '"POCREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "CONVGROSSAMOUNT.CURRENCY" string(5) OPTIONS (NAMEINSOURCE '"CONVGROSSAMOUNT.CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    CONVGROSSAMOUNT bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"CONVGROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    "row.count" bigdecimal(18,2147483647) OPTIONS (NAMEINSOURCE '"row.count"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/CURRENCY/hier/CURRENCY" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/CURRENCY/hier/CURRENCY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/olap" (
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERCOMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERCOMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERCITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERCITY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERPOSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERPOSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    "PURCHASEORDERID.PURCHASEORDERID" string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERID.PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTCATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTCATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    POCREATEDAT date OPTIONS (ANNOTATION '', NAMEINSOURCE '"POCREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    CONVGROSSAMOUNT bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"CONVGROSSAMOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/olap"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PARTNERCITY/hier/PARTNERCITY" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PARTNERCITY/hier/PARTNERCITY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PARTNERCOMPANYNAME/hier/PARTNERCOMPANYNAME" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PARTNERCOMPANYNAME/hier/PARTNERCOMPANYNAME"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PARTNERID/hier/PARTNERID" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PARTNERID/hier/PARTNERID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PARTNERPOSTALCODE/hier/PARTNERPOSTALCODE" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PARTNERPOSTALCODE/hier/PARTNERPOSTALCODE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/POCREATEDAT/hier/POCREATEDAT" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/POCREATEDAT/hier/POCREATEDAT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PRODUCTCATEGORY/hier/PRODUCTCATEGORY" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PRODUCTCATEGORY/hier/PRODUCTCATEGORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PRODUCTID/hier/PRODUCTID" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PRODUCTID/hier/PRODUCTID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PURCHASEORDERID.PURCHASEORDERID/hier" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PURCHASEORDERID.PURCHASEORDERID/hier"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PURCHASEORDERITEM/hier/PURCHASEORDERITEM" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_COMMON_CURRENCY/PURCHASEORDERITEM/hier/PURCHASEORDERITEM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW" (
    PURCHASEORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    LIFECYCLESTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITYUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    CREATEDAT date OPTIONS (ANNOTATION '', NAMEINSOURCE '"CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/AT_PROD/hier/AT_PROD" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/AT_PROD/hier/AT_PROD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/CREATEDAT/hier/CREATEDAT" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/CREATEDAT/hier/CREATEDAT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/CURRENCY/hier/CURRENCY" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/CURRENCY/hier/CURRENCY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/LIFECYCLESTATUS/hier/LIFECYCLESTATUS" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/LIFECYCLESTATUS/hier/LIFECYCLESTATUS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/PURCHASEORDERID/hier/PURCHASEORDERID" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/PURCHASEORDERID/hier/PURCHASEORDERID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/PURCHASEORDERITEM/hier/PURCHASEORDERITEM" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/PURCHASEORDERITEM/hier/PURCHASEORDERITEM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/QUANTITYUNIT/hier/QUANTITYUNIT" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_PURCHASE_OVERVIEW/QUANTITYUNIT/hier/QUANTITYUNIT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD" (
    History_CREATEDAT date OPTIONS (NAMEINSOURCE '"History_CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    SALESORDERID string(10) OPTIONS (NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) OPTIONS (NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    AT_PROD_POSTALCODE string(10) OPTIONS (NAMEINSOURCE '"AT_PROD_POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    AT_PROD_COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"AT_PROD_COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    CA_StartDate date OPTIONS (NAMEINSOURCE '"CA_StartDate"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    CA_EndDate date OPTIONS (NAMEINSOURCE '"CA_EndDate"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    CM_NetAmount bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"CM_NetAmount"', NATIVE_TYPE 'DECIMAL'),
    "row.count" bigdecimal(18,2147483647) OPTIONS (NAMEINSOURCE '"row.count"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/CA_EndDate/hier/CA_EndDate" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/CA_EndDate/hier/CA_EndDate"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/CA_StartDate/hier/CA_StartDate" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/CA_StartDate/hier/CA_StartDate"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/History_CREATEDAT/hier/History_CREATEDAT" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/History_CREATEDAT/hier/History_CREATEDAT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/olap" (
    History_CREATEDAT date OPTIONS (ANNOTATION '', NAMEINSOURCE '"History_CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    SALESORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    AT_PROD_POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_PROD_POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    AT_PROD_COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_PROD_COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/olap"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/SALESORDERID/hier/SALESORDERID" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/SALESORDERID/hier/SALESORDERID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/SALESORDERITEM/hier/SALESORDERITEM" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_DYNAMIC_TIME_PERIOD/SALESORDERITEM/hier/SALESORDERITEM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_LITE" (
    SALESORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    AT_BUYER_POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_BUYER_POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    AT_BUYER_COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_BUYER_COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    DATETIMESTAMP timestamp OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATE_SQL date OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SQL"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    DATETIME_SAP string(14) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIME_SAP"', NATIVE_TYPE 'VARCHAR'),
    DATE_SAP string(8) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SAP"', NATIVE_TYPE 'VARCHAR'),
    "YEAR" string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'VARCHAR'),
    QUARTER string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER"', NATIVE_TYPE 'VARCHAR'),
    "MONTH" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH"', NATIVE_TYPE 'VARCHAR'),
    WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK"', NATIVE_TYPE 'VARCHAR'),
    WEEK_YEAR string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR"', NATIVE_TYPE 'VARCHAR'),
    DAY_OF_WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK"', NATIVE_TYPE 'VARCHAR'),
    "DAY" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY"', NATIVE_TYPE 'VARCHAR'),
    CALQUARTER string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALQUARTER"', NATIVE_TYPE 'VARCHAR'),
    CALMONTH string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALMONTH"', NATIVE_TYPE 'VARCHAR'),
    CALWEEK string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALWEEK"', NATIVE_TYPE 'VARCHAR'),
    YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUARTER_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MONTH_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DAY_OF_WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DAY_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_LITE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_LITE/AT_PROD/hier/AT_PROD" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_LITE/AT_PROD/hier/AT_PROD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_LITE/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_LITE/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_LITE/SALESORDERID/hier/SALESORDERID" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_LITE/SALESORDERID/hier/SALESORDERID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_LITE/SALESORDERITEM/hier/SALESORDERITEM" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_LITE/SALESORDERITEM/hier/SALESORDERITEM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_RANKING" (
    SALESORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    AT_BUYER_POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_BUYER_POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    AT_BUYER_COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_BUYER_COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    DATETIMESTAMP timestamp OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATE_SQL date OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SQL"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    DATETIME_SAP string(14) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIME_SAP"', NATIVE_TYPE 'VARCHAR'),
    DATE_SAP string(8) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SAP"', NATIVE_TYPE 'VARCHAR'),
    "YEAR" string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'VARCHAR'),
    QUARTER string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER"', NATIVE_TYPE 'VARCHAR'),
    "MONTH" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH"', NATIVE_TYPE 'VARCHAR'),
    WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK"', NATIVE_TYPE 'VARCHAR'),
    WEEK_YEAR string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR"', NATIVE_TYPE 'VARCHAR'),
    DAY_OF_WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK"', NATIVE_TYPE 'VARCHAR'),
    "DAY" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY"', NATIVE_TYPE 'VARCHAR'),
    CALQUARTER string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALQUARTER"', NATIVE_TYPE 'VARCHAR'),
    CALMONTH string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALMONTH"', NATIVE_TYPE 'VARCHAR'),
    CALWEEK string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALWEEK"', NATIVE_TYPE 'VARCHAR'),
    YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUARTER_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MONTH_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DAY_OF_WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DAY_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_RANKING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_RANKING/AT_PROD/hier/AT_PROD" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_RANKING/AT_PROD/hier/AT_PROD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_RANKING/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_RANKING/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_RANKING/SALESORDERID/hier/SALESORDERID" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_RANKING/SALESORDERID/hier/SALESORDERID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_ORDER_RANKING/SALESORDERITEM/hier/SALESORDERITEM" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_ORDER_RANKING/SALESORDERITEM/hier/SALESORDERITEM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV" (
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    LIFECYCLESTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERYSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DELIVERYSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    POSTING_DATE date OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTING_DATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    SALESORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITYUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    BILLINGSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BILLINGSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_CREATEDBY string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"HISTORY_CREATEDBY"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    AT_PROD_POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_PROD_POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    AT_PROD_COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_PROD_COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_NEW bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_NEW"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_COMPLETED bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_COMPLETED"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_INPROCESS bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_INPROCESS"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_PAID bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_PAID"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_UNPAID bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_UNPAID"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_DELIVERED bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_DELIVERED"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_UNDELIVERED bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_UNDELIVERED"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/AT_BUYER/hier/AT_BUYER" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/AT_BUYER/hier/AT_BUYER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/AT_PROD/hier/AT_PROD" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/AT_PROD/hier/AT_PROD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/BILLINGSTATUS/hier/BILLINGSTATUS" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/BILLINGSTATUS/hier/BILLINGSTATUS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/CURRENCY/hier/CURRENCY" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/CURRENCY/hier/CURRENCY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/DELIVERYSTATUS/hier/DELIVERYSTATUS" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/DELIVERYSTATUS/hier/DELIVERYSTATUS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/HISTORY_CREATEDBY/hier/HISTORY_CREATEDBY" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/HISTORY_CREATEDBY/hier/HISTORY_CREATEDBY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/LIFECYCLESTATUS/hier/LIFECYCLESTATUS" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/LIFECYCLESTATUS/hier/LIFECYCLESTATUS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/POSTING_DATE/hier/POSTING_DATE" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/POSTING_DATE/hier/POSTING_DATE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/QUANTITYUNIT/hier/QUANTITYUNIT" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/QUANTITYUNIT/hier/QUANTITYUNIT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/SALESORDERID/hier/SALESORDERID" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/SALESORDERID/hier/SALESORDERID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/SALESORDERITEM/hier/SALESORDERITEM" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AN_SALES_OVERVIEW_WO_CURR_CONV/SALESORDERITEM/hier/SALESORDERITEM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_BUYER" (
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_BUYER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_BUYER/hier/AT_BUYER" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_BUYER/hier/AT_BUYER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_PO_HEADER" (
    APPROVALSTATUSDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"APPROVALSTATUSDESC"', NATIVE_TYPE 'NVARCHAR'),
    CONFIRMATIONSTATUSDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CONFIRMATIONSTATUSDESC"', NATIVE_TYPE 'NVARCHAR'),
    LIFECYCLESTATUSDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLESTATUSDESC"', NATIVE_TYPE 'NVARCHAR'),
    ORDERINGSTATUSDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"ORDERINGSTATUSDESC"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    NOTEID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    LIFECYCLESTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    APPROVALSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"APPROVALSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    CONFIRMSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CONFIRMSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    ORDERINGSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"ORDERINGSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_CREATEDBY string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"HISTORY_CREATEDBY"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_CREATEDAT date OPTIONS (ANNOTATION '', NAMEINSOURCE '"HISTORY_CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    HISTORY_CHANGEDAT date OPTIONS (ANNOTATION '', NAMEINSOURCE '"HISTORY_CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    INVOICINGSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"INVOICINGSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_CHANGEDBY string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"HISTORY_CHANGEDBY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_PO_HEADER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_PO_HEADER/hier/AT_PO_HEADER" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_PO_HEADER/hier/AT_PO_HEADER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_PO_ITEM" (
    ProductName string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"ProductName"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERYDATE date OPTIONS (ANNOTATION '', NAMEINSOURCE '"DELIVERYDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    PURCHASEORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    QUANTITYUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_PO_ITEM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_PO_ITEM/hier/AT_PO_ITEM" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_PO_ITEM/hier/AT_PO_ITEM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_PROD" (
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_PROD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_PROD/hier/AT_PROD" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_PROD/hier/AT_PROD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_PURCHASE_ORDER_WORKLIST" (
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    PURCHASEORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    QUANTITYUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTNAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTNAME"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTDESC string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTDESC"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT_1 bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"GROSSAMOUNT_1"', NATIVE_TYPE 'DECIMAL'),
    DELIVERYDATE date OPTIONS (ANNOTATION '', NAMEINSOURCE '"DELIVERYDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCTPICURL string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTPICURL"', NATIVE_TYPE 'NVARCHAR'),
    LIFECYCLEDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLEDESC"', NATIVE_TYPE 'NVARCHAR'),
    APPROVALDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"APPROVALDESC"', NATIVE_TYPE 'NVARCHAR'),
    CONFIRMATIONDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CONFIRMATIONDESC"', NATIVE_TYPE 'NVARCHAR'),
    ORDERINGDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"ORDERINGDESC"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_PURCHASE_ORDER_WORKLIST"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_PURCHASE_ORDER_WORKLIST/hier/AT_PURCHASE_ORDER_WORKLIST" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_PURCHASE_ORDER_WORKLIST/hier/AT_PURCHASE_ORDER_WORKLIST"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_SALES_ORDER_WORKLIST" (
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    LIFECYCLESTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    QUANTITYUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTNAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTDESC string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTDESC"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_SALES_ORDER_WORKLIST"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_SALES_ORDER_WORKLIST/hier/AT_SALES_ORDER_WORKLIST" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_SALES_ORDER_WORKLIST/hier/AT_SALES_ORDER_WORKLIST"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_SUPPLIER" (
    SUPPLIERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIERID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_SUPPLIER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_SUPPLIER/hier/AT_SUPPLIER" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_SUPPLIER/hier/AT_SUPPLIER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_TIME_DIM" (
    DATETIMESTAMP timestamp OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATE_SQL date OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SQL"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    DATETIME_SAP string(14) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIME_SAP"', NATIVE_TYPE 'VARCHAR'),
    DATE_SAP string(8) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SAP"', NATIVE_TYPE 'VARCHAR'),
    "YEAR" string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'VARCHAR'),
    QUARTER string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER"', NATIVE_TYPE 'VARCHAR'),
    "MONTH" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH"', NATIVE_TYPE 'VARCHAR'),
    WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK"', NATIVE_TYPE 'VARCHAR'),
    WEEK_YEAR string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR"', NATIVE_TYPE 'VARCHAR'),
    DAY_OF_WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK"', NATIVE_TYPE 'VARCHAR'),
    "DAY" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY"', NATIVE_TYPE 'VARCHAR'),
    CALQUARTER string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALQUARTER"', NATIVE_TYPE 'VARCHAR'),
    CALMONTH string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALMONTH"', NATIVE_TYPE 'VARCHAR'),
    CALWEEK string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALWEEK"', NATIVE_TYPE 'VARCHAR'),
    YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUARTER_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MONTH_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DAY_OF_WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DAY_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_TIME_DIM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/AT_TIME_DIM/hier/Gregorian_Hierarchy" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/AT_TIME_DIM/hier/Gregorian_Hierarchy"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION" (
    COMPANY_NAME string(80) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(50) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'VARCHAR'),
    DISCOUNT bigdecimal(3,2147483647) OPTIONS (NAMEINSOURCE '"DISCOUNT"', NATIVE_TYPE 'DECIMAL'),
    REGION_CONSTANT string(4) OPTIONS (NAMEINSOURCE '"REGION_CONSTANT"', NATIVE_TYPE 'VARCHAR'),
    SALES_AMER bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES_AMER"', NATIVE_TYPE 'DECIMAL'),
    SALES_AFR bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES_AFR"', NATIVE_TYPE 'DECIMAL'),
    SALES_APJ bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES_APJ"', NATIVE_TYPE 'DECIMAL'),
    SALES_EMEA bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES_EMEA"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION/COMPANY_NAME/hier/COMPANY_NAME" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION/COMPANY_NAME/hier/COMPANY_NAME"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION/DISCOUNT/hier/DISCOUNT" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION/DISCOUNT/hier/DISCOUNT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION/REGION/hier/REGION" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION/REGION/hier/REGION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION/REGION_CONSTANT/hier/REGION_CONSTANT" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION/REGION_CONSTANT/hier/REGION_CONSTANT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL" (
    SALES_RANK integer OPTIONS (NAMEINSOURCE '"SALES_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ORDERS integer OPTIONS (NAMEINSOURCE '"ORDERS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REGION string(50) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'VARCHAR'),
    ORDER_RANK integer OPTIONS (NAMEINSOURCE '"ORDER_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SALES bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'DECIMAL'),
    COMPANY_NAME string(80) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DISCOUNT bigdecimal(3,2147483647) OPTIONS (NAMEINSOURCE '"DISCOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL/COMPANY_NAME/hier/COMPANY_NAME" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL/COMPANY_NAME/hier/COMPANY_NAME"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL/proc/tabletype/VAR_OUT" (
    SALES_RANK integer OPTIONS (NAMEINSOURCE '"SALES_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ORDERS integer OPTIONS (NAMEINSOURCE '"ORDERS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REGION string(50) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'VARCHAR'),
    ORDER_RANK integer OPTIONS (NAMEINSOURCE '"ORDER_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SALES bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'DECIMAL'),
    COMPANY_NAME string(80) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DISCOUNT bigdecimal(3,2147483647) OPTIONS (NAMEINSOURCE '"DISCOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL/proc/tabletype/VAR_OUT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL/REGION/hier/REGION" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL/REGION/hier/REGION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALES_YEAR_COMPARISON" (
    PRODUCT_CATEGORY string(40) OPTIONS (NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    YEAR1_NET_AMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"YEAR1_NET_AMOUNT"', NATIVE_TYPE 'DECIMAL'),
    YEAR2_NET_AMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"YEAR2_NET_AMOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALES_YEAR_COMPARISON"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALES_YEAR_COMPARISON/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALES_YEAR_COMPARISON/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALES_YEAR_COMPARISON/PRODUCT_CATEGORY/hier/PRODUCT_CATEGORY" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALES_YEAR_COMPARISON/PRODUCT_CATEGORY/hier/PRODUCT_CATEGORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN" (
    REGION string(4) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TOTAL_SALES bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TOTAL_SALES"', NATIVE_TYPE 'DECIMAL'),
    SALES bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'DECIMAL'),
    SHARE_SALES bigdecimal(12,2147483647) OPTIONS (NAMEINSOURCE '"SHARE_SALES"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN/COUNTRY/hier/COUNTRY" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN/COUNTRY/hier/COUNTRY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN/PRODUCT_NAME/hier/PRODUCT_NAME" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN/PRODUCT_NAME/hier/PRODUCT_NAME"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN/PRODUCTID/hier/PRODUCTID" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN/PRODUCTID/hier/PRODUCTID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN/REGION/hier/REGION" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALESORDER_DYNAMIC_JOIN/REGION/hier/REGION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALESORDER_RANKING" (
    COMPANY_NAME string(20) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'VARCHAR'),
    SALES string(20) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'VARCHAR'),
    ORDERS string(20) OPTIONS (NAMEINSOURCE '"ORDERS"', NATIVE_TYPE 'VARCHAR'),
    SALES_RANK string(20) OPTIONS (NAMEINSOURCE '"SALES_RANK"', NATIVE_TYPE 'VARCHAR'),
    ORDER_RANK string(20) OPTIONS (NAMEINSOURCE '"ORDER_RANK"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALESORDER_RANKING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALESORDER_RANKING_SQL" (
    COMPANY_NAME string(20) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'VARCHAR'),
    SALES string(20) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'VARCHAR'),
    ORDERS string(20) OPTIONS (NAMEINSOURCE '"ORDERS"', NATIVE_TYPE 'VARCHAR'),
    SALES_RANK string(20) OPTIONS (NAMEINSOURCE '"SALES_RANK"', NATIVE_TYPE 'VARCHAR'),
    ORDER_RANK string(20) OPTIONS (NAMEINSOURCE '"ORDER_RANK"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALESORDER_RANKING_SQL"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/CV_SALESORDER_RANKING_SQL/proc/tabletype/VAR_OUT" (
    COMPANY_NAME string(20) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'VARCHAR'),
    SALES string(20) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'VARCHAR'),
    ORDERS string(20) OPTIONS (NAMEINSOURCE '"ORDERS"', NATIVE_TYPE 'VARCHAR'),
    SALES_RANK string(20) OPTIONS (NAMEINSOURCE '"SALES_RANK"', NATIVE_TYPE 'VARCHAR'),
    ORDER_RANK string(20) OPTIONS (NAMEINSOURCE '"ORDER_RANK"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/CV_SALESORDER_RANKING_SQL/proc/tabletype/VAR_OUT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/DT_CUSTOMER_DISCOUNT_CALCULATION/RV" (
    SALES_RANK integer OPTIONS (NAMEINSOURCE '"SALES_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ORDERS integer OPTIONS (NAMEINSOURCE '"ORDERS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REGION string(50) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    ORDER_RANK integer OPTIONS (NAMEINSOURCE '"ORDER_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SALES bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'DECIMAL'),
    COMPANY_NAME string(50) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DISCOUNT bigdecimal(3,2147483647) OPTIONS (NAMEINSOURCE '"DISCOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/DT_CUSTOMER_DISCOUNT_CALCULATION/RV"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/DT_CUSTOMER_DISCOUNT_CALCULATION/TT" (
    SALES_RANK integer OPTIONS (NAMEINSOURCE '"SALES_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ORDERS integer OPTIONS (NAMEINSOURCE '"ORDERS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REGION string(50) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    ORDER_RANK integer OPTIONS (NAMEINSOURCE '"ORDER_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SALES bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'DECIMAL'),
    COMPANY_NAME string(50) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DISCOUNT bigdecimal(3,2147483647) OPTIONS (NAMEINSOURCE '"DISCOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/DT_CUSTOMER_DISCOUNT_CALCULATION/TT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/DT_TAX_CALCULATION/RV" (
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    TAX bigdecimal(3,2147483647) OPTIONS (NAMEINSOURCE '"TAX"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/DT_TAX_CALCULATION/RV"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.models/DT_TAX_CALCULATION/TT" (
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    TAX bigdecimal(3,2147483647) OPTIONS (NAMEINSOURCE '"TAX"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.models/DT_TAX_CALCULATION/TT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.spatial.models/BP_ADDRESS_DETAILS" (
    ADDRESSID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    LATITUDE double OPTIONS (ANNOTATION '', NAMEINSOURCE '"LATITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LONGITUDE double OPTIONS (ANNOTATION '', NAMEINSOURCE '"LONGITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    PHONENUMBER string(30) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PHONENUMBER"', NATIVE_TYPE 'NVARCHAR'),
    FAXNUMBER string(30) OPTIONS (ANNOTATION '', NAMEINSOURCE '"FAXNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    WEBADDRESS string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEBADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.spatial.models/BP_ADDRESS_DETAILS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.spatial.models/BP_ADDRESS_DETAILS/hier/BP_ADDRESS_DETAILS" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.spatial.models/BP_ADDRESS_DETAILS/hier/BP_ADDRESS_DETAILS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.spatial.models/REGION_SALES_BP" (
    SALESORDERID string(10) OPTIONS (NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_CREATEDAT date OPTIONS (NAMEINSOURCE '"HISTORY_CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    ADDRESSID string(10) OPTIONS (NAMEINSOURCE '"ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    LATITUDE double OPTIONS (NAMEINSOURCE '"LATITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LONGITUDE double OPTIONS (NAMEINSOURCE '"LONGITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    PHONENUMBER string(30) OPTIONS (NAMEINSOURCE '"PHONENUMBER"', NATIVE_TYPE 'NVARCHAR'),
    FAXNUMBER string(30) OPTIONS (NAMEINSOURCE '"FAXNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    WEBADDRESS string(1024) OPTIONS (NAMEINSOURCE '"WEBADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    YEAR_OF_SALE string(10) OPTIONS (NAMEINSOURCE '"YEAR_OF_SALE"', NATIVE_TYPE 'VARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    "row.count" bigdecimal(18,2147483647) OPTIONS (NAMEINSOURCE '"row.count"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.spatial.models/REGION_SALES_BP"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/CURRENCY/hier/CURRENCY" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/CURRENCY/hier/CURRENCY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/HISTORY_CREATEDAT/hier/HISTORY_CREATEDAT" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/HISTORY_CREATEDAT/hier/HISTORY_CREATEDAT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/olap" (
    SALESORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_CREATEDAT date OPTIONS (ANNOTATION '', NAMEINSOURCE '"HISTORY_CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    ADDRESSID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    LATITUDE double OPTIONS (ANNOTATION '', NAMEINSOURCE '"LATITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LONGITUDE double OPTIONS (ANNOTATION '', NAMEINSOURCE '"LONGITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    PHONENUMBER string(30) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PHONENUMBER"', NATIVE_TYPE 'NVARCHAR'),
    FAXNUMBER string(30) OPTIONS (ANNOTATION '', NAMEINSOURCE '"FAXNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    WEBADDRESS string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEBADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/olap"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/SALESORDERID/hier/SALESORDERID" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/SALESORDERID/hier/SALESORDERID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/YEAR_OF_SALE/hier/YEAR_OF_SALE" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.democontent.epm.spatial.models/REGION_SALES_BP/YEAR_OF_SALE/hier/YEAR_OF_SALE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.uis.db/GET_NAVIGATION_TARGET_DATA" (
    id string(256) OPTIONS (NAMEINSOURCE '"id"', NATIVE_TYPE 'VARCHAR'),
    applicationType string(50) OPTIONS (NAMEINSOURCE '"applicationType"', NATIVE_TYPE 'VARCHAR'),
    applicationData string(100) OPTIONS (NAMEINSOURCE '"applicationData"', NATIVE_TYPE 'VARCHAR'),
    postParameters string(2000) OPTIONS (NAMEINSOURCE '"postParameters"', NATIVE_TYPE 'VARCHAR'),
    text string(2000) OPTIONS (NAMEINSOURCE '"text"', NATIVE_TYPE 'VARCHAR'),
    applicationAlias string(100) OPTIONS (NAMEINSOURCE '"applicationAlias"', NATIVE_TYPE 'VARCHAR'),
    url string(2000) OPTIONS (NAMEINSOURCE '"url"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.uis.db/GET_NAVIGATION_TARGET_DATA"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.sap.hana.uis.db/GET_NAVIGATION_TARGET_DATA/proc/tabletype/VAR_OUT" (
    id string(256) OPTIONS (NAMEINSOURCE '"id"', NATIVE_TYPE 'VARCHAR'),
    applicationType string(50) OPTIONS (NAMEINSOURCE '"applicationType"', NATIVE_TYPE 'VARCHAR'),
    applicationData string(100) OPTIONS (NAMEINSOURCE '"applicationData"', NATIVE_TYPE 'VARCHAR'),
    postParameters string(2000) OPTIONS (NAMEINSOURCE '"postParameters"', NATIVE_TYPE 'VARCHAR'),
    text string(2000) OPTIONS (NAMEINSOURCE '"text"', NATIVE_TYPE 'VARCHAR'),
    applicationAlias string(100) OPTIONS (NAMEINSOURCE '"applicationAlias"', NATIVE_TYPE 'VARCHAR'),
    url string(2000) OPTIONS (NAMEINSOURCE '"url"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."sap.hana.uis.db/GET_NAVIGATION_TARGET_DATA/proc/tabletype/VAR_OUT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.testRH/CALCFLIGHT" (
    PRICE bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    CARRID string(3) OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    total_price string(10) OPTIONS (NAMEINSOURCE '"total_price"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."testRH/CALCFLIGHT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.testRH/CALCFLIGHT/CARRID/hier/CARRID" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."testRH/CALCFLIGHT/CARRID/hier/CARRID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.testRH/CALCFLIGHT/Measures/hier/Measures" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."testRH/CALCFLIGHT/Measures/hier/Measures"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.testRH/CALCFLIGHT/PRICE/hier/PRICE" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."testRH/CALCFLIGHT/PRICE/hier/PRICE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.testRH/FLIGHT" (
    PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    CITYFROM string(20) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITYFROM"', NATIVE_TYPE 'NVARCHAR'),
    CITYTO string(20) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITYTO"', NATIVE_TYPE 'NVARCHAR'),
    DISTANCE bigdecimal(9,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DISTANCE"', NATIVE_TYPE 'DECIMAL'),
    CARRID string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    CARRNAME string(20) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CARRNAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."testRH/FLIGHT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_BIC.testRH/FLIGHT/hier/FLIGHT" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_BIC"."testRH/FLIGHT/hier/FLIGHT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_DATAPROV.ACTIVE_DATA_FLOWS" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (ANNOTATION 'Package ID of dataflow', NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of dataflow', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(32) NOT NULL OPTIONS (ANNOTATION '', NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE string(256) OPTIONS (ANNOTATION 'Data source hint', NAMEINSOURCE '"DATASOURCE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Activated dataflows', NAMEINSOURCE '"_SYS_DATAPROV"."ACTIVE_DATA_FLOWS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_DATAPROV.ACTIVE_DATA_FLOWS_" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (ANNOTATION 'Package ID of dataflow', NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of dataflow', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(32) NOT NULL OPTIONS (ANNOTATION '', NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE string(256) OPTIONS (ANNOTATION 'Data source hint', NAMEINSOURCE '"DATASOURCE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Activated dataflows', NAMEINSOURCE '"_SYS_DATAPROV"."ACTIVE_DATA_FLOWS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_DATAPROV.AVAILABLE_OBJECTS" (
    DATASOURCE_NAME string(256) OPTIONS (ANNOTATION 'Name of data source', NAMEINSOURCE '"DATASOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_SYSTEM_HOSTNAME string(256) OPTIONS (ANNOTATION 'Hostname of data source system', NAMEINSOURCE '"DATASOURCE_SYSTEM_HOSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_SYSTEM_IDENTIFIER string(64) OPTIONS (ANNOTATION 'Unique identifier of data source system on that host (e.g. SID or port)', NAMEINSOURCE '"DATASOURCE_SYSTEM_IDENTIFIER"', NATIVE_TYPE 'NVARCHAR'),
    PROVISIONING_SYSTEM_HOSTNAME string(256) OPTIONS (ANNOTATION 'Hostname of the provisioning system', NAMEINSOURCE '"PROVISIONING_SYSTEM_HOSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    PROVISIONING_SYSTEM_IDENTIFIER string(64) OPTIONS (ANNOTATION 'Unique identifier of provisioning system on that host (e.g. SID or port)', NAMEINSOURCE '"PROVISIONING_SYSTEM_IDENTIFIER"', NATIVE_TYPE 'NVARCHAR'),
    CATALOG_NAME string(256) OPTIONS (ANNOTATION 'Catalog name', NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(128) OPTIONS (ANNOTATION 'Object type', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    COMMENT string(128) OPTIONS (ANNOTATION 'Object description', NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Data provisioning source objects', NAMEINSOURCE '"_SYS_DATAPROV"."AVAILABLE_OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_DATAPROV.DATA_FLOW_OBJECTS" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (ANNOTATION 'Package ID of dataflow', NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of dataflow', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(32) NOT NULL OPTIONS (ANNOTATION '', NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    SOURCE_OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of source object', NAMEINSOURCE '"SOURCE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Source objects contained in active dataflows', NAMEINSOURCE '"_SYS_DATAPROV"."DATA_FLOW_OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_DATAPROV.DATA_FLOW_OBJECTS_" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (ANNOTATION 'Package ID of dataflow', NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of dataflow', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(32) NOT NULL OPTIONS (ANNOTATION '', NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    SOURCE_OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of source object', NAMEINSOURCE '"SOURCE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Source objects contained in active dataflows', NAMEINSOURCE '"_SYS_DATAPROV"."DATA_FLOW_OBJECTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_DATAPROV.DATASOURCES" (
    DATASOURCE_NAME string(256) OPTIONS (ANNOTATION 'Name of data source', NAMEINSOURCE '"DATASOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_SYSTEM_HOSTNAME string(256) OPTIONS (ANNOTATION 'Hostname of data source system', NAMEINSOURCE '"DATASOURCE_SYSTEM_HOSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_SYSTEM_IDENTIFIER string(64) OPTIONS (ANNOTATION 'Unique identifier of data source system on that host (e.g. SID or port)', NAMEINSOURCE '"DATASOURCE_SYSTEM_IDENTIFIER"', NATIVE_TYPE 'NVARCHAR'),
    PROVISIONING_SYSTEM_HOSTNAME string(256) OPTIONS (ANNOTATION 'Hostname of the provisioning system', NAMEINSOURCE '"PROVISIONING_SYSTEM_HOSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    PROVISIONING_SYSTEM_IDENTIFIER string(64) OPTIONS (ANNOTATION 'Unique identifier of provisioning system on that host (e.g. SID or port)', NAMEINSOURCE '"PROVISIONING_SYSTEM_IDENTIFIER"', NATIVE_TYPE 'NVARCHAR'),
    PROVISIONING_SYSTEM_TYPE string(32) OPTIONS (ANNOTATION 'Type of provisioning system on that host (e.g. SLT or Test)', NAMEINSOURCE '"PROVISIONING_SYSTEM_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_TYPE string(128) OPTIONS (ANNOTATION 'Type of data source', NAMEINSOURCE '"DATASOURCE_TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Registered data provisioning data sources', NAMEINSOURCE '"_SYS_DATAPROV"."DATASOURCES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_DATAPROV.JOBS" (
    JOB_ID long NOT NULL OPTIONS (ANNOTATION 'ID of a job', NAMEINSOURCE '"JOB_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PACKAGE_ID string(256) OPTIONS (ANNOTATION 'Package ID of dataflow', NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of dataflow', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(32) OPTIONS (ANNOTATION '', NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_ID integer OPTIONS (ANNOTATION 'Repository object version', NAMEINSOURCE '"VERSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATASOURCE_NAME string(256) OPTIONS (ANNOTATION 'Name of data source', NAMEINSOURCE '"DATASOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_SYSTEM_HOSTNAME string(256) OPTIONS (ANNOTATION 'Hostname of data source system', NAMEINSOURCE '"DATASOURCE_SYSTEM_HOSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_SYSTEM_IDENTIFIER string(64) OPTIONS (ANNOTATION 'Unique identifier of data source system on that host (e.g. SID or port)', NAMEINSOURCE '"DATASOURCE_SYSTEM_IDENTIFIER"', NATIVE_TYPE 'NVARCHAR'),
    PROVISIONING_SYSTEM_HOSTNAME string(256) OPTIONS (ANNOTATION 'Hostname of provisioning system', NAMEINSOURCE '"PROVISIONING_SYSTEM_HOSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    PROVISIONING_SYSTEM_IDENTIFIER string(64) OPTIONS (ANNOTATION 'Unique identifier of provisioning system on that host (e.g. SID or port)', NAMEINSOURCE '"PROVISIONING_SYSTEM_IDENTIFIER"', NATIVE_TYPE 'NVARCHAR'),
    COMMENT string(256) OPTIONS (ANNOTATION 'Comment on data provisioning job', NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Activated data provisioning jobs', NAMEINSOURCE '"_SYS_DATAPROV"."JOBS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_DATAPROV.JOBS_" (
    JOB_ID long NOT NULL OPTIONS (ANNOTATION 'ID of a job', NAMEINSOURCE '"JOB_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PACKAGE_ID string(256) OPTIONS (ANNOTATION 'Package ID of dataflow', NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of dataflow', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(32) OPTIONS (ANNOTATION '', NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_ID integer OPTIONS (ANNOTATION 'Repository object version', NAMEINSOURCE '"VERSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATASOURCE_NAME string(256) OPTIONS (ANNOTATION 'Name of data source', NAMEINSOURCE '"DATASOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_SYSTEM_HOSTNAME string(256) OPTIONS (ANNOTATION 'Hostname of data source system', NAMEINSOURCE '"DATASOURCE_SYSTEM_HOSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_SYSTEM_IDENTIFIER string(64) OPTIONS (ANNOTATION 'Unique identifier of data source system on that host (e.g. SID or port)', NAMEINSOURCE '"DATASOURCE_SYSTEM_IDENTIFIER"', NATIVE_TYPE 'NVARCHAR'),
    PROVISIONING_SYSTEM_HOSTNAME string(256) OPTIONS (ANNOTATION 'Hostname of provisioning system', NAMEINSOURCE '"PROVISIONING_SYSTEM_HOSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    PROVISIONING_SYSTEM_IDENTIFIER string(64) OPTIONS (ANNOTATION 'Unique identifier of provisioning system on that host (e.g. SID or port)', NAMEINSOURCE '"PROVISIONING_SYSTEM_IDENTIFIER"', NATIVE_TYPE 'NVARCHAR'),
    COMMENT string(256) OPTIONS (ANNOTATION 'Comment on data provisioning job', NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Activated data provisioning jobs', NAMEINSOURCE '"_SYS_DATAPROV"."JOBS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_DATAPROV.LOGICAL_DATASOURCES" (
    LOGICAL_DATASOURCE string(1024) OPTIONS (ANNOTATION 'Logical name to be used for data source', NAMEINSOURCE '"LOGICAL_DATASOURCE"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_NAME string(256) OPTIONS (ANNOTATION 'Name of the data source', NAMEINSOURCE '"DATASOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_SYSTEM_HOSTNAME string(256) OPTIONS (ANNOTATION 'Hostname of data source system', NAMEINSOURCE '"DATASOURCE_SYSTEM_HOSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_SYSTEM_IDENTIFIER string(64) OPTIONS (ANNOTATION 'Unique identifier of data source system on that host (e.g. SID or port)', NAMEINSOURCE '"DATASOURCE_SYSTEM_IDENTIFIER"', NATIVE_TYPE 'NVARCHAR'),
    PROVISIONING_SYSTEM_HOSTNAME string(256) OPTIONS (ANNOTATION 'Hostname of provisioning system', NAMEINSOURCE '"PROVISIONING_SYSTEM_HOSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    PROVISIONING_SYSTEM_IDENTIFIER string(64) OPTIONS (ANNOTATION 'Unique identifier of provisioning system on that host (e.g. SID or port)', NAMEINSOURCE '"PROVISIONING_SYSTEM_IDENTIFIER"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Logical names of the registered data sources', NAMEINSOURCE '"_SYS_DATAPROV"."LOGICAL_DATASOURCES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_EPM.EPM_PUBLISH_PRIVILEGE_FILTER_TYPE" (
    "FILTER" string(513) OPTIONS (NAMEINSOURCE '"FILTER"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_EPM"."EPM_PUBLISH_PRIVILEGE_FILTER_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_EPM.EPM_PUBLISH_PRIVILEGES_TYPE" (
    PUBLISH_PRIVILEGE_NAME string(256) OPTIONS (NAMEINSOURCE '"PUBLISH_PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    "FILTER" string(513) OPTIONS (NAMEINSOURCE '"FILTER"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_EPM"."EPM_PUBLISH_PRIVILEGES_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_EPM.PUBLISH_GRANTS" (
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    ID long NOT NULL OPTIONS (NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PUBLISH_PRIVILEGE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PUBLISH_PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_EPM"."PUBLISH_GRANTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_EPM.PUBLISH_PRIVILEGES" (
    PUBLISH_PRIVILEGE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PUBLISH_PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OPERAND string(513) OPTIONS (NAMEINSOURCE '"OPERAND"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_EPM"."PUBLISH_PRIVILEGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_EPM.SAVED_CONTAINERS" (
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    MODEL_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"MODEL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VERSION integer NOT NULL OPTIONS (NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTAINER string(256) NOT NULL OPTIONS (NAMEINSOURCE '"CONTAINER"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_EPM"."SAVED_CONTAINERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_EPM.TEMPORARY_CONTAINERS" (
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    MODEL_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"MODEL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VERSION integer NOT NULL OPTIONS (NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTAINER string(256) NOT NULL OPTIONS (NAMEINSOURCE '"CONTAINER"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_EPM"."TEMPORARY_CONTAINERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_EPM.VERSIONS" (
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    MODEL_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"MODEL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VERSION integer NOT NULL OPTIONS (NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMENTS string(1024) OPTIONS (NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS integer OPTIONS (NAMEINSOURCE '"STATUS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_CHANGE_TIME timestamp OPTIONS (NAMEINSOURCE '"LAST_CHANGE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_EPM"."VERSIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.ACTIVATION_HELPER2" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    IS_DELETION integer NOT NULL DEFAULT '-1' OPTIONS (NAMEINSOURCE '"IS_DELETION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HAS_ACTIVE_VERSION integer NOT NULL DEFAULT '-1' OPTIONS (NAMEINSOURCE '"HAS_ACTIVE_VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VERSION_ID integer NOT NULL DEFAULT '-1' OPTIONS (NAMEINSOURCE '"VERSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."ACTIVATION_HELPER2"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.ACTIVE_CONTENT_TEXT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_TYPE string(32) OPTIONS (NAMEINSOURCE '"TEXT_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_LENGTH integer OPTIONS (NAMEINSOURCE '"MAX_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."ACTIVE_CONTENT_TEXT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.ACTIVE_CONTENT_TEXT_CONTENT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    LANG string(256) NOT NULL OPTIONS (NAMEINSOURCE '"LANG"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT string NOT NULL OPTIONS (NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."ACTIVE_CONTENT_TEXT_CONTENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.ACTIVE_OBJECT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"VERSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ACTIVATED_AT timestamp NOT NULL OPTIONS (NAMEINSOURCE '"ACTIVATED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ACTIVATED_BY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"ACTIVATED_BY"', NATIVE_TYPE 'NVARCHAR'),
    EDIT byte NOT NULL DEFAULT '1' OPTIONS (NAMEINSOURCE '"EDIT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CDATA clob(24) OPTIONS (NAMEINSOURCE '"CDATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    BDATA blob(16) OPTIONS (NAMEINSOURCE '"BDATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'BLOB'),
    COMPRESSION_TYPE integer OPTIONS (NAMEINSOURCE '"COMPRESSION_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FORMAT_VERSION string(16) OPTIONS (NAMEINSOURCE '"FORMAT_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERY_UNIT string(256) OPTIONS (NAMEINSOURCE '"DELIVERY_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION string(256) OPTIONS (NAMEINSOURCE '"DU_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    DU_VENDOR string(256) DEFAULT '' OPTIONS (NAMEINSOURCE '"DU_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION_SP string(16) DEFAULT '' OPTIONS (NAMEINSOURCE '"DU_VERSION_SP"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION_PATCH string(16) DEFAULT '' OPTIONS (NAMEINSOURCE '"DU_VERSION_PATCH"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_STATUS byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"OBJECT_STATUS"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CHANGE_NUMBER integer DEFAULT '0' OPTIONS (NAMEINSOURCE '"CHANGE_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RELEASED_AT timestamp OPTIONS (NAMEINSOURCE '"RELEASED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."ACTIVE_OBJECT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.ACTIVE_OBJECT_TEXT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_TYPE string(32) OPTIONS (NAMEINSOURCE '"TEXT_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_LENGTH integer OPTIONS (NAMEINSOURCE '"MAX_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."ACTIVE_OBJECT_TEXT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.ACTIVE_OBJECT_TEXT_CONTENT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    LANG string(256) NOT NULL OPTIONS (NAMEINSOURCE '"LANG"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT string NOT NULL OPTIONS (NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."ACTIVE_OBJECT_TEXT_CONTENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.ACTIVE_OBJECTCROSSREF" (
    FROM_PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    FROM_OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FROM_OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    TO_TENANT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TO_TENANT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TO_PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TO_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    TO_OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TO_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TO_OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"TO_OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    SRC_PATH string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SRC_PATH"', NATIVE_TYPE 'NVARCHAR'),
    DST_PATH string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"DST_PATH"', NATIVE_TYPE 'NVARCHAR'),
    REF_TYPE integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"REF_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."ACTIVE_OBJECTCROSSREF"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.ACTIVE_TAGS" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    TAG string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TAG"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."ACTIVE_TAGS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.ACTIVE_TEXT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_TYPE string(32) OPTIONS (NAMEINSOURCE '"TEXT_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_LENGTH integer OPTIONS (NAMEINSOURCE '"MAX_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."ACTIVE_TEXT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.ACTIVE_TEXT_CONTENT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    LANG string(256) NOT NULL OPTIONS (NAMEINSOURCE '"LANG"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT string NOT NULL OPTIONS (NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."ACTIVE_TEXT_CONTENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.CATALOG_OBJECTS_CREATED_BY_REPOSITORY_ACTIVATIONS" (
    CATALOG_SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of database object', NAMEINSOURCE '"CATALOG_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CATALOG_OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Object name of database object', NAMEINSOURCE '"CATALOG_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REPOSITORY_PACKAGE_ID string(256) NOT NULL OPTIONS (ANNOTATION 'Repository package this database object belongs to', NAMEINSOURCE '"REPOSITORY_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    REPOSITORY_OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Object name in the repository', NAMEINSOURCE '"REPOSITORY_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REPOSITORY_OBJECT_TYPE string(255) NOT NULL OPTIONS (ANNOTATION 'Type of object in the repository', NAMEINSOURCE '"REPOSITORY_OBJECT_TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Objects belonging to repository', NAMEINSOURCE '"_SYS_REPO"."CATALOG_OBJECTS_CREATED_BY_REPOSITORY_ACTIVATIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.CHANGE_CONTRIBUTORS" (
    SRC_SYSTEM string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SRC_SYSTEM"', NATIVE_TYPE 'NVARCHAR'),
    CHANGE_NUMBER integer NOT NULL OPTIONS (NAMEINSOURCE '"CHANGE_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "USER" string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER"', NATIVE_TYPE 'NVARCHAR'),
    STATUS byte NOT NULL DEFAULT '1' OPTIONS (NAMEINSOURCE '"STATUS"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DESCRIPTION clob(24) NOT NULL OPTIONS (NAMEINSOURCE '"DESCRIPTION"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    VALIDATED_AT timestamp OPTIONS (NAMEINSOURCE '"VALIDATED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."CHANGE_CONTRIBUTORS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.CHANGE_ENTRIES" (
    SRC_SYSTEM string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SRC_SYSTEM"', NATIVE_TYPE 'NVARCHAR'),
    CHANGE_NUMBER integer NOT NULL OPTIONS (NAMEINSOURCE '"CHANGE_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."CHANGE_ENTRIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.CHANGE_TRACKING_CONFIG" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."CHANGE_TRACKING_CONFIG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.CHANGES" (
    SRC_SYSTEM string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SRC_SYSTEM"', NATIVE_TYPE 'NVARCHAR'),
    CHANGE_NUMBER integer NOT NULL OPTIONS (NAMEINSOURCE '"CHANGE_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS byte NOT NULL DEFAULT '1' OPTIONS (NAMEINSOURCE '"STATUS"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DESCRIPTION string(256) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    CREATED_AT timestamp NOT NULL OPTIONS (NAMEINSOURCE '"CREATED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CREATED_BY string(256) OPTIONS (NAMEINSOURCE '"CREATED_BY"', NATIVE_TYPE 'NVARCHAR'),
    RELEASED_AT timestamp OPTIONS (NAMEINSOURCE '"RELEASED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RELEASED_BY string(256) OPTIONS (NAMEINSOURCE '"RELEASED_BY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."CHANGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.CONTENT_TEXT_HISTORY" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_ID integer NOT NULL DEFAULT '-1' OPTIONS (NAMEINSOURCE '"VERSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_TYPE string(32) OPTIONS (NAMEINSOURCE '"TEXT_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_LENGTH integer OPTIONS (NAMEINSOURCE '"MAX_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTENT string NOT NULL OPTIONS (NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'NVARCHAR'),
    RECORDMODE byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"RECORDMODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."CONTENT_TEXT_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.DELIVERY_UNITS" (
    DELIVERY_UNIT string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DELIVERY_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    RESPONSIBLE string(256) OPTIONS (NAMEINSOURCE '"RESPONSIBLE"', NATIVE_TYPE 'NVARCHAR'),
    VERSION string(256) OPTIONS (NAMEINSOURCE '"VERSION"', NATIVE_TYPE 'NVARCHAR'),
    VENDOR string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_SP string(16) DEFAULT '' OPTIONS (NAMEINSOURCE '"VERSION_SP"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_PATCH string(16) DEFAULT '' OPTIONS (NAMEINSOURCE '"VERSION_PATCH"', NATIVE_TYPE 'NVARCHAR'),
    PPMS_ID string(20) DEFAULT '' OPTIONS (NAMEINSOURCE '"PPMS_ID"', NATIVE_TYPE 'VARCHAR'),
    CAPTION string(64) OPTIONS (NAMEINSOURCE '"CAPTION"', NATIVE_TYPE 'NVARCHAR'),
    LAST_UPDATE timestamp OPTIONS (NAMEINSOURCE '"LAST_UPDATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SP_PPMS_ID string(20) OPTIONS (NAMEINSOURCE '"SP_PPMS_ID"', NATIVE_TYPE 'VARCHAR'),
    ACH string(64) OPTIONS (NAMEINSOURCE '"ACH"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."DELIVERY_UNITS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.HISTORICAL_OBJECTCROSSREF" (
    FROM_PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    FROM_OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FROM_OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    FROM_VERSION_ID integer NOT NULL DEFAULT '-1' OPTIONS (NAMEINSOURCE '"FROM_VERSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TO_TENANT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TO_TENANT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TO_PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TO_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    TO_OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TO_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TO_OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"TO_OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    SRC_PATH string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SRC_PATH"', NATIVE_TYPE 'NVARCHAR'),
    DST_PATH string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"DST_PATH"', NATIVE_TYPE 'NVARCHAR'),
    REF_TYPE integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"REF_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."HISTORICAL_OBJECTCROSSREF"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.INACTIVE_CONTENT_TEXT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    OWNER string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OWNER"', NATIVE_TYPE 'NVARCHAR'),
    WORKSPACE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"WORKSPACE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_TYPE string(32) OPTIONS (NAMEINSOURCE '"TEXT_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_LENGTH integer OPTIONS (NAMEINSOURCE '"MAX_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."INACTIVE_CONTENT_TEXT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.INACTIVE_CONTENT_TEXT_CONTENT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    OWNER string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OWNER"', NATIVE_TYPE 'NVARCHAR'),
    WORKSPACE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"WORKSPACE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    LANG string(256) NOT NULL OPTIONS (NAMEINSOURCE '"LANG"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT string NOT NULL OPTIONS (NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."INACTIVE_CONTENT_TEXT_CONTENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.INACTIVE_OBJECT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    OWNER string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OWNER"', NATIVE_TYPE 'NVARCHAR'),
    WORKSPACE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"WORKSPACE"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_ID integer OPTIONS (NAMEINSOURCE '"VERSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_CHANGED_AT timestamp NOT NULL OPTIONS (NAMEINSOURCE '"LAST_CHANGED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IS_DELETION byte DEFAULT '0' OPTIONS (NAMEINSOURCE '"IS_DELETION"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    EDIT byte DEFAULT '1' OPTIONS (NAMEINSOURCE '"EDIT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CDATA clob(24) OPTIONS (NAMEINSOURCE '"CDATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    BDATA blob(16) OPTIONS (NAMEINSOURCE '"BDATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'BLOB'),
    COMPRESSION_TYPE integer OPTIONS (NAMEINSOURCE '"COMPRESSION_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FORMAT_VERSION string(16) OPTIONS (NAMEINSOURCE '"FORMAT_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERY_UNIT string(256) OPTIONS (NAMEINSOURCE '"DELIVERY_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION string(256) OPTIONS (NAMEINSOURCE '"DU_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    DU_VENDOR string(256) DEFAULT '' OPTIONS (NAMEINSOURCE '"DU_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION_SP string(16) DEFAULT '' OPTIONS (NAMEINSOURCE '"DU_VERSION_SP"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION_PATCH string(16) DEFAULT '' OPTIONS (NAMEINSOURCE '"DU_VERSION_PATCH"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."INACTIVE_OBJECT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.INACTIVE_OBJECT_TEXT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    OWNER string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OWNER"', NATIVE_TYPE 'NVARCHAR'),
    WORKSPACE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"WORKSPACE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_TYPE string(32) OPTIONS (NAMEINSOURCE '"TEXT_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_LENGTH integer OPTIONS (NAMEINSOURCE '"MAX_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."INACTIVE_OBJECT_TEXT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.INACTIVE_OBJECT_TEXT_CONTENT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    OWNER string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OWNER"', NATIVE_TYPE 'NVARCHAR'),
    WORKSPACE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"WORKSPACE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    LANG string(256) NOT NULL OPTIONS (NAMEINSOURCE '"LANG"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT string NOT NULL OPTIONS (NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."INACTIVE_OBJECT_TEXT_CONTENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.INACTIVE_OBJECTCROSSREF" (
    FROM_PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    FROM_OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FROM_OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    FROM_WORKSPACE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_WORKSPACE"', NATIVE_TYPE 'NVARCHAR'),
    FROM_OWNER string(256) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_OWNER"', NATIVE_TYPE 'NVARCHAR'),
    TO_TENANT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TO_TENANT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TO_PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TO_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    TO_OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TO_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TO_OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"TO_OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    SRC_PATH string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SRC_PATH"', NATIVE_TYPE 'NVARCHAR'),
    DST_PATH string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"DST_PATH"', NATIVE_TYPE 'NVARCHAR'),
    REF_TYPE integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"REF_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."INACTIVE_OBJECTCROSSREF"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.INACTIVE_TEXT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    OWNER string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OWNER"', NATIVE_TYPE 'NVARCHAR'),
    WORKSPACE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"WORKSPACE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_TYPE string(32) OPTIONS (NAMEINSOURCE '"TEXT_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_LENGTH integer OPTIONS (NAMEINSOURCE '"MAX_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."INACTIVE_TEXT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.INACTIVE_TEXT_CONTENT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    OWNER string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OWNER"', NATIVE_TYPE 'NVARCHAR'),
    WORKSPACE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"WORKSPACE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    LANG string(256) NOT NULL OPTIONS (NAMEINSOURCE '"LANG"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT string NOT NULL OPTIONS (NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."INACTIVE_TEXT_CONTENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.LEGAL_DEL_UNIT_DEPENDENCIES" (
    FROM_DU string(256) NOT NULL OPTIONS (NAMEINSOURCE '"FROM_DU"', NATIVE_TYPE 'NVARCHAR'),
    TO_DU string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TO_DU"', NATIVE_TYPE 'NVARCHAR'),
    FROM_VENDOR string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"FROM_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    TO_VENDOR string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"TO_VENDOR"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."LEGAL_DEL_UNIT_DEPENDENCIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.NRIV" (
    DOMAIN string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DOMAIN"', NATIVE_TYPE 'NVARCHAR'),
    NUMBER integer OPTIONS (NAMEINSOURCE '"NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."NRIV"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.OBJECT_HISTORY" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_ID integer NOT NULL DEFAULT '-1' OPTIONS (NAMEINSOURCE '"VERSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ACTIVATED_AT timestamp NOT NULL OPTIONS (NAMEINSOURCE '"ACTIVATED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ACTIVATED_BY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"ACTIVATED_BY"', NATIVE_TYPE 'NVARCHAR'),
    IS_DELETION byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"IS_DELETION"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CLOB_DIFF_STRATEGY byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"CLOB_DIFF_STRATEGY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DIFFERID integer OPTIONS (NAMEINSOURCE '"DIFFERID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DIFFERVERSION string(16) OPTIONS (NAMEINSOURCE '"DIFFERVERSION"', NATIVE_TYPE 'VARCHAR'),
    CVERSION clob(24) OPTIONS (NAMEINSOURCE '"CVERSION"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    BVERSION blob(16) OPTIONS (NAMEINSOURCE '"BVERSION"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'BLOB'),
    FORMAT_VERSION string(16) OPTIONS (NAMEINSOURCE '"FORMAT_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERY_UNIT string(256) OPTIONS (NAMEINSOURCE '"DELIVERY_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION string(256) OPTIONS (NAMEINSOURCE '"DU_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    DU_VENDOR string(256) DEFAULT '' OPTIONS (NAMEINSOURCE '"DU_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION_SP string(16) DEFAULT '' OPTIONS (NAMEINSOURCE '"DU_VERSION_SP"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION_PATCH string(16) DEFAULT '' OPTIONS (NAMEINSOURCE '"DU_VERSION_PATCH"', NATIVE_TYPE 'NVARCHAR'),
    CHANGE_NUMBER integer DEFAULT '0' OPTIONS (NAMEINSOURCE '"CHANGE_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RELEASED_AT timestamp OPTIONS (NAMEINSOURCE '"RELEASED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."OBJECT_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.OBJECT_TEXT_HISTORY" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_ID integer NOT NULL DEFAULT '-1' OPTIONS (NAMEINSOURCE '"VERSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_TYPE string(32) OPTIONS (NAMEINSOURCE '"TEXT_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_LENGTH integer OPTIONS (NAMEINSOURCE '"MAX_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTENT string NOT NULL OPTIONS (NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'NVARCHAR'),
    RECORDMODE byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"RECORDMODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."OBJECT_TEXT_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.PACKAGE_CATALOG" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    SRC_SYSTEM string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SRC_SYSTEM"', NATIVE_TYPE 'NVARCHAR'),
    SRC_TENANT string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SRC_TENANT"', CHAR_OCTET_LENGTH 258, NATIVE_TYPE 'CHAR'),
    DESCRIPTION string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    RESPONSIBLE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"RESPONSIBLE"', NATIVE_TYPE 'NVARCHAR'),
    ORIG_LANG string(42) OPTIONS (NAMEINSOURCE '"ORIG_LANG"', NATIVE_TYPE 'NVARCHAR'),
    IS_STRUCTURAL byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"IS_STRUCTURAL"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DELIVERY_UNIT string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"DELIVERY_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_COLLECTION string(256) DEFAULT '' OPTIONS (NAMEINSOURCE '"TEXT_COLLECTION"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_STATUS string(64) DEFAULT '' OPTIONS (NAMEINSOURCE '"TEXT_STATUS"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_TERMINOLOGY_DOMAIN string(256) DEFAULT '' OPTIONS (NAMEINSOURCE '"TEXT_TERMINOLOGY_DOMAIN"', NATIVE_TYPE 'NVARCHAR'),
    HINTS_FOR_TRANSLATION string(256) DEFAULT '' OPTIONS (NAMEINSOURCE '"HINTS_FOR_TRANSLATION"', NATIVE_TYPE 'NVARCHAR'),
    DU_VENDOR string(256) DEFAULT '' OPTIONS (NAMEINSOURCE '"DU_VENDOR"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."PACKAGE_CATALOG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.PACKAGE_TEXT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_TYPE string(32) OPTIONS (NAMEINSOURCE '"TEXT_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_LENGTH integer OPTIONS (NAMEINSOURCE '"MAX_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."PACKAGE_TEXT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.PACKAGE_TEXT_CONTENT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    LANG string(256) NOT NULL OPTIONS (NAMEINSOURCE '"LANG"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT string NOT NULL OPTIONS (NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."PACKAGE_TEXT_CONTENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.PRODUCT_INSTANCES" (
    VENDOR string(30) NOT NULL OPTIONS (NAMEINSOURCE '"VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(30) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    INSTANCE_ID string(3) NOT NULL DEFAULT '001' OPTIONS (NAMEINSOURCE '"INSTANCE_ID"', NATIVE_TYPE 'NVARCHAR'),
    PPMS_ID string(20) OPTIONS (NAMEINSOURCE '"PPMS_ID"', NATIVE_TYPE 'NVARCHAR'),
    CAPTION string(64) OPTIONS (NAMEINSOURCE '"CAPTION"', NATIVE_TYPE 'NVARCHAR'),
    IMPLICIT byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"IMPLICIT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."PRODUCT_INSTANCES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.PRODUCTS" (
    VENDOR string(30) NOT NULL OPTIONS (NAMEINSOURCE '"VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(30) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    VERSION string(30) OPTIONS (NAMEINSOURCE '"VERSION"', NATIVE_TYPE 'NVARCHAR'),
    CAPTION string(64) OPTIONS (NAMEINSOURCE '"CAPTION"', NATIVE_TYPE 'NVARCHAR'),
    PPMS_ID string(20) OPTIONS (NAMEINSOURCE '"PPMS_ID"', NATIVE_TYPE 'NVARCHAR'),
    SP_STACK_ID string(20) OPTIONS (NAMEINSOURCE '"SP_STACK_ID"', NATIVE_TYPE 'NVARCHAR'),
    SP_STACK_CAPTION string(64) OPTIONS (NAMEINSOURCE '"SP_STACK_CAPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."PRODUCTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.RUNTIME_INFO" (
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    REPOSITORY_PLUGIN string(255) NOT NULL OPTIONS (NAMEINSOURCE '"REPOSITORY_PLUGIN"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION clob(24) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    STATUS integer NOT NULL OPTIONS (NAMEINSOURCE '"STATUS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."RUNTIME_INFO"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.RUNTIME_OBJECTS" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    LAST_CHANGED_AT timestamp NOT NULL OPTIONS (NAMEINSOURCE '"LAST_CHANGED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_CHANGED_BY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"LAST_CHANGED_BY"', NATIVE_TYPE 'NVARCHAR'),
    FORMAT_VERSION string(16) OPTIONS (NAMEINSOURCE '"FORMAT_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    CDATA clob(24) OPTIONS (NAMEINSOURCE '"CDATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    BDATA blob(16) OPTIONS (NAMEINSOURCE '"BDATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'BLOB')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."RUNTIME_OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.SC_2_INSTANCE_MAPPING" (
    SC_VENDOR string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SC_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    SC_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SC_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SC_TYPE string(20) OPTIONS (NAMEINSOURCE '"SC_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_VENDOR string(30) NOT NULL OPTIONS (NAMEINSOURCE '"PRODUCT_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(30) NOT NULL OPTIONS (NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_INSTANCE_ID string(3) NOT NULL OPTIONS (NAMEINSOURCE '"PRODUCT_INSTANCE_ID"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."SC_2_INSTANCE_MAPPING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_REPO.SCHEMAVERSION" (
    SCHEMA_TYPE string(16) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    DB_SCHEMA_RELEASE string(16) OPTIONS (NAMEINSOURCE '"DB_SCHEMA_RELEASE"', NATIVE_TYPE 'NVARCHAR'),
    DB_SCHEMA_VERSION integer OPTIONS (NAMEINSOURCE '"DB_SCHEMA_VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_CONSISTENT byte NOT NULL DEFAULT '1' OPTIONS (NAMEINSOURCE '"IS_CONSISTENT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"_SYS_REPO"."SCHEMAVERSION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._INA_ACTIVE_OBJECT" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    IS_SEARCH_SUPPORTED string(1) OPTIONS (NAMEINSOURCE '"IS_SEARCH_SUPPORTED"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_VERSION_NUMBER integer OPTIONS (NAMEINSOURCE '"SCHEMA_VERSION_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_INA_ACTIVE_OBJECT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._INA_ACTIVE_OBJECT_PROPERTY" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(256) NOT NULL OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_INA_ACTIVE_OBJECT_PROPERTY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._INA_ACTIVE_PERSPECTIVE_V" (
    PACKAGE_ID string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    PERSPECTIVE_ID string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PERSPECTIVE_ID"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_VERSION_NUMBER integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"SCHEMA_VERSION_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_SEARCH_SUPPORTED string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"IS_SEARCH_SUPPORTED"', NATIVE_TYPE 'VARCHAR'),
    PROPERTY_KEY string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PROPERTY_KEY"', NATIVE_TYPE 'NVARCHAR'),
    PROPERTY_VALUE string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PROPERTY_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION '', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    USER_ID string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"USER_ID"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT_TEXT_ID string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CONTENT_TEXT_ID"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT_TEXT_TYPE string(32) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CONTENT_TEXT_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT_TEXT_LANGUAGE string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CONTENT_TEXT_LANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT_TEXT string OPTIONS (ANNOTATION '', NAMEINSOURCE '"CONTENT_TEXT"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_OBJECT_ID string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATASOURCE_OBJECT_ID"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_PACKAGE_ID string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATASOURCE_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    DATASOURCE_SCHEMA_ID string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATASOURCE_SCHEMA_ID"', NATIVE_TYPE 'NVARCHAR'),
    TITLE_TEXT_LANGUAGE string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"TITLE_TEXT_LANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    TITLE_TEXT string OPTIONS (ANNOTATION '', NAMEINSOURCE '"TITLE_TEXT"', NATIVE_TYPE 'NVARCHAR'),
    SUMMARY_TEXT_LANGUAGE string(256) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUMMARY_TEXT_LANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    SUMMARY_TEXT string OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUMMARY_TEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_INA_ACTIVE_PERSPECTIVE_V"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_APPSITES" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_DESC string(5000) OPTIONS (NAMEINSOURCE '"SITE_DESC"', NATIVE_TYPE 'NVARCHAR'),
    SITE_LAYOUT clob(16) OPTIONS (NAMEINSOURCE '"SITE_LAYOUT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'CLOB')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_APPSITES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_AUDIT_LOG" (
    "TIMESTAMP" timestamp NOT NULL OPTIONS (NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    HOST string(2048) NOT NULL OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'NVARCHAR'),
    MESSAGE clob(24) NOT NULL OPTIONS (NAMEINSOURCE '"MESSAGE"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    STATUS string(128) NOT NULL OPTIONS (NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_AUDIT_LOG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_PAGES" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PG_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"PG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    PG_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob(16) OPTIONS (NAMEINSOURCE '"PG_LAYOUT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (NAMEINSOURCE '"PARENT_PAGE_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_PAGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_PAGES_WIDGETS" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PG_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"PG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_LAYOUT_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_PAGES_WIDGETS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_PROPERTIES" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ENTITY_TYPE string(10) NOT NULL OPTIONS (NAMEINSOURCE '"ENTITY_TYPE"', NATIVE_TYPE 'VARCHAR'),
    ENTITY_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"ENTITY_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    KEY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(20) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_USER_APPSITES" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_NAME string(256) OPTIONS (NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_DESC string(5000) OPTIONS (NAMEINSOURCE '"SITE_DESC"', NATIVE_TYPE 'NVARCHAR'),
    SITE_LAYOUT clob(16) OPTIONS (NAMEINSOURCE '"SITE_LAYOUT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'CLOB'),
    LAST_UPDATED timestamp OPTIONS (NAMEINSOURCE '"LAST_UPDATED"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_USER_APPSITES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_USER_PAGES" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PG_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"PG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_NAME string(256) OPTIONS (NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob(16) OPTIONS (NAMEINSOURCE '"PG_LAYOUT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (NAMEINSOURCE '"PARENT_PAGE_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    LAST_UPDATED timestamp OPTIONS (NAMEINSOURCE '"LAST_UPDATED"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_USER_PAGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_USER_PAGES_WIDGETS" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PG_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"PG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_LAYOUT_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    LAST_UPDATED timestamp OPTIONS (NAMEINSOURCE '"LAST_UPDATED"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_USER_PAGES_WIDGETS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_USER_PROPERTIES" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ENTITY_TYPE string(10) NOT NULL OPTIONS (NAMEINSOURCE '"ENTITY_TYPE"', NATIVE_TYPE 'VARCHAR'),
    ENTITY_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"ENTITY_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(20) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR'),
    LAST_UPDATED timestamp OPTIONS (NAMEINSOURCE '"LAST_UPDATED"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_USER_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_USER_WIDGET_PROPERTIES" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WG_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    KEY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_USER_WIDGET_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_USER_WIDGETS" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WG_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WG_DESC string(5000) OPTIONS (NAMEINSOURCE '"WG_DESC"', NATIVE_TYPE 'NVARCHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    LAST_UPDATED timestamp OPTIONS (NAMEINSOURCE '"LAST_UPDATED"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    WG_TEMPLATE_ID string(5000) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_PACKAGE_ID string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(256) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_USER_WIDGETS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_WIDGET_PROPERTIES" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WG_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    KEY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_WIDGET_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_WIDGET_TEMPLATE_LISTS" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(10) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_WIDGET_TEMPLATE_LISTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_WIDGET_TEMPLATE_PROPERTIES" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WG_ID string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(20) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_WIDGET_TEMPLATE_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_WIDGET_TEMPLATES" (
    GUID string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"GUID"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    SPECXMLURL string(5000) OPTIONS (NAMEINSOURCE '"SPECXMLURL"', NATIVE_TYPE 'NVARCHAR'),
    THUMBNAIL string(5000) OPTIONS (NAMEINSOURCE '"THUMBNAIL"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(256) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_WIDGET_TEMPLATES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT._UIS_WIDGETS" (
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WG_ID string(50) NOT NULL OPTIONS (NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WG_DESC string(5000) OPTIONS (NAMEINSOURCE '"WG_DESC"', NATIVE_TYPE 'NVARCHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    WG_TEMPLATE_ID string(5000) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_PACKAGE_ID string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(256) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."_UIS_WIDGETS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.CDS_ANNOTATION_VALUE" (
    "artifactName.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"artifactName.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "artifactName.localName" string(256) NOT NULL OPTIONS (NAMEINSOURCE '"artifactName.localName"', NATIVE_TYPE 'NVARCHAR'),
    "annotationName.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"annotationName.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "annotationName.localName" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"annotationName.localName"', NATIVE_TYPE 'NVARCHAR'),
    valueTree clob(24) NOT NULL OPTIONS (NAMEINSOURCE '"valueTree"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."CDS_ANNOTATION_VALUE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.CDS_ARTIFACT" (
    "name.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"name.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "name.localName" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"name.localName"', NATIVE_TYPE 'NVARCHAR'),
    "originalName.namespace" string(127) OPTIONS (NAMEINSOURCE '"originalName.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "originalName.localName" string(127) OPTIONS (NAMEINSOURCE '"originalName.localName"', NATIVE_TYPE 'NVARCHAR'),
    kind string(127) NOT NULL OPTIONS (NAMEINSOURCE '"kind"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."CDS_ARTIFACT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.CDS_ASSOCIATION" (
    "name.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"name.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "name.localName" string(256) NOT NULL OPTIONS (NAMEINSOURCE '"name.localName"', NATIVE_TYPE 'NVARCHAR'),
    "targetEntityName.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"targetEntityName.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "targetEntityName.localName" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"targetEntityName.localName"', NATIVE_TYPE 'NVARCHAR'),
    sourceCardinalityMax integer OPTIONS (NAMEINSOURCE '"sourceCardinalityMax"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    targetCardinalityMin integer OPTIONS (NAMEINSOURCE '"targetCardinalityMin"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    targetCardinalityMax integer OPTIONS (NAMEINSOURCE '"targetCardinalityMax"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    isViaBacklink integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"isViaBacklink"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "viaEntityName.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"viaEntityName.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "viaEntityName.localName" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"viaEntityName.localName"', NATIVE_TYPE 'NVARCHAR'),
    joinCondition clob(24) OPTIONS (NAMEINSOURCE '"joinCondition"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    associationKind string(127) OPTIONS (NAMEINSOURCE '"associationKind"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."CDS_ASSOCIATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.CDS_DERIVED_TYPE" (
    "name.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"name.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "name.localName" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"name.localName"', NATIVE_TYPE 'NVARCHAR'),
    metaTableSelector string(127) NOT NULL OPTIONS (NAMEINSOURCE '"metaTableSelector"', NATIVE_TYPE 'NVARCHAR'),
    "target.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"target.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "target.localName" string(256) NOT NULL OPTIONS (NAMEINSOURCE '"target.localName"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."CDS_DERIVED_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.CDS_EXPRESSION" (
    "name.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"name.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "name.localName" string(256) NOT NULL OPTIONS (NAMEINSOURCE '"name.localName"', NATIVE_TYPE 'NVARCHAR'),
    definition string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"definition"', NATIVE_TYPE 'NVARCHAR'),
    kind string(127) NOT NULL OPTIONS (NAMEINSOURCE '"kind"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."CDS_EXPRESSION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.CDS_SCALAR_TYPE" (
    "name.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"name.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "name.localName" string(256) NOT NULL OPTIONS (NAMEINSOURCE '"name.localName"', NATIVE_TYPE 'NVARCHAR'),
    isAnonymous byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"isAnonymous"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    primitiveTypeName string(127) NOT NULL OPTIONS (NAMEINSOURCE '"primitiveTypeName"', NATIVE_TYPE 'NVARCHAR'),
    length integer OPTIONS (NAMEINSOURCE '"length"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "precision" integer OPTIONS (NAMEINSOURCE '"precision"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    scale integer OPTIONS (NAMEINSOURCE '"scale"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."CDS_SCALAR_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.CDS_STRUCTURE" (
    "name.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"name.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "name.localName" string(256) NOT NULL OPTIONS (NAMEINSOURCE '"name.localName"', NATIVE_TYPE 'NVARCHAR'),
    schemaName string(127) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"schemaName"', NATIVE_TYPE 'NVARCHAR'),
    isAnonymous byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"isAnonymous"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."CDS_STRUCTURE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.CDS_STRUCTURE_COMPONENT" (
    "name.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"name.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "name.localName" string(256) NOT NULL OPTIONS (NAMEINSOURCE '"name.localName"', NATIVE_TYPE 'NVARCHAR'),
    componentName string(127) NOT NULL OPTIONS (NAMEINSOURCE '"componentName"', NATIVE_TYPE 'NVARCHAR'),
    originalComponentName string(127) OPTIONS (NAMEINSOURCE '"originalComponentName"', NATIVE_TYPE 'NVARCHAR'),
    componentIndex integer NOT NULL OPTIONS (NAMEINSOURCE '"componentIndex"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    metaTableSelector string(127) NOT NULL OPTIONS (NAMEINSOURCE '"metaTableSelector"', NATIVE_TYPE 'NVARCHAR'),
    "target.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"target.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "target.localName" string(256) NOT NULL OPTIONS (NAMEINSOURCE '"target.localName"', NATIVE_TYPE 'NVARCHAR'),
    isKey byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"isKey"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    isNullable byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"isNullable"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    originalDefinition string(5000) OPTIONS (NAMEINSOURCE '"originalDefinition"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."CDS_STRUCTURE_COMPONENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.CDS_VIEW" (
    "name.namespace" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"name.namespace"', NATIVE_TYPE 'NVARCHAR'),
    "name.localName" string(127) NOT NULL OPTIONS (NAMEINSOURCE '"name.localName"', NATIVE_TYPE 'NVARCHAR'),
    definition clob(24) NOT NULL OPTIONS (NAMEINSOURCE '"definition"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."CDS_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.PP_A_ALGORITHM" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PDC_NAME string(256) OPTIONS (NAMEINSOURCE '"PDC_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PDC_PACKAGE string(256) OPTIONS (NAMEINSOURCE '"PDC_PACKAGE"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(256) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."PP_A_ALGORITHM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.PP_A_CHA" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(256) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    MSD_TABLE string(256) OPTIONS (NAMEINSOURCE '"MSD_TABLE"', NATIVE_TYPE 'NVARCHAR'),
    DATATYPE long OPTIONS (NAMEINSOURCE '"DATATYPE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LENGTH long OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_VIEW string(256) OPTIONS (NAMEINSOURCE '"READ_VIEW"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."PP_A_CHA"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.PP_A_DATACONTAINER" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FACT_TABLE string(256) OPTIONS (NAMEINSOURCE '"FACT_TABLE"', NATIVE_TYPE 'NVARCHAR'),
    READ_VIEW string(256) OPTIONS (NAMEINSOURCE '"READ_VIEW"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."PP_A_DATACONTAINER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.PP_A_KYF" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(256) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    UNITDIMENSION string(256) OPTIONS (NAMEINSOURCE '"UNITDIMENSION"', NATIVE_TYPE 'NVARCHAR'),
    CHARGEDUNIT string(256) OPTIONS (NAMEINSOURCE '"CHARGEDUNIT"', NATIVE_TYPE 'NVARCHAR'),
    DATATYPE long OPTIONS (NAMEINSOURCE '"DATATYPE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LENGTH long OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCALE long OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."PP_A_KYF"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.PP_A_SESSION" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VERSION integer NOT NULL OPTIONS (NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    READ_VIEW string(256) NOT NULL OPTIONS (NAMEINSOURCE '"READ_VIEW"', NATIVE_TYPE 'NVARCHAR'),
    "USER" string(256) OPTIONS (NAMEINSOURCE '"USER"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."PP_A_SESSION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.SEARCH_RULE_SETS" (
    PACKAGE_ID string(256) OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    RULE_SET string(256) OPTIONS (NAMEINSOURCE '"RULE_SET"', NATIVE_TYPE 'NVARCHAR'),
    RULE_ID string(256) OPTIONS (NAMEINSOURCE '"RULE_ID"', NATIVE_TYPE 'NVARCHAR'),
    ORDER_ integer OPTIONS (NAMEINSOURCE '"ORDER_"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "COLUMN" string(256) OPTIONS (NAMEINSOURCE '"COLUMN"', NATIVE_TYPE 'NVARCHAR'),
    "PARAMETER" string(256) OPTIONS (NAMEINSOURCE '"PARAMETER"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(256) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."SEARCH_RULE_SETS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.TABLE_PLACEMENT" (
    SCHEMA_NAME string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_NAME string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"GROUP_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_TYPE string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"GROUP_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    SUBTYPE string(256) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"SUBTYPE"', NATIVE_TYPE 'NVARCHAR'),
    MIN_ROWS_FOR_PARTITIONING long OPTIONS (NAMEINSOURCE '"MIN_ROWS_FOR_PARTITIONING"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INITIAL_PARTITIONS integer OPTIONS (NAMEINSOURCE '"INITIAL_PARTITIONS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REPARTITIONING_THRESHOLD long OPTIONS (NAMEINSOURCE '"REPARTITIONING_THRESHOLD"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCATION string(256) OPTIONS (NAMEINSOURCE '"LOCATION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."TABLE_PLACEMENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_RT.TI_IMPORT_KEYS" (
    TABLE_SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TI_PACKAGE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TI_PACKAGE"', NATIVE_TYPE 'NVARCHAR'),
    TI_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TI_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TI_TYPE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TI_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    CSV_PACKAGE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"CSV_PACKAGE"', NATIVE_TYPE 'NVARCHAR'),
    CSV_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"CSV_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CSV_FILEEXT string(256) NOT NULL OPTIONS (NAMEINSOURCE '"CSV_FILEEXT"', NATIVE_TYPE 'NVARCHAR'),
    KEY_COLUMN_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"KEY_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    KEY_VALUE string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"KEY_VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_RT"."TI_IMPORT_KEYS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_SECURITY._SYS_PASSWORD_BLACKLIST" (
    BLACKLIST_TERM string(256) NOT NULL OPTIONS (NAMEINSOURCE '"BLACKLIST_TERM"', NATIVE_TYPE 'NVARCHAR'),
    CHECK_PARTIAL_PASSWORD string(6) NOT NULL OPTIONS (NAMEINSOURCE '"CHECK_PARTIAL_PASSWORD"', NATIVE_TYPE 'VARCHAR'),
    CHECK_CASE_SENSITIVE string(6) NOT NULL OPTIONS (NAMEINSOURCE '"CHECK_CASE_SENSITIVE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_SECURITY"."_SYS_PASSWORD_BLACKLIST"', UPDATABLE TRUE);
*/
CREATE FOREIGN TABLE "_SYS_STATISTICS.GLOBAL_COLUMN_TABLES_SIZE" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ESTIMATED_MAX_MEMORY_SIZE_IN_TOTAL long OPTIONS (NAMEINSOURCE '"ESTIMATED_MAX_MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMPRESSED_RECORD_COUNT long OPTIONS (NAMEINSOURCE '"LAST_COMPRESSED_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_DELTA long OPTIONS (NAMEINSOURCE '"MEMORY_SIZE_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_HISTORY_DELTA long OPTIONS (NAMEINSOURCE '"MEMORY_SIZE_IN_HISTORY_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_HISTORY_MAIN long OPTIONS (NAMEINSOURCE '"MEMORY_SIZE_IN_HISTORY_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_MAIN long OPTIONS (NAMEINSOURCE '"MEMORY_SIZE_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_TOTAL long OPTIONS (NAMEINSOURCE '"MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PART_COUNT long OPTIONS (NAMEINSOURCE '"PART_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_DELTA long OPTIONS (NAMEINSOURCE '"RAW_RECORD_COUNT_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_HISTORY_DELTA long OPTIONS (NAMEINSOURCE '"RAW_RECORD_COUNT_IN_HISTORY_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_HISTORY_MAIN long OPTIONS (NAMEINSOURCE '"RAW_RECORD_COUNT_IN_HISTORY_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_MAIN long OPTIONS (NAMEINSOURCE '"RAW_RECORD_COUNT_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECORD_COUNT long OPTIONS (NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_COLUMN_COUNT long OPTIONS (NAMEINSOURCE '"TABLE_COLUMN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."GLOBAL_COLUMN_TABLES_SIZE"', UPDATABLE TRUE);
/*
CREATE FOREIGN TABLE "_SYS_STATISTICS.GLOBAL_CPU_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_CPU_IDLE_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_IDLE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_IDLE_TIME_PERCENT short OPTIONS (NAMEINSOURCE '"TOTAL_CPU_IDLE_TIME_PERCENT"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TOTAL_CPU_SYSTEM_MODE_PERCENT short OPTIONS (NAMEINSOURCE '"TOTAL_CPU_SYSTEM_MODE_PERCENT"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TOTAL_CPU_SYSTEM_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_SYSTEM_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_USER_MODE_PERCENT short OPTIONS (NAMEINSOURCE '"TOTAL_CPU_USER_MODE_PERCENT"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TOTAL_CPU_USER_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_USER_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_WIO_MODE_PERCENT short OPTIONS (NAMEINSOURCE '"TOTAL_CPU_WIO_MODE_PERCENT"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TOTAL_CPU_WIO_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_WIO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_INSTANCE_PROCESSES_CPU_PERCENT short OPTIONS (NAMEINSOURCE '"TOTAL_INSTANCE_PROCESSES_CPU_PERCENT"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TOTAL_INSTANCE_PROCESSES_CPU_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_INSTANCE_PROCESSES_CPU_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."GLOBAL_CPU_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.GLOBAL_DEC_EXTRACTOR_STATUS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CLIENT string(3) OPTIONS (NAMEINSOURCE '"CLIENT"', NATIVE_TYPE 'NVARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ERROR_MESSAGE string(5000) OPTIONS (NAMEINSOURCE '"ERROR_MESSAGE"', NATIVE_TYPE 'NVARCHAR'),
    PHASE string(20) OPTIONS (NAMEINSOURCE '"PHASE"', NATIVE_TYPE 'VARCHAR'),
    REQUEST_ID integer OPTIONS (NAMEINSOURCE '"REQUEST_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STATUS string(5) OPTIONS (NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    "TIMESTAMP" timestamp OPTIONS (NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."GLOBAL_DEC_EXTRACTOR_STATUS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.GLOBAL_DISKS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEVICE_ID long OPTIONS (NAMEINSOURCE '"DEVICE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DISK_ID integer OPTIONS (NAMEINSOURCE '"DISK_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FILESYSTEM_TYPE string(16) OPTIONS (NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PATH string(512) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    SUBPATH string(512) OPTIONS (NAMEINSOURCE '"SUBPATH"', NATIVE_TYPE 'VARCHAR'),
    TOTAL_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USAGE_TYPE string(16) OPTIONS (NAMEINSOURCE '"USAGE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    USED_SIZE long OPTIONS (NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."GLOBAL_DISKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.GLOBAL_INTERNAL_DISKFULL_EVENTS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ACKNOWLEDGED string(6) OPTIONS (NAMEINSOURCE '"ACKNOWLEDGED"', NATIVE_TYPE 'VARCHAR'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FAILED_HANDLES long OPTIONS (NAMEINSOURCE '"FAILED_HANDLES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HANDLE_TIME timestamp OPTIONS (NAMEINSOURCE '"HANDLE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    ID long OPTIONS (NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INFO string(2000) OPTIONS (NAMEINSOURCE '"INFO"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATE string(256) OPTIONS (NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(256) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."GLOBAL_INTERNAL_DISKFULL_EVENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.GLOBAL_INTERNAL_EVENTS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ACKNOWLEDGED string(6) OPTIONS (NAMEINSOURCE '"ACKNOWLEDGED"', NATIVE_TYPE 'VARCHAR'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FAILED_HANDLES long OPTIONS (NAMEINSOURCE '"FAILED_HANDLES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HANDLE_TIME timestamp OPTIONS (NAMEINSOURCE '"HANDLE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    ID long OPTIONS (NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INFO string(2000) OPTIONS (NAMEINSOURCE '"INFO"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATE string(256) OPTIONS (NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(256) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."GLOBAL_INTERNAL_EVENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.GLOBAL_MEMORY_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PHYSICAL_MEMORY_USED_BY_INSTANCE_PROCESSES long OPTIONS (NAMEINSOURCE '"PHYSICAL_MEMORY_USED_BY_INSTANCE_PROCESSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_AVAILABLE_MEMORY long OPTIONS (NAMEINSOURCE '"TOTAL_AVAILABLE_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_MEMORY_USED_BY_ALL_PROCESSES long OPTIONS (NAMEINSOURCE '"TOTAL_MEMORY_USED_BY_ALL_PROCESSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_MEMORY_USED_BY_INSTANCE_PROCESSES long OPTIONS (NAMEINSOURCE '"TOTAL_MEMORY_USED_BY_INSTANCE_PROCESSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PHYSICAL_MEMORY long OPTIONS (NAMEINSOURCE '"TOTAL_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."GLOBAL_MEMORY_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.GLOBAL_PERSISTENCE_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_DISKS_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_DISKS_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_DISKS_USED_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_DISKS_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_VOLUMES_DATA_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_VOLUMES_DATA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_VOLUMES_LOG_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_VOLUMES_LOG_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."GLOBAL_PERSISTENCE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.GLOBAL_ROWSTORE_TABLES_SIZE" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ALLOCATED_FIXED_PART_SIZE long OPTIONS (NAMEINSOURCE '"ALLOCATED_FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_VARIABLE_PART_SIZE long OPTIONS (NAMEINSOURCE '"ALLOCATED_VARIABLE_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FIXED_PAGE_FRAGMENT_SIZE long OPTIONS (NAMEINSOURCE '"FIXED_PAGE_FRAGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_PAGE_HEADER_SIZE long OPTIONS (NAMEINSOURCE '"FIXED_PAGE_HEADER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_PART_FRAGMENT_SIZE long OPTIONS (NAMEINSOURCE '"FIXED_PART_FRAGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_PART_FREE_SIZE long OPTIONS (NAMEINSOURCE '"FIXED_PART_FREE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    LOAD_STATUS string(256) OPTIONS (NAMEINSOURCE '"LOAD_STATUS"', NATIVE_TYPE 'NVARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RECORD_COUNT long OPTIONS (NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USED_FIXED_PART_SIZE long OPTIONS (NAMEINSOURCE '"USED_FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_VARIABLE_PART_SIZE long OPTIONS (NAMEINSOURCE '"USED_VARIABLE_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VARIABLE_PART_FRAGMENT_SIZE long OPTIONS (NAMEINSOURCE '"VARIABLE_PART_FRAGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."GLOBAL_ROWSTORE_TABLES_SIZE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.GLOBAL_TABLE_PERSISTENCE_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    APPEND_COUNT long OPTIONS (NAMEINSOURCE '"APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTES_APPENDED long OPTIONS (NAMEINSOURCE '"BYTES_APPENDED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTES_READ long OPTIONS (NAMEINSOURCE '"BYTES_READ"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTES_WRITTEN long OPTIONS (NAMEINSOURCE '"BYTES_WRITTEN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTESTREAM_WRITTEN long OPTIONS (NAMEINSOURCE '"BYTESTREAM_WRITTEN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COPY_COUNT long OPTIONS (NAMEINSOURCE '"COPY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DISK_SIZE long OPTIONS (NAMEINSOURCE '"DISK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OPTIMIZE_COUNT long OPTIONS (NAMEINSOURCE '"OPTIMIZE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_COUNT long OPTIONS (NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COUNT long OPTIONS (NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRUNCATE_COUNT long OPTIONS (NAMEINSOURCE '"TRUNCATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COUNT long OPTIONS (NAMEINSOURCE '"WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."GLOBAL_TABLE_PERSISTENCE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.GLOBAL_TABLES_SIZE" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_COLUMN_TABLE string(6) OPTIONS (NAMEINSOURCE '"IS_COLUMN_TABLE"', NATIVE_TYPE 'VARCHAR'),
    PART_COUNT long OPTIONS (NAMEINSOURCE '"PART_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECORD_COUNT long OPTIONS (NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SIZE long OPTIONS (NAMEINSOURCE '"TABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."GLOBAL_TABLES_SIZE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_BLOCKED_TRANSACTIONS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    BLOCKED_APPLICATION string(512) OPTIONS (NAMEINSOURCE '"BLOCKED_APPLICATION"', NATIVE_TYPE 'NVARCHAR'),
    BLOCKED_APPLICATION_SOURCE string(512) OPTIONS (NAMEINSOURCE '"BLOCKED_APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR'),
    BLOCKED_APPLICATION_USER string(512) OPTIONS (NAMEINSOURCE '"BLOCKED_APPLICATION_USER"', NATIVE_TYPE 'NVARCHAR'),
    BLOCKED_CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"BLOCKED_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    BLOCKED_STATEMENT_STRING string(5000) OPTIONS (NAMEINSOURCE '"BLOCKED_STATEMENT_STRING"', NATIVE_TYPE 'NVARCHAR'),
    BLOCKED_TIME timestamp OPTIONS (NAMEINSOURCE '"BLOCKED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    BLOCKED_TRANSACTION_ID integer OPTIONS (NAMEINSOURCE '"BLOCKED_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    BLOCKED_UPDATE_TRANSACTION_ID long OPTIONS (NAMEINSOURCE '"BLOCKED_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    LOCK_MODE string(32) OPTIONS (NAMEINSOURCE '"LOCK_MODE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_OWNER_APPLICATION string(512) OPTIONS (NAMEINSOURCE '"LOCK_OWNER_APPLICATION"', NATIVE_TYPE 'NVARCHAR'),
    LOCK_OWNER_APPLICATION_SOURCE string(512) OPTIONS (NAMEINSOURCE '"LOCK_OWNER_APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR'),
    LOCK_OWNER_APPLICATION_USER string(512) OPTIONS (NAMEINSOURCE '"LOCK_OWNER_APPLICATION_USER"', NATIVE_TYPE 'NVARCHAR'),
    LOCK_OWNER_CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"LOCK_OWNER_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_HOST string(64) OPTIONS (NAMEINSOURCE '"LOCK_OWNER_HOST"', NATIVE_TYPE 'VARCHAR'),
    LOCK_OWNER_LAST_ACTION string(128) OPTIONS (NAMEINSOURCE '"LOCK_OWNER_LAST_ACTION"', NATIVE_TYPE 'VARCHAR'),
    LOCK_OWNER_PID long OPTIONS (NAMEINSOURCE '"LOCK_OWNER_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_OWNER_TRANSACTION_ID integer OPTIONS (NAMEINSOURCE '"LOCK_OWNER_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_UPDATE_TRANSACTION_ID long OPTIONS (NAMEINSOURCE '"LOCK_OWNER_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_OWNER_USER_NAME string(256) OPTIONS (NAMEINSOURCE '"LOCK_OWNER_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    LOCK_TYPE string(32) OPTIONS (NAMEINSOURCE '"LOCK_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WAITING_RECORD_ID string(256) OPTIONS (NAMEINSOURCE '"WAITING_RECORD_ID"', NATIVE_TYPE 'VARCHAR'),
    WAITING_SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"WAITING_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WAITING_TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"WAITING_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_BLOCKED_TRANSACTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_COLUMN_TABLES_PART_SIZE" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ESTIMATED_MAX_MEMORY_SIZE_IN_TOTAL long OPTIONS (NAMEINSOURCE '"ESTIMATED_MAX_MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    IS_DELTA_LOADED string(6) OPTIONS (NAMEINSOURCE '"IS_DELTA_LOADED"', NATIVE_TYPE 'VARCHAR'),
    IS_LOG_DELTA string(6) OPTIONS (NAMEINSOURCE '"IS_LOG_DELTA"', NATIVE_TYPE 'VARCHAR'),
    LAST_COMPRESSED_RECORD_COUNT long OPTIONS (NAMEINSOURCE '"LAST_COMPRESSED_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_MERGE_TIME timestamp OPTIONS (NAMEINSOURCE '"LAST_MERGE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_REPLAY_LOG_TIME timestamp OPTIONS (NAMEINSOURCE '"LAST_REPLAY_LOG_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LOADED string(10) OPTIONS (NAMEINSOURCE '"LOADED"', NATIVE_TYPE 'VARCHAR'),
    MEMORY_SIZE_IN_DELTA long OPTIONS (NAMEINSOURCE '"MEMORY_SIZE_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_HISTORY_DELTA long OPTIONS (NAMEINSOURCE '"MEMORY_SIZE_IN_HISTORY_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_HISTORY_MAIN long OPTIONS (NAMEINSOURCE '"MEMORY_SIZE_IN_HISTORY_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_MAIN long OPTIONS (NAMEINSOURCE '"MEMORY_SIZE_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_TOTAL long OPTIONS (NAMEINSOURCE '"MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MERGE_COUNT long OPTIONS (NAMEINSOURCE '"MERGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TIME timestamp OPTIONS (NAMEINSOURCE '"MODIFY_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PART_ID integer OPTIONS (NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PERSISTENT_MERGE string(6) OPTIONS (NAMEINSOURCE '"PERSISTENT_MERGE"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RAW_RECORD_COUNT_IN_DELTA long OPTIONS (NAMEINSOURCE '"RAW_RECORD_COUNT_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_HISTORY_DELTA long OPTIONS (NAMEINSOURCE '"RAW_RECORD_COUNT_IN_HISTORY_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_HISTORY_MAIN long OPTIONS (NAMEINSOURCE '"RAW_RECORD_COUNT_IN_HISTORY_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_MAIN long OPTIONS (NAMEINSOURCE '"RAW_RECORD_COUNT_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COUNT long OPTIONS (NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECORD_COUNT long OPTIONS (NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WRITE_COUNT long OPTIONS (NAMEINSOURCE '"WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_COLUMN_TABLES_PART_SIZE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_CONNECTION_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    AVG_EXECUTION_MEMORY_SIZE long OPTIONS (NAMEINSOURCE '"AVG_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    END_TIME timestamp OPTIONS (NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    EXECUTION_COUNT_BY_ROUTING long OPTIONS (NAMEINSOURCE '"EXECUTION_COUNT_BY_ROUTING"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    LAST_EXECUTED_TIME timestamp OPTIONS (NAMEINSOURCE '"LAST_EXECUTED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MAX_EXECUTION_MEMORY_SIZE long OPTIONS (NAMEINSOURCE '"MAX_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_MEMORY_SIZE long OPTIONS (NAMEINSOURCE '"MIN_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_AVG_EXECUTION_TIME bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"OTHERS_AVG_EXECUTION_TIME"', NATIVE_TYPE 'DECIMAL'),
    OTHERS_AVG_LOCK_WAIT_TIME bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"OTHERS_AVG_LOCK_WAIT_TIME"', NATIVE_TYPE 'DECIMAL'),
    OTHERS_COUNT long OPTIONS (NAMEINSOURCE '"OTHERS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_LOCK_WAIT_COUNT long OPTIONS (NAMEINSOURCE '"OTHERS_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_MAX_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"OTHERS_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_MAX_LOCK_WAIT_TIME long OPTIONS (NAMEINSOURCE '"OTHERS_MAX_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_TOTAL_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"OTHERS_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_TOTAL_LOCK_WAIT_TIME long OPTIONS (NAMEINSOURCE '"OTHERS_TOTAL_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    READ_ONLY_TRANSACTION_AVG_EXECUTION_TIME bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"READ_ONLY_TRANSACTION_AVG_EXECUTION_TIME"', NATIVE_TYPE 'DECIMAL'),
    READ_ONLY_TRANSACTION_COUNT long OPTIONS (NAMEINSOURCE '"READ_ONLY_TRANSACTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_ONLY_TRANSACTION_MAX_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"READ_ONLY_TRANSACTION_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_ONLY_TRANSACTION_TOTAL_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"READ_ONLY_TRANSACTION_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLLBACK_AVG_EXECUTION_TIME bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"ROLLBACK_AVG_EXECUTION_TIME"', NATIVE_TYPE 'DECIMAL'),
    ROLLBACK_COUNT long OPTIONS (NAMEINSOURCE '"ROLLBACK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLLBACK_MAX_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"ROLLBACK_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLLBACK_TOTAL_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"ROLLBACK_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_AVG_EXECUTION_TIME bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"SELECT_AVG_EXECUTION_TIME"', NATIVE_TYPE 'DECIMAL'),
    SELECT_EXECUTION_COUNT long OPTIONS (NAMEINSOURCE '"SELECT_EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_AVG_EXECUTION_TIME bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"SELECT_FOR_UPDATE_AVG_EXECUTION_TIME"', NATIVE_TYPE 'DECIMAL'),
    SELECT_FOR_UPDATE_AVG_LOCK_WAIT_TIME bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"SELECT_FOR_UPDATE_AVG_LOCK_WAIT_TIME"', NATIVE_TYPE 'DECIMAL'),
    SELECT_FOR_UPDATE_COUNT long OPTIONS (NAMEINSOURCE '"SELECT_FOR_UPDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_LOCK_WAIT_COUNT long OPTIONS (NAMEINSOURCE '"SELECT_FOR_UPDATE_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_MAX_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"SELECT_FOR_UPDATE_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_MAX_LOCK_WAIT_TIME long OPTIONS (NAMEINSOURCE '"SELECT_FOR_UPDATE_MAX_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_TOTAL_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"SELECT_FOR_UPDATE_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_TOTAL_LOCK_WAIT_TIME long OPTIONS (NAMEINSOURCE '"SELECT_FOR_UPDATE_TOTAL_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_MAX_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"SELECT_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_TOTAL_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"SELECT_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_MEMORY_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_COUNT long OPTIONS (NAMEINSOURCE '"TOTAL_PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_AVG_EXECUTION_TIME bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"UPDATE_AVG_EXECUTION_TIME"', NATIVE_TYPE 'DECIMAL'),
    UPDATE_AVG_LOCK_WAIT_TIME bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"UPDATE_AVG_LOCK_WAIT_TIME"', NATIVE_TYPE 'DECIMAL'),
    UPDATE_COUNT long OPTIONS (NAMEINSOURCE '"UPDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_LOCK_WAIT_COUNT long OPTIONS (NAMEINSOURCE '"UPDATE_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_MAX_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"UPDATE_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_MAX_LOCK_WAIT_TIME long OPTIONS (NAMEINSOURCE '"UPDATE_MAX_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TOTAL_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"UPDATE_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TOTAL_LOCK_WAIT_TIME long OPTIONS (NAMEINSOURCE '"UPDATE_TOTAL_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_AVG_EXECUTION_TIME bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"UPDATE_TRANSACTION_AVG_EXECUTION_TIME"', NATIVE_TYPE 'DECIMAL'),
    UPDATE_TRANSACTION_COUNT long OPTIONS (NAMEINSOURCE '"UPDATE_TRANSACTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_MAX_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"UPDATE_TRANSACTION_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_TOTAL_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"UPDATE_TRANSACTION_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_CONNECTION_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_CONNECTIONS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    AUTO_COMMIT string(6) OPTIONS (NAMEINSOURCE '"AUTO_COMMIT"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_DISTRIBUTION_MODE string(128) OPTIONS (NAMEINSOURCE '"CLIENT_DISTRIBUTION_MODE"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_HOST string(64) OPTIONS (NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_IP string(16) OPTIONS (NAMEINSOURCE '"CLIENT_IP"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_STATUS string(128) OPTIONS (NAMEINSOURCE '"CONNECTION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_TYPE string(128) OPTIONS (NAMEINSOURCE '"CONNECTION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CREATED_BY string(256) OPTIONS (NAMEINSOURCE '"CREATED_BY"', NATIVE_TYPE 'VARCHAR'),
    CREATOR_THREAD_ID long OPTIONS (NAMEINSOURCE '"CREATOR_THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CURRENT_OPERATOR_NAME string(64) OPTIONS (NAMEINSOURCE '"CURRENT_OPERATOR_NAME"', NATIVE_TYPE 'VARCHAR'),
    CURRENT_STATEMENT_ID string(256) OPTIONS (NAMEINSOURCE '"CURRENT_STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    END_TIME timestamp OPTIONS (NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    FETCHED_RECORD_COUNT long OPTIONS (NAMEINSOURCE '"FETCHED_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    IDLE_TIME long OPTIONS (NAMEINSOURCE '"IDLE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_ENCRYPTED string(6) OPTIONS (NAMEINSOURCE '"IS_ENCRYPTED"', NATIVE_TYPE 'VARCHAR'),
    IS_HISTORY_SAVED string(6) OPTIONS (NAMEINSOURCE '"IS_HISTORY_SAVED"', NATIVE_TYPE 'VARCHAR'),
    LAST_ACTION string(128) OPTIONS (NAMEINSOURCE '"LAST_ACTION"', NATIVE_TYPE 'VARCHAR'),
    LOGICAL_CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"LOGICAL_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEMORY_SIZE_PER_CONNECTION long OPTIONS (NAMEINSOURCE '"MEMORY_SIZE_PER_CONNECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWN string(6) OPTIONS (NAMEINSOURCE '"OWN"', NATIVE_TYPE 'VARCHAR'),
    PARENT_CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"PARENT_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RECEIVED_MESSAGE_COUNT long OPTIONS (NAMEINSOURCE '"RECEIVED_MESSAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVED_MESSAGE_SIZE long OPTIONS (NAMEINSOURCE '"RECEIVED_MESSAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SENT_MESSAGE_COUNT long OPTIONS (NAMEINSOURCE '"SENT_MESSAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SENT_MESSAGE_SIZE long OPTIONS (NAMEINSOURCE '"SENT_MESSAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    START_TIME timestamp OPTIONS (NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TRANSACTION_ID integer OPTIONS (NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_CONNECTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_CS_UNLOADS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COLUMN_NAME string(256) OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    IS_HISTORY string(5) OPTIONS (NAMEINSOURCE '"IS_HISTORY"', NATIVE_TYPE 'VARCHAR'),
    PART_ID integer OPTIONS (NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REASON string(16) OPTIONS (NAMEINSOURCE '"REASON"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNLOAD_TIME timestamp OPTIONS (NAMEINSOURCE '"UNLOAD_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_CS_UNLOADS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_DATA_VOLUME_PAGE_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FILE_NAME string(256) OPTIONS (NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILL_RATIO bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"FILL_RATIO"', NATIVE_TYPE 'DECIMAL'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    INITIAL_BLOCK_COUNT long OPTIONS (NAMEINSOURCE '"INITIAL_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_SIZE integer OPTIONS (NAMEINSOURCE '"PAGE_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PAGE_SIZE_CLASS string(32) OPTIONS (NAMEINSOURCE '"PAGE_SIZE_CLASS"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SHADOW_BLOCK_COUNT long OPTIONS (NAMEINSOURCE '"SHADOW_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_COUNT long OPTIONS (NAMEINSOURCE '"SUPERBLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_SIZE integer OPTIONS (NAMEINSOURCE '"SUPERBLOCK_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_ALLOCATE_BLOCK_COUNT long OPTIONS (NAMEINSOURCE '"TOTAL_ALLOCATE_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SET_BLOCK_FREE_AFTER_SAVEPOINT_COUNT long OPTIONS (NAMEINSOURCE '"TOTAL_SET_BLOCK_FREE_AFTER_SAVEPOINT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SET_BLOCK_FREE_COUNT long OPTIONS (NAMEINSOURCE '"TOTAL_SET_BLOCK_FREE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_BLOCK_COUNT long OPTIONS (NAMEINSOURCE '"USED_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_DATA_VOLUME_PAGE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_DATA_VOLUME_SUPERBLOCK_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_VOLUME_NAME string(256) OPTIONS (NAMEINSOURCE '"DATA_VOLUME_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILL_RATIO bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"FILL_RATIO"', NATIVE_TYPE 'DECIMAL'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUPERBLOCK_COUNT long OPTIONS (NAMEINSOURCE '"SUPERBLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_SIZE long OPTIONS (NAMEINSOURCE '"SUPERBLOCK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SUPERBLOCK_COUNT long OPTIONS (NAMEINSOURCE '"USED_SUPERBLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_DATA_VOLUME_SUPERBLOCK_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_DELTA_MERGE_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    LAST_ERROR integer OPTIONS (NAMEINSOURCE '"LAST_ERROR"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEMORY_MERGE string(6) OPTIONS (NAMEINSOURCE '"MEMORY_MERGE"', NATIVE_TYPE 'VARCHAR'),
    MERGED_DELTA_RECORDS integer OPTIONS (NAMEINSOURCE '"MERGED_DELTA_RECORDS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MOTIVATION string(8) OPTIONS (NAMEINSOURCE '"MOTIVATION"', NATIVE_TYPE 'VARCHAR'),
    PART_ID integer OPTIONS (NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PASSPORT string(256) OPTIONS (NAMEINSOURCE '"PASSPORT"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SUCCESS string(6) OPTIONS (NAMEINSOURCE '"SUCCESS"', NATIVE_TYPE 'VARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(7) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_DELTA_MERGE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_HEAP_ALLOCATORS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CATEGORY string(128) OPTIONS (NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEPTH long OPTIONS (NAMEINSOURCE '"DEPTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOC_ERRORS long OPTIONS (NAMEINSOURCE '"EXCLUSIVE_ALLOC_ERRORS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_COUNT long OPTIONS (NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_SIZE long OPTIONS (NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COUNT_IN_USE long OPTIONS (NAMEINSOURCE '"EXCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_COUNT long OPTIONS (NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_SIZE long OPTIONS (NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (NAMEINSOURCE '"EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (NAMEINSOURCE '"EXCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_SIZE_IN_USE long OPTIONS (NAMEINSOURCE '"EXCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLAGS string(64) OPTIONS (NAMEINSOURCE '"FLAGS"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    INCLUSIVE_ALLOCATED_COUNT long OPTIONS (NAMEINSOURCE '"INCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_SIZE long OPTIONS (NAMEINSOURCE '"INCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_COUNT_IN_USE long OPTIONS (NAMEINSOURCE '"INCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_COUNT long OPTIONS (NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_SIZE long OPTIONS (NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (NAMEINSOURCE '"INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (NAMEINSOURCE '"INCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_SIZE_IN_USE long OPTIONS (NAMEINSOURCE '"INCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MALLOC_PROXY_CACHE_MISSES long OPTIONS (NAMEINSOURCE '"MALLOC_PROXY_CACHE_MISSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_ID long OPTIONS (NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_HEAP_ALLOCATORS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_LONG_IDLE_CURSOR" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    APPLICATION string(512) OPTIONS (NAMEINSOURCE '"APPLICATION"', NATIVE_TYPE 'VARCHAR'),
    APPLICATIONSOURCE string(512) OPTIONS (NAMEINSOURCE '"APPLICATIONSOURCE"', NATIVE_TYPE 'VARCHAR'),
    APPLICATIONUSER string(512) OPTIONS (NAMEINSOURCE '"APPLICATIONUSER"', NATIVE_TYPE 'VARCHAR'),
    APPLICATIONVERSION string(512) OPTIONS (NAMEINSOURCE '"APPLICATIONVERSION"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_HOST string(64) OPTIONS (NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONNECTION_STATUS string(128) OPTIONS (NAMEINSOURCE '"CONNECTION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    IDLE_TIME long OPTIONS (NAMEINSOURCE '"IDLE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_COL string(64) OPTIONS (NAMEINSOURCE '"INDEX_COL"', NATIVE_TYPE 'VARCHAR'),
    LOGICAL_CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"LOGICAL_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    START_MVCC_TIMESTAMP long OPTIONS (NAMEINSOURCE '"START_MVCC_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATEMENT_STATUS string(128) OPTIONS (NAMEINSOURCE '"STATEMENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_STRING string(5000) OPTIONS (NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_LONG_IDLE_CURSOR"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_LONG_RUNNING_STATEMENTS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    APPLICATION_USER_NAME string(256) OPTIONS (NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AUTO_COMMIT string(6) OPTIONS (NAMEINSOURCE '"AUTO_COMMIT"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_HOST string(64) OPTIONS (NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_IP string(16) OPTIONS (NAMEINSOURCE '"CLIENT_IP"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_START_TIME timestamp OPTIONS (NAMEINSOURCE '"CONNECTION_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DURATION long OPTIONS (NAMEINSOURCE '"DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    THREAD_DETAIL string(5000) OPTIONS (NAMEINSOURCE '"THREAD_DETAIL"', NATIVE_TYPE 'NVARCHAR'),
    THREAD_ID long OPTIONS (NAMEINSOURCE '"THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRANSACTION_ID integer OPTIONS (NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_NAME string(256) OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_LONG_RUNNING_STATEMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_LONG_SERIALIZABLE_TRANSACTION" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CLIENT_HOST string(64) OPTIONS (NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONNECTION_STATUS string(128) OPTIONS (NAMEINSOURCE '"CONNECTION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    INDEX_COL string(64) OPTIONS (NAMEINSOURCE '"INDEX_COL"', NATIVE_TYPE 'VARCHAR'),
    LOGICAL_CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"LOGICAL_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MIN_MVCC_SNAPSHOT_TIMESTAMP long OPTIONS (NAMEINSOURCE '"MIN_MVCC_SNAPSHOT_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRANSACTION_ID integer OPTIONS (NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_LONG_SERIALIZABLE_TRANSACTION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_MEMORY_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CHECK_HOST string(64) OPTIONS (NAMEINSOURCE '"CHECK_HOST"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST_AVAILABLE_MEMORY long OPTIONS (NAMEINSOURCE '"HOST_AVAILABLE_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST_PHYSICAL_MEMORY long OPTIONS (NAMEINSOURCE '"HOST_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST_TOTAL_USED_MEMORY long OPTIONS (NAMEINSOURCE '"HOST_TOTAL_USED_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSTANCE_PROCESSES_MEMORY long OPTIONS (NAMEINSOURCE '"INSTANCE_PROCESSES_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSTANCE_PROCESSES_PHYSICAL_MEMORY long OPTIONS (NAMEINSOURCE '"INSTANCE_PROCESSES_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_MEMORY_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_OBJECT_LOCK_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    LOCK_FAILED_COUNT long OPTIONS (NAMEINSOURCE '"LOCK_FAILED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_TYPE string(32) OPTIONS (NAMEINSOURCE '"LOCK_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_WAIT_COUNT long OPTIONS (NAMEINSOURCE '"LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_WAIT_TIME long OPTIONS (NAMEINSOURCE '"LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_ID long OPTIONS (NAMEINSOURCE '"OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PART_ID integer OPTIONS (NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_OBJECT_LOCK_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_OBJECT_LOCKS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ACQUIRED_TIME timestamp OPTIONS (NAMEINSOURCE '"ACQUIRED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    LOCK_MODE string(32) OPTIONS (NAMEINSOURCE '"LOCK_MODE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_OWNER_TRANSACTION_ID integer OPTIONS (NAMEINSOURCE '"LOCK_OWNER_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_UPDATE_TRANSACTION_ID long OPTIONS (NAMEINSOURCE '"LOCK_OWNER_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_OBJECT_LOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_ONE_DAY_FILE_COUNT" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FILE_TYPE string(128) OPTIONS (NAMEINSOURCE '"FILE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    NUM_FILES long OPTIONS (NAMEINSOURCE '"NUM_FILES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_SIZE long OPTIONS (NAMEINSOURCE '"SUM_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_ONE_DAY_FILE_COUNT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_RECORD_LOCKS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ACQUIRED_TIME timestamp OPTIONS (NAMEINSOURCE '"ACQUIRED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    LOCK_MODE string(32) OPTIONS (NAMEINSOURCE '"LOCK_MODE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_OWNER_TRANSACTION_ID integer OPTIONS (NAMEINSOURCE '"LOCK_OWNER_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_UPDATE_TRANSACTION_ID long OPTIONS (NAMEINSOURCE '"LOCK_OWNER_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RECORD_ID string(256) OPTIONS (NAMEINSOURCE '"RECORD_ID"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_RECORD_LOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_RESOURCE_UTILIZATION_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ALLOCATION_LIMIT long OPTIONS (NAMEINSOURCE '"ALLOCATION_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FREE_PHYSICAL_MEMORY long OPTIONS (NAMEINSOURCE '"FREE_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_SWAP_SPACE long OPTIONS (NAMEINSOURCE '"FREE_SWAP_SPACE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    INSTANCE_TOTAL_MEMORY_USED_SIZE long OPTIONS (NAMEINSOURCE '"INSTANCE_TOTAL_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SNAPSHOT_DELTA long OPTIONS (NAMEINSOURCE '"SNAPSHOT_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_IDLE_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_IDLE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_IDLE_TIME_DELTA long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_IDLE_TIME_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_SYSTEM_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_SYSTEM_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_SYSTEM_TIME_DELTA long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_SYSTEM_TIME_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_USER_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_USER_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_USER_TIME_DELTA long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_USER_TIME_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_WIO_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_WIO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_WIO_TIME_DELTA long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_WIO_TIME_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_PHYSICAL_MEMORY long OPTIONS (NAMEINSOURCE '"USED_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SWAP_SPACE long OPTIONS (NAMEINSOURCE '"USED_SWAP_SPACE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_RESOURCE_UTILIZATION_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_RS_MEMORY" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ALLOCATED_SIZE long OPTIONS (NAMEINSOURCE '"ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CATEGORY string(128) OPTIONS (NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FREE_SIZE long OPTIONS (NAMEINSOURCE '"FREE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USED_SIZE long OPTIONS (NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_RS_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_SAVEPOINT_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    AVG_CRITICAL_PHASE_DURATION long OPTIONS (NAMEINSOURCE '"AVG_CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_DURATION long OPTIONS (NAMEINSOURCE '"AVG_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_PAGES bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"AVG_FLUSHED_PAGES"', NATIVE_TYPE 'DECIMAL'),
    AVG_FLUSHED_PAGES_IN_CRITICAL_PHASE bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"AVG_FLUSHED_PAGES_IN_CRITICAL_PHASE"', NATIVE_TYPE 'DECIMAL'),
    AVG_FLUSHED_ROWSTORE_PAGES bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_PAGES"', NATIVE_TYPE 'DECIMAL'),
    AVG_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', NATIVE_TYPE 'DECIMAL'),
    AVG_FLUSHED_ROWSTORE_SIZE long OPTIONS (NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_SIZE long OPTIONS (NAMEINSOURCE '"AVG_FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (NAMEINSOURCE '"AVG_FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FREQUENCY long OPTIONS (NAMEINSOURCE '"AVG_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TOTAL_SIZE long OPTIONS (NAMEINSOURCE '"AVG_TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    LAST_CRITICAL_PHASE_DURATION long OPTIONS (NAMEINSOURCE '"LAST_CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_DURATION long OPTIONS (NAMEINSOURCE '"LAST_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_PAGES long OPTIONS (NAMEINSOURCE '"LAST_FLUSHED_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_PAGES_IN_CRITICAL_PHASE long OPTIONS (NAMEINSOURCE '"LAST_FLUSHED_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_PAGES long OPTIONS (NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE long OPTIONS (NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_SIZE long OPTIONS (NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_SIZE long OPTIONS (NAMEINSOURCE '"LAST_FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (NAMEINSOURCE '"LAST_FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FREQUENCY long OPTIONS (NAMEINSOURCE '"LAST_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_RTT_SIZE long OPTIONS (NAMEINSOURCE '"LAST_RTT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_TOTAL_SIZE long OPTIONS (NAMEINSOURCE '"LAST_TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REQUESTED_FREQUENCY long OPTIONS (NAMEINSOURCE '"REQUESTED_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESET_TIME timestamp OPTIONS (NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SAVEPOINTS long OPTIONS (NAMEINSOURCE '"SAVEPOINTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    START_TIME timestamp OPTIONS (NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE string(16) OPTIONS (NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    VERSION integer OPTIONS (NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_SAVEPOINT_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_SAVEPOINTS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CRITICAL_PHASE_DURATION long OPTIONS (NAMEINSOURCE '"CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DURATION long OPTIONS (NAMEINSOURCE '"DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_PAGES long OPTIONS (NAMEINSOURCE '"FLUSHED_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_PAGES_IN_CRITICAL_PHASE long OPTIONS (NAMEINSOURCE '"FLUSHED_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_PAGES long OPTIONS (NAMEINSOURCE '"FLUSHED_ROWSTORE_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE long OPTIONS (NAMEINSOURCE '"FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_SIZE long OPTIONS (NAMEINSOURCE '"FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (NAMEINSOURCE '"FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_SIZE long OPTIONS (NAMEINSOURCE '"FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (NAMEINSOURCE '"FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REQUESTED_FREQUENCY long OPTIONS (NAMEINSOURCE '"REQUESTED_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RTT_SIZE long OPTIONS (NAMEINSOURCE '"RTT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    START_TIME timestamp OPTIONS (NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE string(16) OPTIONS (NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    TIME_SINCE_PREVIOUS long OPTIONS (NAMEINSOURCE '"TIME_SINCE_PREVIOUS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION integer OPTIONS (NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_SAVEPOINTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_SERVICE_COMPONENT_MEMORY" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMPONENT string(5000) OPTIONS (NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USED_MEMORY_SIZE long OPTIONS (NAMEINSOURCE '"USED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_SERVICE_COMPONENT_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_SERVICE_MEMORY" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ALLOCATION_LIMIT long OPTIONS (NAMEINSOURCE '"ALLOCATION_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CODE_SIZE long OPTIONS (NAMEINSOURCE '"CODE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPACTORS_ALLOCATED_SIZE long OPTIONS (NAMEINSOURCE '"COMPACTORS_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPACTORS_FREEABLE_SIZE long OPTIONS (NAMEINSOURCE '"COMPACTORS_FREEABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EFFECTIVE_ALLOCATION_LIMIT long OPTIONS (NAMEINSOURCE '"EFFECTIVE_ALLOCATION_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HEAP_MEMORY_ALLOCATED_SIZE long OPTIONS (NAMEINSOURCE '"HEAP_MEMORY_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HEAP_MEMORY_USED_SIZE long OPTIONS (NAMEINSOURCE '"HEAP_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    LOGICAL_MEMORY_SIZE long OPTIONS (NAMEINSOURCE '"LOGICAL_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PHYSICAL_MEMORY_SIZE long OPTIONS (NAMEINSOURCE '"PHYSICAL_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PROCESS_ID long OPTIONS (NAMEINSOURCE '"PROCESS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SERVICE_NAME string(256) OPTIONS (NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SHARED_MEMORY_ALLOCATED_SIZE long OPTIONS (NAMEINSOURCE '"SHARED_MEMORY_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_MEMORY_USED_SIZE long OPTIONS (NAMEINSOURCE '"SHARED_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STACK_SIZE long OPTIONS (NAMEINSOURCE '"STACK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_MEMORY_USED_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_SERVICE_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_SERVICE_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ACTIVE_REQUEST_COUNT integer OPTIONS (NAMEINSOURCE '"ACTIVE_REQUEST_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ACTIVE_STATUS string(128) OPTIONS (NAMEINSOURCE '"ACTIVE_STATUS"', NATIVE_TYPE 'VARCHAR'),
    ACTIVE_THREAD_COUNT integer OPTIONS (NAMEINSOURCE '"ACTIVE_THREAD_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALL_FINISHED_REQUEST_COUNT long OPTIONS (NAMEINSOURCE '"ALL_FINISHED_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVAILABLE_MEMORY long OPTIONS (NAMEINSOURCE '"AVAILABLE_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DETAIL string(128) OPTIONS (NAMEINSOURCE '"DETAIL"', NATIVE_TYPE 'VARCHAR'),
    FINISHED_NON_INTERNAL_REQUEST_COUNT long OPTIONS (NAMEINSOURCE '"FINISHED_NON_INTERNAL_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    OPEN_FILE_COUNT integer OPTIONS (NAMEINSOURCE '"OPEN_FILE_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PENDING_REQUEST_COUNT integer OPTIONS (NAMEINSOURCE '"PENDING_REQUEST_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PHYSICAL_MEMORY long OPTIONS (NAMEINSOURCE '"PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PROCESS_CPU_TIME long OPTIONS (NAMEINSOURCE '"PROCESS_CPU_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESS_ID long OPTIONS (NAMEINSOURCE '"PROCESS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESS_MEMORY long OPTIONS (NAMEINSOURCE '"PROCESS_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESS_PHYSICAL_MEMORY long OPTIONS (NAMEINSOURCE '"PROCESS_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_PER_SEC bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"REQUESTS_PER_SEC"', NATIVE_TYPE 'DECIMAL'),
    RESPONSE_TIME integer OPTIONS (NAMEINSOURCE '"RESPONSE_TIME"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(256) OPTIONS (NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    THREAD_COUNT integer OPTIONS (NAMEINSOURCE '"THREAD_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_CPU_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_CPU_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_MEMORY long OPTIONS (NAMEINSOURCE '"TOTAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_SERVICE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_SESSION_CONTEXT" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    KEY string(32) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SECTION string(8) OPTIONS (NAMEINSOURCE '"SECTION"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(512) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_SESSION_CONTEXT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_SQL_PLAN_CACHE" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ABAP_VARCHAR_MODE string(6) OPTIONS (NAMEINSOURCE '"ABAP_VARCHAR_MODE"', NATIVE_TYPE 'VARCHAR'),
    ACCESSED_OBJECTS string(5000) OPTIONS (NAMEINSOURCE '"ACCESSED_OBJECTS"', NATIVE_TYPE 'VARCHAR'),
    AVG_CURSOR_DURATION long OPTIONS (NAMEINSOURCE '"AVG_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_CLOSE_TIME long OPTIONS (NAMEINSOURCE '"AVG_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_FETCH_TIME long OPTIONS (NAMEINSOURCE '"AVG_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_OPEN_TIME long OPTIONS (NAMEINSOURCE '"AVG_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"AVG_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (NAMEINSOURCE '"AVG_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXECUTION_COUNT long OPTIONS (NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT_BY_ROUTING long OPTIONS (NAMEINSOURCE '"EXECUTION_COUNT_BY_ROUTING"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    IS_DISTRIBUTED_EXECUTION string(6) OPTIONS (NAMEINSOURCE '"IS_DISTRIBUTED_EXECUTION"', NATIVE_TYPE 'VARCHAR'),
    IS_INTERNAL string(6) OPTIONS (NAMEINSOURCE '"IS_INTERNAL"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(6) OPTIONS (NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR'),
    LAST_CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"LAST_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_EXECUTION_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"LAST_EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_PREPARATION_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"LAST_PREPARATION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MAX_CURSOR_DURATION long OPTIONS (NAMEINSOURCE '"MAX_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_CLOSE_TIME long OPTIONS (NAMEINSOURCE '"MAX_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_FETCH_TIME long OPTIONS (NAMEINSOURCE '"MAX_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_OPEN_TIME long OPTIONS (NAMEINSOURCE '"MAX_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (NAMEINSOURCE '"MAX_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CURSOR_DURATION long OPTIONS (NAMEINSOURCE '"MIN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_CLOSE_TIME long OPTIONS (NAMEINSOURCE '"MIN_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_FETCH_TIME long OPTIONS (NAMEINSOURCE '"MIN_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_OPEN_TIME long OPTIONS (NAMEINSOURCE '"MIN_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"MIN_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (NAMEINSOURCE '"MIN_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_CONNECTION_ID long OPTIONS (NAMEINSOURCE '"OWNER_CONNECTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMETER_COUNT long OPTIONS (NAMEINSOURCE '"PARAMETER_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_ID long OPTIONS (NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_MEMORY_SIZE long OPTIONS (NAMEINSOURCE '"PLAN_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_SHARING_TYPE string(128) OPTIONS (NAMEINSOURCE '"PLAN_SHARING_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PREPARATION_COUNT long OPTIONS (NAMEINSOURCE '"PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REFERENCE_COUNT long OPTIONS (NAMEINSOURCE '"REFERENCE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT_HASH string(32) OPTIONS (NAMEINSOURCE '"STATEMENT_HASH"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_STRING string(5000) OPTIONS (NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_LOCATIONS string(2000) OPTIONS (NAMEINSOURCE '"TABLE_LOCATIONS"', NATIVE_TYPE 'VARCHAR'),
    TABLE_TYPES string(128) OPTIONS (NAMEINSOURCE '"TABLE_TYPES"', NATIVE_TYPE 'VARCHAR'),
    TOTAL_CURSOR_DURATION long OPTIONS (NAMEINSOURCE '"TOTAL_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_CLOSE_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_FETCH_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_OPEN_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_COUNT long OPTIONS (NAMEINSOURCE '"TOTAL_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_DURATION long OPTIONS (NAMEINSOURCE '"TOTAL_LOCK_WAIT_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_METADATA_CACHE_MISS_COUNT long OPTIONS (NAMEINSOURCE '"TOTAL_METADATA_CACHE_MISS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_RESULT_RECORD_COUNT long OPTIONS (NAMEINSOURCE '"TOTAL_RESULT_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (NAMEINSOURCE '"TOTAL_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATED_TABLE_OID long OPTIONS (NAMEINSOURCE '"UPDATED_TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_NAME string(256) OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_SQL_PLAN_CACHE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_TABLE_VIRTUAL_FILES" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CONTAINER_ID long OPTIONS (NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    NAME string(512) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    NAMESPACE string(512) OPTIONS (NAMEINSOURCE '"NAMESPACE"', NATIVE_TYPE 'VARCHAR'),
    PAGE_COUNT long OPTIONS (NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PART_ID integer OPTIONS (NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PHYSICAL_SIZE long OPTIONS (NAMEINSOURCE '"PHYSICAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'VARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_TABLE_VIRTUAL_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_UNCOMMITTED_WRITE_TRANSACTION" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CLIENT_HOST string(64) OPTIONS (NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONNECTION_STATUS string(128) OPTIONS (NAMEINSOURCE '"CONNECTION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    INDEX_COL string(64) OPTIONS (NAMEINSOURCE '"INDEX_COL"', NATIVE_TYPE 'VARCHAR'),
    LOGICAL_CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"LOGICAL_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MIN_MVCC_SNAPSHOT_TIMESTAMP long OPTIONS (NAMEINSOURCE '"MIN_MVCC_SNAPSHOT_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PRIMARY_TRANSACTION_ID integer OPTIONS (NAMEINSOURCE '"PRIMARY_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRANSACTION_ID integer OPTIONS (NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_UNCOMMITTED_WRITE_TRANSACTION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_VIRTUAL_FILES" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    BYTES_APPENDED long OPTIONS (NAMEINSOURCE '"BYTES_APPENDED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTES_READ long OPTIONS (NAMEINSOURCE '"BYTES_READ"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTES_WRITTEN long OPTIONS (NAMEINSOURCE '"BYTES_WRITTEN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTESTREAM_WRITTEN long OPTIONS (NAMEINSOURCE '"BYTESTREAM_WRITTEN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_ID long OPTIONS (NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PAGE_COUNT long OPTIONS (NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PHYSICAL_SIZE long OPTIONS (NAMEINSOURCE '"PHYSICAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUM_APPEND integer OPTIONS (NAMEINSOURCE '"SUM_APPEND"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUM_COPY integer OPTIONS (NAMEINSOURCE '"SUM_COPY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUM_READ integer OPTIONS (NAMEINSOURCE '"SUM_READ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUM_TRUNCATE integer OPTIONS (NAMEINSOURCE '"SUM_TRUNCATE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUM_WRITE integer OPTIONS (NAMEINSOURCE '"SUM_WRITE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUM_WRITEOPTIMIZED integer OPTIONS (NAMEINSOURCE '"SUM_WRITEOPTIMIZED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_VIRTUAL_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_VOLUME_FILES" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FILE_NAME string(256) OPTIONS (NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILE_TYPE string(128) OPTIONS (NAMEINSOURCE '"FILE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_VOLUME_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_VOLUME_IO_DETAILED_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ACTIVE_APPEND_COUNT long OPTIONS (NAMEINSOURCE '"ACTIVE_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_READ_COUNT long OPTIONS (NAMEINSOURCE '"ACTIVE_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_TRIGGER_ASYNC_READ_COUNT long OPTIONS (NAMEINSOURCE '"ACTIVE_TRIGGER_ASYNC_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_TRIGGER_ASYNC_WRITE_COUNT long OPTIONS (NAMEINSOURCE '"ACTIVE_TRIGGER_ASYNC_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_WRITE_COUNT long OPTIONS (NAMEINSOURCE '"ACTIVE_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    APPEND_COUNT long OPTIONS (NAMEINSOURCE '"APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_APPEND_SIZE long OPTIONS (NAMEINSOURCE '"AVG_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_APPEND_TIME long OPTIONS (NAMEINSOURCE '"AVG_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SIZE long OPTIONS (NAMEINSOURCE '"AVG_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_TIME long OPTIONS (NAMEINSOURCE '"AVG_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_READ_SIZE long OPTIONS (NAMEINSOURCE '"AVG_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_READ_TIME long OPTIONS (NAMEINSOURCE '"AVG_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"AVG_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (NAMEINSOURCE '"AVG_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"AVG_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_TIME long OPTIONS (NAMEINSOURCE '"AVG_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONFIGURATION string(128) OPTIONS (NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FILESYSTEM_TYPE string(16) OPTIONS (NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    MAX_APPEND_SIZE long OPTIONS (NAMEINSOURCE '"MAX_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_APPEND_TIME long OPTIONS (NAMEINSOURCE '"MAX_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_IO_BUFFER_SIZE long OPTIONS (NAMEINSOURCE '"MAX_IO_BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SIZE long OPTIONS (NAMEINSOURCE '"MAX_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_TIME long OPTIONS (NAMEINSOURCE '"MAX_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_READ_SIZE long OPTIONS (NAMEINSOURCE '"MAX_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_READ_TIME long OPTIONS (NAMEINSOURCE '"MAX_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"MAX_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (NAMEINSOURCE '"MAX_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"MAX_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_TIME long OPTIONS (NAMEINSOURCE '"MAX_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_APPEND_SIZE long OPTIONS (NAMEINSOURCE '"MIN_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_APPEND_TIME long OPTIONS (NAMEINSOURCE '"MIN_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SIZE long OPTIONS (NAMEINSOURCE '"MIN_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TIME long OPTIONS (NAMEINSOURCE '"MIN_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_READ_SIZE long OPTIONS (NAMEINSOURCE '"MIN_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_READ_TIME long OPTIONS (NAMEINSOURCE '"MIN_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"MIN_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (NAMEINSOURCE '"MIN_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"MIN_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TIME long OPTIONS (NAMEINSOURCE '"MIN_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PATH string(512) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    READ_COUNT long OPTIONS (NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_READ_COUNT long OPTIONS (NAMEINSOURCE '"TRIGGER_ASYNC_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_WRITE_COUNT long OPTIONS (NAMEINSOURCE '"TRIGGER_ASYNC_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE string(16) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WRITE_COUNT long OPTIONS (NAMEINSOURCE '"WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_VOLUME_IO_DETAILED_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_VOLUME_IO_PERFORMANCE_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    AVG_READ_ENQUEUE_TIME long OPTIONS (NAMEINSOURCE '"AVG_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SIZE long OPTIONS (NAMEINSOURCE '"AVG_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SYNC_SIZE long OPTIONS (NAMEINSOURCE '"AVG_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SYNC_TIME long OPTIONS (NAMEINSOURCE '"AVG_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_TIME long OPTIONS (NAMEINSOURCE '"AVG_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_ENQUEUE_TIME long OPTIONS (NAMEINSOURCE '"AVG_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"AVG_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SYNC_SIZE long OPTIONS (NAMEINSOURCE '"AVG_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SYNC_TIME long OPTIONS (NAMEINSOURCE '"AVG_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_TIME long OPTIONS (NAMEINSOURCE '"AVG_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DELAYED_READ_REQUESTS long OPTIONS (NAMEINSOURCE '"DELAYED_READ_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELAYED_WRITE_REQUESTS long OPTIONS (NAMEINSOURCE '"DELAYED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEQUEUED_DELAYED_REQUESTS long OPTIONS (NAMEINSOURCE '"DEQUEUED_DELAYED_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_READS long OPTIONS (NAMEINSOURCE '"FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_WRITES long OPTIONS (NAMEINSOURCE '"FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    ITEMS_IN_DELAY_QUEUE long OPTIONS (NAMEINSOURCE '"ITEMS_IN_DELAY_QUEUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_ENQUEUE_TIME long OPTIONS (NAMEINSOURCE '"LAST_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SIZE long OPTIONS (NAMEINSOURCE '"LAST_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SYNC_SIZE long OPTIONS (NAMEINSOURCE '"LAST_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SYNC_TIME long OPTIONS (NAMEINSOURCE '"LAST_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_TIME long OPTIONS (NAMEINSOURCE '"LAST_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_ENQUEUE_TIME long OPTIONS (NAMEINSOURCE '"LAST_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"LAST_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SYNC_SIZE long OPTIONS (NAMEINSOURCE '"LAST_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SYNC_TIME long OPTIONS (NAMEINSOURCE '"LAST_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_TIME long OPTIONS (NAMEINSOURCE '"LAST_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_IO_BUFFER long OPTIONS (NAMEINSOURCE '"MAX_IO_BUFFER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ITEMS_IN_DELAY_QUEUE long OPTIONS (NAMEINSOURCE '"MAX_ITEMS_IN_DELAY_QUEUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_ENQUEUE_TIME long OPTIONS (NAMEINSOURCE '"MAX_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SIZE long OPTIONS (NAMEINSOURCE '"MAX_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SYNC_SIZE long OPTIONS (NAMEINSOURCE '"MAX_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SYNC_TIME long OPTIONS (NAMEINSOURCE '"MAX_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_TIME long OPTIONS (NAMEINSOURCE '"MAX_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_ENQUEUE_TIME long OPTIONS (NAMEINSOURCE '"MAX_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"MAX_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SYNC_SIZE long OPTIONS (NAMEINSOURCE '"MAX_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SYNC_TIME long OPTIONS (NAMEINSOURCE '"MAX_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_TIME long OPTIONS (NAMEINSOURCE '"MAX_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_ENQUEUE_TIME long OPTIONS (NAMEINSOURCE '"MIN_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SIZE long OPTIONS (NAMEINSOURCE '"MIN_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SYNC_SIZE long OPTIONS (NAMEINSOURCE '"MIN_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SYNC_TIME long OPTIONS (NAMEINSOURCE '"MIN_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TIME long OPTIONS (NAMEINSOURCE '"MIN_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_ENQUEUE_TIME long OPTIONS (NAMEINSOURCE '"MIN_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"MIN_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SYNC_SIZE long OPTIONS (NAMEINSOURCE '"MIN_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SYNC_TIME long OPTIONS (NAMEINSOURCE '"MIN_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TIME long OPTIONS (NAMEINSOURCE '"MIN_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PATH string(256) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    READ_COMPLETIONS long OPTIONS (NAMEINSOURCE '"READ_COMPLETIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_REQUESTS long OPTIONS (NAMEINSOURCE '"READ_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_SYNC long OPTIONS (NAMEINSOURCE '"READ_SYNC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESUBMITTED_DELAYED_REQUESTS long OPTIONS (NAMEINSOURCE '"RESUBMITTED_DELAYED_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESUBMITTED_DELAYED_REQUESTS_DELAYED_AGAIN long OPTIONS (NAMEINSOURCE '"RESUBMITTED_DELAYED_REQUESTS_DELAYED_AGAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_READS long OPTIONS (NAMEINSOURCE '"SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_WRITES long OPTIONS (NAMEINSOURCE '"SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_ENQUEUE_TIME long OPTIONS (NAMEINSOURCE '"SUM_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SIZE long OPTIONS (NAMEINSOURCE '"SUM_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SYNC_SIZE long OPTIONS (NAMEINSOURCE '"SUM_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SYNC_TIME long OPTIONS (NAMEINSOURCE '"SUM_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_TIME long OPTIONS (NAMEINSOURCE '"SUM_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_ENQUEUE_TIME long OPTIONS (NAMEINSOURCE '"SUM_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"SUM_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SYNC_SIZE long OPTIONS (NAMEINSOURCE '"SUM_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SYNC_TIME long OPTIONS (NAMEINSOURCE '"SUM_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_TIME long OPTIONS (NAMEINSOURCE '"SUM_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE string(16) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WRITE_COMPLETIONS long OPTIONS (NAMEINSOURCE '"WRITE_COMPLETIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_REQUESTS long OPTIONS (NAMEINSOURCE '"WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_SYNC long OPTIONS (NAMEINSOURCE '"WRITE_SYNC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_VOLUME_IO_PERFORMANCE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_VOLUME_IO_RETRY_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    AVG_FULL_RETRY_READS_PER_REQUEST_COUNT long OPTIONS (NAMEINSOURCE '"AVG_FULL_RETRY_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FULL_RETRY_WRITES_PER_REQUEST_COUNT long OPTIONS (NAMEINSOURCE '"AVG_FULL_RETRY_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHORT_READS_PER_REQUEST_COUNT long OPTIONS (NAMEINSOURCE '"AVG_SHORT_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHORT_WRITES_PER_REQUEST_COUNT long OPTIONS (NAMEINSOURCE '"AVG_SHORT_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONFIGURATION string(128) OPTIONS (NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FAILED_APPEND_COUNT long OPTIONS (NAMEINSOURCE '"FAILED_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_READ_COUNT long OPTIONS (NAMEINSOURCE '"FAILED_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_WRITE_COUNT long OPTIONS (NAMEINSOURCE '"FAILED_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILESYSTEM_TYPE string(16) OPTIONS (NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    FULL_RETRY_READ_COUNT long OPTIONS (NAMEINSOURCE '"FULL_RETRY_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_WRITE_COUNT long OPTIONS (NAMEINSOURCE '"FULL_RETRY_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    MAX_FULL_RETRY_READS_PER_REQUEST_COUNT long OPTIONS (NAMEINSOURCE '"MAX_FULL_RETRY_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_FULL_RETRY_WRITES_PER_REQUEST_COUNT long OPTIONS (NAMEINSOURCE '"MAX_FULL_RETRY_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_IO_BUFFER_SIZE long OPTIONS (NAMEINSOURCE '"MAX_IO_BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHORT_READS_PER_REQUEST_COUNT long OPTIONS (NAMEINSOURCE '"MAX_SHORT_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHORT_WRITES_PER_REQUEST_COUNT long OPTIONS (NAMEINSOURCE '"MAX_SHORT_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PATH string(512) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REQUESTS_WITH_FULL_RETRY_READS_COUNT long OPTIONS (NAMEINSOURCE '"REQUESTS_WITH_FULL_RETRY_READS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_FULL_RETRY_WRITES_COUNT long OPTIONS (NAMEINSOURCE '"REQUESTS_WITH_FULL_RETRY_WRITES_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_SHORT_READS_COUNT long OPTIONS (NAMEINSOURCE '"REQUESTS_WITH_SHORT_READS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_SHORT_WRITES_COUNT long OPTIONS (NAMEINSOURCE '"REQUESTS_WITH_SHORT_WRITES_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_READ_COUNT long OPTIONS (NAMEINSOURCE '"SHORT_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_WRITE_COUNT long OPTIONS (NAMEINSOURCE '"SHORT_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPEND_COUNT long OPTIONS (NAMEINSOURCE '"TOTAL_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_COUNT long OPTIONS (NAMEINSOURCE '"TOTAL_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_COUNT long OPTIONS (NAMEINSOURCE '"TOTAL_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE string(16) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_VOLUME_IO_RETRY_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_VOLUME_IO_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    BLOCKED_WRITE_REQUESTS long OPTIONS (NAMEINSOURCE '"BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLOSE_CALL_COUNT long OPTIONS (NAMEINSOURCE '"CLOSE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONFIGURATION string(128) OPTIONS (NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ENQUEUED_WRITE_REQUESTS long OPTIONS (NAMEINSOURCE '"ENQUEUED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EOF_READS long OPTIONS (NAMEINSOURCE '"EOF_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXISTS_CALL_COUNT long OPTIONS (NAMEINSOURCE '"EXISTS_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILESYSTEM_TYPE string(16) OPTIONS (NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    GETDEVICEID_CALL_COUNT long OPTIONS (NAMEINSOURCE '"GETDEVICEID_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETMODIFICATIONTIME_CALL_COUNT long OPTIONS (NAMEINSOURCE '"GETMODIFICATIONTIME_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETSIZE_CALL_COUNT long OPTIONS (NAMEINSOURCE '"GETSIZE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    MAX_BLOCKED_WRITE_REQUESTS long OPTIONS (NAMEINSOURCE '"MAX_BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OPEN_CALL_COUNT long OPTIONS (NAMEINSOURCE '"OPEN_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PATH string(256) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOVE_CALL_COUNT long OPTIONS (NAMEINSOURCE '"REMOVE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_CALL_COUNT long OPTIONS (NAMEINSOURCE '"RESIZE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SYNC_CALL_COUNT long OPTIONS (NAMEINSOURCE '"SYNC_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPENDS long OPTIONS (NAMEINSOURCE '"TOTAL_APPENDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ASYNC_READS long OPTIONS (NAMEINSOURCE '"TOTAL_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ASYNC_WRITES long OPTIONS (NAMEINSOURCE '"TOTAL_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_READS long OPTIONS (NAMEINSOURCE '"TOTAL_FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_READS long OPTIONS (NAMEINSOURCE '"TOTAL_FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_WRITES long OPTIONS (NAMEINSOURCE '"TOTAL_FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_IO_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_IO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_IO_TIME_DELTA long OPTIONS (NAMEINSOURCE '"TOTAL_IO_TIME_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_SIZE_DELTA long OPTIONS (NAMEINSOURCE '"TOTAL_READ_SIZE_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_TIME_DELTA long OPTIONS (NAMEINSOURCE '"TOTAL_READ_TIME_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SHORT_READS long OPTIONS (NAMEINSOURCE '"TOTAL_SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SHORT_WRITES long OPTIONS (NAMEINSOURCE '"TOTAL_SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SYNC_READS long OPTIONS (NAMEINSOURCE '"TOTAL_SYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SYNC_WRITES long OPTIONS (NAMEINSOURCE '"TOTAL_SYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_READS long OPTIONS (NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_WRITES long OPTIONS (NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_SIZE_DELTA long OPTIONS (NAMEINSOURCE '"TOTAL_WRITE_SIZE_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_TIME_DELTA long OPTIONS (NAMEINSOURCE '"TOTAL_WRITE_TIME_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE string(16) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_VOLUME_IO_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_VOLUME_IO_TOTAL_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    BLOCKED_WRITE_REQUESTS long OPTIONS (NAMEINSOURCE '"BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONFIGURATION string(128) OPTIONS (NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FILESYSTEM_TYPE string(16) OPTIONS (NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    MAX_BLOCKED_WRITE_REQUESTS long OPTIONS (NAMEINSOURCE '"MAX_BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PATH string(512) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_APPENDS long OPTIONS (NAMEINSOURCE '"TOTAL_APPENDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_READS long OPTIONS (NAMEINSOURCE '"TOTAL_FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_WRITES long OPTIONS (NAMEINSOURCE '"TOTAL_FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_READS long OPTIONS (NAMEINSOURCE '"TOTAL_FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_WRITES long OPTIONS (NAMEINSOURCE '"TOTAL_FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_IO_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_IO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READS long OPTIONS (NAMEINSOURCE '"TOTAL_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SHORT_READS long OPTIONS (NAMEINSOURCE '"TOTAL_SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SHORT_WRITES long OPTIONS (NAMEINSOURCE '"TOTAL_SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_READS long OPTIONS (NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_WRITES long OPTIONS (NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_SIZE long OPTIONS (NAMEINSOURCE '"TOTAL_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_TIME long OPTIONS (NAMEINSOURCE '"TOTAL_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITES long OPTIONS (NAMEINSOURCE '"TOTAL_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_READ_RATIO double OPTIONS (NAMEINSOURCE '"TRIGGER_READ_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TRIGGER_WRITE_RATIO double OPTIONS (NAMEINSOURCE '"TRIGGER_WRITE_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TYPE string(16) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_VOLUME_IO_TOTAL_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.HOST_WORKLOAD" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMMIT_COUNT long OPTIONS (NAMEINSOURCE '"COMMIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPILATION_COUNT long OPTIONS (NAMEINSOURCE '"COMPILATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CURRENT_COMMIT_RATE double OPTIONS (NAMEINSOURCE '"CURRENT_COMMIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_COMPILATION_RATE double OPTIONS (NAMEINSOURCE '"CURRENT_COMPILATION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_EXECUTION_RATE double OPTIONS (NAMEINSOURCE '"CURRENT_EXECUTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_MEMORY_USAGE_RATE double OPTIONS (NAMEINSOURCE '"CURRENT_MEMORY_USAGE_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_ROLLBACK_RATE double OPTIONS (NAMEINSOURCE '"CURRENT_ROLLBACK_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_TRANSACTION_RATE double OPTIONS (NAMEINSOURCE '"CURRENT_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_UPDATE_TRANSACTION_RATE double OPTIONS (NAMEINSOURCE '"CURRENT_UPDATE_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXECUTION_COUNT long OPTIONS (NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PEAK_COMMIT_RATE double OPTIONS (NAMEINSOURCE '"PEAK_COMMIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_COMPILATION_RATE double OPTIONS (NAMEINSOURCE '"PEAK_COMPILATION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_EXECUTION_RATE double OPTIONS (NAMEINSOURCE '"PEAK_EXECUTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_MEMORY_USAGE_RATE double OPTIONS (NAMEINSOURCE '"PEAK_MEMORY_USAGE_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_ROLLBACK_RATE double OPTIONS (NAMEINSOURCE '"PEAK_ROLLBACK_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_TRANSACTION_RATE double OPTIONS (NAMEINSOURCE '"PEAK_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_UPDATE_TRANSACTION_RATE double OPTIONS (NAMEINSOURCE '"PEAK_UPDATE_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ROLLBACK_COUNT long OPTIONS (NAMEINSOURCE '"ROLLBACK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_COUNT long OPTIONS (NAMEINSOURCE '"UPDATE_TRANSACTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."HOST_WORKLOAD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.INDEX_SERVER_HEAP_MEMORY_STATISTICS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMPACTORS_FREEABLE long OPTIONS (NAMEINSOURCE '"COMPACTORS_FREEABLE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HEAP_MEMORY_ALLOCATED long OPTIONS (NAMEINSOURCE '"HEAP_MEMORY_ALLOCATED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HEAP_MEMORY_FREE long OPTIONS (NAMEINSOURCE '"HEAP_MEMORY_FREE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HEAP_MEMORY_USED long OPTIONS (NAMEINSOURCE '"HEAP_MEMORY_USED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PROCESS_MEMORY long OPTIONS (NAMEINSOURCE '"PROCESS_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESS_PHYSICAL_MEMORY long OPTIONS (NAMEINSOURCE '"PROCESS_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SYSTEM_PHYSICAL_MEMORY long OPTIONS (NAMEINSOURCE '"SYSTEM_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."INDEX_SERVER_HEAP_MEMORY_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.STATISTICS_ALERT_INFORMATION" (
    ALERT_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"ALERT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_NAME string(64) OPTIONS (NAMEINSOURCE '"ALERT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ALERT_DESCRIPTION string(1024) OPTIONS (NAMEINSOURCE '"ALERT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    ALERT_USERACTION string(1024) OPTIONS (NAMEINSOURCE '"ALERT_USERACTION"', NATIVE_TYPE 'NVARCHAR'),
    "INTERVAL" string(128) OPTIONS (NAMEINSOURCE '"INTERVAL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."STATISTICS_ALERT_INFORMATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.STATISTICS_ALERT_LAST_CHECK_INFORMATION" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) NOT NULL OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    SQL_PORT integer NOT NULL OPTIONS (NAMEINSOURCE '"SQL_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"ALERT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INDEX string(128) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    ALERT_LAST_CHECK_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"ALERT_LAST_CHECK_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ALERT_LAST_CHECK_RATING byte OPTIONS (NAMEINSOURCE '"ALERT_LAST_CHECK_RATING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    ALERT_LAST_CHECK_EMAIL byte OPTIONS (NAMEINSOURCE '"ALERT_LAST_CHECK_EMAIL"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    ALERT_SEQ integer OPTIONS (NAMEINSOURCE '"ALERT_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."STATISTICS_ALERT_LAST_CHECK_INFORMATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.STATISTICS_ALERTS" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) NOT NULL OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    SQL_PORT integer NOT NULL OPTIONS (NAMEINSOURCE '"SQL_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"ALERT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    ALERT_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"ALERT_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ALERT_RATING byte OPTIONS (NAMEINSOURCE '"ALERT_RATING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    ALERT_DETAILS string(1024) OPTIONS (NAMEINSOURCE '"ALERT_DETAILS"', NATIVE_TYPE 'NVARCHAR'),
    EMAIL_STATE byte OPTIONS (NAMEINSOURCE '"EMAIL_STATE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    PROCESS_STATE byte OPTIONS (NAMEINSOURCE '"PROCESS_STATE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    PROCESS_TIME timestamp OPTIONS (NAMEINSOURCE '"PROCESS_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PROCESS_AGENT string(256) OPTIONS (NAMEINSOURCE '"PROCESS_AGENT"', NATIVE_TYPE 'NVARCHAR'),
    ALERT_SEQ integer OPTIONS (NAMEINSOURCE '"ALERT_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."STATISTICS_ALERTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.STATISTICS_CURRENT_ALERTS" (
    ALERT_SEQ integer NOT NULL OPTIONS (NAMEINSOURCE '"ALERT_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"ALERT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) NOT NULL OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    SQL_PORT integer NOT NULL OPTIONS (NAMEINSOURCE '"SQL_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_DESCRIPTION string(1024) OPTIONS (NAMEINSOURCE '"ALERT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    ALERT_DETAILS string(1024) OPTIONS (NAMEINSOURCE '"ALERT_DETAILS"', NATIVE_TYPE 'NVARCHAR'),
    ALERT_NAME string(64) OPTIONS (NAMEINSOURCE '"ALERT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ALERT_RATING byte NOT NULL OPTIONS (NAMEINSOURCE '"ALERT_RATING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    ALERT_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"ALERT_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ALERT_USERACTION string(1024) OPTIONS (NAMEINSOURCE '"ALERT_USERACTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."STATISTICS_CURRENT_ALERTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.STATISTICS_INTERVAL_INFORMATION" (
    NAME string(128) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DURATION integer OPTIONS (NAMEINSOURCE '"DURATION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    START_TIME timestamp OPTIONS (NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."STATISTICS_INTERVAL_INFORMATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.STATISTICS_LAST_CHECKS" (
    ALERT_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"ALERT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MIN_ALERT_SEQ integer NOT NULL OPTIONS (NAMEINSOURCE '"MIN_ALERT_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SNAPSHOT_ID timestamp OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ALERT_DESCRIPTION string(1024) OPTIONS (NAMEINSOURCE '"ALERT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    ALERT_NAME string(64) OPTIONS (NAMEINSOURCE '"ALERT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ALERT_LAST_CHECK_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"ALERT_LAST_CHECK_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ALERT_NEXT_CHECK_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"ALERT_NEXT_CHECK_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ALERT_LAST_CHECK_RATING byte OPTIONS (NAMEINSOURCE '"ALERT_LAST_CHECK_RATING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    ALERT_USERACTION string(1024) OPTIONS (NAMEINSOURCE '"ALERT_USERACTION"', NATIVE_TYPE 'NVARCHAR'),
    "INTERVAL" integer OPTIONS (NAMEINSOURCE '"INTERVAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INTERVAL_START_TIME timestamp OPTIONS (NAMEINSOURCE '"INTERVAL_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ID_COUNT long NOT NULL OPTIONS (NAMEINSOURCE '"ID_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."STATISTICS_LAST_CHECKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.STATISTICS_LASTVALUES" (
    HOST string(64) NOT NULL OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer NOT NULL OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NAME string(128) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX string(1024) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    REACHED_AT timestamp OPTIONS (NAMEINSOURCE '"REACHED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."STATISTICS_LASTVALUES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.STATISTICS_STATE" (
    STATE string(64) NOT NULL OPTIONS (NAMEINSOURCE '"STATE"', NATIVE_TYPE 'NVARCHAR'),
    REACHED_AT timestamp OPTIONS (NAMEINSOURCE '"REACHED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."STATISTICS_STATE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.STATISTICS_VERSION" (
    VERSION byte NOT NULL OPTIONS (NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SINCE timestamp OPTIONS (NAMEINSOURCE '"SINCE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."STATISTICS_VERSION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_STATISTICS.TT_EVENT_HISTORY" (
    SNAPSHOT_ID timestamp OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INDEX string(1024) OPTIONS (NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    SERVER_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"SERVER_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    ACKNOWLEDGED string(6) OPTIONS (NAMEINSOURCE '"ACKNOWLEDGED"', NATIVE_TYPE 'VARCHAR'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_SEQ integer OPTIONS (NAMEINSOURCE '"DATA_SEQ"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FAILED_HANDLES long OPTIONS (NAMEINSOURCE '"FAILED_HANDLES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HANDLE_TIME timestamp OPTIONS (NAMEINSOURCE '"HANDLE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    ID long OPTIONS (NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INFO string(2000) OPTIONS (NAMEINSOURCE '"INFO"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATE string(256) OPTIONS (NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(256) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_STATISTICS"."TT_EVENT_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_XS.DEBUG_PERMISSIONS" (
    GRANTOR string(256) NOT NULL OPTIONS (NAMEINSOURCE '"GRANTOR"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    STARTING timestamp NOT NULL OPTIONS (NAMEINSOURCE '"STARTING"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    UNTIL timestamp NOT NULL OPTIONS (NAMEINSOURCE '"UNTIL"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TOKEN string(32) OPTIONS (NAMEINSOURCE '"TOKEN"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_XS"."DEBUG_PERMISSIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_XS.HTTP_DESTINATIONS" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(512) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    HOST string(2048) NOT NULL OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'NVARCHAR'),
    PORT integer NOT NULL OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH_PREFIX string(2048) OPTIONS (NAMEINSOURCE '"PATH_PREFIX"', NATIVE_TYPE 'NVARCHAR'),
    USE_PROXY byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"USE_PROXY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    PROXY_HOST string(2048) OPTIONS (NAMEINSOURCE '"PROXY_HOST"', NATIVE_TYPE 'NVARCHAR'),
    PROXY_PORT integer NOT NULL OPTIONS (NAMEINSOURCE '"PROXY_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    AUTHENTICATION_TYPE byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"AUTHENTICATION_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    USE_SSL byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"USE_SSL"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TIMEOUT short NOT NULL DEFAULT '-1' OPTIONS (NAMEINSOURCE '"TIMEOUT"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    REMOTE_SID string(12) OPTIONS (NAMEINSOURCE '"REMOTE_SID"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_CLIENT string(12) OPTIONS (NAMEINSOURCE '"REMOTE_CLIENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_XS"."HTTP_DESTINATIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_XS.JOB_LOG" (
    NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    ID long NOT NULL OPTIONS (NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLANNED_TIME timestamp NOT NULL OPTIONS (NAMEINSOURCE '"PLANNED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATUS string(16) NOT NULL OPTIONS (NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    ERROR_MESSAGE string(2048) OPTIONS (NAMEINSOURCE '"ERROR_MESSAGE"', NATIVE_TYPE 'NVARCHAR'),
    STARTED_AT timestamp OPTIONS (NAMEINSOURCE '"STARTED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    FINISHED_AT timestamp OPTIONS (NAMEINSOURCE '"FINISHED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(256) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'NVARCHAR'),
    PORT string(5) OPTIONS (NAMEINSOURCE '"PORT"', NATIVE_TYPE 'VARCHAR'),
    ACTION string(512) OPTIONS (NAMEINSOURCE '"ACTION"', NATIVE_TYPE 'NVARCHAR'),
    "USER" string(256) OPTIONS (NAMEINSOURCE '"USER"', NATIVE_TYPE 'NVARCHAR'),
    LOCALE string(64) OPTIONS (NAMEINSOURCE '"LOCALE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_XS"."JOB_LOG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_XS.JOB_SCHEDULES" (
    ID long NOT NULL OPTIONS (NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOB_NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"JOB_NAME"', NATIVE_TYPE 'NVARCHAR'),
    XSCRON string(256) NOT NULL OPTIONS (NAMEINSOURCE '"XSCRON"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(512) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    "PARAMETER" clob(24) OPTIONS (NAMEINSOURCE '"PARAMETER"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB')
) OPTIONS (NAMEINSOURCE '"_SYS_XS"."JOB_SCHEDULES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_XS.JOBS" (
    NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(512) NOT NULL OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    ACTION string(512) NOT NULL OPTIONS (NAMEINSOURCE '"ACTION"', NATIVE_TYPE 'NVARCHAR'),
    "USER" string(256) OPTIONS (NAMEINSOURCE '"USER"', NATIVE_TYPE 'NVARCHAR'),
    LOCALE string(64) OPTIONS (NAMEINSOURCE '"LOCALE"', NATIVE_TYPE 'VARCHAR'),
    STATUS string(16) NOT NULL DEFAULT 'INACTIVE' OPTIONS (NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_TIME timestamp OPTIONS (NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_XS"."JOBS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_XS.JS_RECOMPILE_ISSUES" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SUFFIX string(255) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_SUFFIX"', NATIVE_TYPE 'NVARCHAR'),
    STAMP timestamp NOT NULL OPTIONS (NAMEINSOURCE '"STAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MESSAGE string(2048) NOT NULL OPTIONS (NAMEINSOURCE '"MESSAGE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_XS"."JS_RECOMPILE_ISSUES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_XS.RUNTIME_CONFIGURATION" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    CONFIGURATION string(2048) NOT NULL OPTIONS (NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'NVARCHAR'),
    CHANGED_BY string(256) OPTIONS (NAMEINSOURCE '"CHANGED_BY"', NATIVE_TYPE 'NVARCHAR'),
    CHANGED_AT timestamp OPTIONS (NAMEINSOURCE '"CHANGED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_XS"."RUNTIME_CONFIGURATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_XS.SAML_PROVIDER_CONFIG" (
    SAML_PROVIDER string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SAML_PROVIDER"', NATIVE_TYPE 'NVARCHAR'),
    PROFILE_TYPE byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"PROFILE_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    BINDING_TYPE byte NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"BINDING_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DESTINATION_PACKAGE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DESTINATION_PACKAGE"', NATIVE_TYPE 'NVARCHAR'),
    DESTINATION_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DESTINATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PATH string(2048) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"_SYS_XS"."SAML_PROVIDER_CONFIG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_XS.SQL_CONNECTIONS" (
    NAME string(512) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USERNAME string(256) OPTIONS (NAMEINSOURCE '"USERNAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(2048) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    ASSIGNED_BY string(256) OPTIONS (NAMEINSOURCE '"ASSIGNED_BY"', NATIVE_TYPE 'NVARCHAR'),
    ASSIGNED_AT timestamp OPTIONS (NAMEINSOURCE '"ASSIGNED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"_SYS_XS"."SQL_CONNECTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "_SYS_XS.USAGE_STATISTICS" (
    APPLICATION_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNTIL timestamp NOT NULL OPTIONS (NAMEINSOURCE '"UNTIL"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COUNTER long NOT NULL OPTIONS (NAMEINSOURCE '"COUNTER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"_SYS_XS"."USAGE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "BOOKS.TABLE1" (
    I integer NOT NULL OPTIONS (NAMEINSOURCE '"I"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    A string(10) OPTIONS (NAMEINSOURCE '"A"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"BOOKS"."TABLE1"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "HANA_FLIGHT.HANA_FLIGHT_DATA" (
    COUNTRYFROM string(3) OPTIONS (NAMEINSOURCE '"COUNTRYFROM"', NATIVE_TYPE 'VARCHAR'),
    CITYFROM string(20) NOT NULL OPTIONS (NAMEINSOURCE '"CITYFROM"', NATIVE_TYPE 'VARCHAR'),
    AIRPORTFROM string(3) NOT NULL OPTIONS (NAMEINSOURCE '"AIRPORTFROM"', NATIVE_TYPE 'VARCHAR'),
    COUNTRYTO string(3) NOT NULL OPTIONS (NAMEINSOURCE '"COUNTRYTO"', NATIVE_TYPE 'VARCHAR'),
    CITYTO string(20) NOT NULL OPTIONS (NAMEINSOURCE '"CITYTO"', NATIVE_TYPE 'VARCHAR'),
    AIRPORTTO string(3) NOT NULL OPTIONS (NAMEINSOURCE '"AIRPORTTO"', NATIVE_TYPE 'VARCHAR'),
    FLIGHTTIME integer NOT NULL OPTIONS (NAMEINSOURCE '"FLIGHTTIME"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEPARTURETIME time NOT NULL OPTIONS (NAMEINSOURCE '"DEPARTURETIME"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'TIME'),
    ARRIVALTIME time NOT NULL OPTIONS (NAMEINSOURCE '"ARRIVALTIME"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'TIME'),
    DISTANCE bigdecimal(1,2147483647) NOT NULL OPTIONS (NAMEINSOURCE '"DISTANCE"', NATIVE_TYPE 'DECIMAL'),
    DISTANCEUNIT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"DISTANCEUNIT"', NATIVE_TYPE 'VARCHAR'),
    FLIGHTTYPE string(1) NOT NULL OPTIONS (NAMEINSOURCE '"FLIGHTTYPE"', NATIVE_TYPE 'VARCHAR'),
    PERIOD byte NOT NULL OPTIONS (NAMEINSOURCE '"PERIOD"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CARRID string(3) NOT NULL OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'VARCHAR'),
    CONNID string(4) NOT NULL OPTIONS (NAMEINSOURCE '"CONNID"', NATIVE_TYPE 'VARCHAR'),
    FLDATE timestamp NOT NULL OPTIONS (NAMEINSOURCE '"FLDATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PRICE bigdecimal(1,2147483647) NOT NULL OPTIONS (NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    CURRENCY string(5) NOT NULL OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'VARCHAR'),
    PLANETYPE string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PLANETYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"HANA_FLIGHT"."HANA_FLIGHT_DATA"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.ACCESSIBLE_VIEWS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user who is authorized to access the view', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the view', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'Name of the view', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ANALYTICAL_PRIVILEGE_NEEDED string(5) OPTIONS (ANNOTATION 'Specifies if this view is secured by means of analytical privileges', NAMEINSOURCE '"ANALYTICAL_PRIVILEGE_NEEDED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."ACCESSIBLE_VIEWS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.AFL_AREAS" (
    AREA_OID long OPTIONS (ANNOTATION 'Object ID of the AFL area', NAMEINSOURCE '"AREA_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the AFL area', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL area', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Create timestamp of the AFL area', NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."AFL_AREAS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.AFL_FUNCTION_PARAMETERS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the AFL function', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Area name of the AFL function', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Function name of the AFL function', NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PARAMETER_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Parameter name', NAMEINSOURCE '"PARAMETER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer NOT NULL OPTIONS (ANNOTATION 'Ordinal position of the parameter', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IO_TYPE string(8) OPTIONS (ANNOTATION 'direction of the parameter', NAMEINSOURCE '"IO_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE string(22) OPTIONS (ANNOTATION 'data type', NAMEINSOURCE '"DATA_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CS_DATA_TYPE string(13) OPTIONS (ANNOTATION 'Column store data type', NAMEINSOURCE '"CS_DATA_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CS_DATA_TYPE_EXPRESSION string(256) OPTIONS (ANNOTATION 'Regular experssion of column store data type', NAMEINSOURCE '"CS_DATA_TYPE_EXPRESSION"', NATIVE_TYPE 'NVARCHAR'),
    SQL_NAME string(256) OPTIONS (ANNOTATION 'Sql name', NAMEINSOURCE '"SQL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SQL_DATA_TYPE string(14) OPTIONS (ANNOTATION 'Sql data type', NAMEINSOURCE '"SQL_DATA_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'Parameter length', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RAW_SIZE integer OPTIONS (ANNOTATION 'Parameter raw size', NAMEINSOURCE '"RAW_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Scale of the parameter', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USAGE string(32) OPTIONS (ANNOTATION 'usage', NAMEINSOURCE '"USAGE"', NATIVE_TYPE 'NVARCHAR'),
    BUSINESS_TEXT_ID integer OPTIONS (ANNOTATION 'Business text id of the parameter', NAMEINSOURCE '"BUSINESS_TEXT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."AFL_FUNCTION_PARAMETERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.AFL_FUNCTION_PROPERTIES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema of the AFL function properties', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Area name of the AFL function properties', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Function name of the AFL function properties', NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) NOT NULL OPTIONS (ANNOTATION 'Key of the AFL function properties', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(1024) OPTIONS (ANNOTATION 'Value of the AFL function properties', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."AFL_FUNCTION_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.AFL_FUNCTIONS" (
    FUNCTION_OID long OPTIONS (ANNOTATION 'Object ID of the AFL function', NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the AFL function', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL area that the AFL function belong to', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL package that the AFL function belong to', NAMEINSOURCE '"PACKAGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL function', NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Create timestamp of the AFL function', NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INPUT_PARAMETER_COUNT integer OPTIONS (ANNOTATION 'Number of the input parameters of the AFL function', NAMEINSOURCE '"INPUT_PARAMETER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RETURN_VALUE_COUNT integer OPTIONS (ANNOTATION 'Number of the out parameters of the AFL function', NAMEINSOURCE '"RETURN_VALUE_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FUNCTION_TYPE string(7) NOT NULL OPTIONS (ANNOTATION 'Type of the AFL function', NAMEINSOURCE '"FUNCTION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TECHNICAL_CATEGORY string(11) NOT NULL OPTIONS (ANNOTATION 'Technical category of the AFL function', NAMEINSOURCE '"TECHNICAL_CATEGORY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."AFL_FUNCTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.AFL_PACKAGES" (
    PACKAGE_OID long OPTIONS (ANNOTATION 'Object ID of the AFL package', NAMEINSOURCE '"PACKAGE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the AFL package', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL area that the AFL package belong to', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL package', NAMEINSOURCE '"PACKAGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Create timestamp of the AFL package', NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."AFL_PACKAGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.AFL_TEXTS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the AFL text', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Area name of the AFL text', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID integer NOT NULL OPTIONS (ANNOTATION 'Text id', NAMEINSOURCE '"TEXT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LANGUAGE_CODE string(5) NOT NULL OPTIONS (ANNOTATION 'Language code of AFL text', NAMEINSOURCE '"LANGUAGE_CODE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT string(512) OPTIONS (ANNOTATION 'Text', NAMEINSOURCE '"TEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."AFL_TEXTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.AUDIT_LOG" (
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Time the event occurred', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Name of the host where the event occured', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port number', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Name of the service', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'ID of the connection', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CLIENT_HOST string(64) OPTIONS (ANNOTATION 'IP of the client host', NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_IP string(16) OPTIONS (ANNOTATION 'IP of the client application', NAMEINSOURCE '"CLIENT_IP"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (ANNOTATION 'PID of the client process', NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLIENT_PORT integer OPTIONS (ANNOTATION 'Port of the client process', NAMEINSOURCE '"CLIENT_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of user connected to the database', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the application user', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AUDIT_POLICY_NAME string(256) OPTIONS (ANNOTATION 'Name of the Audit Policy hit', NAMEINSOURCE '"AUDIT_POLICY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    EVENT_STATUS string(32) OPTIONS (ANNOTATION 'Whether the event was successful or not', NAMEINSOURCE '"EVENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    EVENT_LEVEL string(16) OPTIONS (ANNOTATION 'Severity Level of the event', NAMEINSOURCE '"EVENT_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    EVENT_ACTION string(32) OPTIONS (ANNOTATION 'Action performed by the audit event', NAMEINSOURCE '"EVENT_ACTION"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Name of schema', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of object', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRIVILEGE_NAME string(256) OPTIONS (ANNOTATION 'Name of privilege granted', NAMEINSOURCE '"PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROLE_NAME string(256) OPTIONS (ANNOTATION 'Name of role granted', NAMEINSOURCE '"ROLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE string(256) OPTIONS (ANNOTATION 'The grantee in GRANT/REVOKE statements', NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    GRANTABLE string(16) OPTIONS (ANNOTATION 'Whether the privilege/role being granted is grantable or not', NAMEINSOURCE '"GRANTABLE"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME string(256) OPTIONS (ANNOTATION 'Configuration file which was changed', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SECTION string(128) OPTIONS (ANNOTATION 'Configuration which was changed', NAMEINSOURCE '"SECTION"', NATIVE_TYPE 'VARCHAR'),
    KEY string(128) OPTIONS (ANNOTATION 'Attribute being changed', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    PREV_VALUE string(5000) OPTIONS (ANNOTATION 'Old value of the attribute', NAMEINSOURCE '"PREV_VALUE"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'New value of the attribute', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'The SQL statement which caused the event', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    COMMENT string(5000) OPTIONS (ANNOTATION 'Any extra information on the event', NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."AUDIT_LOG"', UPDATABLE TRUE);
*/
CREATE FOREIGN TABLE "PUBLIC.AUDIT_POLICIES" (
    AUDIT_POLICY_NAME string(256) OPTIONS (ANNOTATION 'Audit policy name', NAMEINSOURCE '"AUDIT_POLICY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AUDIT_POLICY_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the audit policy', NAMEINSOURCE '"AUDIT_POLICY_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVENT_STATUS string(32) OPTIONS (ANNOTATION 'Status of events to be audited: ''SUCCESSFUL EVENTS''/''UNSUCCESSFUL EVENTS''/''ALL EVENTS''', NAMEINSOURCE '"EVENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    EVENT_LEVEL string(16) OPTIONS (ANNOTATION 'Level of events to be audited: ''EMERGENCY''/''CRITICAL''/''ALERT''/''WARNING''/''INFO''', NAMEINSOURCE '"EVENT_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    IS_AUDIT_POLICY_ACTIVE string(5) OPTIONS (ANNOTATION 'Audit policy is active: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_AUDIT_POLICY_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    EVENT_ACTION string(32) OPTIONS (ANNOTATION 'Action to be audited, for example: ''SELECT'', ''GRANT PRIVILEGE'', ...', NAMEINSOURCE '"EVENT_ACTION"', NATIVE_TYPE 'VARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User whose actions are to be audited', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    EXCEPT_USER_NAME string(256) OPTIONS (ANNOTATION 'User whose actions are not to be audited', NAMEINSOURCE '"EXCEPT_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of object to be audited, ''INVALID'' in case of change of object type after creation of audit policy', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_SCHEMA string(256) OPTIONS (ANNOTATION 'Schema of object to be audited', NAMEINSOURCE '"OBJECT_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of object to be audited', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."AUDIT_POLICIES"', UPDATABLE TRUE);
/*
CREATE FOREIGN TABLE "PUBLIC.AUTHORIZATION_GRAPH" (
    ROOT_DEPENDENT_TYPE_ID short OPTIONS (ANNOTATION 'Object type ID of the root object to show as a graph', NAMEINSOURCE '"ROOT_DEPENDENT_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ROOT_DEPENDENT_OBJECT_ID long OPTIONS (ANNOTATION 'Object ID of the root object to show as a graph', NAMEINSOURCE '"ROOT_DEPENDENT_OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEPENDENT_TYPE_ID short OPTIONS (ANNOTATION 'Object type ID of the dependent object', NAMEINSOURCE '"DEPENDENT_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEPENDENT_TYPE_ID_NAME string(256) OPTIONS (ANNOTATION 'Object type name of the dependent object', NAMEINSOURCE '"DEPENDENT_TYPE_ID_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_SUBTYPE_ID short OPTIONS (ANNOTATION 'Object subtype ID of the dependent object', NAMEINSOURCE '"DEPENDENT_SUBTYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEPENDENT_SUBTYPE_ID_NAME string(256) OPTIONS (ANNOTATION 'Object subtype name of the dependent object', NAMEINSOURCE '"DEPENDENT_SUBTYPE_ID_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_ID long OPTIONS (ANNOTATION 'Object ID of the dependent object', NAMEINSOURCE '"DEPENDENT_OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEPENDENT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name the dependent object belongs to', NAMEINSOURCE '"DEPENDENT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the dependent object', NAMEINSOURCE '"DEPENDENT_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OWNER_OID long OPTIONS (ANNOTATION 'ID of the user owning the dependent object', NAMEINSOURCE '"DEPENDENT_OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEPENDENT_OWNER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user owning the dependent object', NAMEINSOURCE '"DEPENDENT_OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_READONLY integer OPTIONS (ANNOTATION 'Readonly property of the dependent object', NAMEINSOURCE '"DEPENDENT_READONLY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNDERLYING_TYPE_ID short OPTIONS (ANNOTATION 'Object type ID of the underlying object', NAMEINSOURCE '"UNDERLYING_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    UNDERLYING_TYPE_ID_NAME string(256) OPTIONS (ANNOTATION 'Object type name of the underlying object', NAMEINSOURCE '"UNDERLYING_TYPE_ID_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNDERLYING_SUBTYPE_ID short OPTIONS (ANNOTATION 'Object subtype ID of the underlying object', NAMEINSOURCE '"UNDERLYING_SUBTYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    UNDERLYING_SUBTYPE_ID_NAME string(256) OPTIONS (ANNOTATION 'Object subtype name of the underlying object', NAMEINSOURCE '"UNDERLYING_SUBTYPE_ID_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNDERLYING_OBJECT_ID long OPTIONS (ANNOTATION 'Object ID of the underlying object', NAMEINSOURCE '"UNDERLYING_OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNDERLYING_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name the underlying object belongs to', NAMEINSOURCE '"UNDERLYING_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNDERLYING_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the underlying object', NAMEINSOURCE '"UNDERLYING_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNDERLYING_OWNER_OID long OPTIONS (ANNOTATION 'ID of the user owning the underlying object', NAMEINSOURCE '"UNDERLYING_OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNDERLYING_OWNER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user owning the underlying object', NAMEINSOURCE '"UNDERLYING_OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNDERLYING_READONLY integer OPTIONS (ANNOTATION 'Readonly property of the underlying object', NAMEINSOURCE '"UNDERLYING_READONLY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEPENDENCY_USER_OID long OPTIONS (ANNOTATION 'ID of the user required to have a certain privilege on the underlying object in order to validate the dependent object', NAMEINSOURCE '"DEPENDENCY_USER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEPENDENCY_USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user required to have a certain privilege on the underlying object in order to validate the dependent object', NAMEINSOURCE '"DEPENDENCY_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENCY_TYPE short OPTIONS (ANNOTATION 'Type of dependency determines the validation semantics for dependencies sharing the same dependent objects', NAMEINSOURCE '"DEPENDENCY_TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    PRIVILEGE_ID long OPTIONS (ANNOTATION 'ID of the privilege the dependency user is required to have on the underlying object', NAMEINSOURCE '"PRIVILEGE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRIVILEGE_NAME string(256) OPTIONS (ANNOTATION 'Name of the privilege the dependency user is required to have on the underlying object', NAMEINSOURCE '"PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_VALID byte OPTIONS (ANNOTATION 'Current state of the dependency (as integer). It is set by the object validation logic and reflects missing privileges or invalidated objects: 0 .. 3', NAMEINSOURCE '"IS_VALID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DEPENDENCY_STATUS string(40) OPTIONS (ANNOTATION 'Current state of a privilege for the dependent object: ''INVALID''/''NOT AUTHORIZED''/''AUTHORIZED NON GRANTABLE''/''AUTHORIZED GRANTABLE''', NAMEINSOURCE '"DEPENDENCY_STATUS"', NATIVE_TYPE 'VARCHAR'),
    AVAILABLE_PRIVILEGES string(256) OPTIONS (ANNOTATION 'Current state of a privilege on upper node (dependent object): ''INVALID''/''NOT GRANTABLE''/''GRANTABLE''', NAMEINSOURCE '"AVAILABLE_PRIVILEGES"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."AUTHORIZATION_GRAPH"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.AUTHORIZATION_TYPES" (
    TYPE_ID long OPTIONS (ANNOTATION 'Id of the authorization object type', NAMEINSOURCE '"TYPE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE_NAME string(256) OPTIONS (ANNOTATION 'Name of the authorization object type', NAMEINSOURCE '"TYPE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUBTYPE_ID long OPTIONS (ANNOTATION 'Id of the authorization object subtype', NAMEINSOURCE '"SUBTYPE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBTYPE_NAME string(256) OPTIONS (ANNOTATION 'Name of the authorization object subtype', NAMEINSOURCE '"SUBTYPE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."AUTHORIZATION_TYPES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.CATALOG_OBJECTS_CREATED_BY_REPOSITORY_ACTIVATIONS" (
    CATALOG_SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of database object', NAMEINSOURCE '"CATALOG_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CATALOG_OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Object name of database object', NAMEINSOURCE '"CATALOG_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REPOSITORY_PACKAGE_ID string(256) NOT NULL OPTIONS (ANNOTATION 'Repository package this database object belongs to', NAMEINSOURCE '"REPOSITORY_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    REPOSITORY_OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Object name in the repository', NAMEINSOURCE '"REPOSITORY_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REPOSITORY_OBJECT_TYPE string(255) NOT NULL OPTIONS (ANNOTATION 'Type of object in the repository', NAMEINSOURCE '"REPOSITORY_OBJECT_TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."CATALOG_OBJECTS_CREATED_BY_REPOSITORY_ACTIVATIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.CONSTRAINTS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short OPTIONS (ANNOTATION 'Column position in this constraint', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    CONSTRAINT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Constraint name', NAMEINSOURCE '"CONSTRAINT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_PRIMARY_KEY string(5) NOT NULL OPTIONS (ANNOTATION 'Constraint is primary key constraint: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_PRIMARY_KEY"', NATIVE_TYPE 'VARCHAR'),
    IS_UNIQUE_KEY string(5) NOT NULL OPTIONS (ANNOTATION 'Constraint is unique constraint: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNIQUE_KEY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."CONSTRAINTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.CREDENTIALS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user the credential belongs to', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMPONENT string(256) OPTIONS (ANNOTATION 'Name of the component the credential is valid for', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'NVARCHAR'),
    PURPOSE string(256) OPTIONS (ANNOTATION 'Purpose, for example remote machine, the credential is valid for', NAMEINSOURCE '"PURPOSE"', NATIVE_TYPE 'NVARCHAR'),
    CREDENTIAL_TYPE string(64) OPTIONS (ANNOTATION 'Type of the credential, e.g. password or X509', NAMEINSOURCE '"CREDENTIAL_TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."CREDENTIALS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.CS_BO_VIEWS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BO_VIEW_NAME string(256) OPTIONS (ANNOTATION 'Business object view name', NAMEINSOURCE '"BO_VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ANCHOR_SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Anchor schema name', NAMEINSOURCE '"ANCHOR_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ANCHOR_TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Anchor table name', NAMEINSOURCE '"ANCHOR_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."CS_BO_VIEWS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.CS_FREESTYLE_COLUMNS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Freestyle column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."CS_FREESTYLE_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.CS_JOIN_CONDITIONS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONDITION_NAME string(256) OPTIONS (ANNOTATION 'Join condition name', NAMEINSOURCE '"JOIN_CONDITION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_ORDER long OPTIONS (ANNOTATION 'Join order number', NAMEINSOURCE '"JOIN_ORDER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_SCHEMA_NAME1 string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of column 1', NAMEINSOURCE '"TABLE_SCHEMA_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME1 string(256) NOT NULL OPTIONS (ANNOTATION 'Table name of column 1', NAMEINSOURCE '"TABLE_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME1 string(256) NOT NULL OPTIONS (ANNOTATION 'Name of column 1', NAMEINSOURCE '"COLUMN_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER1 integer OPTIONS (ANNOTATION 'Alias Number of table name 1', NAMEINSOURCE '"ALIAS_NUMBER1"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_SCHEMA_NAME2 string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of column 2', NAMEINSOURCE '"TABLE_SCHEMA_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME2 string(256) NOT NULL OPTIONS (ANNOTATION 'Table name of column 2', NAMEINSOURCE '"TABLE_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME2 string(256) NOT NULL OPTIONS (ANNOTATION 'Name of column 2', NAMEINSOURCE '"COLUMN_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER2 integer OPTIONS (ANNOTATION 'Alias Number of table name 2', NAMEINSOURCE '"ALIAS_NUMBER2"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONSTRAINTS string(256) OPTIONS (ANNOTATION 'Join constraint name', NAMEINSOURCE '"CONSTRAINTS"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_TYPE string(5) OPTIONS (ANNOTATION 'Join type: ''inner''/''left''/''right''/''full''', NAMEINSOURCE '"JOIN_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CARDINALITY string(3) OPTIONS (ANNOTATION 'Join cardinality: ''1:1''/''1:n''/''n:1''/''n:n''', NAMEINSOURCE '"CARDINALITY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."CS_JOIN_CONDITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.CS_JOIN_CONSTRAINTS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONSTRAINT_NAME string(256) OPTIONS (ANNOTATION 'Join constraint name', NAMEINSOURCE '"JOIN_CONSTRAINT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONSTRAINT_TYPE string(32) OPTIONS (ANNOTATION 'Type of constraint owner', NAMEINSOURCE '"CONSTRAINT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCATION string(256) OPTIONS (ANNOTATION 'Name of constraint owner', NAMEINSOURCE '"LOCATION"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of table', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OPERATOR string(256) OPTIONS (ANNOTATION 'Operator', NAMEINSOURCE '"OPERATOR"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."CS_JOIN_CONSTRAINTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.CS_JOIN_PATHS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_PATH_NAME string(256) OPTIONS (ANNOTATION 'Join path name', NAMEINSOURCE '"JOIN_PATH_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONDITIONS string(5000) OPTIONS (ANNOTATION 'Comma separated list of join conditions', NAMEINSOURCE '"JOIN_CONDITIONS"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONSTRAINTS string(5000) OPTIONS (ANNOTATION 'Comma separated list of join constraints', NAMEINSOURCE '"JOIN_CONSTRAINTS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."CS_JOIN_PATHS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.CS_JOIN_TABLES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of physical table name', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Physical table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE string(32) OPTIONS (ANNOTATION 'Type of table: ''FACT_TABLE''/''D_TABLE''/''X_TABLE''/''Y_TABLE''/''TEMP_TABLE''/''S_TABLE''/''EXTERNAL_OBJECT''/''CONVERSION_TABLE''/''OLAP_TEXT_TABLE''/''AUTHORIZATION_TABLE''/''HIERARCHY''', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."CS_JOIN_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.CS_KEY_FIGURES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    KEY_FIGURE_NAME string(256) OPTIONS (ANNOTATION 'Key figure name', NAMEINSOURCE '"KEY_FIGURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_AGGREGATION_TYPE string(32) OPTIONS (ANNOTATION 'Aggregation type like: ''sum''/''count''/''min''/...', NAMEINSOURCE '"DEFAULT_AGGREGATION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) OPTIONS (ANNOTATION 'Description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    UNIT_CONVERSION_NAME string(256) OPTIONS (ANNOTATION 'Name of unit conversion', NAMEINSOURCE '"UNIT_CONVERSION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of table', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    EXPRESSION_FLAGS string(32) OPTIONS (ANNOTATION 'Expression flags', NAMEINSOURCE '"EXPRESSION_FLAGS"', NATIVE_TYPE 'VARCHAR'),
    EXPRESSION string(256) OPTIONS (ANNOTATION 'Expression', NAMEINSOURCE '"EXPRESSION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."CS_KEY_FIGURES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.CS_VIEW_COLUMNS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'View column name', NAMEINSOURCE '"VIEW_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of table', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER integer OPTIONS (ANNOTATION 'Alias number', NAMEINSOURCE '"ALIAS_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_PATH string(256) OPTIONS (ANNOTATION 'Join path name', NAMEINSOURCE '"JOIN_PATH"', NATIVE_TYPE 'NVARCHAR'),
    CS_TYPE string(16) OPTIONS (ANNOTATION 'Column store data type', NAMEINSOURCE '"CS_TYPE"', NATIVE_TYPE 'VARCHAR'),
    EXPRESSION_FLAGS string(32) OPTIONS (ANNOTATION 'Expression flags', NAMEINSOURCE '"EXPRESSION_FLAGS"', NATIVE_TYPE 'VARCHAR'),
    EXPRESSION string(256) OPTIONS (ANNOTATION 'Expression', NAMEINSOURCE '"EXPRESSION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."CS_VIEW_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.DATA_STATISTICS" (
    DATA_STATISTICS_OID long NOT NULL OPTIONS (ANNOTATION 'Data statistics object ID', NAMEINSOURCE '"DATA_STATISTICS_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_STATISTICS_TYPE string(9) NOT NULL OPTIONS (ANNOTATION 'Specifies the data statistics type: ''HISTOGRAM''/''SIMPLE''', NAMEINSOURCE '"DATA_STATISTICS_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DATA_STATISTICS_NAME string(256) OPTIONS (ANNOTATION 'Specifies the data statistics name', NAMEINSOURCE '"DATA_STATISTICS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_SOURCE_OBJECT_TYPE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies the data source object type: ''TABLE''/''VIEW''', NAMEINSOURCE '"DATA_SOURCE_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DATA_SOURCE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Specifies the schema name of the data source', NAMEINSOURCE '"DATA_SOURCE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_SOURCE_OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Specifies the object name of the data source', NAMEINSOURCE '"DATA_SOURCE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_SOURCE_COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Specifies the column name of the data source', NAMEINSOURCE '"DATA_SOURCE_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Specifies the time when the data statistics object was created', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_REFRESH_TIME timestamp OPTIONS (ANNOTATION 'Specifies the time when the data statistics object was last refreshed', NAMEINSOURCE '"LAST_REFRESH_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MINVALUE_NUMERIC double OPTIONS (ANNOTATION 'Specifies the minimum numeric value of the data source', NAMEINSOURCE '"MINVALUE_NUMERIC"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MINVALUE_STRING string(256) OPTIONS (ANNOTATION 'Specifies the minimum string value of the data source', NAMEINSOURCE '"MINVALUE_STRING"', NATIVE_TYPE 'NVARCHAR'),
    MAXVALUE_NUMERIC double OPTIONS (ANNOTATION 'Specifies the maximum numeric value of the data source', NAMEINSOURCE '"MAXVALUE_NUMERIC"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAXVALUE_STRING string(256) OPTIONS (ANNOTATION 'Specifies the maximum string value of the data source', NAMEINSOURCE '"MAXVALUE_STRING"', NATIVE_TYPE 'NVARCHAR'),
    COUNT long OPTIONS (ANNOTATION 'Specifies the number of values of the data source', NAMEINSOURCE '"COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DISTINCT_COUNT long OPTIONS (ANNOTATION 'Specifies the number of unique values of the data source', NAMEINSOURCE '"DISTINCT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NULL_COUNT long OPTIONS (ANNOTATION 'Specifies the number of NULL values of the data source', NAMEINSOURCE '"NULL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_BUCKETS long OPTIONS (ANNOTATION 'Specifies the number of buckets specified in the CREATE STATISTICS statement', NAMEINSOURCE '"CREATE_BUCKETS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_REFRESH_BUCKETS long OPTIONS (ANNOTATION 'Specifies the number of buckets used when the data statistics object was last refreshed', NAMEINSOURCE '"LAST_REFRESH_BUCKETS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_MEMORY long OPTIONS (ANNOTATION 'Specifies the memory size to be used by the data statistics object specified in the CREATE STATISTICS statement', NAMEINSOURCE '"CREATE_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_REFRESH_MEMORY long OPTIONS (ANNOTATION 'Specifies the memory size used by the data statistics object when the object was last refreshed', NAMEINSOURCE '"LAST_REFRESH_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_MEMORY_PERCENT integer OPTIONS (ANNOTATION 'Specifies the memory size, as a percentage of the data source size, to be used by the data statistics object specified in the CREATE STATISTICS statement', NAMEINSOURCE '"CREATE_MEMORY_PERCENT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_REFRESH_MEMORY_PERCENT integer OPTIONS (ANNOTATION 'Specifies the memory size, as a percentage of the data source size,  used by the data statistics object when the object was last refreshed', NAMEINSOURCE '"LAST_REFRESH_MEMORY_PERCENT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "CONSTRAINT" string(8) NOT NULL OPTIONS (ANNOTATION 'Specifies the constraint for the build algorithm for the data statistics object: ''MAXDIFF''/''QOPTIMAL''', NAMEINSOURCE '"CONSTRAINT"', NATIVE_TYPE 'VARCHAR'),
    IS_PERSISTENT string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if the content of the data statistics object is persistent or not: ''FALSE''/''TRUE''', NAMEINSOURCE '"IS_PERSISTENT"', NATIVE_TYPE 'VARCHAR'),
    CREATE_QERROR float OPTIONS (ANNOTATION 'Specifies the parameter qerror for the data statistics object of type ''HISTOGRAM'' as specified in the CREATE STATISTICS statement', NAMEINSOURCE '"CREATE_QERROR"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    LAST_REFRESH_QERROR float OPTIONS (ANNOTATION 'Specifies the parameter qerror for the data statistics object of type ''HISTOGRAM'' as computed at the last refresh', NAMEINSOURCE '"LAST_REFRESH_QERROR"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    CREATE_QTHETA integer OPTIONS (ANNOTATION 'Specifies the parameter qtheta for the data statistics object of type ''HISTOGRAM'' as specified at the CREATE STATISTICS statement', NAMEINSOURCE '"CREATE_QTHETA"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_REFRESH_QTHETA integer OPTIONS (ANNOTATION 'Specifies the parameter qtheta for the data statistics object of type ''HISTOGRAM'' as computed at the last refresh', NAMEINSOURCE '"LAST_REFRESH_QTHETA"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."DATA_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.DATA_TYPES" (
    TYPE_ID short OPTIONS (ANNOTATION 'Data type ID', NAMEINSOURCE '"TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TYPE_NAME string(16) OPTIONS (ANNOTATION 'Data type name', NAMEINSOURCE '"TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_SIZE integer OPTIONS (ANNOTATION 'Maximum size of the data type that this system can support', NAMEINSOURCE '"COLUMN_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LITERAL_PREFIX string(1) OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo Varchar. Character or characters used to prefix a literal, for example, a single quotation mark ('') for character data types or 0x for binary data types; NULL is returned for data types where a literal prefix is not applicable', NAMEINSOURCE '"LITERAL_PREFIX"', NATIVE_TYPE 'CHAR'),
    LITERAL_SUFFIX string(1) OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo Varchar. Character or characters used to terminate a literal, for example, a single quotation mark ('') for character data types; NULL is returned for data types where a literal suffix is not applicable', NAMEINSOURCE '"LITERAL_SUFFIX"', NATIVE_TYPE 'CHAR'),
    CREATE_PARAMS string(16) OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo Varchar. A list of keywords, separated by commas, corresponding to each parameter that the application may specify in parentheses when using the name that is returned in the TYPE_NAME field', NAMEINSOURCE '"CREATE_PARAMS"', NATIVE_TYPE 'VARCHAR'),
    NULLABLE byte OPTIONS (ANNOTATION 'Specifies whether the data type can accept null or not', NAMEINSOURCE '"NULLABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CASE_SENSITIVE byte OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo smallint. Whether a character data type is case-sensitive in collations and comparisons', NAMEINSOURCE '"CASE_SENSITIVE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SEARCHABLE byte OPTIONS (ANNOTATION 'How the data type can be used in the WHERE clause', NAMEINSOURCE '"SEARCHABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    UNSIGNED_ATTRIBUTE byte OPTIONS (ANNOTATION 'Signed or unsigned', NAMEINSOURCE '"UNSIGNED_ATTRIBUTE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FIXED_PREC_SCALE byte OPTIONS (ANNOTATION 'Whether the data type has predefined fixed precision and scale (ODBC)', NAMEINSOURCE '"FIXED_PREC_SCALE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    AUTO_UNIQUE_VALUE byte OPTIONS (ANNOTATION 'Whether the data type is autoincrementing (ODBC)', NAMEINSOURCE '"AUTO_UNIQUE_VALUE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    LOCAL_TYPE_NAME string(16) OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo varchar. Localized version of the data source-dependent name of the data type', NAMEINSOURCE '"LOCAL_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    MINIMUM_SCALE short OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo smallint. The minimum scale of the data type on the data source', NAMEINSOURCE '"MINIMUM_SCALE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    MAXIMUM_SCALE short OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo smallint. The maximum scale of the data type on the data source', NAMEINSOURCE '"MAXIMUM_SCALE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SQL_DATA_TYPE short OPTIONS (ANNOTATION 'ODBC 3.0 SQLGetTypeInfo smallint. The value of the SQL data type as it appears in the SQL_DESC_TYPE field of the descriptor. This column is the same as the DATATYPE column, except for interval and datetime data types', NAMEINSOURCE '"SQL_DATA_TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SQL_DATETIME_SUB short OPTIONS (ANNOTATION 'ODBC 3.0 SQLGetTypeInfo smallint. When the value of SQL_DATATYPE is SQL_DATETIME or SQL_INTERVAL, this column contains the datetime/interval subcode', NAMEINSOURCE '"SQL_DATETIME_SUB"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    NUM_PREC_RADIX integer OPTIONS (ANNOTATION 'ODBC 3.0 SQLGetTypeInfo integer. In case of an approximate numeric data type, value is 2 to indicate that COLUMN_SIZE specifies the number of bits. For exact numeric data types value 10 indicates that COLUMN_SIZE specifies the number of decimal digits', NAMEINSOURCE '"NUM_PREC_RADIX"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INTERVAL_PRECISION short OPTIONS (ANNOTATION 'ODBC 3.0 SQLGetTypeInfo smallint. If the data type is an interval data type, then this column contains the value of the interval leading precision. Otherwise, this column is NULL', NAMEINSOURCE '"INTERVAL_PRECISION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."DATA_TYPES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.DUMMY" (
    DUMMY string(1) OPTIONS (NAMEINSOURCE '"DUMMY"', NATIVE_TYPE 'CHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."DUMMY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.EFFECTIVE_PRIVILEGES" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user for whom effective privileges are shown', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE string(256) OPTIONS (ANNOTATION 'User or role that has the privilege', NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE_TYPE string(4) NOT NULL OPTIONS (ANNOTATION '''USER'' or ''ROLE''', NAMEINSOURCE '"GRANTEE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    GRANTOR string(256) OPTIONS (ANNOTATION 'User or role that provided the privilege', NAMEINSOURCE '"GRANTOR"', NATIVE_TYPE 'NVARCHAR'),
    GRANTOR_TYPE string(4) NOT NULL OPTIONS (ANNOTATION '''USER'' or ''ROLE''', NAMEINSOURCE '"GRANTOR_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the granted object like: ''TABLE''/''SCHEMA''/...', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name the object belongs to', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of granted object', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRIVILEGE string(256) OPTIONS (ANNOTATION 'Privilege granted', NAMEINSOURCE '"PRIVILEGE"', NATIVE_TYPE 'NVARCHAR'),
    IS_GRANTABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Privilege was granted ''WITH GRANT OPTION''/''WITH ADMIN OPTION'': ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_GRANTABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Privilege is valid or it became invalid because of implicit revoking: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."EFFECTIVE_PRIVILEGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.EFFECTIVE_ROLES" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user for whom effective roles are shown', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE string(256) OPTIONS (ANNOTATION 'User or role that has the role', NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE_TYPE string(4) NOT NULL OPTIONS (ANNOTATION '''USER'' or ''ROLE''', NAMEINSOURCE '"GRANTEE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    GRANTOR string(256) OPTIONS (ANNOTATION 'User that granted the role', NAMEINSOURCE '"GRANTOR"', NATIVE_TYPE 'NVARCHAR'),
    ROLE_NAME string(256) OPTIONS (ANNOTATION 'Role granted', NAMEINSOURCE '"ROLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_GRANTABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Role was granted ''WITH ADMIN OPTION'': ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_GRANTABLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."EFFECTIVE_ROLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.EFFECTIVE_STRUCTURED_PRIVILEGES" (
    ROOT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Name of the schema the requested object is in', NAMEINSOURCE '"ROOT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROOT_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the requested object', NAMEINSOURCE '"ROOT_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the requesting user', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_ID long OPTIONS (ANNOTATION 'ID of the requesting user', NAMEINSOURCE '"USER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema of a certain object in the object hierarchy', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of a certain object in the object hierarchy', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_OID long OPTIONS (ANNOTATION 'Object ID of a certain object in the hierarchy', NAMEINSOURCE '"OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EFFECTIVE_FILTER string(5000) OPTIONS (ANNOTATION 'Filter condition applying to a certain object (merged and optimized predicates provided by all structured privileges that apply)', NAMEINSOURCE '"EFFECTIVE_FILTER"', NATIVE_TYPE 'NVARCHAR'),
    STRUCTURED_PRIVILEGE_NAME string(256) OPTIONS (ANNOTATION 'Name of a certain structured privilege created for that particular object', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STRUCTURED_PRIVILEGE_ID long OPTIONS (ANNOTATION 'ID of the structured privilege', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STRUCTURED_PRIVILEGE_FILTER string(5000) OPTIONS (ANNOTATION 'Filter condition provided by that particular structured privilege', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_FILTER"', NATIVE_TYPE 'NVARCHAR'),
    STRUCTURED_PRIVILEGE_STATUS string(64) OPTIONS (ANNOTATION 'Status of a particular structured privilege (APPLIED, NOT GRANTED, NO MATCHING ATTRIBUTE, NO FILTER VALUES FOUND)', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_STATUS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."EFFECTIVE_STRUCTURED_PRIVILEGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.ELEMENT_TYPES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'The name of the schema containing the object defining or using the collection type', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'The name of the table, view, or procedure that defines or uses the collection type', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_OID long NOT NULL OPTIONS (ANNOTATION 'The identifier of the table, view, or procedure that defines or uses the collection type', NAMEINSOURCE '"OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_TYPE string(5) NOT NULL OPTIONS (ANNOTATION 'One of ''TABLE'', ''VIEW'', or ''PROCEDURE''', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    ELEMENT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'The name of the table or view column or procedure parameter', NAMEINSOURCE '"ELEMENT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'The identifier of the element type', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'The name of the element type', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'The length for a character string type or the precision for a numeric type', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'The scale for a numeric type', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MIN_CARDINALITY integer OPTIONS (ANNOTATION 'The lower bound of the array', NAMEINSOURCE '"MIN_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_CARDINALITY integer OPTIONS (ANNOTATION 'The upper bound of the array', NAMEINSOURCE '"MAX_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOW_DUPLICATES string(5) NOT NULL OPTIONS (ANNOTATION 'Indicates if duplicates should be allowed within one column: ''TRUE''/''FALSE''', NAMEINSOURCE '"ALLOW_DUPLICATES"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."ELEMENT_TYPES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.EXPLAIN_PLAN_TABLE" (
    STATEMENT_NAME string(256) OPTIONS (ANNOTATION 'The string specified as STATEMENT_NAME on executing EXPLAIN PLAN command. This is used to distinguish plans from each other when there are multiple plans in EXPLAIN_PLAN_TABLE view', NAMEINSOURCE '"STATEMENT_NAME"', NATIVE_TYPE 'VARCHAR'),
    OPERATOR_NAME string(5000) OPTIONS (ANNOTATION 'Name of an operator', NAMEINSOURCE '"OPERATOR_NAME"', NATIVE_TYPE 'VARCHAR'),
    OPERATOR_DETAILS clob OPTIONS (ANNOTATION 'Details of an operator. Predicates and expressions used by the operator are shown here', NAMEINSOURCE '"OPERATOR_DETAILS"', NATIVE_TYPE 'NCLOB'),
    EXECUTION_ENGINE string(256) OPTIONS (ANNOTATION 'Execution engine where the plan operator is executed: COLUMN or ROW', NAMEINSOURCE '"EXECUTION_ENGINE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name the dependent object belongs to', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Name of database tables and views accessed by an operator', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE string(5000) OPTIONS (ANNOTATION 'Table stored type: COLUMN or ROW', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TABLE_SIZE double OPTIONS (ANNOTATION 'Estimated input row count of an operator. This is available only for operators accessing tables and views directly', NAMEINSOURCE '"TABLE_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OUTPUT_SIZE double OPTIONS (ANNOTATION 'Estimated output row count of an operator', NAMEINSOURCE '"OUTPUT_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    SUBTREE_COST double OPTIONS (ANNOTATION 'Estimated cost of executing the subtree starting from an operator', NAMEINSOURCE '"SUBTREE_COST"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OPERATOR_ID integer OPTIONS (ANNOTATION 'Unique ID of an operator. IDs are integers starting from 1', NAMEINSOURCE '"OPERATOR_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARENT_OPERATOR_ID integer OPTIONS (ANNOTATION 'OPERATOR_ID of the parent of an operator. The shape of a query plan is a tree and the topology of the tree can be reconstructed using OPERATOR_ID and PARENT_OPERATOR_ID. PARENT_OPERATOR_ID of the root operator is shown as NULL ', NAMEINSOURCE '"PARENT_OPERATOR_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL integer OPTIONS (ANNOTATION 'Level from the root operator. Level of the root operator is 1, level of a child of the root operator is 2 and so on. This can be utilized for output indentation', NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POSITION integer OPTIONS (ANNOTATION 'Position in the parent operator. Position of the first child is 1, position of the second child is 2 and so on', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(256) OPTIONS (ANNOTATION 'Host where the plan operator is generated', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port where the plan operator is generated', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Date and time when the EXPLAIN PLAN command was executed', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."EXPLAIN_PLAN_TABLE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.FULLTEXT_INDEXES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the fulltext index', NAMEINSOURCE '"INDEX_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the fulltext index', NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LANGUAGE_COLUMN string(256) OPTIONS (ANNOTATION 'Column name of the indexed table containing language indicators for the indexed documents', NAMEINSOURCE '"LANGUAGE_COLUMN"', NATIVE_TYPE 'NVARCHAR'),
    MIME_TYPE_COLUMN string(256) OPTIONS (ANNOTATION 'Column name of the indexed table containing MIME type indicators for the indexed documents', NAMEINSOURCE '"MIME_TYPE_COLUMN"', NATIVE_TYPE 'NVARCHAR'),
    LANGUAGE_DETECTION string(256) OPTIONS (ANNOTATION 'Set of languages to be considered for automatic language detection', NAMEINSOURCE '"LANGUAGE_DETECTION"', NATIVE_TYPE 'NVARCHAR'),
    FAST_PREPROCESS string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, preprocessing will be done with reduced functionality (e.g. linguistic search is not available), which will speed up the indexing', NAMEINSOURCE '"FAST_PREPROCESS"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_INDEX string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, fuzzy search is performed with an additional index (faster search, but higher memory consumption)', NAMEINSOURCE '"FUZZY_SEARCH_INDEX"', NATIVE_TYPE 'VARCHAR'),
    SEARCH_ONLY string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, the text-attributes will not store any DAFs, i.e. it is not possible to retrieve the HTML-converted or original data from the text-attribute. If the text-attribute is a shadow attribute (i.e. created via CREATE FULLTEXT INDEX), the source-attribute (containing the original data) is not affected by this flag', NAMEINSOURCE '"SEARCH_ONLY"', NATIVE_TYPE 'VARCHAR'),
    IS_EXPLICIT string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, the index is an explicit fulltext index, i.e. created by CREATE FULLTEXT INDEX', NAMEINSOURCE '"IS_EXPLICIT"', NATIVE_TYPE 'VARCHAR'),
    FLUSH_AFTER_DOCUMENTS integer OPTIONS (ANNOTATION 'Used to store change-tracking behavior of the fulltext index', NAMEINSOURCE '"FLUSH_AFTER_DOCUMENTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLUSH_EVERY_MINUTES integer OPTIONS (ANNOTATION 'Used to store change-tracking behavior of the fulltext index', NAMEINSOURCE '"FLUSH_EVERY_MINUTES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONFIGURATION string(256) OPTIONS (ANNOTATION 'An explicit config-file can be specified, for example, to enable named entity extraction', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'NVARCHAR'),
    INTERNAL_COLUMN_NAME string(512) OPTIONS (ANNOTATION 'Name of the internal text-attribute, only set if the fulltext index was not created using TEXT-datatype', NAMEINSOURCE '"INTERNAL_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PHRASE_INDEX_RATIO float OPTIONS (ANNOTATION 'Float between 0.0 and 1.0 which specifies how much memory the phrase index may use (as a percentage of the memory size of the fulltext index)', NAMEINSOURCE '"PHRASE_INDEX_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    TEXT_MINING string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, text mining capabilities will be enabled on the indexed column', NAMEINSOURCE '"TEXT_MINING"', NATIVE_TYPE 'VARCHAR'),
    TEXT_ANALYSIS string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, an additional table is created that stores text analysis results, normally this parameter should be set to false', NAMEINSOURCE '"TEXT_ANALYSIS"', NATIVE_TYPE 'VARCHAR'),
    MIME_TYPE string(256) OPTIONS (ANNOTATION 'MIME type indicator for the indexed documents', NAMEINSOURCE '"MIME_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    TOKEN_SEPARATORS string(256) OPTIONS (ANNOTATION 'Characters used as token separators.', NAMEINSOURCE '"TOKEN_SEPARATORS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."FULLTEXT_INDEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.FUNCTION_PARAMETERS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the function', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the function', NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the function', NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMETER_NAME string(256) OPTIONS (ANNOTATION 'Parameter name', NAMEINSOURCE '"PARAMETER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_ID integer OPTIONS (ANNOTATION 'Data type ID', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Data type name', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'Parameter length', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Scale of the parameter', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the parameter', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_TYPE_SCHEMA string(256) OPTIONS (ANNOTATION 'Schema name of table type if DATA_TYPE_NAME is TABLE_TYPE', NAMEINSOURCE '"TABLE_TYPE_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE_NAME string(256) OPTIONS (ANNOTATION 'Name of table type if DATA_TYPE_NAME is TABLE_TYPE', NAMEINSOURCE '"TABLE_TYPE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PARAMETER_TYPE string(7) OPTIONS (ANNOTATION 'Parameter mode: IN, OUT, INOUT', NAMEINSOURCE '"PARAMETER_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HAS_DEFAULT_VALUE string(5) OPTIONS (ANNOTATION 'Specifies whether the parameter has a default value or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_DEFAULT_VALUE"', NATIVE_TYPE 'VARCHAR'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the parameter accepts a null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."FUNCTION_PARAMETERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.FUNCTIONS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the function', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the function', NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_OID long OPTIONS (ANNOTATION 'Object ID of the function', NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INPUT_PARAMETER_COUNT integer OPTIONS (ANNOTATION 'Input type parameter count', NAMEINSOURCE '"INPUT_PARAMETER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RETURN_VALUE_COUNT integer OPTIONS (ANNOTATION 'Return value type parameter count', NAMEINSOURCE '"RETURN_VALUE_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_UNICODE string(5) OPTIONS (ANNOTATION 'Specifies whether the function contains Unicode or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNICODE"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION clob OPTIONS (ANNOTATION 'Query string of the function', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NCLOB'),
    FUNCTION_TYPE string(10) NOT NULL OPTIONS (ANNOTATION 'Type of the function', NAMEINSOURCE '"FUNCTION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the function is valid or not. This becomes ''FALSE'' when its base objects are changed or dropped: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."FUNCTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.GEOCODE_INDEXES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Index name', NAMEINSOURCE '"INDEX_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the index', NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSH_AFTER_DOCUMENTS integer OPTIONS (ANNOTATION 'Used to store change-tracking behaviour of the index', NAMEINSOURCE '"FLUSH_AFTER_DOCUMENTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLUSH_EVERY_MINUTES integer OPTIONS (ANNOTATION 'Used to store change-tracking behaviour of the index', NAMEINSOURCE '"FLUSH_EVERY_MINUTES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."GEOCODE_INDEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.GRANTED_PRIVILEGES" (
    GRANTEE string(256) OPTIONS (ANNOTATION 'User or role the privilege is granted to', NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE_TYPE string(4) NOT NULL OPTIONS (ANNOTATION '''USER'' or ''ROLE''', NAMEINSOURCE '"GRANTEE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    GRANTOR string(256) OPTIONS (ANNOTATION 'User who granted the privilege', NAMEINSOURCE '"GRANTOR"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the granted object like: ''TABLE''/''SCHEMA''/...', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name the object belongs to', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of granted object', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRIVILEGE string(256) OPTIONS (ANNOTATION 'Privilege granted', NAMEINSOURCE '"PRIVILEGE"', NATIVE_TYPE 'NVARCHAR'),
    IS_GRANTABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Privilege was granted ''WITH GRANT OPTION''/''WITH ADMIN OPTION'': ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_GRANTABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Privilege is valid or it became invalid because of implicit revoking: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."GRANTED_PRIVILEGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.GRANTED_ROLES" (
    GRANTEE string(256) OPTIONS (ANNOTATION 'User or role the role is granted to', NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE_TYPE string(4) NOT NULL OPTIONS (ANNOTATION '''USER'' or ''ROLE''', NAMEINSOURCE '"GRANTEE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    ROLE_NAME string(256) OPTIONS (ANNOTATION 'Name of the granted role', NAMEINSOURCE '"ROLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GRANTOR string(256) OPTIONS (ANNOTATION 'User who granted the role', NAMEINSOURCE '"GRANTOR"', NATIVE_TYPE 'NVARCHAR'),
    IS_GRANTABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Role was granted ''WITH ADMIN OPTION'': ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_GRANTABLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."GRANTED_ROLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.INDEX_COLUMNS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Index name', NAMEINSOURCE '"INDEX_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the index', NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "CONSTRAINT" string(32) OPTIONS (ANNOTATION 'Constraint type of the index: UNIQUE, NOT_NULL_UNIQUE, PRIMARY_KEY; Geocode type of the column: GEOCODE COUNTRY, GEOCODE STATE, GEOCODE COUNTY, GEOCODE CITY, GEOCODE POSTAL_CODE, GEOCODE DISTRICT, GEOCODE STREET, GEOCODE HOUSE_NUMBER, GEOCODE ADDRESS_LINE, GEOCODE', NAMEINSOURCE '"CONSTRAINT"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the indexed column', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short OPTIONS (ANNOTATION 'Ordinal position of the indexed column', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ASCENDING_ORDER string(5) OPTIONS (ANNOTATION 'Specifies whether the indexed column is ascending order or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"ASCENDING_ORDER"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."INDEX_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.INDEXES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Index name', NAMEINSOURCE '"INDEX_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_OID long OPTIONS (ANNOTATION 'Object ID of the index', NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_TYPE string(32) OPTIONS (ANNOTATION 'Type of RS-index: ''BTREE''/''BTREE_UNIQUE''/''CPBTREE''/''CPBTREE_UNIQUE''; Type of CS-index: ''INVERTED VALUE''/''INVERTED VALUE UNIQUE''', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    "CONSTRAINT" string(32) OPTIONS (ANNOTATION 'Constraint type of the index: ''UNIQUE''/''NOT_NULL_UNIQUE''/''PRIMARY_KEY''', NAMEINSOURCE '"CONSTRAINT"', NATIVE_TYPE 'VARCHAR'),
    KEY_LENGTH short OPTIONS (ANNOTATION 'Length of the key', NAMEINSOURCE '"KEY_LENGTH"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    BTREE_FILL_FACTOR short OPTIONS (ANNOTATION 'B-tree fill factor (50~100)', NAMEINSOURCE '"BTREE_FILL_FACTOR"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    BTREE_SPLIT_TYPE byte OPTIONS (ANNOTATION 'B-tree split type: ''SPLIT_PERCENT''/''SPLIT_INVOKER''', NAMEINSOURCE '"BTREE_SPLIT_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    BTREE_SPLIT_POSITION byte OPTIONS (ANNOTATION 'B-tree split position (0~100)', NAMEINSOURCE '"BTREE_SPLIT_POSITION"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."INDEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.INVALID_CONNECT_ATTEMPTS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUCCESSFUL_CONNECT_TIME timestamp NOT NULL OPTIONS (ANNOTATION 'Time of the valid connect attempt', NAMEINSOURCE '"SUCCESSFUL_CONNECT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INVALID_CONNECT_ATTEMPTS long OPTIONS (ANNOTATION 'Number of invalid connect attempts for this user between last successful connect and given time', NAMEINSOURCE '"INVALID_CONNECT_ATTEMPTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."INVALID_CONNECT_ATTEMPTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_ACTIVE_STATEMENTS" (
    HOST string(64) NOT NULL OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer NOT NULL OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer NOT NULL OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Prepared statement ID', NAMEINSOURCE '"STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    START_MVCC_TIMESTAMP long OPTIONS (ANNOTATION 'Internal MVCC timestamp of the transaction start time', NAMEINSOURCE '"START_MVCC_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPILED_TIME timestamp OPTIONS (ANNOTATION 'Compilation timestamp of the statement', NAMEINSOURCE '"COMPILED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATEMENT_STATUS string(128) OPTIONS (ANNOTATION 'Status of SQL statement', NAMEINSOURCE '"STATEMENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'SQL statement', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    ALLOCATED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Current snapshot of allocated memory size for executing this statement', NAMEINSOURCE '"ALLOCATED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Current snapshot of used memory size for executing this statement', NAMEINSOURCE '"USED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_ID long OPTIONS (ANNOTATION 'Logical plan ID', NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_EXECUTED_TIME timestamp OPTIONS (ANNOTATION 'Recently executed time of statement. This timestamp is updated when opening cursors and executing DML/DDL but not when fetching cursor results or closing cursors.', NAMEINSOURCE '"LAST_EXECUTED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_ACTION_TIME timestamp OPTIONS (ANNOTATION 'Recently performed time of action against the statement. This timestamp is updated when opening cursors, executing DML/DDL, fetching results, and closing cursors.', NAMEINSOURCE '"LAST_ACTION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RECOMPILE_COUNT long OPTIONS (ANNOTATION 'Recompile count', NAMEINSOURCE '"RECOMPILE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT long OPTIONS (ANNOTATION 'Count of executions', NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_TIME long OPTIONS (ANNOTATION 'Average time of statement execution', NAMEINSOURCE '"AVG_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum time of statement execution', NAMEINSOURCE '"MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_TIME long OPTIONS (ANNOTATION 'Minimum time of statement execution', NAMEINSOURCE '"MIN_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Sum of statement execution time', NAMEINSOURCE '"TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CURSOR_DURATION long OPTIONS (ANNOTATION 'Average time of statement execution including communication time with clients', NAMEINSOURCE '"AVG_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CURSOR_DURATION long OPTIONS (ANNOTATION 'Maximum time of statement execution including communication time with clients', NAMEINSOURCE '"MAX_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Minimum time of statement execution including communication time with clients', NAMEINSOURCE '"MIN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CURSOR_DURATION long OPTIONS (ANNOTATION 'Sum of statement execution time including communication time with clients', NAMEINSOURCE '"TOTAL_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Average memory size used during each execution', NAMEINSOURCE '"AVG_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Maximum memory size used during each execution', NAMEINSOURCE '"MAX_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Minimum memory size used during each execution', NAMEINSOURCE '"MIN_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Sum of memory size used during each execution', NAMEINSOURCE '"TOTAL_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Average lock wait time for the statement', NAMEINSOURCE '"AVG_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Maximum lock wait time for the statement', NAMEINSOURCE '"MAX_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Minimum lock wait time for the statement', NAMEINSOURCE '"MIN_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCKWAIT_COUNT long OPTIONS (ANNOTATION 'Total lock wait count for the statement', NAMEINSOURCE '"TOTAL_LOCKWAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Accumulated lock wait time for the statement', NAMEINSOURCE '"TOTAL_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (ANNOTATION 'Average time of statement preparation', NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (ANNOTATION 'Maximum time of statement preparation', NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Minimum time of statement preparation', NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (ANNOTATION 'Total time of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_COUNT long OPTIONS (ANNOTATION 'Total count of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HAS_HOLDABLE_CURSOR string(5) OPTIONS (ANNOTATION 'Holdable cursor existence', NAMEINSOURCE '"HAS_HOLDABLE_CURSOR"', NATIVE_TYPE 'VARCHAR'),
    CURSOR_TYPE string(18) OPTIONS (ANNOTATION 'Type of cursor', NAMEINSOURCE '"CURSOR_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PARENT_STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Parent prepared statement ID', NAMEINSOURCE '"PARENT_STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    APPLICATION_SOURCE string(256) OPTIONS (ANNOTATION 'Application source information', NAMEINSOURCE '"APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_ACTIVE_STATEMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_ATTACHED_STORAGES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    STORAGE_ID integer OPTIONS (ANNOTATION 'Storage ID', NAMEINSOURCE '"STORAGE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    KEY string(256) OPTIONS (ANNOTATION 'Key (from storage provider)', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(2000) OPTIONS (ANNOTATION 'Value (from storage provider)', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_ATTACHED_STORAGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_BACKUP_CATALOG" (
    ENTRY_ID long OPTIONS (ANNOTATION 'Unique ID of a backup catalog entry', NAMEINSOURCE '"ENTRY_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTRY_TYPE_NAME string(64) OPTIONS (ANNOTATION 'Classification of backup catalog entries. The following types are supported: ''complete data backup''/''data snapshot''/''log backup''/''log missing''', NAMEINSOURCE '"ENTRY_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    BACKUP_ID long OPTIONS (ANNOTATION 'Unique ID of a data backup or a log backup respectively. All backup files of a single data backup share the same BACKUP_ID', NAMEINSOURCE '"BACKUP_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SYS_START_TIME timestamp OPTIONS (ANNOTATION 'Start time given in server local time', NAMEINSOURCE '"SYS_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    UTC_START_TIME timestamp OPTIONS (ANNOTATION 'Start time given in UTC', NAMEINSOURCE '"UTC_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SYS_END_TIME timestamp OPTIONS (ANNOTATION 'Stop time given in server local time', NAMEINSOURCE '"SYS_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    UTC_END_TIME timestamp OPTIONS (ANNOTATION 'Stop time given in UTC', NAMEINSOURCE '"UTC_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE_NAME string(64) OPTIONS (ANNOTATION 'Result of corresponding action: ''successful''/''failed''/''running''/''cancel pending''/''canceled''', NAMEINSOURCE '"STATE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMMENT string(256) OPTIONS (ANNOTATION 'Additional information', NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'VARCHAR'),
    MESSAGE string(512) OPTIONS (ANNOTATION 'Additional information', NAMEINSOURCE '"MESSAGE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_BACKUP_CATALOG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_BACKUP_CATALOG_FILES" (
    ENTRY_ID long OPTIONS (ANNOTATION 'Unique ID of a backup catalog entry', NAMEINSOURCE '"ENTRY_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKUP_ID long OPTIONS (ANNOTATION 'Unique ID of a data backup and log backup respectively. All backup files of a single data backup share the same BACKUP_ID', NAMEINSOURCE '"BACKUP_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SOURCE_ID long OPTIONS (ANNOTATION 'Persistence volume ID', NAMEINSOURCE '"SOURCE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SOURCE_TYPE_NAME string(64) OPTIONS (ANNOTATION 'Type of persistence to be backed up: ''volume''/''topology''', NAMEINSOURCE '"SOURCE_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    SERVICE_TYPE_NAME string(64) OPTIONS (ANNOTATION 'Type of database service: ''indexserver''/''nameserver''/''statisticsserver''', NAMEINSOURCE '"SERVICE_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    REDO_LOG_POSITION long OPTIONS (ANNOTATION 'In case of a data backup this value specifies the log position that must be processed next when a log recovery is requested after restoring the data backup', NAMEINSOURCE '"REDO_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIRST_REDO_LOG_POSITION long OPTIONS (ANNOTATION 'In case of a log backup this value specifies the log position of the oldest log entry contained in the backup', NAMEINSOURCE '"FIRST_REDO_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_REDO_LOG_POSITION long OPTIONS (ANNOTATION 'In case of a log backup this value specifies the log position of the newest log entry contained in the backup', NAMEINSOURCE '"LAST_REDO_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKUP_SIZE long OPTIONS (ANNOTATION 'Specifies the size of the backup', NAMEINSOURCE '"BACKUP_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTINATION_PATH string(512) OPTIONS (ANNOTATION 'Data or log backup was written to this location', NAMEINSOURCE '"DESTINATION_PATH"', NATIVE_TYPE 'VARCHAR'),
    DESTINATION_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Type of location: ''file''/''backint''', NAMEINSOURCE '"DESTINATION_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    EXTERNAL_BACKUP_ID string(64) OPTIONS (ANNOTATION 'Identifier of backup received from a backup tool', NAMEINSOURCE '"EXTERNAL_BACKUP_ID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_BACKUP_CATALOG_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_BACKUP_CONFIGURATION" (
    MAX_RECOVERY_FILE_AGE long OPTIONS (ANNOTATION 'Max recovery file age', NAMEINSOURCE '"MAX_RECOVERY_FILE_AGE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOG_REPLAY_STEP_SIZE long OPTIONS (ANNOTATION 'Log replay step size in bytes', NAMEINSOURCE '"LOG_REPLAY_STEP_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_RECOVERY_BACKINT_CHANNELS long OPTIONS (ANNOTATION 'Max number of parallel backint channels per request during recovery', NAMEINSOURCE '"MAX_RECOVERY_BACKINT_CHANNELS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKINT_EXECUTABLE_LINK string(256) OPTIONS (ANNOTATION 'Linkname of the backint executable', NAMEINSOURCE '"BACKINT_EXECUTABLE_LINK"', NATIVE_TYPE 'VARCHAR'),
    BACKINT_EXECUTABLE string(256) OPTIONS (ANNOTATION 'Real filename of the backint executable', NAMEINSOURCE '"BACKINT_EXECUTABLE"', NATIVE_TYPE 'VARCHAR'),
    BACKINT_DATA_BACKUP_PATH string(256) OPTIONS (ANNOTATION 'Data backup directory for backint', NAMEINSOURCE '"BACKINT_DATA_BACKUP_PATH"', NATIVE_TYPE 'VARCHAR'),
    BACKINT_LOG_BACKUP_PATH string(256) OPTIONS (ANNOTATION 'Log backup directory for backint', NAMEINSOURCE '"BACKINT_LOG_BACKUP_PATH"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_BACKUP_CONFIGURATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_BLOCKED_TRANSACTIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    BLOCKED_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID of the transaction waiting for a lock', NAMEINSOURCE '"BLOCKED_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    BLOCKED_UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID of the write transaction waiting for the lock', NAMEINSOURCE '"BLOCKED_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKED_CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID associated with the blocked write transaction', NAMEINSOURCE '"BLOCKED_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID of the transaction holding the lock', NAMEINSOURCE '"LOCK_OWNER_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID of the write transaction holding the lock', NAMEINSOURCE '"LOCK_OWNER_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_OWNER_CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID associated with the write transaction holding the lock', NAMEINSOURCE '"LOCK_OWNER_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    BLOCKED_TIME timestamp OPTIONS (ANNOTATION 'Blocked timestamp', NAMEINSOURCE '"BLOCKED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    WAITING_RECORD_ID string(256) OPTIONS (ANNOTATION 'ID of the record on which the lock is currently placed', NAMEINSOURCE '"WAITING_RECORD_ID"', NATIVE_TYPE 'VARCHAR'),
    WAITING_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Name of the schema on which the lock is currently placed', NAMEINSOURCE '"WAITING_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WAITING_TABLE_NAME string(256) OPTIONS (ANNOTATION 'Deprecated: use WAITING_OBJECT_NAME instead', NAMEINSOURCE '"WAITING_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WAITING_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the object on which the lock is currently placed', NAMEINSOURCE '"WAITING_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WAITING_OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Object type', NAMEINSOURCE '"WAITING_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_TYPE string(32) OPTIONS (ANNOTATION 'Lock type: ''RECORD''/''TABLE''/''METADATA''', NAMEINSOURCE '"LOCK_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_MODE string(32) OPTIONS (ANNOTATION 'Lock mode: ''SHARED''/''EXCLUSIVE''/''INTENTIONAL EXCLUSIVE''', NAMEINSOURCE '"LOCK_MODE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_BLOCKED_TRANSACTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CACHE_ENTRIES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CACHE_ID string(128) OPTIONS (ANNOTATION 'ID of the cache that created the entry', NAMEINSOURCE '"CACHE_ID"', NATIVE_TYPE 'VARCHAR'),
    ENTRY_ID string(128) OPTIONS (ANNOTATION 'ID of the cached entry', NAMEINSOURCE '"ENTRY_ID"', NATIVE_TYPE 'VARCHAR'),
    ENTRY_DESCRIPTION string(5000) OPTIONS (ANNOTATION 'Description of the cached entry', NAMEINSOURCE '"ENTRY_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    COMPONENT string(128) OPTIONS (ANNOTATION 'Information about the component that created the cached entry', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'Information about the user that created the cached entry', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    MEMORY_SIZE long OPTIONS (ANNOTATION 'Used memory to store the cached entry in the cache', NAMEINSOURCE '"MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Point in time when the cache entry was inserted into the cache', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    READ_COUNT long OPTIONS (ANNOTATION 'Determines how often the cache entry was read successfully from the cache', NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CACHE_ENTRIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CACHES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CACHE_ID string(128) OPTIONS (ANNOTATION 'The unique identifier for the cache', NAMEINSOURCE '"CACHE_ID"', NATIVE_TYPE 'VARCHAR'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'The maximum available memory budget in bytes available for the cache instance', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'The memory in bytes used by the cache instance', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTRY_COUNT long OPTIONS (ANNOTATION 'The number of entries in the cache instance', NAMEINSOURCE '"ENTRY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSERT_COUNT long OPTIONS (ANNOTATION 'The number of insertions into the cache instance', NAMEINSOURCE '"INSERT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INVALIDATE_COUNT long OPTIONS (ANNOTATION 'The number of invalidations in the cache instance', NAMEINSOURCE '"INVALIDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HIT_COUNT long OPTIONS (ANNOTATION 'The number of cache hits for the cache instance', NAMEINSOURCE '"HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MISS_COUNT long OPTIONS (ANNOTATION 'The number of cache misses for the cache instance', NAMEINSOURCE '"MISS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CACHES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CACHES_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CACHE_ID string(128) OPTIONS (ANNOTATION 'The unique identifier for the cache', NAMEINSOURCE '"CACHE_ID"', NATIVE_TYPE 'VARCHAR'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'The maximum available memory budget in bytes available for the cache instance', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'The memory in bytes used by the cache instance', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTRY_COUNT long OPTIONS (ANNOTATION 'The number of entries in the cache instance', NAMEINSOURCE '"ENTRY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSERT_COUNT long OPTIONS (ANNOTATION 'The number of insertions into the cache instance', NAMEINSOURCE '"INSERT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INVALIDATE_COUNT long OPTIONS (ANNOTATION 'The number of invalidations in the cache instance', NAMEINSOURCE '"INVALIDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HIT_COUNT long OPTIONS (ANNOTATION 'The number of cache hits for the cache instance', NAMEINSOURCE '"HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MISS_COUNT long OPTIONS (ANNOTATION 'The number of cache misses for the cache instance', NAMEINSOURCE '"MISS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CACHES_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CATALOG_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Category of catalog data', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    ALLOCATION_COUNT long OPTIONS (ANNOTATION 'The number of allocated entries', NAMEINSOURCE '"ALLOCATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_FIXED_PART_SIZE long OPTIONS (ANNOTATION 'Allocated memory size for fixed-size part', NAMEINSOURCE '"ALLOCATED_FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_FIXED_PART_SIZE long OPTIONS (ANNOTATION 'Used memory size for fixed-size part', NAMEINSOURCE '"USED_FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_VARIABLE_PART_SIZE long OPTIONS (ANNOTATION 'Allocated memory size for variable-size part', NAMEINSOURCE '"ALLOCATED_VARIABLE_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_VARIABLE_PART_SIZE long OPTIONS (ANNOTATION 'Used memory size for variable-size part', NAMEINSOURCE '"USED_VARIABLE_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CATALOG_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CE_CALCSCENARIOS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_PERSISTENT string(5) OPTIONS (ANNOTATION 'Indicates if calculation scenario is persistent or transient: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_PERSISTENT"', NATIVE_TYPE 'VARCHAR'),
    FLAGS long OPTIONS (ANNOTATION 'Calculation scenario flags', NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Creation time', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory size of loaded calculation scenario model', NAMEINSOURCE '"MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(256) OPTIONS (ANNOTATION 'Component that create the calculation scenario', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'NVARCHAR'),
    SCENARIO_VERSION string(256) OPTIONS (ANNOTATION 'Scenario version of the calculation scenario', NAMEINSOURCE '"SCENARIO_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    JSON clob OPTIONS (ANNOTATION 'JSON string representing the calculation scenario', NAMEINSOURCE '"JSON"', NATIVE_TYPE 'NCLOB')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CE_CALCSCENARIOS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CE_CALCSCENARIOS_OVERVIEW" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_PERSISTENT string(5) OPTIONS (ANNOTATION 'Indicates if calculation scenario is persistent or transient: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_PERSISTENT"', NATIVE_TYPE 'VARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Creation time', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory size of loaded calculation scenario model', NAMEINSOURCE '"MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(256) OPTIONS (ANNOTATION 'Component that create the calculation scenario', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CE_CALCSCENARIOS_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CE_CALCVIEW_DEPENDENCIES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of column view', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'Column view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CALCNODE_NAME string(256) OPTIONS (ANNOTATION 'Referenced calculation node name', NAMEINSOURCE '"CALCNODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CE_CALCVIEW_DEPENDENCIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CE_DEBUG_INFOS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NODE_NAME string(256) OPTIONS (ANNOTATION 'Calculation node name', NAMEINSOURCE '"NODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT_ID long OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEBUG_TYPE_MASK long OPTIONS (ANNOTATION 'Bit mask indicating type of debug information', NAMEINSOURCE '"DEBUG_TYPE_MASK"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name (temporay intermediate result table)', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAMES clob OPTIONS (ANNOTATION 'Column names', NAMEINSOURCE '"COLUMN_NAMES"', NATIVE_TYPE 'CLOB'),
    TABLE_SIZE long OPTIONS (ANNOTATION 'Table size (temporay intermediate result table)', NAMEINSOURCE '"TABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Execution timestamp', NAMEINSOURCE '"EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    APPLICATION_QUERY_ID string(256) OPTIONS (ANNOTATION 'Application Query ID', NAMEINSOURCE '"APPLICATION_QUERY_ID"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CE_DEBUG_INFOS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CE_DEBUG_JSONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT_ID long OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE string(16) OPTIONS (ANNOTATION 'JSON type (original, instantiated, optimized, extrace)', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    MODEL_JSON clob OPTIONS (ANNOTATION 'JSON string representing the calculation scenario', NAMEINSOURCE '"MODEL_JSON"', NATIVE_TYPE 'NCLOB'),
    EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Execution timestamp', NAMEINSOURCE '"EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CE_DEBUG_JSONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CE_DEBUG_NODE_MAPPING" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_ID long OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NODE_NAME string(256) OPTIONS (ANNOTATION 'Calculation node name', NAMEINSOURCE '"NODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NODE_TYPE string(16) OPTIONS (ANNOTATION 'Calculation node type (ROOT, TEMPLATE, CALC_DS)', NAMEINSOURCE '"NODE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SUCC_SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Successor scenario name', NAMEINSOURCE '"SUCC_SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUCC_NODE_NAME string(256) OPTIONS (ANNOTATION 'Successor calculation node name', NAMEINSOURCE '"SUCC_NODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RUNTIME_NODE_NAME string(256) OPTIONS (ANNOTATION 'Runtime calculation node name', NAMEINSOURCE '"RUNTIME_NODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RUNTIME_NODE_JSON clob OPTIONS (ANNOTATION 'JSON string representing the calculation node', NAMEINSOURCE '"RUNTIME_NODE_JSON"', NATIVE_TYPE 'NCLOB'),
    EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Execution timestamp', NAMEINSOURCE '"EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CE_DEBUG_NODE_MAPPING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CE_PLE_CALCSCENARIOS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of calculation scenario', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Calculation scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CE_PLE_CALCSCENARIOS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CLIENT_VERSIONS" (
    CLIENT_TYPE string(256) OPTIONS (ANNOTATION 'Client, e.g. ''ABAP_FDA'', ''BI Modeler''', NAMEINSOURCE '"CLIENT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_RELEASE_ID short OPTIONS (ANNOTATION 'Technical release ID', NAMEINSOURCE '"CLIENT_RELEASE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    CLIENT_RELEASE_DESC string(256) OPTIONS (ANNOTATION 'Human readable release description', NAMEINSOURCE '"CLIENT_RELEASE_DESC"', NATIVE_TYPE 'VARCHAR'),
    MIN_VERSION short OPTIONS (ANNOTATION 'Lowest supported protocol version', NAMEINSOURCE '"MIN_VERSION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    MAX_VERSION short OPTIONS (ANNOTATION 'Highest supported protocol version', NAMEINSOURCE '"MAX_VERSION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CLIENT_VERSIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_COMPACTION_THREAD" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUM_COMPACTION_COLLISIONS long OPTIONS (ANNOTATION 'Count of memory compaction collisions (other thread currently in compaction and compaction was not forced)', NAMEINSOURCE '"NUM_COMPACTION_COLLISIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NUM_COMPACTIONS long OPTIONS (ANNOTATION 'Count number of compaction requests', NAMEINSOURCE '"NUM_COMPACTIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_SIZE_COMPACTION_REQUESTS long OPTIONS (ANNOTATION 'Compaction request in bytes (last)', NAMEINSOURCE '"LAST_SIZE_COMPACTION_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SIZE_COMPACTION_REQUESTS long OPTIONS (ANNOTATION 'Compaction request in bytes (max)', NAMEINSOURCE '"MAX_SIZE_COMPACTION_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_SIZE_COMPACTION_REQUESTS long OPTIONS (ANNOTATION 'Compaction request in bytes (min)', NAMEINSOURCE '"MIN_SIZE_COMPACTION_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_SIZE_COMPACTION_REQUESTS long OPTIONS (ANNOTATION 'Compaction request in bytes (total)', NAMEINSOURCE '"SUM_SIZE_COMPACTION_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SIZE_COMPACTION_REQUESTS long OPTIONS (ANNOTATION 'Compaction request in bytes (avg)', NAMEINSOURCE '"AVG_SIZE_COMPACTION_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_SIZE_FREEABLE long OPTIONS (ANNOTATION 'Bytes compactible at compaction call (last)', NAMEINSOURCE '"LAST_SIZE_FREEABLE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SIZE_FREEABLE long OPTIONS (ANNOTATION 'Bytes compactible at compaction call (max)', NAMEINSOURCE '"MAX_SIZE_FREEABLE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_SIZE_FREEABLE long OPTIONS (ANNOTATION 'Bytes compactible at compaction call (min)', NAMEINSOURCE '"MIN_SIZE_FREEABLE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_SIZE_FREEABLE long OPTIONS (ANNOTATION 'Bytes compactible at compaction call (total)', NAMEINSOURCE '"SUM_SIZE_FREEABLE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SIZE_FREEABLE long OPTIONS (ANNOTATION 'Bytes compactible at compaction call (avg)', NAMEINSOURCE '"AVG_SIZE_FREEABLE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_SIZE_FREED_BY_GARBAGE_COLLECTION long OPTIONS (ANNOTATION 'Bytes compacted by memory garbage collection (defragmentation) (last)', NAMEINSOURCE '"LAST_SIZE_FREED_BY_GARBAGE_COLLECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SIZE_FREED_BY_GARBAGE_COLLECTION long OPTIONS (ANNOTATION 'Bytes compacted by memory garbage collection (defragmentation) (max)', NAMEINSOURCE '"MAX_SIZE_FREED_BY_GARBAGE_COLLECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_SIZE_FREED_BY_GARBAGE_COLLECTION long OPTIONS (ANNOTATION 'Bytes compacted by memory garbage collection (defragmentation) (min)', NAMEINSOURCE '"MIN_SIZE_FREED_BY_GARBAGE_COLLECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_SIZE_FREED_BY_GARBAGE_COLLECTION long OPTIONS (ANNOTATION 'Bytes compacted by memory garbage collection (defragmentation) (total)', NAMEINSOURCE '"SUM_SIZE_FREED_BY_GARBAGE_COLLECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SIZE_FREED_BY_GARBAGE_COLLECTION long OPTIONS (ANNOTATION 'Bytes compacted by memory garbage collection (defragmentation) (avg)', NAMEINSOURCE '"AVG_SIZE_FREED_BY_GARBAGE_COLLECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMPACTION_RESULT long OPTIONS (ANNOTATION 'Compaction result in bytes (difference of allocated bytes before and after compaction, difference may be influenced by other factors than compaction) (last)', NAMEINSOURCE '"LAST_COMPACTION_RESULT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_COMPACTION_RESULT long OPTIONS (ANNOTATION 'Compaction result in bytes (difference of allocated bytes before and after compaction, difference may be influenced by other factors than compaction) (max)', NAMEINSOURCE '"MAX_COMPACTION_RESULT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_COMPACTION_RESULT long OPTIONS (ANNOTATION 'Compaction result in bytes (difference of allocated bytes before and after compaction, difference may be influenced by other factors than compaction) (min)', NAMEINSOURCE '"MIN_COMPACTION_RESULT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_COMPACTION_RESULT long OPTIONS (ANNOTATION 'Compaction result in bytes (difference of allocated bytes before and after compaction, difference may be influenced by other factors than compaction) (total)', NAMEINSOURCE '"SUM_COMPACTION_RESULT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_COMPACTION_RESULT long OPTIONS (ANNOTATION 'Compaction result in bytes (difference of allocated bytes before and after compaction, difference may be influenced by other factors than compaction) (avg)', NAMEINSOURCE '"AVG_COMPACTION_RESULT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_COMPACTION_THREAD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CONDITIONAL_VARIABLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of wait calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKING_COUNT long OPTIONS (ANNOTATION 'Count of blocking wait calls', NAMEINSOURCE '"BLOCKING_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timeouts', NAMEINSOURCE '"TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_RATE double OPTIONS (ANNOTATION 'Wait rate', NAMEINSOURCE '"WAIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (last)', NAMEINSOURCE '"LAST_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (max)', NAMEINSOURCE '"MAX_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (min)', NAMEINSOURCE '"MIN_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (total)', NAMEINSOURCE '"SUM_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (avg)', NAMEINSOURCE '"AVG_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of semaphore creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of semaphore destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CONDITIONAL_VARIABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CONDITIONAL_VARIABLES_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of wait calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKING_COUNT long OPTIONS (ANNOTATION 'Count of blocking wait calls', NAMEINSOURCE '"BLOCKING_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timeouts', NAMEINSOURCE '"TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_RATE double OPTIONS (ANNOTATION 'Wait rate', NAMEINSOURCE '"WAIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (last)', NAMEINSOURCE '"LAST_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (max)', NAMEINSOURCE '"MAX_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (min)', NAMEINSOURCE '"MIN_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (total)', NAMEINSOURCE '"SUM_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (avg)', NAMEINSOURCE '"AVG_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of semaphore creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of semaphore destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CONDITIONAL_VARIABLES_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CONNECTION_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SELECT_EXECUTION_COUNT long OPTIONS (ANNOTATION 'Total number of select statement executions', NAMEINSOURCE '"SELECT_EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of select statement execution', NAMEINSOURCE '"SELECT_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of select statement execution', NAMEINSOURCE '"SELECT_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    SELECT_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of select statement execution', NAMEINSOURCE '"SELECT_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_COUNT long OPTIONS (ANNOTATION 'Total number of select for update exeution', NAMEINSOURCE '"SELECT_FOR_UPDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of select for update execution', NAMEINSOURCE '"SELECT_FOR_UPDATE_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of select for update execution', NAMEINSOURCE '"SELECT_FOR_UPDATE_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    SELECT_FOR_UPDATE_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of select for update execution', NAMEINSOURCE '"SELECT_FOR_UPDATE_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Number of lock waits during select for update', NAMEINSOURCE '"SELECT_FOR_UPDATE_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_TOTAL_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Total lock wait time during select for update', NAMEINSOURCE '"SELECT_FOR_UPDATE_TOTAL_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_AVG_LOCK_WAIT_TIME float OPTIONS (ANNOTATION 'Average lock wait time during select for update', NAMEINSOURCE '"SELECT_FOR_UPDATE_AVG_LOCK_WAIT_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    SELECT_FOR_UPDATE_MAX_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Maximum lock wait time uring select for update', NAMEINSOURCE '"SELECT_FOR_UPDATE_MAX_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_COUNT long OPTIONS (ANNOTATION 'Total number of update statement and insert statement executions', NAMEINSOURCE '"UPDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of update statement executions', NAMEINSOURCE '"UPDATE_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of update statement executions', NAMEINSOURCE '"UPDATE_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    UPDATE_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of update statement executions', NAMEINSOURCE '"UPDATE_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Number of lock waits during update statement executions', NAMEINSOURCE '"UPDATE_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TOTAL_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Total lock wait execution time during update statement executions', NAMEINSOURCE '"UPDATE_TOTAL_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_AVG_LOCK_WAIT_TIME float OPTIONS (ANNOTATION 'Average lock wait time during update statement exectuions', NAMEINSOURCE '"UPDATE_AVG_LOCK_WAIT_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    UPDATE_MAX_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Maximum lock wait time during update statement executions', NAMEINSOURCE '"UPDATE_MAX_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_ONLY_TRANSACTION_COUNT long OPTIONS (ANNOTATION 'Number of read only transactions', NAMEINSOURCE '"READ_ONLY_TRANSACTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_ONLY_TRANSACTION_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of read only transactions', NAMEINSOURCE '"READ_ONLY_TRANSACTION_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_ONLY_TRANSACTION_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of read only transactions', NAMEINSOURCE '"READ_ONLY_TRANSACTION_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    READ_ONLY_TRANSACTION_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of read only transactions', NAMEINSOURCE '"READ_ONLY_TRANSACTION_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_COUNT long OPTIONS (ANNOTATION 'Number of update transactions', NAMEINSOURCE '"UPDATE_TRANSACTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of update transactions', NAMEINSOURCE '"UPDATE_TRANSACTION_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of update transactions', NAMEINSOURCE '"UPDATE_TRANSACTION_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    UPDATE_TRANSACTION_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of update transactions', NAMEINSOURCE '"UPDATE_TRANSACTION_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLLBACK_COUNT long OPTIONS (ANNOTATION 'Number of rollbacked transactions', NAMEINSOURCE '"ROLLBACK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLLBACK_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of rollbacks', NAMEINSOURCE '"ROLLBACK_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLLBACK_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of rollbacks', NAMEINSOURCE '"ROLLBACK_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    ROLLBACK_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of rollbacks', NAMEINSOURCE '"ROLLBACK_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_COUNT long OPTIONS (ANNOTATION 'Number of other statement executions including data definition statements and data control statements', NAMEINSOURCE '"OTHERS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of other statements', NAMEINSOURCE '"OTHERS_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of other statements', NAMEINSOURCE '"OTHERS_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    OTHERS_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of other statements', NAMEINSOURCE '"OTHERS_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Total lock wait count of other statements', NAMEINSOURCE '"OTHERS_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_TOTAL_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Total lock wait time of other statements', NAMEINSOURCE '"OTHERS_TOTAL_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_AVG_LOCK_WAIT_TIME float OPTIONS (ANNOTATION 'Average lock wait time of other statements', NAMEINSOURCE '"OTHERS_AVG_LOCK_WAIT_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    OTHERS_MAX_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Maximum lock wait time of other statements', NAMEINSOURCE '"OTHERS_MAX_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_EXECUTED_TIME timestamp OPTIONS (ANNOTATION 'Last execution timestamp with this connection', NAMEINSOURCE '"LAST_EXECUTED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    AVG_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Average memory size used during each execution', NAMEINSOURCE '"AVG_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Maximum memory size used during each execution', NAMEINSOURCE '"MAX_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Minimum memory size used during each execution', NAMEINSOURCE '"MIN_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Sum of memory size used during each execution', NAMEINSOURCE '"TOTAL_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (ANNOTATION 'Average time of statement preparation', NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (ANNOTATION 'Maximum time of statement preparation', NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Minimim time of statement preparation', NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (ANNOTATION 'Total time of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_COUNT long OPTIONS (ANNOTATION 'Total count of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT_BY_ROUTING long OPTIONS (ANNOTATION 'Execution count by the client routed connection in statement routing', NAMEINSOURCE '"EXECUTION_COUNT_BY_ROUTING"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    END_TIME timestamp OPTIONS (ANNOTATION 'The time when the connection is closed for history connections', NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CONNECTION_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CONNECTIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Connected Time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IDLE_TIME long OPTIONS (ANNOTATION 'Time that the connection is unused and idle', NAMEINSOURCE '"IDLE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONNECTION_STATUS string(128) OPTIONS (ANNOTATION 'Connection Status: ''RUNNING''/''IDLE''', NAMEINSOURCE '"CONNECTION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_HOST string(64) OPTIONS (ANNOTATION 'Host name of client machine', NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_IP string(16) OPTIONS (ANNOTATION 'IP of client machine', NAMEINSOURCE '"CLIENT_IP"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (ANNOTATION 'Client Process ID', NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONNECTION_TYPE string(128) OPTIONS (ANNOTATION 'Connection type: Remote, Local, History (remote), History (local)', NAMEINSOURCE '"CONNECTION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OWN string(5) OPTIONS (ANNOTATION 'Own connection: TRUE if own connection, FALSE if not', NAMEINSOURCE '"OWN"', NATIVE_TYPE 'VARCHAR'),
    IS_HISTORY_SAVED string(5) OPTIONS (ANNOTATION 'Field is no longer valid  - will be deprecated soon', NAMEINSOURCE '"IS_HISTORY_SAVED"', NATIVE_TYPE 'VARCHAR'),
    MEMORY_SIZE_PER_CONNECTION long OPTIONS (ANNOTATION 'Allocated memory size per connection', NAMEINSOURCE '"MEMORY_SIZE_PER_CONNECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AUTO_COMMIT string(5) OPTIONS (ANNOTATION 'Commit mode of the current transaction: TRUE if the current connection is in auto-commit mode, FALSE otherwise', NAMEINSOURCE '"AUTO_COMMIT"', NATIVE_TYPE 'VARCHAR'),
    LAST_ACTION string(128) OPTIONS (ANNOTATION 'The last action done by the current connection: ExecuteGroup, CommitTrans, AbortTrans, PrepareStatement, CloseStatement, ExecutePrepared, ExecuteStatement, FetchCursor, CloseCursor, LobGetPiece, LogPutPiece, LobFind, Authenticate, Connect, Disconnect, ExecQidItab, CursorFetchItab, InsertIncompleteItab, AbapStream, TxStartXA, TxJoinXA ', NAMEINSOURCE '"LAST_ACTION"', NATIVE_TYPE 'VARCHAR'),
    CURRENT_STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Current statement ID', NAMEINSOURCE '"CURRENT_STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    CURRENT_OPERATOR_NAME string(64) OPTIONS (ANNOTATION 'Current operator name', NAMEINSOURCE '"CURRENT_OPERATOR_NAME"', NATIVE_TYPE 'VARCHAR'),
    FETCHED_RECORD_COUNT long OPTIONS (ANNOTATION 'Sum of the record count fetched by select statements', NAMEINSOURCE '"FETCHED_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AFFECTED_RECORD_COUNT long OPTIONS (ANNOTATION 'Sum of the record count affected by DML/DDL statements (e.g. INSERT/UPDATE/DELETE/REPLACE/CREATE TABLE .. LIKE .. WITH DATA/CREATE TABLE .. AS (SELECT ..)/IMPORT/EXPORT)', NAMEINSOURCE '"AFFECTED_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SENT_MESSAGE_SIZE long OPTIONS (ANNOTATION 'Total size of messages sent by the current connection', NAMEINSOURCE '"SENT_MESSAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SENT_MESSAGE_COUNT long OPTIONS (ANNOTATION 'Total message count sent by the current connection', NAMEINSOURCE '"SENT_MESSAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVED_MESSAGE_SIZE long OPTIONS (ANNOTATION 'Total size of messages received by the current connection', NAMEINSOURCE '"RECEIVED_MESSAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVED_MESSAGE_COUNT long OPTIONS (ANNOTATION 'Total message count received by the current connection', NAMEINSOURCE '"RECEIVED_MESSAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATOR_THREAD_ID long OPTIONS (ANNOTATION 'Thread ID who created the current connection', NAMEINSOURCE '"CREATOR_THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATED_BY string(256) OPTIONS (ANNOTATION 'Engine component that created the connections: Session, Planning, Repository, CalcEngine, Authentication, Table Exporter, Loader, LLVM, JSVM, IMS Search API, OLAP Engine, Mergedog, Ping Status, Name Server, Queue Server, SQL Stored Procedure, Authorization, TrexViaDbsl from ABAP, HybridTable Reorganizer, Session external', NAMEINSOURCE '"CREATED_BY"', NATIVE_TYPE 'VARCHAR'),
    IS_ENCRYPTED string(5) OPTIONS (ANNOTATION 'Encrypted: TRUE if the secure communication is enabled (SSL enabled), FALSE, otherwise', NAMEINSOURCE '"IS_ENCRYPTED"', NATIVE_TYPE 'VARCHAR'),
    END_TIME timestamp OPTIONS (ANNOTATION 'The time when the connection is closed for history connections', NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PARENT_CONNECTION_ID integer OPTIONS (ANNOTATION 'Parent connection ID', NAMEINSOURCE '"PARENT_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CLIENT_DISTRIBUTION_MODE string(128) OPTIONS (ANNOTATION 'Client distribution mode of the current connection (i.e. [distribution] client_distribution_mode)', NAMEINSOURCE '"CLIENT_DISTRIBUTION_MODE"', NATIVE_TYPE 'VARCHAR'),
    LOGICAL_CONNECTION_ID integer OPTIONS (ANNOTATION 'Logical connection ID in statement routing', NAMEINSOURCE '"LOGICAL_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CURRENT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Current schema name', NAMEINSOURCE '"CURRENT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CURRENT_THREAD_ID long OPTIONS (ANNOTATION 'Current executing thread ID', NAMEINSOURCE '"CURRENT_THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CONNECTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CONTAINER_DIRECTORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CNT_CREATE long OPTIONS (ANNOTATION 'Count of creates', NAMEINSOURCE '"CNT_CREATE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CREATE_ROLLBACK long OPTIONS (ANNOTATION 'Count of rolled back creates', NAMEINSOURCE '"CNT_CREATE_ROLLBACK"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE long OPTIONS (ANNOTATION 'Count of removes', NAMEINSOURCE '"CNT_REMOVE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE_FAIL long OPTIONS (ANNOTATION 'Count of failed removes', NAMEINSOURCE '"CNT_REMOVE_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE_ROLLBACK long OPTIONS (ANNOTATION 'Count of rolled back removes', NAMEINSOURCE '"CNT_REMOVE_ROLLBACK"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_MOVE long OPTIONS (ANNOTATION 'Count of moves', NAMEINSOURCE '"CNT_MOVE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_GET_PHYSICALSIZE long OPTIONS (ANNOTATION 'Count of getPhysicalSize', NAMEINSOURCE '"CNT_GET_PHYSICALSIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_GET long OPTIONS (ANNOTATION 'Count of retrieved containers', NAMEINSOURCE '"CNT_GET"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_GET_FAIL long OPTIONS (ANNOTATION 'Count of failed gets', NAMEINSOURCE '"CNT_GET_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_BEGIN long OPTIONS (ANNOTATION 'Count of used iterators', NAMEINSOURCE '"CNT_BEGIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_ITERATED long OPTIONS (ANNOTATION 'Count of iterated containers', NAMEINSOURCE '"CNT_ITERATED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CACHEHIT long OPTIONS (ANNOTATION 'Count of cache hits', NAMEINSOURCE '"CNT_CACHEHIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CACHEMISS long OPTIONS (ANNOTATION 'Count of cache misses', NAMEINSOURCE '"CNT_CACHEMISS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CONTAINERS long OPTIONS (ANNOTATION 'Count of existing containers', NAMEINSOURCE '"CNT_CONTAINERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CONTAINER_DIRECTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CONTAINER_NAME_DIRECTORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CNT_CREATE long OPTIONS (ANNOTATION 'Count of creates', NAMEINSOURCE '"CNT_CREATE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CREATE_FAIL long OPTIONS (ANNOTATION 'Count of failed creates', NAMEINSOURCE '"CNT_CREATE_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_INITIAL_CREATE long OPTIONS (ANNOTATION 'Count of creates on load', NAMEINSOURCE '"CNT_INITIAL_CREATE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_INITIAL_SKIP long OPTIONS (ANNOTATION 'Count of skips on load', NAMEINSOURCE '"CNT_INITIAL_SKIP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE long OPTIONS (ANNOTATION 'Count of removes', NAMEINSOURCE '"CNT_REMOVE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE_FAIL long OPTIONS (ANNOTATION 'Count of failed removes', NAMEINSOURCE '"CNT_REMOVE_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE_ALL long OPTIONS (ANNOTATION 'Count of removeAll', NAMEINSOURCE '"CNT_REMOVE_ALL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_RENAME long OPTIONS (ANNOTATION 'Count of renames', NAMEINSOURCE '"CNT_RENAME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_RENAME_FAIL long OPTIONS (ANNOTATION 'Count of failed renames', NAMEINSOURCE '"CNT_RENAME_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_EXISTS long OPTIONS (ANNOTATION 'Count of checked containers', NAMEINSOURCE '"CNT_EXISTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_GET long OPTIONS (ANNOTATION 'Count of retrieved containers', NAMEINSOURCE '"CNT_GET"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_GET_FAIL long OPTIONS (ANNOTATION 'Count of failed gets', NAMEINSOURCE '"CNT_GET_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_BEGIN long OPTIONS (ANNOTATION 'Count of used iterators', NAMEINSOURCE '"CNT_BEGIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_ITERATE long OPTIONS (ANNOTATION 'Count of iterated containers', NAMEINSOURCE '"CNT_ITERATE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CONTAINERS long OPTIONS (ANNOTATION 'Count of existing containers', NAMEINSOURCE '"CNT_CONTAINERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CONTAINER_NAME_DIRECTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CONTEXT_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Allocator name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    DEPTH long OPTIONS (ANNOTATION 'Depth', NAMEINSOURCE '"DEPTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator, including suballocators', NAMEINSOURCE '"INCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use, including suballocators', NAMEINSOURCE '"INCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator and suballocators (estimate)', NAMEINSOURCE '"INCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator and its suballocators, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"INCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator', NAMEINSOURCE '"EXCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use', NAMEINSOURCE '"EXCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator', NAMEINSOURCE '"EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator (estimate)', NAMEINSOURCE '"EXCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOC_ERRORS long OPTIONS (ANNOTATION 'Count of allocation errors', NAMEINSOURCE '"EXCLUSIVE_ALLOC_ERRORS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"EXCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MALLOC_PROXY_CACHE_MISSES long OPTIONS (ANNOTATION 'Deprecated', NAMEINSOURCE '"MALLOC_PROXY_CACHE_MISSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLAGS string(64) OPTIONS (ANNOTATION 'Allocator flags', NAMEINSOURCE '"FLAGS"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT string(64) OPTIONS (ANNOTATION 'Name of SAP HANA component of this allocator', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CONTEXT_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CONTEXT_MEMORY_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Allocator name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    DEPTH long OPTIONS (ANNOTATION 'Depth', NAMEINSOURCE '"DEPTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator, including suballocators', NAMEINSOURCE '"INCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use, including suballocators', NAMEINSOURCE '"INCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator and suballocators (estimate)', NAMEINSOURCE '"INCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator and its suballocators, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"INCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator', NAMEINSOURCE '"EXCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use', NAMEINSOURCE '"EXCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator', NAMEINSOURCE '"EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator (estimate)', NAMEINSOURCE '"EXCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOC_ERRORS long OPTIONS (ANNOTATION 'Count of allocation errors', NAMEINSOURCE '"EXCLUSIVE_ALLOC_ERRORS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"EXCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MALLOC_PROXY_CACHE_MISSES long OPTIONS (ANNOTATION 'Deprecated', NAMEINSOURCE '"MALLOC_PROXY_CACHE_MISSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLAGS string(64) OPTIONS (ANNOTATION 'Allocator flags', NAMEINSOURCE '"FLAGS"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT string(64) OPTIONS (ANNOTATION 'Name of SAP HANA component of this allocator', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CONTEXT_MEMORY_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CONVERTER_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(32) OPTIONS (ANNOTATION 'Type of converter', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    MAX_LEVEL long OPTIONS (ANNOTATION 'Maximum level, e.g. level of root page', NAMEINSOURCE '"MAX_LEVEL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PAGENUMBER long OPTIONS (ANNOTATION 'Maximum page number', NAMEINSOURCE '"MAX_PAGENUMBER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of currently allocated pages', NAMEINSOURCE '"ALLOCATED_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_PAGE_SIZE long OPTIONS (ANNOTATION 'Total size [bytes] of currently allocated pages', NAMEINSOURCE '"ALLOCATED_PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ALLOCATED_PAGE_COUNT long OPTIONS (ANNOTATION 'Maximum number of allocated pages', NAMEINSOURCE '"MAX_ALLOCATED_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ALLOCATED_PAGE_SIZE long OPTIONS (ANNOTATION 'Maximum size [bytes] of allocated pages', NAMEINSOURCE '"MAX_ALLOCATED_PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATE_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page allocations', NAMEINSOURCE '"ALLOCATE_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATE_OR_GET_STATIC_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page allocations or retrievals during static phase', NAMEINSOURCE '"ALLOCATE_OR_GET_STATIC_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEALLOCATE_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page deallocations', NAMEINSOURCE '"DEALLOCATE_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ASSIGN_PHYSICAL_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of physical page assignments', NAMEINSOURCE '"ASSIGN_PHYSICAL_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNASSIGN_PHYSICAL_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of physical page unassignments', NAMEINSOURCE '"UNASSIGN_PHYSICAL_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNASSIGN_PHYSICAL_PAGE_COUNT_DURING_DROP_SNAPSHOT long OPTIONS (ANNOTATION 'Number of physical page unassignments during drop snapshot', NAMEINSOURCE '"UNASSIGN_PHYSICAL_PAGE_COUNT_DURING_DROP_SNAPSHOT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_SNAPSHOT_COUNT long OPTIONS (ANNOTATION 'Number of snapshots created', NAMEINSOURCE '"CREATE_SNAPSHOT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DROP_SNAPSHOT_COUNT long OPTIONS (ANNOTATION 'Number of snapshots dropped', NAMEINSOURCE '"DROP_SNAPSHOT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL0_COUNT long OPTIONS (ANNOTATION 'Number of level 0 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL0_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL1_COUNT long OPTIONS (ANNOTATION 'Number of level 1 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL1_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL2_COUNT long OPTIONS (ANNOTATION 'Number of level 2 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL2_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL3_COUNT long OPTIONS (ANNOTATION 'Number of level 3 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL3_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL4_COUNT long OPTIONS (ANNOTATION 'Number of level 4 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL4_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CONVERTER_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CONVERTER_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(32) OPTIONS (ANNOTATION 'Type of converter', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    MAX_LEVEL long OPTIONS (ANNOTATION 'Maximum level, e.g. level of root page', NAMEINSOURCE '"MAX_LEVEL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PAGENUMBER long OPTIONS (ANNOTATION 'Maximum page number', NAMEINSOURCE '"MAX_PAGENUMBER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of currently allocated pages', NAMEINSOURCE '"ALLOCATED_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_PAGE_SIZE long OPTIONS (ANNOTATION 'Total size [bytes] of currently allocated pages', NAMEINSOURCE '"ALLOCATED_PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ALLOCATED_PAGE_COUNT long OPTIONS (ANNOTATION 'Maximum number of allocated pages', NAMEINSOURCE '"MAX_ALLOCATED_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ALLOCATED_PAGE_SIZE long OPTIONS (ANNOTATION 'Maximum size [bytes] of allocated pages', NAMEINSOURCE '"MAX_ALLOCATED_PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATE_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page allocations', NAMEINSOURCE '"ALLOCATE_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATE_OR_GET_STATIC_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page allocations or retrievals during static phase', NAMEINSOURCE '"ALLOCATE_OR_GET_STATIC_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEALLOCATE_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page deallocations', NAMEINSOURCE '"DEALLOCATE_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ASSIGN_PHYSICAL_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of physical page assignments', NAMEINSOURCE '"ASSIGN_PHYSICAL_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNASSIGN_PHYSICAL_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of physical page unassignments', NAMEINSOURCE '"UNASSIGN_PHYSICAL_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNASSIGN_PHYSICAL_PAGE_COUNT_DURING_DROP_SNAPSHOT long OPTIONS (ANNOTATION 'Number of physical page unassignments during drop snapshot', NAMEINSOURCE '"UNASSIGN_PHYSICAL_PAGE_COUNT_DURING_DROP_SNAPSHOT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_SNAPSHOT_COUNT long OPTIONS (ANNOTATION 'Number of snapshots created', NAMEINSOURCE '"CREATE_SNAPSHOT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DROP_SNAPSHOT_COUNT long OPTIONS (ANNOTATION 'Number of snapshots dropped', NAMEINSOURCE '"DROP_SNAPSHOT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL0_COUNT long OPTIONS (ANNOTATION 'Number of level 0 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL0_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL1_COUNT long OPTIONS (ANNOTATION 'Number of level 1 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL1_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL2_COUNT long OPTIONS (ANNOTATION 'Number of level 2 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL2_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL3_COUNT long OPTIONS (ANNOTATION 'Number of level 3 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL3_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL4_COUNT long OPTIONS (ANNOTATION 'Number of level 4 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL4_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CONVERTER_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CS_ALL_COLUMNS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables, and -1 during table schema change temporarily', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEMORY_SIZE_IN_TOTAL long OPTIONS (ANNOTATION 'Sum of MEMORY_SIZE_IN_MAIN and MEMORY_SIZE_IN_DELTA columns', NAMEINSOURCE '"MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_MAIN long OPTIONS (ANNOTATION 'Current memory consumption in main; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_DELTA long OPTIONS (ANNOTATION 'Current memory consumption in delta; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMPRESSED_SIZE long OPTIONS (ANNOTATION 'Estimated size assuming that column is not compressed', NAMEINSOURCE '"UNCOMPRESSED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPRESSION_RATIO_IN_PERCENTAGE double OPTIONS (ANNOTATION 'MEMORY_SIZE_IN_TOTAL / UNCOMPRESSED_SIZE * 100', NAMEINSOURCE '"COMPRESSION_RATIO_IN_PERCENTAGE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    COUNT long OPTIONS (ANNOTATION 'Record count; 0 if not loaded', NAMEINSOURCE '"COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DISTINCT_COUNT long OPTIONS (ANNOTATION 'Distinct count of values; 0 if not loaded', NAMEINSOURCE '"DISTINCT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPRESSION_TYPE string(16) OPTIONS (ANNOTATION 'Type of column compression: can be SPARSE, PREFIXED, CLUSTERED, INDIRECT, RLE or DEFAULT if column is only dictionary coded. Columns in M_CS_COLUMNS show the runtime value, which can be changed during the runtime', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(16) OPTIONS (ANNOTATION 'Type of inverted index; can be FULL, BLOCK or NONE for no index', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_LOADED string(16) OPTIONS (ANNOTATION 'Load status of inverted index; can be NOT APPLICABLE, UNLOADED or LOADED', NAMEINSOURCE '"INDEX_LOADED"', NATIVE_TYPE 'VARCHAR'),
    IMPLEMENTATION_FLAGS long OPTIONS (ANNOTATION 'Column internal implementation spec summary', NAMEINSOURCE '"IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_ACCESS_TIME timestamp OPTIONS (ANNOTATION 'Last time the column was read or there was an insert to, update of or delete from the column; Undefined for unloaded columns', NAMEINSOURCE '"LAST_ACCESS_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LOADED string(5) OPTIONS (ANNOTATION 'Flag to indicate that column is loaded into memory: ''TRUE''/''FALSE''', NAMEINSOURCE '"LOADED"', NATIVE_TYPE 'VARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAIN_MEMORY_SIZE_IN_DATA long OPTIONS (ANNOTATION 'Current memory consumption in data', NAMEINSOURCE '"MAIN_MEMORY_SIZE_IN_DATA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAIN_MEMORY_SIZE_IN_DICT long OPTIONS (ANNOTATION 'Current memory consumption in dict', NAMEINSOURCE '"MAIN_MEMORY_SIZE_IN_DICT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAIN_MEMORY_SIZE_IN_INDEX long OPTIONS (ANNOTATION 'Current memory consumption in index', NAMEINSOURCE '"MAIN_MEMORY_SIZE_IN_INDEX"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAIN_MEMORY_SIZE_IN_MISC long OPTIONS (ANNOTATION 'Current memory consumption in misc', NAMEINSOURCE '"MAIN_MEMORY_SIZE_IN_MISC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELTA_MEMORY_SIZE_IN_DATA long OPTIONS (ANNOTATION 'Current memory consumption in data', NAMEINSOURCE '"DELTA_MEMORY_SIZE_IN_DATA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELTA_MEMORY_SIZE_IN_DICT long OPTIONS (ANNOTATION 'Current memory consumption in dict', NAMEINSOURCE '"DELTA_MEMORY_SIZE_IN_DICT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELTA_MEMORY_SIZE_IN_INDEX long OPTIONS (ANNOTATION 'Current memory consumption in index', NAMEINSOURCE '"DELTA_MEMORY_SIZE_IN_INDEX"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELTA_MEMORY_SIZE_IN_MISC long OPTIONS (ANNOTATION 'Current memory consumption in misc', NAMEINSOURCE '"DELTA_MEMORY_SIZE_IN_MISC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_CREATE_DURATION long OPTIONS (ANNOTATION 'Time needed for creating inverted index', NAMEINSOURCE '"INDEX_CREATE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELTA_IMPLEMENTATION_FLAGS long OPTIONS (ANNOTATION 'Column internal implementation spec summary', NAMEINSOURCE '"DELTA_IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERNAL_ATTRIBUTE_TYPE string(32) OPTIONS (ANNOTATION 'Attribute type for internal columns; NULL for noninternal columns ', NAMEINSOURCE '"INTERNAL_ATTRIBUTE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LAST_LOAD_TIME timestamp OPTIONS (ANNOTATION 'Last time the column was loaded; Undefined for unloaded columns', NAMEINSOURCE '"LAST_LOAD_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CS_ALL_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CS_COLUMNS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables, and -1 during table schema change temporarily', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEMORY_SIZE_IN_TOTAL long OPTIONS (ANNOTATION 'Sum of MEMORY_SIZE_IN_MAIN and MEMORY_SIZE_IN_DELTA columns', NAMEINSOURCE '"MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_MAIN long OPTIONS (ANNOTATION 'Current memory consumption in main; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_DELTA long OPTIONS (ANNOTATION 'Current memory consumption in delta; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMPRESSED_SIZE long OPTIONS (ANNOTATION 'Estimated size assuming that column is not compressed', NAMEINSOURCE '"UNCOMPRESSED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPRESSION_RATIO_IN_PERCENTAGE double OPTIONS (ANNOTATION 'MEMORY_SIZE_IN_TOTAL / UNCOMPRESSED_SIZE * 100', NAMEINSOURCE '"COMPRESSION_RATIO_IN_PERCENTAGE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    COUNT long OPTIONS (ANNOTATION 'Record count; 0 if not loaded', NAMEINSOURCE '"COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DISTINCT_COUNT long OPTIONS (ANNOTATION 'Distinct count of values; 0 if not loaded', NAMEINSOURCE '"DISTINCT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPRESSION_TYPE string(16) OPTIONS (ANNOTATION 'Type of column compression: can be SPARSE, PREFIXED, CLUSTERED, INDIRECT, RLE or DEFAULT if column is only dictionary coded. Columns in M_CS_COLUMNS show the runtime value, which can be changed during the runtime', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(16) OPTIONS (ANNOTATION 'Type of inverted index; can be FULL, BLOCK or NONE for no index', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_LOADED string(16) OPTIONS (ANNOTATION 'Load status of inverted index; can be NOT APPLICABLE, UNLOADED or LOADED', NAMEINSOURCE '"INDEX_LOADED"', NATIVE_TYPE 'VARCHAR'),
    IMPLEMENTATION_FLAGS long OPTIONS (ANNOTATION 'Column internal implementation spec summary', NAMEINSOURCE '"IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_ACCESS_TIME timestamp OPTIONS (ANNOTATION 'Last time the column was read or there was an insert to, update of or delete from the column; Undefined for unloaded columns', NAMEINSOURCE '"LAST_ACCESS_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LOADED string(5) OPTIONS (ANNOTATION 'Flag to indicate that column is loaded into memory: ''TRUE''/''FALSE''', NAMEINSOURCE '"LOADED"', NATIVE_TYPE 'VARCHAR'),
    LAST_LOAD_TIME timestamp OPTIONS (ANNOTATION 'Last time the column was loaded; Undefined for unloaded columns', NAMEINSOURCE '"LAST_LOAD_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CS_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CS_LOADS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOAD_TIME timestamp OPTIONS (ANNOTATION 'Timestamp of load event', NAMEINSOURCE '"LOAD_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name. Empty if the whole table is loaded.', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is loaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object Id of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_HISTORY string(5) OPTIONS (ANNOTATION 'Flag to indicate whether the history part is loaded (only relevant for history tables). Empty if the whole table is loaded.', NAMEINSOURCE '"IS_HISTORY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CS_LOADS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CS_PARTITIONS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema Name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table Name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "PARTITION" integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables and 1 through number of partitions for partitioned tables', NAMEINSOURCE '"PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUBPARTITION integer OPTIONS (ANNOTATION 'Subpartition ID. 0 for non-partitioned tables or tables without multi-level partitioning and 1 through number of subpartitions for partitioned table with multi-level partitioniong', NAMEINSOURCE '"SUBPARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "RANGE" string(64) OPTIONS (ANNOTATION 'Range definition of partition/subpartition for range-partitioned tables, empty otherwise', NAMEINSOURCE '"RANGE"', NATIVE_TYPE 'VARCHAR'),
    SUBRANGE string(64) OPTIONS (ANNOTATION 'Subrange definition of partition for range-partitioned tables, empty otherwise', NAMEINSOURCE '"SUBRANGE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CS_PARTITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CS_TABLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned and non-replicated tables, 1 through number of partitions for partitioned tables, 1 through number of the original table and all its replica for replicated tables, and -1 temporarily during table schema change', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEMORY_SIZE_IN_TOTAL long OPTIONS (ANNOTATION 'Total memory size is the sum of memory size in main, delta, and history parts', NAMEINSOURCE '"MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_MAIN long OPTIONS (ANNOTATION 'Current memory consumption in main; this value varies depending on the number of attributes actually loaded and includes data for open transactions', NAMEINSOURCE '"MEMORY_SIZE_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_DELTA long OPTIONS (ANNOTATION 'Current memory consumption in delta', NAMEINSOURCE '"MEMORY_SIZE_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_HISTORY_MAIN long OPTIONS (ANNOTATION 'Current memory consumption in history-main; 0 for normal non-history tables', NAMEINSOURCE '"MEMORY_SIZE_IN_HISTORY_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_HISTORY_DELTA long OPTIONS (ANNOTATION 'Current memory consumption in history-delta; 0 for normal non-history tables', NAMEINSOURCE '"MEMORY_SIZE_IN_HISTORY_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ESTIMATED_MAX_MEMORY_SIZE_IN_TOTAL long OPTIONS (ANNOTATION 'Estimated maximum memory consumption in total for table fully loaded (not including data for open transactions)', NAMEINSOURCE '"ESTIMATED_MAX_MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECORD_COUNT long OPTIONS (ANNOTATION 'Record count', NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_MAIN long OPTIONS (ANNOTATION 'Current number of entries in table main part, this value differs from number of visible table main rows because there are entries of modified rows marked as invalidated', NAMEINSOURCE '"RAW_RECORD_COUNT_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_DELTA long OPTIONS (ANNOTATION 'Current number of entries in table delta part, this value differs from number of visible table delta rows because there are additional entries such as deleted rows or updated rows; can contain deleted records', NAMEINSOURCE '"RAW_RECORD_COUNT_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_HISTORY_MAIN long OPTIONS (ANNOTATION 'Raw record count in history-main', NAMEINSOURCE '"RAW_RECORD_COUNT_IN_HISTORY_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_HISTORY_DELTA long OPTIONS (ANNOTATION 'Raw record count in history-delta', NAMEINSOURCE '"RAW_RECORD_COUNT_IN_HISTORY_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMPRESSED_RECORD_COUNT long OPTIONS (ANNOTATION 'The number of entries in main during last optimize compression run', NAMEINSOURCE '"LAST_COMPRESSED_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_UDIV long OPTIONS (ANNOTATION 'Maximum table row number, this number is pure technical and only internally used', NAMEINSOURCE '"MAX_UDIV"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_MERGE_CID long OPTIONS (ANNOTATION 'Maximum commit-ID of transactions for which changes were already merged to table main part', NAMEINSOURCE '"MAX_MERGE_CID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ROWID long OPTIONS (ANNOTATION 'Maximum rowid, this number is pure technical and only internally used', NAMEINSOURCE '"MAX_ROWID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_DELTA2_ACTIVE string(5) OPTIONS (ANNOTATION 'Flag to indicate that a second delta is used: ''TRUE''/''FALSE''. During a table delta merge updates and inserts are stored to a second delta because the delta one is locked', NAMEINSOURCE '"IS_DELTA2_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    IS_DELTA_LOADED string(5) OPTIONS (ANNOTATION 'Flag to indicate that delta part of table is loaded: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_DELTA_LOADED"', NATIVE_TYPE 'VARCHAR'),
    IS_LOG_DELTA string(5) OPTIONS (ANNOTATION 'Flag to indicate that currently delta log is written: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_LOG_DELTA"', NATIVE_TYPE 'VARCHAR'),
    PERSISTENT_MERGE string(5) OPTIONS (ANNOTATION 'Flag to indicate that new main part will be written to disk during table delta merge unless requested differently: ''TRUE''/''FALSE''', NAMEINSOURCE '"PERSISTENT_MERGE"', NATIVE_TYPE 'VARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Created time', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MODIFY_TIME timestamp OPTIONS (ANNOTATION 'Modified time', NAMEINSOURCE '"MODIFY_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_MERGE_TIME timestamp OPTIONS (ANNOTATION 'Point in time, Unix time format, last time the table delta part was merged into main part', NAMEINSOURCE '"LAST_MERGE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_REPLAY_LOG_TIME timestamp OPTIONS (ANNOTATION 'Point in time, Unix time format, last time the table log was replayed', NAMEINSOURCE '"LAST_REPLAY_LOG_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LOADED string(10) OPTIONS (ANNOTATION 'Flag to show how many columns of table are loaded in memory (NO, PARTIALLY, and FULL); see M_CS_COLUMNS for each column', NAMEINSOURCE '"LOADED"', NATIVE_TYPE 'VARCHAR'),
    READ_COUNT long OPTIONS (ANNOTATION 'Number of read accesses on the table or partition. Note: This is not the number of SELECT statements against this table. A SELECT may involve several read accesses.', NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COUNT long OPTIONS (ANNOTATION 'Number of write accesses on the table or partition. Note: This is not the number of DML & DDL statements against this table.  A DML or DDL statement may involve several write accesses.', NAMEINSOURCE '"WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MERGE_COUNT long OPTIONS (ANNOTATION 'Number of delta merges done on the table or partition', NAMEINSOURCE '"MERGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_REPLICA string(5) OPTIONS (ANNOTATION 'Flag to indicate that the part is a replica', NAMEINSOURCE '"IS_REPLICA"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CS_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_CS_UNLOADS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNLOAD_TIME timestamp OPTIONS (ANNOTATION 'Timestamp of unload event', NAMEINSOURCE '"UNLOAD_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name. Empty if the whole table is unloaded.', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object Id of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_HISTORY string(5) OPTIONS (ANNOTATION 'Flag to indicate whether the history part is unloaded (only relevant for history tables). Empty if the whole table is unloaded.', NAMEINSOURCE '"IS_HISTORY"', NATIVE_TYPE 'VARCHAR'),
    REASON string(16) OPTIONS (ANNOTATION 'Unload reason (LOW MEMORY, EXPLICIT or UNUSED RESOURCE)', NAMEINSOURCE '"REASON"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_CS_UNLOADS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_DATA_VOLUME_PAGE_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_VOLUME_NAME string(512) OPTIONS (ANNOTATION 'DataVolume name', NAMEINSOURCE '"DATA_VOLUME_NAME"', NATIVE_TYPE 'VARCHAR'),
    PAGE_SIZECLASS string(16) OPTIONS (ANNOTATION 'Page size class', NAMEINSOURCE '"PAGE_SIZECLASS"', NATIVE_TYPE 'VARCHAR'),
    PAGE_SIZE long OPTIONS (ANNOTATION 'Page size', NAMEINSOURCE '"PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_SIZE long OPTIONS (ANNOTATION 'Superblock size', NAMEINSOURCE '"SUPERBLOCK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INITIAL_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of init pages', NAMEINSOURCE '"INITIAL_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ALLOCATE_BLOCK_COUNT long OPTIONS (ANNOTATION 'Number of single and group allocated blocks', NAMEINSOURCE '"TOTAL_ALLOCATE_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SET_BLOCK_FREE_COUNT long OPTIONS (ANNOTATION 'Number of single and group freed blocks', NAMEINSOURCE '"TOTAL_SET_BLOCK_FREE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SET_BLOCK_FREE_AFTER_SAVEPOINT_COUNT long OPTIONS (ANNOTATION 'Number of single and group freed-after-savepoint blocks', NAMEINSOURCE '"TOTAL_SET_BLOCK_FREE_AFTER_SAVEPOINT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_COUNT long OPTIONS (ANNOTATION 'Number of used Superblocks', NAMEINSOURCE '"SUPERBLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of used blocks', NAMEINSOURCE '"USED_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHADOW_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of shadow blocks', NAMEINSOURCE '"SHADOW_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILL_RATIO double OPTIONS (ANNOTATION 'Fill ratio', NAMEINSOURCE '"FILL_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_DATA_VOLUME_PAGE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_DATA_VOLUME_PAGE_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_VOLUME_NAME string(512) OPTIONS (ANNOTATION 'DataVolume name', NAMEINSOURCE '"DATA_VOLUME_NAME"', NATIVE_TYPE 'VARCHAR'),
    PAGE_SIZECLASS string(16) OPTIONS (ANNOTATION 'Page size class', NAMEINSOURCE '"PAGE_SIZECLASS"', NATIVE_TYPE 'VARCHAR'),
    PAGE_SIZE long OPTIONS (ANNOTATION 'Page size', NAMEINSOURCE '"PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_SIZE long OPTIONS (ANNOTATION 'Superblock size', NAMEINSOURCE '"SUPERBLOCK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INITIAL_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of init pages', NAMEINSOURCE '"INITIAL_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ALLOCATE_BLOCK_COUNT long OPTIONS (ANNOTATION 'Number of single and group allocated blocks', NAMEINSOURCE '"TOTAL_ALLOCATE_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SET_BLOCK_FREE_COUNT long OPTIONS (ANNOTATION 'Number of single and group freed blocks', NAMEINSOURCE '"TOTAL_SET_BLOCK_FREE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SET_BLOCK_FREE_AFTER_SAVEPOINT_COUNT long OPTIONS (ANNOTATION 'Number of single and group freed-after-savepoint blocks', NAMEINSOURCE '"TOTAL_SET_BLOCK_FREE_AFTER_SAVEPOINT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_COUNT long OPTIONS (ANNOTATION 'Number of used Superblocks', NAMEINSOURCE '"SUPERBLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of used blocks', NAMEINSOURCE '"USED_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHADOW_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of shadow blocks', NAMEINSOURCE '"SHADOW_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILL_RATIO double OPTIONS (ANNOTATION 'Fill ratio', NAMEINSOURCE '"FILL_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_DATA_VOLUME_PAGE_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_DATA_VOLUME_SUPERBLOCK_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_VOLUME_NAME string(512) OPTIONS (ANNOTATION 'DataVolume name', NAMEINSOURCE '"DATA_VOLUME_NAME"', NATIVE_TYPE 'VARCHAR'),
    SUPERBLOCK_SIZE long OPTIONS (ANNOTATION 'Superblock size', NAMEINSOURCE '"SUPERBLOCK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SUPERBLOCK_COUNT long OPTIONS (ANNOTATION 'Count of used Superblocks', NAMEINSOURCE '"USED_SUPERBLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_COUNT long OPTIONS (ANNOTATION 'Count of Superblocks', NAMEINSOURCE '"SUPERBLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILL_RATIO double OPTIONS (ANNOTATION 'Fill ratio', NAMEINSOURCE '"FILL_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_DATA_VOLUME_SUPERBLOCK_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_DATA_VOLUMES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FILE_NAME string(512) OPTIONS (ANNOTATION 'Filename of DataVolume', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILE_ID long OPTIONS (ANNOTATION 'FileID of DataVolume', NAMEINSOURCE '"FILE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SIZE long OPTIONS (ANNOTATION 'Size of DataVolume', NAMEINSOURCE '"SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SIZE long OPTIONS (ANNOTATION 'Max. size of DataVolume', NAMEINSOURCE '"MAX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_DATA_VOLUMES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_DATABASE" (
    DATABASE_NAME string(256) OPTIONS (ANNOTATION 'System SID', NAMEINSOURCE '"DATABASE_NAME"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (ANNOTATION 'Default master host', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    VERSION string(32) OPTIONS (ANNOTATION 'Version: major.minor.patch.build', NAMEINSOURCE '"VERSION"', NATIVE_TYPE 'VARCHAR'),
    USAGE string(32) OPTIONS (ANNOTATION 'Database usage type. Recommended values: production,test,development,custom. Any value is allowed, but recommended values may be used by clients to alter behavior.', NAMEINSOURCE '"USAGE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_DATABASE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_DATABASE_HISTORY" (
    INSTALL_TIME timestamp OPTIONS (ANNOTATION 'Install/first start time', NAMEINSOURCE '"INSTALL_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    VERSION string(32) OPTIONS (ANNOTATION 'Version: major.minor.patch.build', NAMEINSOURCE '"VERSION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_DATABASE_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_DEBUG_CONNECTIONS" (
    DEBUG_SESSION_ID string(32) OPTIONS (ANNOTATION 'Landscape-wide unique identifier for debug session', NAMEINSOURCE '"DEBUG_SESSION_ID"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection that is used for communication', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_USAGE string(16) OPTIONS (ANNOTATION 'Specifies whether this connection is used for debugger communication or debugging', NAMEINSOURCE '"CONNECTION_USAGE"', NATIVE_TYPE 'VARCHAR'),
    OPERATION string(512) OPTIONS (ANNOTATION 'Operation that is currently running within this connection', NAMEINSOURCE '"OPERATION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_DEBUG_CONNECTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_DEBUG_SESSIONS" (
    DEBUG_SESSION_ID string(32) OPTIONS (ANNOTATION 'Landscape-wide unique identifier for debug session', NAMEINSOURCE '"DEBUG_SESSION_ID"', NATIVE_TYPE 'VARCHAR'),
    COMPILE_MODE string(20) OPTIONS (ANNOTATION 'Compilation handling of nested procedures', NAMEINSOURCE '"COMPILE_MODE"', NATIVE_TYPE 'VARCHAR'),
    TIMEOUT integer OPTIONS (ANNOTATION 'Seconds after which debug session will time out and destroy itself', NAMEINSOURCE '"TIMEOUT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ATTACH_COUNT integer OPTIONS (ANNOTATION 'Number of debuggees the debugger is currently attached to', NAMEINSOURCE '"ATTACH_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ATTACH_FILTER_CONNECTION_ID integer OPTIONS (ANNOTATION 'The debugger is attached to connection with this ID', NAMEINSOURCE '"ATTACH_FILTER_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ATTACH_FILTER_USER_NAME string(256) OPTIONS (ANNOTATION 'The debugger is attached to connections where this user name is set', NAMEINSOURCE '"ATTACH_FILTER_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ATTACH_FILTER_APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'The debugger is attached to connections where this application user name is set', NAMEINSOURCE '"ATTACH_FILTER_APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_DEBUG_SESSIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_DELTA_MERGE_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(8) OPTIONS (ANNOTATION 'MERGE (table delta merge), HINT (application merge hint), SPARSE (optimize compression), FACT (fact table compression)', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HISTORY string(5) OPTIONS (ANNOTATION 'Flag to indicate history part was merged: ''TRUE''/''FALSE''', NAMEINSOURCE '"HISTORY"', NATIVE_TYPE 'VARCHAR'),
    MEMORY_MERGE string(5) OPTIONS (ANNOTATION 'Flag to indicate table was merged in memory only: ''TRUE''/''FALSE''', NAMEINSOURCE '"MEMORY_MERGE"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT string(256) OPTIONS (ANNOTATION 'External identifier for table merge called by an application', NAMEINSOURCE '"PASSPORT"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Execution start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    EXECUTION_TIME long OPTIONS (ANNOTATION 'Execution duration', NAMEINSOURCE '"EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MOTIVATION string(8) OPTIONS (ANNOTATION 'HARD, SMART, AUTO, FORCE', NAMEINSOURCE '"MOTIVATION"', NATIVE_TYPE 'VARCHAR'),
    SUCCESS string(5) OPTIONS (ANNOTATION 'Call success flag; depends on field TYPE; HINT: application merge hint was accepted/rejected; MERGE/SPARSE: delta merge/optimize compression was completed with or without success: ''TRUE''/''FALSE''', NAMEINSOURCE '"SUCCESS"', NATIVE_TYPE 'VARCHAR'),
    MERGED_DELTA_RECORDS integer OPTIONS (ANNOTATION 'Number of documents in delta', NAMEINSOURCE '"MERGED_DELTA_RECORDS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_ERROR integer OPTIONS (ANNOTATION 'Error code of the last error that occurred. Explains why a merge did not succeed. See ERROR_DESCRIPTION for details', NAMEINSOURCE '"LAST_ERROR"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ERROR_DESCRIPTION string(2000) OPTIONS (ANNOTATION 'Description of the last error that occurred during merge. Please note that a failing merge does not necessarily indicate a problem', NAMEINSOURCE '"ERROR_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_DELTA_MERGE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_DISKS" (
    DISK_ID integer OPTIONS (ANNOTATION 'Disk ID', NAMEINSOURCE '"DISK_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEVICE_ID long OPTIONS (ANNOTATION 'Database Internal Device ID', NAMEINSOURCE '"DEVICE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name. Will only be set if disk is used by exactly one host.', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PATH string(512) OPTIONS (ANNOTATION 'Path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    SUBPATH string(512) OPTIONS (ANNOTATION 'Subpath', NAMEINSOURCE '"SUBPATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    USAGE_TYPE string(32) OPTIONS (ANNOTATION 'Usage Type: LOG, DATA, TRACE, DATA_BACKUP and LOG_BACKUP', NAMEINSOURCE '"USAGE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'Volume Used Space', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'Volume Size', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_DISKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_EFFECTIVE_TABLE_PLACEMENT" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RECORD_COUNT long OPTIONS (ANNOTATION 'Record Count', NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_TYPE string(256) OPTIONS (ANNOTATION 'Type', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_NAME string(256) OPTIONS (ANNOTATION 'Group Name', NAMEINSOURCE '"GROUP_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_TYPE string(256) OPTIONS (ANNOTATION 'Group Type', NAMEINSOURCE '"GROUP_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    SUBTYPE string(256) OPTIONS (ANNOTATION 'Sub Type', NAMEINSOURCE '"SUBTYPE"', NATIVE_TYPE 'NVARCHAR'),
    LOCATION string(256) OPTIONS (ANNOTATION 'Location', NAMEINSOURCE '"LOCATION"', NATIVE_TYPE 'NVARCHAR'),
    POSSIBLE_LOCATION string(5000) OPTIONS (ANNOTATION 'Possible Location', NAMEINSOURCE '"POSSIBLE_LOCATION"', NATIVE_TYPE 'NVARCHAR'),
    LOCATION_MATCH string(32) OPTIONS (ANNOTATION 'Location Match', NAMEINSOURCE '"LOCATION_MATCH"', NATIVE_TYPE 'NVARCHAR'),
    MIN_ROWS_FOR_PARTITIONING long OPTIONS (ANNOTATION 'Minimum Row Count for Partitioning', NAMEINSOURCE '"MIN_ROWS_FOR_PARTITIONING"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_ROWS_FOR_PARTITIONING_MATCH string(32) OPTIONS (ANNOTATION 'Minimum Row Count for Match', NAMEINSOURCE '"MIN_ROWS_FOR_PARTITIONING_MATCH"', NATIVE_TYPE 'NVARCHAR'),
    PARTITIONING_THRESHOLD long OPTIONS (ANNOTATION 'Partitioning Threshold', NAMEINSOURCE '"PARTITIONING_THRESHOLD"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARTITIONING_THRESHOLD_MATCH string(32) OPTIONS (ANNOTATION 'Partitioning Threshold Match', NAMEINSOURCE '"PARTITIONING_THRESHOLD_MATCH"', NATIVE_TYPE 'NVARCHAR'),
    INITIAL_PARTITION integer OPTIONS (ANNOTATION 'Initial Partitions', NAMEINSOURCE '"INITIAL_PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INITIAL_PARTITION_MATCH string(32) OPTIONS (ANNOTATION 'Initial Partition Match', NAMEINSOURCE '"INITIAL_PARTITION_MATCH"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_EFFECTIVE_TABLE_PLACEMENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_EPM_SESSIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    MODEL_NAME string(256) OPTIONS (ANNOTATION 'Model name', NAMEINSOURCE '"MODEL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VERSION integer OPTIONS (ANNOTATION 'Version', NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS string(18) OPTIONS (ANNOTATION 'Status', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_EPM_SESSIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_ERROR_CODES" (
    CODE integer NOT NULL OPTIONS (ANNOTATION 'Error Code ', NAMEINSOURCE '"CODE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CODE_STRING string(256) OPTIONS (ANNOTATION 'Error Code String', NAMEINSOURCE '"CODE_STRING"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(2000) OPTIONS (ANNOTATION 'Error Description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_ERROR_CODES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_ES_TABLES" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name for extended table', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name for extended table', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_DELTA_ENABLED string(5) OPTIONS (ANNOTATION 'True if it is RLV table, otherwise FALSE', NAMEINSOURCE '"IS_DELTA_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    TABLE_SIZE long OPTIONS (ANNOTATION 'Size of compressed data in bytes', NAMEINSOURCE '"TABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECORD_COUNT long OPTIONS (ANNOTATION 'Row count in extended table', NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_MODIFIED_TIME timestamp OPTIONS (ANNOTATION 'Timestamp when table was last modified', NAMEINSOURCE '"LAST_MODIFIED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_ES_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_EVENTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(256) OPTIONS (ANNOTATION 'Type of event', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    ID long OPTIONS (ANNOTATION 'ID of event', NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INFOTEXT string(2000) OPTIONS (ANNOTATION 'Additional info freetext', NAMEINSOURCE '"INFOTEXT"', NATIVE_TYPE 'VARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Time event was created', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    UPDATE_TIME timestamp OPTIONS (ANNOTATION 'Time event was updated', NAMEINSOURCE '"UPDATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HANDLE_TIME timestamp OPTIONS (ANNOTATION 'Time event was handled', NAMEINSOURCE '"HANDLE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE string(256) OPTIONS (ANNOTATION 'State of event', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    ACKNOWLEDGED string(5) OPTIONS (ANNOTATION 'Event acknowledged: ''TRUE''/''FALSE''', NAMEINSOURCE '"ACKNOWLEDGED"', NATIVE_TYPE 'VARCHAR'),
    FAILED_HANDLES long OPTIONS (ANNOTATION 'Number of failed handle attempts', NAMEINSOURCE '"FAILED_HANDLES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_EVENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_EXPENSIVE_STATEMENTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID (This number is ever increasing)', NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT_HASH string(32) OPTIONS (ANNOTATION 'Unique identifier for an SQL string', NAMEINSOURCE '"STATEMENT_HASH"', NATIVE_TYPE 'VARCHAR'),
    DB_USER string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"DB_USER"', NATIVE_TYPE 'NVARCHAR'),
    APP_USER string(256) OPTIONS (ANNOTATION 'Application user name', NAMEINSOURCE '"APP_USER"', NATIVE_TYPE 'NVARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Statement start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DURATION_MICROSEC long OPTIONS (ANNOTATION 'Statement duration', NAMEINSOURCE '"DURATION_MICROSEC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_NAME string(5000) OPTIONS (ANNOTATION 'Related objects', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OPERATION string(5000) OPTIONS (ANNOTATION 'Type of operation: e.g. prepare, execute, fetch, close', NAMEINSOURCE '"OPERATION"', NATIVE_TYPE 'NVARCHAR'),
    RECORDS long OPTIONS (ANNOTATION 'Number of records', NAMEINSOURCE '"RECORDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'Statement string', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    PARAMETERS string(5000) OPTIONS (ANNOTATION 'Parameters', NAMEINSOURCE '"PARAMETERS"', NATIVE_TYPE 'NVARCHAR'),
    ERROR_CODE integer OPTIONS (ANNOTATION 'Error code', NAMEINSOURCE '"ERROR_CODE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ERROR_TEXT string(5000) OPTIONS (ANNOTATION 'Error message', NAMEINSOURCE '"ERROR_TEXT"', NATIVE_TYPE 'NVARCHAR'),
    LOCK_WAIT_COUNT integer OPTIONS (ANNOTATION 'Accumulated lock wait count', NAMEINSOURCE '"LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_WAIT_DURATION long OPTIONS (ANNOTATION 'Accumulated lock wait duration', NAMEINSOURCE '"LOCK_WAIT_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOC_MEM_SIZE_ROWSTORE long OPTIONS (ANNOTATION 'Allocated memory size for row store', NAMEINSOURCE '"ALLOC_MEM_SIZE_ROWSTORE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOC_MEM_SIZE_COLSTORE long OPTIONS (ANNOTATION 'Allocated memory size for column store', NAMEINSOURCE '"ALLOC_MEM_SIZE_COLSTORE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory required for computing the statement, incl. memory for intermediate results. Kept for cache reasons or released after the statement execution.', NAMEINSOURCE '"MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REUSED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory reused from cached data structures, 0 if caches empty', NAMEINSOURCE '"REUSED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CPU_TIME long OPTIONS (ANNOTATION 'CPU time (us) consumed to compute the statement', NAMEINSOURCE '"CPU_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PASSPORT_ROOT_CONTEXT_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying source of request', NAMEINSOURCE '"PASSPORT_ROOT_CONTEXT_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_TRANSACTION_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying business transaction', NAMEINSOURCE '"PASSPORT_TRANSACTION_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_CONNECTION_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying connection', NAMEINSOURCE '"PASSPORT_CONNECTION_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_CONNECTION_COUNTER long OPTIONS (ANNOTATION 'SAP EPP Passport connection counter', NAMEINSOURCE '"PASSPORT_CONNECTION_COUNTER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATEMENT_START_TIME timestamp OPTIONS (ANNOTATION 'Time when the first OPERATION of a statement execution started. All OPERATIONs of a statement execution share the same STATEMENT_START_TIME.', NAMEINSOURCE '"STATEMENT_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    APPLICATION_SOURCE string(256) OPTIONS (ANNOTATION 'Application can define from which source file SAP HANA is called. Usage is up to the application. Value also displayed in M_PREPARED_STATEMENTS.APPLICATION_SOURCE', NAMEINSOURCE '"APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Name of the application', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NETWORK_MESSAGE_ID long OPTIONS (ANNOTATION 'The client message id on the physical server connection, also found in M_SQL_CLIENT_NETWORK_IO. MESSAGE_ID', NAMEINSOURCE '"NETWORK_MESSAGE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_EXPENSIVE_STATEMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_EXPORT_BINARY_STATUS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID to distinguish data of each import session (-1 for Python)', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema of table or view being imported', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Name of table or view being imported', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_TYPE string(16) OPTIONS (ANNOTATION 'Index type: ''UNKNOWN''/''PHYSICAL''/''OLAP''/''JOIN''/''HIERARCHY''/''CALCULATION''/...', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    STATUS string(16) OPTIONS (ANNOTATION 'Import status. ''queued''/''working''/''skipped''/''done''/''failed''', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    "ERROR" string(512) OPTIONS (ANNOTATION 'Empty if import was successful, error text otherwise', NAMEINSOURCE '"ERROR"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_EXPORT_BINARY_STATUS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_EXTRACTORS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Name of the schema where the DSO tables are generated', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Name of the DSO specific status table', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT string(3) OPTIONS (ANNOTATION 'The ID of the client', NAMEINSOURCE '"CLIENT"', NATIVE_TYPE 'NVARCHAR'),
    STATUS string(5) OPTIONS (ANNOTATION 'General status overview saying ''OK'' or ''ERROR''', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    REQUEST_ID integer OPTIONS (ANNOTATION 'SID of the request used for activation', NAMEINSOURCE '"REQUEST_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ERROR_MESSAGE string(5000) OPTIONS (ANNOTATION 'The message in case of an error', NAMEINSOURCE '"ERROR_MESSAGE"', NATIVE_TYPE 'NVARCHAR'),
    PHASE string(32) OPTIONS (ANNOTATION 'The phase of the last running operation', NAMEINSOURCE '"PHASE"', NATIVE_TYPE 'VARCHAR'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Timestamp of the operation phase', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_EXTRACTORS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_FEATURES" (
    COMPONENT_NAME string(32) OPTIONS (ANNOTATION 'Name of the component owning the feature', NAMEINSOURCE '"COMPONENT_NAME"', NATIVE_TYPE 'VARCHAR'),
    FEATURE_NAME string(32) OPTIONS (ANNOTATION 'Name of the feature', NAMEINSOURCE '"FEATURE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FEATURE_VERSION long OPTIONS (ANNOTATION 'Version of the feature', NAMEINSOURCE '"FEATURE_VERSION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_FEATURES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_FULLTEXT_QUEUES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INDEX_OID long OPTIONS (ANNOTATION 'OID of the corresponding fulltext index', NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema of the data table', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Name of the data table', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Name of the document column', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STATUS string(16) OPTIONS (ANNOTATION 'Queue status (ACTIVE, SUSPENDED)', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'NVARCHAR'),
    TOTAL_DOCUMENT_COUNT long OPTIONS (ANNOTATION 'Total number of documents in the original table', NAMEINSOURCE '"TOTAL_DOCUMENT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEXED_DOCUMENT_COUNT long OPTIONS (ANNOTATION 'Number of successfully indexed documents', NAMEINSOURCE '"INDEXED_DOCUMENT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_DOCUMENT_COUNT long OPTIONS (ANNOTATION 'Number of documents currently in the queue', NAMEINSOURCE '"QUEUE_DOCUMENT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ERROR_DOCUMENT_COUNT long OPTIONS (ANNOTATION 'Number of failed documents', NAMEINSOURCE '"ERROR_DOCUMENT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_FULLTEXT_QUEUES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_FUZZY_SEARCH_INDEXES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables, -1 during table schema change', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FUZZY_SEARCH_MODE string(256) OPTIONS (ANNOTATION 'Fuzzy index search mode', NAMEINSOURCE '"FUZZY_SEARCH_MODE"', NATIVE_TYPE 'NVARCHAR'),
    MEMORY_SIZE_IN_TOTAL long OPTIONS (ANNOTATION 'Sum of MEMORY_SIZE_IN_MAIN and MEMORY_SIZE_IN_DELTA', NAMEINSOURCE '"MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_MAIN long OPTIONS (ANNOTATION 'Current size of the fuzzy search indexes in main; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_DELTA long OPTIONS (ANNOTATION 'Current size of the fuzzy search indexes in delta; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOADED string(5) OPTIONS (ANNOTATION 'Flag to indicate that column is loaded into memory: ''TRUE''/''FALSE''', NAMEINSOURCE '"LOADED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_FUZZY_SEARCH_INDEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_GARBAGE_COLLECTION_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STORE_TYPE string(16) OPTIONS (ANNOTATION 'type of storage handled (COLUMN STORE, LIVECACHE)', NAMEINSOURCE '"STORE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HISTORY_COUNT integer OPTIONS (ANNOTATION 'Current count of history files in GC', NAMEINSOURCE '"HISTORY_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WAITER_COUNT integer OPTIONS (ANNOTATION 'Current count of GC waiters', NAMEINSOURCE '"WAITER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MIN_READ_TID long OPTIONS (ANNOTATION 'Last known minimum TID of a reading transaction at EOT', NAMEINSOURCE '"MIN_READ_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_STARTED_TID long OPTIONS (ANNOTATION 'TID of the last started cleanup job', NAMEINSOURCE '"LAST_STARTED_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_STARTED_TID_POSTCOMMIT long OPTIONS (ANNOTATION 'TID of the last started postcommit job', NAMEINSOURCE '"LAST_STARTED_TID_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIRST_WAITING_TID long OPTIONS (ANNOTATION 'TID of the first waiting cleanup job', NAMEINSOURCE '"FIRST_WAITING_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIRST_WAITING_TID_POSTCOMMIT long OPTIONS (ANNOTATION 'TID of the first waiting postcommit job', NAMEINSOURCE '"FIRST_WAITING_TID_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTERS long OPTIONS (ANNOTATION 'Count of history files which entered the queue for cleanup', NAMEINSOURCE '"ENTERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTERS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of history files which entered the queue for postcommit', NAMEINSOURCE '"ENTERS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STARTED_JOBS long OPTIONS (ANNOTATION 'Count of garbage collection (cleanup) jobs started', NAMEINSOURCE '"STARTED_JOBS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STARTED_JOBS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of postcommit jobs started', NAMEINSOURCE '"STARTED_JOBS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESSED_JOBS long OPTIONS (ANNOTATION 'Count of undo files processed for cleanup ', NAMEINSOURCE '"PROCESSED_JOBS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESSED_JOBS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of undo files processed for postcommit', NAMEINSOURCE '"PROCESSED_JOBS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_LOADS long OPTIONS (ANNOTATION 'Count of all GC queue loads', NAMEINSOURCE '"QUEUE_LOADS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_LOADS_NONEMPTY long OPTIONS (ANNOTATION 'Count of GC queue loads which found some elements', NAMEINSOURCE '"QUEUE_LOADS_NONEMPTY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_EMPTY_COUNT long OPTIONS (ANNOTATION 'Count of queue empty states after GC finished', NAMEINSOURCE '"QUEUE_EMPTY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINTS long OPTIONS (ANNOTATION 'Count of savepoints', NAMEINSOURCE '"SAVEPOINTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (last)', NAMEINSOURCE '"LAST_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (max)', NAMEINSOURCE '"MAX_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (min)', NAMEINSOURCE '"MIN_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (total)', NAMEINSOURCE '"SUM_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_HISTORY_SIZE_AT_SVP double OPTIONS (ANNOTATION 'Count of history files present at savepoint (avg)', NAMEINSOURCE '"AVG_HISTORY_SIZE_AT_SVP"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    EMPTY_HISTORY_AT_SVP_COUNT long OPTIONS (ANNOTATION 'Count of savepoints finding empty queue', NAMEINSOURCE '"EMPTY_HISTORY_AT_SVP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_GARBAGE_COLLECTION_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_GARBAGE_COLLECTION_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STORE_TYPE string(16) OPTIONS (ANNOTATION 'type of storage handled (COLUMN STORE, LIVECACHE)', NAMEINSOURCE '"STORE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HISTORY_COUNT integer OPTIONS (ANNOTATION 'Current count of history files in GC', NAMEINSOURCE '"HISTORY_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WAITER_COUNT integer OPTIONS (ANNOTATION 'Current count of GC waiters', NAMEINSOURCE '"WAITER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MIN_READ_TID long OPTIONS (ANNOTATION 'Last known minimum TID of a reading transaction at EOT', NAMEINSOURCE '"MIN_READ_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_STARTED_TID long OPTIONS (ANNOTATION 'TID of the last started cleanup job', NAMEINSOURCE '"LAST_STARTED_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_STARTED_TID_POSTCOMMIT long OPTIONS (ANNOTATION 'TID of the last started postcommit job', NAMEINSOURCE '"LAST_STARTED_TID_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIRST_WAITING_TID long OPTIONS (ANNOTATION 'TID of the first waiting cleanup job', NAMEINSOURCE '"FIRST_WAITING_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIRST_WAITING_TID_POSTCOMMIT long OPTIONS (ANNOTATION 'TID of the first waiting postcommit job', NAMEINSOURCE '"FIRST_WAITING_TID_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTERS long OPTIONS (ANNOTATION 'Count of history files which entered the queue for cleanup', NAMEINSOURCE '"ENTERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTERS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of history files which entered the queue for postcommit', NAMEINSOURCE '"ENTERS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STARTED_JOBS long OPTIONS (ANNOTATION 'Count of garbage collection (cleanup) jobs started', NAMEINSOURCE '"STARTED_JOBS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STARTED_JOBS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of postcommit jobs started', NAMEINSOURCE '"STARTED_JOBS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESSED_JOBS long OPTIONS (ANNOTATION 'Count of undo files processed for cleanup ', NAMEINSOURCE '"PROCESSED_JOBS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESSED_JOBS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of undo files processed for postcommit', NAMEINSOURCE '"PROCESSED_JOBS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_LOADS long OPTIONS (ANNOTATION 'Count of all GC queue loads', NAMEINSOURCE '"QUEUE_LOADS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_LOADS_NONEMPTY long OPTIONS (ANNOTATION 'Count of GC queue loads which found some elements', NAMEINSOURCE '"QUEUE_LOADS_NONEMPTY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_EMPTY_COUNT long OPTIONS (ANNOTATION 'Count of queue empty states after GC finished', NAMEINSOURCE '"QUEUE_EMPTY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINTS long OPTIONS (ANNOTATION 'Count of savepoints', NAMEINSOURCE '"SAVEPOINTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (last)', NAMEINSOURCE '"LAST_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (max)', NAMEINSOURCE '"MAX_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (min)', NAMEINSOURCE '"MIN_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (total)', NAMEINSOURCE '"SUM_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_HISTORY_SIZE_AT_SVP double OPTIONS (ANNOTATION 'Count of history files present at savepoint (avg)', NAMEINSOURCE '"AVG_HISTORY_SIZE_AT_SVP"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    EMPTY_HISTORY_AT_SVP_COUNT long OPTIONS (ANNOTATION 'Count of savepoints finding empty queue', NAMEINSOURCE '"EMPTY_HISTORY_AT_SVP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_GARBAGE_COLLECTION_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_HEAP_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Allocator name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    DEPTH long OPTIONS (ANNOTATION 'Depth', NAMEINSOURCE '"DEPTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator, including suballocators', NAMEINSOURCE '"INCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use, including suballocators', NAMEINSOURCE '"INCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator and suballocators (estimate)', NAMEINSOURCE '"INCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator and its suballocators, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"INCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator', NAMEINSOURCE '"EXCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use', NAMEINSOURCE '"EXCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator', NAMEINSOURCE '"EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator (estimate)', NAMEINSOURCE '"EXCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOC_ERRORS long OPTIONS (ANNOTATION 'Count of allocation errors', NAMEINSOURCE '"EXCLUSIVE_ALLOC_ERRORS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"EXCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MALLOC_PROXY_CACHE_MISSES long OPTIONS (ANNOTATION 'Deprecated', NAMEINSOURCE '"MALLOC_PROXY_CACHE_MISSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLAGS string(64) OPTIONS (ANNOTATION 'Allocator flags', NAMEINSOURCE '"FLAGS"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT string(64) OPTIONS (ANNOTATION 'Name of SAP HANA component of this allocator', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_HEAP_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_HEAP_MEMORY_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Allocator name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    DEPTH long OPTIONS (ANNOTATION 'Depth', NAMEINSOURCE '"DEPTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator, including suballocators', NAMEINSOURCE '"INCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use, including suballocators', NAMEINSOURCE '"INCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator and suballocators (estimate)', NAMEINSOURCE '"INCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator and its suballocators, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"INCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator', NAMEINSOURCE '"EXCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use', NAMEINSOURCE '"EXCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator', NAMEINSOURCE '"EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator (estimate)', NAMEINSOURCE '"EXCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOC_ERRORS long OPTIONS (ANNOTATION 'Count of allocation errors', NAMEINSOURCE '"EXCLUSIVE_ALLOC_ERRORS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"EXCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MALLOC_PROXY_CACHE_MISSES long OPTIONS (ANNOTATION 'Deprecated', NAMEINSOURCE '"MALLOC_PROXY_CACHE_MISSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLAGS string(64) OPTIONS (ANNOTATION 'Allocator flags', NAMEINSOURCE '"FLAGS"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT string(64) OPTIONS (ANNOTATION 'Name of SAP HANA component of this allocator', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_HEAP_MEMORY_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_HISTORY_INDEX_LAST_COMMIT_ID" (
    SESSION_ID long OPTIONS (ANNOTATION 'Session ID', NAMEINSOURCE '"SESSION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SESSION_OWNER_VOLUME_ID long OPTIONS (ANNOTATION 'Volume ID of this session', NAMEINSOURCE '"SESSION_OWNER_VOLUME_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMMIT_ID long OPTIONS (ANNOTATION 'Last commit ID of history index in this session', NAMEINSOURCE '"LAST_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_HISTORY_INDEX_LAST_COMMIT_ID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_HOST_INFORMATION" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    KEY string(32) OPTIONS (ANNOTATION 'Key', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_HOST_INFORMATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_HOST_RESOURCE_UTILIZATION" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    FREE_PHYSICAL_MEMORY long OPTIONS (ANNOTATION 'Free physical memory on the host', NAMEINSOURCE '"FREE_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_PHYSICAL_MEMORY long OPTIONS (ANNOTATION 'Used physical memory on the host', NAMEINSOURCE '"USED_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_SWAP_SPACE long OPTIONS (ANNOTATION 'Free swap memory on the host', NAMEINSOURCE '"FREE_SWAP_SPACE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SWAP_SPACE long OPTIONS (ANNOTATION 'Used swap memory on the host', NAMEINSOURCE '"USED_SWAP_SPACE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATION_LIMIT long OPTIONS (ANNOTATION 'Allocation limit for all processes', NAMEINSOURCE '"ALLOCATION_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSTANCE_TOTAL_MEMORY_USED_SIZE long OPTIONS (ANNOTATION 'Amount of memory from the memory pool that is currently in actual use by SAP HANA processes', NAMEINSOURCE '"INSTANCE_TOTAL_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSTANCE_TOTAL_MEMORY_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Size of the memory pool for all SAP HANA processes', NAMEINSOURCE '"INSTANCE_TOTAL_MEMORY_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSTANCE_CODE_SIZE long OPTIONS (ANNOTATION 'Code size, including shared libraries of SAP HANA processes', NAMEINSOURCE '"INSTANCE_CODE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSTANCE_SHARED_MEMORY_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Shared memory size of SAP HANA processes', NAMEINSOURCE '"INSTANCE_SHARED_MEMORY_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_USER_TIME long OPTIONS (ANNOTATION 'CPU time spent in user mode', NAMEINSOURCE '"TOTAL_CPU_USER_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_SYSTEM_TIME long OPTIONS (ANNOTATION 'CPU time spent in kernel mode', NAMEINSOURCE '"TOTAL_CPU_SYSTEM_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_WIO_TIME long OPTIONS (ANNOTATION 'CPU time spent in wait IO (Linux only, Windows always 0)', NAMEINSOURCE '"TOTAL_CPU_WIO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_IDLE_TIME long OPTIONS (ANNOTATION 'CPU idle time', NAMEINSOURCE '"TOTAL_CPU_IDLE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SYS_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Host timestamp in local time zone', NAMEINSOURCE '"SYS_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    UTC_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Host timestamp in UTC', NAMEINSOURCE '"UTC_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_HOST_RESOURCE_UTILIZATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_IMPORT_BINARY_STATUS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID to distinguish data of each import session (-1 for Python)', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema of table or view being imported', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Name of table or view being imported', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_TYPE string(16) OPTIONS (ANNOTATION 'Index type: ''UNKNOWN''/''PHYSICAL''/''OLAP''/''JOIN''/''HIERARCHY''/''CALCULATION''/...', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    STATUS string(16) OPTIONS (ANNOTATION 'Import status. ''queued''/''working''/''skipped''/''done''/''failed''', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    "ERROR" string(512) OPTIONS (ANNOTATION 'Empty if import was successful, error text otherwise', NAMEINSOURCE '"ERROR"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_IMPORT_BINARY_STATUS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_INIFILE_CONTENTS" (
    FILE_NAME string(256) OPTIONS (ANNOTATION 'Configuration file name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LAYER_NAME string(16) OPTIONS (ANNOTATION 'Configuration layer: DEFAULT, SYSTEM, TENANT, HOST', NAMEINSOURCE '"LAYER_NAME"', NATIVE_TYPE 'VARCHAR'),
    TENANT_NAME string(256) OPTIONS (ANNOTATION 'Tenant name, if layer is TENANT', NAMEINSOURCE '"TENANT_NAME"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name, if layer is HOST', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    SECTION string(128) OPTIONS (ANNOTATION 'Configuration section name', NAMEINSOURCE '"SECTION"', NATIVE_TYPE 'VARCHAR'),
    KEY string(128) OPTIONS (ANNOTATION 'Configuration key name', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Configuration value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_INIFILE_CONTENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_INIFILES" (
    FILE_NAME string(256) OPTIONS (ANNOTATION 'Configuration file name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_LAYER string(5) OPTIONS (ANNOTATION 'TRUE if file has configuration on this layer (Always TRUE)', NAMEINSOURCE '"DEFAULT_LAYER"', NATIVE_TYPE 'VARCHAR'),
    SYSTEM_LAYER string(5) OPTIONS (ANNOTATION 'TRUE if file has configuration on this layer', NAMEINSOURCE '"SYSTEM_LAYER"', NATIVE_TYPE 'VARCHAR'),
    TENANT_LAYER string(5) OPTIONS (ANNOTATION 'TRUE if file has configuration on this layer', NAMEINSOURCE '"TENANT_LAYER"', NATIVE_TYPE 'VARCHAR'),
    HOST_LAYER string(5) OPTIONS (ANNOTATION 'TRUE if file has configuration on this layer', NAMEINSOURCE '"HOST_LAYER"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_INIFILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_JOB_PROGRESS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema of the object', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the object', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOB_NAME string(128) OPTIONS (ANNOTATION 'Type of the operation', NAMEINSOURCE '"JOB_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection that triggered the operation', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Start time of the operation', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CURRENT_PROGRESS integer OPTIONS (ANNOTATION 'Steps of the operation that are already finished', NAMEINSOURCE '"CURRENT_PROGRESS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_PROGRESS integer OPTIONS (ANNOTATION 'Maximum steps of the operation', NAMEINSOURCE '"MAX_PROGRESS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PROGRESS_DETAIL string(256) OPTIONS (ANNOTATION 'Detail information of the operation', NAMEINSOURCE '"PROGRESS_DETAIL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_JOB_PROGRESS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_JOBEXECUTORS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_CONCURRENCY integer OPTIONS (ANNOTATION 'Maximum number of concurrently running threads (config)', NAMEINSOURCE '"MAX_CONCURRENCY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_WORKER_COUNT integer OPTIONS (ANNOTATION 'Total number of worker threads', NAMEINSOURCE '"TOTAL_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARKED_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of parked worker threads', NAMEINSOURCE '"PARKED_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FREE_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of free worker threads', NAMEINSOURCE '"FREE_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SYS_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting in system', NAMEINSOURCE '"SYS_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    JOB_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting for a job on another worker thread', NAMEINSOURCE '"JOB_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    YIELD_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting on yield', NAMEINSOURCE '"YIELD_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WORKER_CREATE_COUNT long OPTIONS (ANNOTATION '#threads created', NAMEINSOURCE '"WORKER_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_JOBEXECUTORS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_JOBEXECUTORS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_CONCURRENCY integer OPTIONS (ANNOTATION 'Maximum number of concurrently running threads (config)', NAMEINSOURCE '"MAX_CONCURRENCY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_WORKER_COUNT integer OPTIONS (ANNOTATION 'Total number of worker threads', NAMEINSOURCE '"TOTAL_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARKED_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of parked worker threads', NAMEINSOURCE '"PARKED_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FREE_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of free worker threads', NAMEINSOURCE '"FREE_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SYS_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting in system', NAMEINSOURCE '"SYS_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    JOB_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting for a job on another worker thread', NAMEINSOURCE '"JOB_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    YIELD_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting on yield', NAMEINSOURCE '"YIELD_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WORKER_CREATE_COUNT long OPTIONS (ANNOTATION '#threads created', NAMEINSOURCE '"WORKER_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_JOBEXECUTORS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_KERNEL_PROFILER" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Application user name (if profiling is restricted to an application user)', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'SQL user name (if profiling is restricted to an SQL user)', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WAIT_TIME long OPTIONS (ANNOTATION 'Wait time between two sampling runs in milliseconds', NAMEINSOURCE '"WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_LIMIT long OPTIONS (ANNOTATION 'Allocation limit for profiling data (not an exact limit, a heuristic approach is used to limit memory)', NAMEINSOURCE '"MEMORY_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_KERNEL_PROFILER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LANDSCAPE_HOST_CONFIGURATION" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    HOST_ACTIVE string(128) OPTIONS (ANNOTATION 'Host active Status (Summary of Active values of all services on that host)', NAMEINSOURCE '"HOST_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    HOST_STATUS string(128) OPTIONS (ANNOTATION 'Host status', NAMEINSOURCE '"HOST_STATUS"', NATIVE_TYPE 'VARCHAR'),
    FAILOVER_STATUS string(128) OPTIONS (ANNOTATION 'Failover status', NAMEINSOURCE '"FAILOVER_STATUS"', NATIVE_TYPE 'VARCHAR'),
    FAILOVER_GROUP string(256) OPTIONS (ANNOTATION 'DEPRECATED: replaced by FAILOVER_..._GROUP columns', NAMEINSOURCE '"FAILOVER_GROUP"', NATIVE_TYPE 'VARCHAR'),
    FAILOVER_CONFIG_GROUP string(256) OPTIONS (ANNOTATION 'Configured failover group', NAMEINSOURCE '"FAILOVER_CONFIG_GROUP"', NATIVE_TYPE 'VARCHAR'),
    FAILOVER_ACTUAL_GROUP string(256) OPTIONS (ANNOTATION 'Actual failover group', NAMEINSOURCE '"FAILOVER_ACTUAL_GROUP"', NATIVE_TYPE 'VARCHAR'),
    NAMESERVER_CONFIG_ROLE string(16) OPTIONS (ANNOTATION 'Nameserver configured role: MASTER, SLAVE', NAMEINSOURCE '"NAMESERVER_CONFIG_ROLE"', NATIVE_TYPE 'VARCHAR'),
    NAMESERVER_ACTUAL_ROLE string(16) OPTIONS (ANNOTATION 'Nameserver actual role: MASTER, SLAVE', NAMEINSOURCE '"NAMESERVER_ACTUAL_ROLE"', NATIVE_TYPE 'VARCHAR'),
    INDEXSERVER_CONFIG_ROLE string(16) OPTIONS (ANNOTATION 'Indexserver configured role: WORKER, STANDBY', NAMEINSOURCE '"INDEXSERVER_CONFIG_ROLE"', NATIVE_TYPE 'VARCHAR'),
    INDEXSERVER_ACTUAL_ROLE string(16) OPTIONS (ANNOTATION 'Indexserver actual role: MASTER, SLAVE, STANDBY', NAMEINSOURCE '"INDEXSERVER_ACTUAL_ROLE"', NATIVE_TYPE 'VARCHAR'),
    STORAGE_PARTITION integer OPTIONS (ANNOTATION 'Storage Partition ~= subpath used by that host', NAMEINSOURCE '"STORAGE_PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOVE_STATUS string(16) OPTIONS (ANNOTATION 'Remove progress', NAMEINSOURCE '"REMOVE_STATUS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LANDSCAPE_HOST_CONFIGURATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LICENSE" (
    HARDWARE_KEY string(11) OPTIONS (ANNOTATION 'Hardware key of this SAP HANA installation', NAMEINSOURCE '"HARDWARE_KEY"', NATIVE_TYPE 'VARCHAR'),
    SYSTEM_ID string(3) OPTIONS (ANNOTATION 'System identifier (SID) of this SAP HANA database', NAMEINSOURCE '"SYSTEM_ID"', NATIVE_TYPE 'VARCHAR'),
    INSTALL_NO string(10) OPTIONS (ANNOTATION 'Installation number of this SAP HANA database', NAMEINSOURCE '"INSTALL_NO"', NATIVE_TYPE 'VARCHAR'),
    SYSTEM_NO string(18) OPTIONS (ANNOTATION 'System number of this SAP HANA database', NAMEINSOURCE '"SYSTEM_NO"', NATIVE_TYPE 'VARCHAR'),
    PRODUCT_NAME string(256) OPTIONS (ANNOTATION 'Name of the licensed software product, e.g. SAP HANA', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'VARCHAR'),
    PRODUCT_LIMIT long OPTIONS (ANNOTATION 'Licensed amount of main memory as specified by the license', NAMEINSOURCE '"PRODUCT_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRODUCT_USAGE long OPTIONS (ANNOTATION 'Peak memory allocation since installation, measured hourly', NAMEINSOURCE '"PRODUCT_USAGE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    START_DATE timestamp OPTIONS (ANNOTATION 'Start date of the validity period of the license', NAMEINSOURCE '"START_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    EXPIRATION_DATE timestamp OPTIONS (ANNOTATION 'Expiration date of the validity period of the license', NAMEINSOURCE '"EXPIRATION_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_SUCCESSFUL_CHECK timestamp OPTIONS (ANNOTATION 'Latest date on which the license was successfully checked and found valid', NAMEINSOURCE '"LAST_SUCCESSFUL_CHECK"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PERMANENT string(5) OPTIONS (ANNOTATION 'TRUE if the license is a permanent one, FALSE if the license is a temporary one', NAMEINSOURCE '"PERMANENT"', NATIVE_TYPE 'VARCHAR'),
    VALID string(5) OPTIONS (ANNOTATION 'TRUE if the license is currently valid, otherwise FALSE', NAMEINSOURCE '"VALID"', NATIVE_TYPE 'VARCHAR'),
    ENFORCED string(5) OPTIONS (ANNOTATION 'TRUE if the license is a memory-enforced license, otherwise FALSE', NAMEINSOURCE '"ENFORCED"', NATIVE_TYPE 'VARCHAR'),
    LOCKED_DOWN string(5) OPTIONS (ANNOTATION 'TRUE if the system is locked down due to license status, otherwise FALSE', NAMEINSOURCE '"LOCKED_DOWN"', NATIVE_TYPE 'VARCHAR'),
    MEASUREMENT_XML clob OPTIONS (ANNOTATION 'Measurement log produced for this licensed system with current memory consumption', NAMEINSOURCE '"MEASUREMENT_XML"', NATIVE_TYPE 'CLOB')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LICENSE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LICENSE_USAGE_HISTORY" (
    PRODUCT_USAGE long OPTIONS (ANNOTATION 'Maximum utilized amount of main memory used in this period', NAMEINSOURCE '"PRODUCT_USAGE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PERIOD_START_TIME timestamp OPTIONS (ANNOTATION 'Start time of the period the maximum was used in', NAMEINSOURCE '"PERIOD_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PERIOD_END_TIME timestamp OPTIONS (ANNOTATION 'End time of the period the maximum was used in', NAMEINSOURCE '"PERIOD_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LICENSE_USAGE_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LIVECACHE_CONTAINER_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTAINER_ID long OPTIONS (ANNOTATION 'Container ID', NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_CLASS_ID integer OPTIONS (ANNOTATION 'OMS class ID', NAMEINSOURCE '"OMS_CLASS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_CLASS_NAME string(64) OPTIONS (ANNOTATION 'OMS class name', NAMEINSOURCE '"OMS_CLASS_NAME"', NATIVE_TYPE 'VARCHAR'),
    OMS_SCHEMA_HANDLE integer OPTIONS (ANNOTATION 'OMS schema handle', NAMEINSOURCE '"OMS_SCHEMA_HANDLE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_CONTAINER_NO integer OPTIONS (ANNOTATION 'OMS container number', NAMEINSOURCE '"OMS_CONTAINER_NO"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CLASS_SIZE long OPTIONS (ANNOTATION 'Object class size', NAMEINSOURCE '"CLASS_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_SIZE integer OPTIONS (ANNOTATION 'Object key size', NAMEINSOURCE '"KEY_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY_PARTITION_COUNT integer OPTIONS (ANNOTATION 'Key partition count', NAMEINSOURCE '"KEY_PARTITION_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY_PARTITION_PREFIX_SIZE integer OPTIONS (ANNOTATION 'Key partition prefix length', NAMEINSOURCE '"KEY_PARTITION_PREFIX_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CACHED_KEYS string(5) OPTIONS (ANNOTATION 'Cached keys active: ''TRUE''/''FALSE''', NAMEINSOURCE '"CACHED_KEYS"', NATIVE_TYPE 'VARCHAR'),
    COPY_ON_UPDATE string(5) OPTIONS (ANNOTATION 'Copy on update active: ''TRUE''/''FALSE''', NAMEINSOURCE '"COPY_ON_UPDATE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_COUNT long OPTIONS (ANNOTATION 'Object count', NAMEINSOURCE '"OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SIZE_SUM long OPTIONS (ANNOTATION 'Object size sum', NAMEINSOURCE '"OBJECT_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_OBJECT_COUNT long OPTIONS (ANNOTATION 'History (mark deleted) object count', NAMEINSOURCE '"HISTORY_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_SIZE_SUM long OPTIONS (ANNOTATION 'History data size sum', NAMEINSOURCE '"HISTORY_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_COUNT long OPTIONS (ANNOTATION 'Page count', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_SIZE_SUM long OPTIONS (ANNOTATION 'Page size sum', NAMEINSOURCE '"PAGE_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_CREATE_COUNT long OPTIONS (ANNOTATION 'Object create count since restart', NAMEINSOURCE '"OBJECT_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_UPDATE_COUNT long OPTIONS (ANNOTATION 'Object update count since restart', NAMEINSOURCE '"OBJECT_UPDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_DELETE_COUNT long OPTIONS (ANNOTATION 'Object delete count since restart', NAMEINSOURCE '"OBJECT_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Create timestamp', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LIVECACHE_CONTAINER_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LIVECACHE_CONTAINER_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTAINER_ID long OPTIONS (ANNOTATION 'Container ID', NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_CLASS_ID integer OPTIONS (ANNOTATION 'OMS class ID', NAMEINSOURCE '"OMS_CLASS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_CLASS_NAME string(64) OPTIONS (ANNOTATION 'OMS class name', NAMEINSOURCE '"OMS_CLASS_NAME"', NATIVE_TYPE 'VARCHAR'),
    OMS_SCHEMA_HANDLE integer OPTIONS (ANNOTATION 'OMS schema handle', NAMEINSOURCE '"OMS_SCHEMA_HANDLE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_CONTAINER_NO integer OPTIONS (ANNOTATION 'OMS container number', NAMEINSOURCE '"OMS_CONTAINER_NO"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CLASS_SIZE long OPTIONS (ANNOTATION 'Object class size', NAMEINSOURCE '"CLASS_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_SIZE integer OPTIONS (ANNOTATION 'Object key size', NAMEINSOURCE '"KEY_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY_PARTITION_COUNT integer OPTIONS (ANNOTATION 'Key partition count', NAMEINSOURCE '"KEY_PARTITION_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY_PARTITION_PREFIX_SIZE integer OPTIONS (ANNOTATION 'Key partition prefix length', NAMEINSOURCE '"KEY_PARTITION_PREFIX_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CACHED_KEYS string(5) OPTIONS (ANNOTATION 'Cached keys active: ''TRUE''/''FALSE''', NAMEINSOURCE '"CACHED_KEYS"', NATIVE_TYPE 'VARCHAR'),
    COPY_ON_UPDATE string(5) OPTIONS (ANNOTATION 'Copy on update active: ''TRUE''/''FALSE''', NAMEINSOURCE '"COPY_ON_UPDATE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_COUNT long OPTIONS (ANNOTATION 'Object count', NAMEINSOURCE '"OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SIZE_SUM long OPTIONS (ANNOTATION 'Object size sum', NAMEINSOURCE '"OBJECT_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_OBJECT_COUNT long OPTIONS (ANNOTATION 'History (mark deleted) object count', NAMEINSOURCE '"HISTORY_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_SIZE_SUM long OPTIONS (ANNOTATION 'History data size sum', NAMEINSOURCE '"HISTORY_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_COUNT long OPTIONS (ANNOTATION 'Page count', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_SIZE_SUM long OPTIONS (ANNOTATION 'Page size sum', NAMEINSOURCE '"PAGE_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_CREATE_COUNT long OPTIONS (ANNOTATION 'Object create count since restart', NAMEINSOURCE '"OBJECT_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_UPDATE_COUNT long OPTIONS (ANNOTATION 'Object update count since restart', NAMEINSOURCE '"OBJECT_UPDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_DELETE_COUNT long OPTIONS (ANNOTATION 'Object delete count since restart', NAMEINSOURCE '"OBJECT_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Create timestamp', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LIVECACHE_CONTAINER_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LIVECACHE_LOCK_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTAINER_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on containers', NAMEINSOURCE '"CONTAINER_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on containers', NAMEINSOURCE '"CONTAINER_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on containers', NAMEINSOURCE '"CONTAINER_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of lock timeouts on containers', NAMEINSOURCE '"CONTAINER_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on schemas', NAMEINSOURCE '"SCHEMA_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on schemas', NAMEINSOURCE '"SCHEMA_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on schemas', NAMEINSOURCE '"SCHEMA_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of lock timeouts on schemas', NAMEINSOURCE '"SCHEMA_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on objects', NAMEINSOURCE '"OBJECT_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on objects', NAMEINSOURCE '"OBJECT_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on objects', NAMEINSOURCE '"OBJECT_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of timeouts on objects', NAMEINSOURCE '"OBJECT_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_REQUESTS_COUNT long OPTIONS (ANNOTATION 'Number of committed requests', NAMEINSOURCE '"COMMITTED_REQUESTS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LIVECACHE_LOCK_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LIVECACHE_LOCK_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTAINER_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on containers', NAMEINSOURCE '"CONTAINER_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on containers', NAMEINSOURCE '"CONTAINER_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on containers', NAMEINSOURCE '"CONTAINER_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of lock timeouts on containers', NAMEINSOURCE '"CONTAINER_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on schemas', NAMEINSOURCE '"SCHEMA_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on schemas', NAMEINSOURCE '"SCHEMA_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on schemas', NAMEINSOURCE '"SCHEMA_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of lock timeouts on schemas', NAMEINSOURCE '"SCHEMA_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on objects', NAMEINSOURCE '"OBJECT_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on objects', NAMEINSOURCE '"OBJECT_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on objects', NAMEINSOURCE '"OBJECT_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of timeouts on objects', NAMEINSOURCE '"OBJECT_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_REQUESTS_COUNT long OPTIONS (ANNOTATION 'Number of committed requests', NAMEINSOURCE '"COMMITTED_REQUESTS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LIVECACHE_LOCK_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LIVECACHE_LOCKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ID string(20) OPTIONS (ANNOTATION 'ID of the lock (OID, container ID, or schema ID dependent on the lock class)', NAMEINSOURCE '"ID"', NATIVE_TYPE 'VARCHAR'),
    CLASS string(20) OPTIONS (ANNOTATION 'The class that the lock belongs to', NAMEINSOURCE '"CLASS"', NATIVE_TYPE 'VARCHAR'),
    GRANTED_MODE string(20) OPTIONS (ANNOTATION 'The mode that the lock has currently granted to some request(s)', NAMEINSOURCE '"GRANTED_MODE"', NATIVE_TYPE 'VARCHAR'),
    MODE string(20) OPTIONS (ANNOTATION 'The mode that the request is requesting on the lock: ''Free''/''IntendShare''/''IntendExclusive''/''Share''/''ShareIntendExclusive''/''Exclusive''', NAMEINSOURCE '"MODE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(10) OPTIONS (ANNOTATION 'The type specifies when the lock can be removed (either at transaction-end (EOT) or if not visible anymore (Consistent))', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    STATE string(10) OPTIONS (ANNOTATION 'State of this lock request', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    TID long OPTIONS (ANNOTATION 'Transaction ID belonging to this lock request', NAMEINSOURCE '"TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT long OPTIONS (ANNOTATION 'Remaining timeout, if timeout is specified', NAMEINSOURCE '"TIMEOUT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LIVECACHE_LOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LIVECACHE_OMS_VERSIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VERSION_ID string(22) OPTIONS (ANNOTATION 'ID of the OMS version', NAMEINSOURCE '"VERSION_ID"', NATIVE_TYPE 'VARCHAR'),
    CREATE_DATE timestamp OPTIONS (ANNOTATION 'Timestamp of the creation of the OMS version', NAMEINSOURCE '"CREATE_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_OPEN_DATE timestamp OPTIONS (ANNOTATION 'Timestamp, when the OMS version was opened last', NAMEINSOURCE '"LAST_OPEN_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IS_OPEN string(5) NOT NULL OPTIONS (ANNOTATION 'Flag indicating whether the version is currently open: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_OPEN"', NATIVE_TYPE 'VARCHAR'),
    HEAP_USAGE long OPTIONS (ANNOTATION 'Memory that is currently used by the version', NAMEINSOURCE '"HEAP_USAGE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_DESCRIPTION string(512) OPTIONS (ANNOTATION 'Description', NAMEINSOURCE '"VERSION_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LIVECACHE_OMS_VERSIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LIVECACHE_PROCEDURE_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_NAME string(128) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'VARCHAR'),
    METHOD_NAME string(128) OPTIONS (ANNOTATION 'Method name', NAMEINSOURCE '"METHOD_NAME"', NATIVE_TYPE 'VARCHAR'),
    CALL_COUNT long OPTIONS (ANNOTATION 'Number of calls of the procedure', NAMEINSOURCE '"CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_RUN_TIME long OPTIONS (ANNOTATION 'Sum runtime of the procedure', NAMEINSOURCE '"SUM_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_RUN_TIME long OPTIONS (ANNOTATION 'Max runtime of the procedure', NAMEINSOURCE '"MAX_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_RUN_TIME long OPTIONS (ANNOTATION 'Min runtime of the procedure', NAMEINSOURCE '"MIN_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_RUN_TIME long OPTIONS (ANNOTATION 'Average runtime of the procedure', NAMEINSOURCE '"AVERAGE_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs', NAMEINSOURCE '"DEREF_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_BASE_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs against basis', NAMEINSOURCE '"DEREF_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs against basis from within an OMS version', NAMEINSOURCE '"DEREF_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of key derefs', NAMEINSOURCE '"DEREF_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of key derefs against basis', NAMEINSOURCE '"DEREF_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of key derefs against basis from within an OMS version', NAMEINSOURCE '"DEREF_KEYED_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_BASE_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis', NAMEINSOURCE '"ITER_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of objects read via a key-iterator from the basis', NAMEINSOURCE '"ITER_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis from within an OMS version', NAMEINSOURCE '"ITER_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects, created in an OMS-version, read via an OID-iterator', NAMEINSOURCE '"ITER_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis from within an OMS version', NAMEINSOURCE '"ITER_KEYED_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects, created in an OMS version, read via a key-iterator', NAMEINSOURCE '"ITER_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects', NAMEINSOURCE '"DEREF_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects against basis', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_SIZE long OPTIONS (ANNOTATION 'Accumulated size of var objects read from the basis', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects against basis from within an OMS version', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_IN_VERSION_SIZE long OPTIONS (ANNOTATION 'Accumulated size of var objects read from the basis from within an OMS version', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_IN_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created standard objects', NAMEINSOURCE '"NEW_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created keyed objects', NAMEINSOURCE '"NEW_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created var objects', NAMEINSOURCE '"NEW_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created standard objects in an OMS version', NAMEINSOURCE '"NEW_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created keyed objects in an OMS version', NAMEINSOURCE '"NEW_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created var objects in an OMS version', NAMEINSOURCE '"NEW_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_COUNT long OPTIONS (ANNOTATION 'Number of store calls on standard objects', NAMEINSOURCE '"STORE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on standard objects in an OMS versino', NAMEINSOURCE '"STORE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of store calls on keyed objects', NAMEINSOURCE '"STORE_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on keyed objects in an OMS version', NAMEINSOURCE '"STORE_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of store calls on var objects', NAMEINSOURCE '"STORE_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_SIZE long OPTIONS (ANNOTATION 'Accumulated size of store calls on var objects', NAMEINSOURCE '"STORE_VAR_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on var objects in an OMS version', NAMEINSOURCE '"STORE_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_IN_VERSION_SIZE long OPTIONS (ANNOTATION 'Accumulated size of store calls on var objects in an OMS version', NAMEINSOURCE '"STORE_VAR_OBJECT_IN_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of standard objects in the basis', NAMEINSOURCE '"STORE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of keyed objects in the basis', NAMEINSOURCE '"STORE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of var objects in the basis', NAMEINSOURCE '"STORE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_BASE_SIZE long OPTIONS (ANNOTATION 'Accumulated sizes of updated objects in the basis', NAMEINSOURCE '"STORE_VAR_OBJECT_BASE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on standard objects', NAMEINSOURCE '"DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on keyed objects', NAMEINSOURCE '"DELETE_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on var objects', NAMEINSOURCE '"DELETE_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on standard objects in an OMS version', NAMEINSOURCE '"DELETE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on keyed objects in an OMS version', NAMEINSOURCE '"DELETE_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on var objects in an OMS version', NAMEINSOURCE '"DELETE_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted standard objects in the basis', NAMEINSOURCE '"DELETE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted keyed objects in the basis', NAMEINSOURCE '"DELETE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted var objects in the basis', NAMEINSOURCE '"DELETE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on standard objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on standard objects in the basis', NAMEINSOURCE '"LOCK_SHARE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on keyed objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on keyed objects in the basis', NAMEINSOURCE '"LOCK_SHARE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on var objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on var objects in the basis', NAMEINSOURCE '"LOCK_SHARE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_CALLED_COUNT long OPTIONS (ANNOTATION 'Number of OMS release calls', NAMEINSOURCE '"RELEASE_CALLED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_COUNT long OPTIONS (ANNOTATION 'Number of released standard objects', NAMEINSOURCE '"RELEASE_EXECUTED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of releases keyed objects', NAMEINSOURCE '"RELEASE_EXECUTED_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of releases var objects', NAMEINSOURCE '"RELEASE_EXECUTED_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_HOP_COUNT long OPTIONS (ANNOTATION 'Number of hops in the history chain during deref', NAMEINSOURCE '"HISTORY_HOP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_HISTORY_HOP_COUNT long OPTIONS (ANNOTATION 'Number of hops in the history chain during iteration', NAMEINSOURCE '"ITER_HISTORY_HOP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of dbp-exceptions thrown', NAMEINSOURCE '"EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OUT_OF_DATE_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of out-of-date-exceptions thrown', NAMEINSOURCE '"OUT_OF_DATE_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OUT_OF_MEMORY_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of out-of-memory-exceptions thrown', NAMEINSOURCE '"OUT_OF_MEMORY_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of timeout-exceptions thrown', NAMEINSOURCE '"TIMEOUT_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_TERMINATE_COUNT long OPTIONS (ANNOTATION 'Number of OMS terminate calls', NAMEINSOURCE '"OMS_TERMINATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBTRANSACTION_ROLLBACK_COUNT long OPTIONS (ANNOTATION 'Number of rolled back sub-transactions', NAMEINSOURCE '"SUBTRANSACTION_ROLLBACK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBTRANSACTION_COMMIT_COUNT long OPTIONS (ANNOTATION 'Number of committed sub-transactions', NAMEINSOURCE '"SUBTRANSACTION_COMMIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SUBTRANSACTION_LEVEL long OPTIONS (ANNOTATION 'Maximal subtransaction level', NAMEINSOURCE '"MAX_SUBTRANSACTION_LEVEL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_CONSISTENT_VIEW_COUNT long OPTIONS (ANNOTATION 'Number of new-consistent-view calls with objects', NAMEINSOURCE '"NEW_CONSISTENT_VIEW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_NEW_CONSISTENT_VIEW_WAIT_TIME long OPTIONS (ANNOTATION 'Average wait time of new-consistent-view calls with objects', NAMEINSOURCE '"AVERAGE_NEW_CONSISTENT_VIEW_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_CONSISTENT_VIEW_MAX_WAIT_TIME long OPTIONS (ANNOTATION 'Maximal wait time of new-consistent-view calls with objects', NAMEINSOURCE '"NEW_CONSISTENT_VIEW_MAX_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_CACHE_HIT_COUNT long OPTIONS (ANNOTATION 'Number of cache hits in the key-cache', NAMEINSOURCE '"KEY_CACHE_HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_MISS_CACHE_HIT_COUNT long OPTIONS (ANNOTATION 'Number of cache hits in the key-miss-cache', NAMEINSOURCE '"KEY_MISS_CACHE_HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VERSION_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of key-derefs in an OMS version on objects created in this version', NAMEINSOURCE '"DEREF_VERSION_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_REHASH_COUNT long OPTIONS (ANNOTATION 'Number of rehashes of the OMS-object-hash', NAMEINSOURCE '"OMS_REHASH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_HASH_CHAIN_SEARCH_LENGTH long OPTIONS (ANNOTATION 'Average search length on the hash-chains of the OMS-object-hash', NAMEINSOURCE '"AVERAGE_HASH_CHAIN_SEARCH_LENGTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_HASH_CHAIN_LENGTH long OPTIONS (ANNOTATION 'Maximum length of a hash-chain of the OMS-object-hash', NAMEINSOURCE '"MAX_HASH_CHAIN_LENGTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_CREATE_COUNT long OPTIONS (ANNOTATION 'Number of created OMS versions', NAMEINSOURCE '"VERSION_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_OPEN_COUNT long OPTIONS (ANNOTATION 'Number of open-version calls', NAMEINSOURCE '"VERSION_OPEN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_CLOSE_COUNT long OPTIONS (ANNOTATION 'Number of close-version calls', NAMEINSOURCE '"VERSION_CLOSE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_DROP_COUNT long OPTIONS (ANNOTATION 'Number of dropped OMS versions', NAMEINSOURCE '"VERSION_DROP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_ALLOC_COUNT long OPTIONS (ANNOTATION 'Number of allocations via a user allocator', NAMEINSOURCE '"USER_ALLOC_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MAX_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_MAX_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MIN_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_MIN_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_AVERAGE_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_AVERAGE_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_DELETE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations via a user allocator', NAMEINSOURCE '"USER_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MAX_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_MAX_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MIN_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_MIN_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_AVERAGE_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_AVERAGE_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_DELTA_MAX_SIZE long OPTIONS (ANNOTATION 'Maximal difference between allocation and deallocation on a user allocator during the execution of a method', NAMEINSOURCE '"USER_DELTA_MAX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_ALLOC_COUNT long OPTIONS (ANNOTATION 'Number of allocations via an OMS internal allocator', NAMEINSOURCE '"OMS_ALLOC_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MAX_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MAX_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MIN_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MIN_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_AVERAGE_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_AVERAGE_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_DELETE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations via an OMS internal allocator', NAMEINSOURCE '"OMS_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MAX_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MAX_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MIN_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MIN_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_AVERAGE_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_AVERAGE_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_DELTA_MAX_SIZE long OPTIONS (ANNOTATION 'Maximum difference between allocation and deallocation on an OMS internal allocator during the execution of a method', NAMEINSOURCE '"OMS_DELTA_MAX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_COMMUNICATION_TIME long OPTIONS (ANNOTATION 'Average stream communication time', NAMEINSOURCE '"STREAM_COMMUNICATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_READ_COUNT long OPTIONS (ANNOTATION 'Number of communications for reading ABAP tables', NAMEINSOURCE '"STREAM_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_WRITE_COUNT long OPTIONS (ANNOTATION 'Number of communications for writing ABAP tables', NAMEINSOURCE '"STREAM_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_READ_ROW_COUNT long OPTIONS (ANNOTATION 'Number of rows read from ABAP tables', NAMEINSOURCE '"STREAM_READ_ROW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_WRITE_ROW_COUNT long OPTIONS (ANNOTATION 'Number of rows written to ABAP tables', NAMEINSOURCE '"STREAM_WRITE_ROW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LIVECACHE_PROCEDURE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LIVECACHE_PROCEDURE_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_NAME string(128) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'VARCHAR'),
    METHOD_NAME string(128) OPTIONS (ANNOTATION 'Method name', NAMEINSOURCE '"METHOD_NAME"', NATIVE_TYPE 'VARCHAR'),
    CALL_COUNT long OPTIONS (ANNOTATION 'Number of calls of the procedure', NAMEINSOURCE '"CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_RUN_TIME long OPTIONS (ANNOTATION 'Sum runtime of the procedure', NAMEINSOURCE '"SUM_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_RUN_TIME long OPTIONS (ANNOTATION 'Max runtime of the procedure', NAMEINSOURCE '"MAX_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_RUN_TIME long OPTIONS (ANNOTATION 'Min runtime of the procedure', NAMEINSOURCE '"MIN_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_RUN_TIME long OPTIONS (ANNOTATION 'Average runtime of the procedure', NAMEINSOURCE '"AVERAGE_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs', NAMEINSOURCE '"DEREF_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_BASE_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs against basis', NAMEINSOURCE '"DEREF_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs against basis from within an OMS version', NAMEINSOURCE '"DEREF_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of key derefs', NAMEINSOURCE '"DEREF_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of key derefs against basis', NAMEINSOURCE '"DEREF_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of key derefs against basis from within an OMS version', NAMEINSOURCE '"DEREF_KEYED_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_BASE_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis', NAMEINSOURCE '"ITER_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of objects read via a key-iterator from the basis', NAMEINSOURCE '"ITER_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis from within an OMS version', NAMEINSOURCE '"ITER_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects, created in an OMS-version, read via an OID-iterator', NAMEINSOURCE '"ITER_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis from within an OMS version', NAMEINSOURCE '"ITER_KEYED_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects, created in an OMS version, read via a key-iterator', NAMEINSOURCE '"ITER_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects', NAMEINSOURCE '"DEREF_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects against basis', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_SIZE long OPTIONS (ANNOTATION 'Accumulated size of var objects read from the basis', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects against basis from within an OMS version', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_IN_VERSION_SIZE long OPTIONS (ANNOTATION 'Accumulated size of var objects read from the basis from within an OMS version', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_IN_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created standard objects', NAMEINSOURCE '"NEW_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created keyed objects', NAMEINSOURCE '"NEW_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created var objects', NAMEINSOURCE '"NEW_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created standard objects in an OMS version', NAMEINSOURCE '"NEW_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created keyed objects in an OMS version', NAMEINSOURCE '"NEW_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created var objects in an OMS version', NAMEINSOURCE '"NEW_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_COUNT long OPTIONS (ANNOTATION 'Number of store calls on standard objects', NAMEINSOURCE '"STORE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on standard objects in an OMS versino', NAMEINSOURCE '"STORE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of store calls on keyed objects', NAMEINSOURCE '"STORE_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on keyed objects in an OMS version', NAMEINSOURCE '"STORE_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of store calls on var objects', NAMEINSOURCE '"STORE_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_SIZE long OPTIONS (ANNOTATION 'Accumulated size of store calls on var objects', NAMEINSOURCE '"STORE_VAR_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on var objects in an OMS version', NAMEINSOURCE '"STORE_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_IN_VERSION_SIZE long OPTIONS (ANNOTATION 'Accumulated size of store calls on var objects in an OMS version', NAMEINSOURCE '"STORE_VAR_OBJECT_IN_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of standard objects in the basis', NAMEINSOURCE '"STORE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of keyed objects in the basis', NAMEINSOURCE '"STORE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of var objects in the basis', NAMEINSOURCE '"STORE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_BASE_SIZE long OPTIONS (ANNOTATION 'Accumulated sizes of updated objects in the basis', NAMEINSOURCE '"STORE_VAR_OBJECT_BASE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on standard objects', NAMEINSOURCE '"DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on keyed objects', NAMEINSOURCE '"DELETE_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on var objects', NAMEINSOURCE '"DELETE_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on standard objects in an OMS version', NAMEINSOURCE '"DELETE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on keyed objects in an OMS version', NAMEINSOURCE '"DELETE_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on var objects in an OMS version', NAMEINSOURCE '"DELETE_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted standard objects in the basis', NAMEINSOURCE '"DELETE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted keyed objects in the basis', NAMEINSOURCE '"DELETE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted var objects in the basis', NAMEINSOURCE '"DELETE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on standard objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on standard objects in the basis', NAMEINSOURCE '"LOCK_SHARE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on keyed objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on keyed objects in the basis', NAMEINSOURCE '"LOCK_SHARE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on var objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on var objects in the basis', NAMEINSOURCE '"LOCK_SHARE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_CALLED_COUNT long OPTIONS (ANNOTATION 'Number of OMS release calls', NAMEINSOURCE '"RELEASE_CALLED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_COUNT long OPTIONS (ANNOTATION 'Number of released standard objects', NAMEINSOURCE '"RELEASE_EXECUTED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of releases keyed objects', NAMEINSOURCE '"RELEASE_EXECUTED_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of releases var objects', NAMEINSOURCE '"RELEASE_EXECUTED_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_HOP_COUNT long OPTIONS (ANNOTATION 'Number of hops in the history chain during deref', NAMEINSOURCE '"HISTORY_HOP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_HISTORY_HOP_COUNT long OPTIONS (ANNOTATION 'Number of hops in the history chain during iteration', NAMEINSOURCE '"ITER_HISTORY_HOP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of dbp-exceptions thrown', NAMEINSOURCE '"EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OUT_OF_DATE_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of out-of-date-exceptions thrown', NAMEINSOURCE '"OUT_OF_DATE_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OUT_OF_MEMORY_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of out-of-memory-exceptions thrown', NAMEINSOURCE '"OUT_OF_MEMORY_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of timeout-exceptions thrown', NAMEINSOURCE '"TIMEOUT_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_TERMINATE_COUNT long OPTIONS (ANNOTATION 'Number of OMS terminate calls', NAMEINSOURCE '"OMS_TERMINATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBTRANSACTION_ROLLBACK_COUNT long OPTIONS (ANNOTATION 'Number of rolled back sub-transactions', NAMEINSOURCE '"SUBTRANSACTION_ROLLBACK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBTRANSACTION_COMMIT_COUNT long OPTIONS (ANNOTATION 'Number of committed sub-transactions', NAMEINSOURCE '"SUBTRANSACTION_COMMIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SUBTRANSACTION_LEVEL long OPTIONS (ANNOTATION 'Maximal subtransaction level', NAMEINSOURCE '"MAX_SUBTRANSACTION_LEVEL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_CONSISTENT_VIEW_COUNT long OPTIONS (ANNOTATION 'Number of new-consistent-view calls with objects', NAMEINSOURCE '"NEW_CONSISTENT_VIEW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_NEW_CONSISTENT_VIEW_WAIT_TIME long OPTIONS (ANNOTATION 'Average wait time of new-consistent-view calls with objects', NAMEINSOURCE '"AVERAGE_NEW_CONSISTENT_VIEW_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_CONSISTENT_VIEW_MAX_WAIT_TIME long OPTIONS (ANNOTATION 'Maximal wait time of new-consistent-view calls with objects', NAMEINSOURCE '"NEW_CONSISTENT_VIEW_MAX_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_CACHE_HIT_COUNT long OPTIONS (ANNOTATION 'Number of cache hits in the key-cache', NAMEINSOURCE '"KEY_CACHE_HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_MISS_CACHE_HIT_COUNT long OPTIONS (ANNOTATION 'Number of cache hits in the key-miss-cache', NAMEINSOURCE '"KEY_MISS_CACHE_HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VERSION_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of key-derefs in an OMS version on objects created in this version', NAMEINSOURCE '"DEREF_VERSION_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_REHASH_COUNT long OPTIONS (ANNOTATION 'Number of rehashes of the OMS-object-hash', NAMEINSOURCE '"OMS_REHASH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_HASH_CHAIN_SEARCH_LENGTH long OPTIONS (ANNOTATION 'Average search length on the hash-chains of the OMS-object-hash', NAMEINSOURCE '"AVERAGE_HASH_CHAIN_SEARCH_LENGTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_HASH_CHAIN_LENGTH long OPTIONS (ANNOTATION 'Maximum length of a hash-chain of the OMS-object-hash', NAMEINSOURCE '"MAX_HASH_CHAIN_LENGTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_CREATE_COUNT long OPTIONS (ANNOTATION 'Number of created OMS versions', NAMEINSOURCE '"VERSION_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_OPEN_COUNT long OPTIONS (ANNOTATION 'Number of open-version calls', NAMEINSOURCE '"VERSION_OPEN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_CLOSE_COUNT long OPTIONS (ANNOTATION 'Number of close-version calls', NAMEINSOURCE '"VERSION_CLOSE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_DROP_COUNT long OPTIONS (ANNOTATION 'Number of dropped OMS versions', NAMEINSOURCE '"VERSION_DROP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_ALLOC_COUNT long OPTIONS (ANNOTATION 'Number of allocations via a user allocator', NAMEINSOURCE '"USER_ALLOC_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MAX_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_MAX_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MIN_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_MIN_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_AVERAGE_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_AVERAGE_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_DELETE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations via a user allocator', NAMEINSOURCE '"USER_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MAX_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_MAX_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MIN_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_MIN_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_AVERAGE_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_AVERAGE_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_DELTA_MAX_SIZE long OPTIONS (ANNOTATION 'Maximal difference between allocation and deallocation on a user allocator during the execution of a method', NAMEINSOURCE '"USER_DELTA_MAX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_ALLOC_COUNT long OPTIONS (ANNOTATION 'Number of allocations via an OMS internal allocator', NAMEINSOURCE '"OMS_ALLOC_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MAX_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MAX_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MIN_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MIN_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_AVERAGE_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_AVERAGE_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_DELETE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations via an OMS internal allocator', NAMEINSOURCE '"OMS_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MAX_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MAX_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MIN_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MIN_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_AVERAGE_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_AVERAGE_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_DELTA_MAX_SIZE long OPTIONS (ANNOTATION 'Maximum difference between allocation and deallocation on an OMS internal allocator during the execution of a method', NAMEINSOURCE '"OMS_DELTA_MAX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_COMMUNICATION_TIME long OPTIONS (ANNOTATION 'Average stream communication time', NAMEINSOURCE '"STREAM_COMMUNICATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_READ_COUNT long OPTIONS (ANNOTATION 'Number of communications for reading ABAP tables', NAMEINSOURCE '"STREAM_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_WRITE_COUNT long OPTIONS (ANNOTATION 'Number of communications for writing ABAP tables', NAMEINSOURCE '"STREAM_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_READ_ROW_COUNT long OPTIONS (ANNOTATION 'Number of rows read from ABAP tables', NAMEINSOURCE '"STREAM_READ_ROW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_WRITE_ROW_COUNT long OPTIONS (ANNOTATION 'Number of rows written to ABAP tables', NAMEINSOURCE '"STREAM_WRITE_ROW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LIVECACHE_PROCEDURE_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LIVECACHE_SCHEMA_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_SCHEMA_HANDLE integer OPTIONS (ANNOTATION 'OMS schema ID', NAMEINSOURCE '"OMS_SCHEMA_HANDLE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_SCHEMA_NAME string(96) OPTIONS (ANNOTATION 'OMS schema name', NAMEINSOURCE '"OMS_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Create timestamp', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LIVECACHE_SCHEMA_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LIVECACHE_SCHEMA_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_SCHEMA_HANDLE integer OPTIONS (ANNOTATION 'OMS schema ID', NAMEINSOURCE '"OMS_SCHEMA_HANDLE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_SCHEMA_NAME string(96) OPTIONS (ANNOTATION 'OMS schema name', NAMEINSOURCE '"OMS_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Create timestamp', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LIVECACHE_SCHEMA_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LOCK_WAITS_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_TYPE string(32) OPTIONS (ANNOTATION 'Lock type: RECORD, TABLE, METADATA', NAMEINSOURCE '"LOCK_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TOTAL_LOCK_WAITS long OPTIONS (ANNOTATION 'Total lock wait count', NAMEINSOURCE '"TOTAL_LOCK_WAITS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Total lock wait duration (unit: micro second)', NAMEINSOURCE '"TOTAL_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LOCK_WAITS_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LOG_BUFFERS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOG_MODE string(16) OPTIONS (ANNOTATION 'Log mode', NAMEINSOURCE '"LOG_MODE"', NATIVE_TYPE 'VARCHAR'),
    BUFFER_SIZE long OPTIONS (ANNOTATION 'Size of one log buffer in memory', NAMEINSOURCE '"BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BUFFER_COUNT long OPTIONS (ANNOTATION 'Count of log buffers in memory', NAMEINSOURCE '"BUFFER_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEGMENT_SIZE long OPTIONS (ANNOTATION 'Maximum size of one log segment', NAMEINSOURCE '"SEGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKUP_ENABLED string(5) OPTIONS (ANNOTATION 'Log segment backup enabled: ''TRUE''/''FALSE'' (''FALSE'' on log backup history broken)', NAMEINSOURCE '"BACKUP_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    BACKUP_TIMEOUT long OPTIONS (ANNOTATION 'Log segment backup timeout', NAMEINSOURCE '"BACKUP_TIMEOUT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_NOWAIT_COUNT long OPTIONS (ANNOTATION 'Count of buffer switches without blocking on buffer semaphore', NAMEINSOURCE '"SWITCH_NOWAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of buffer switches with blocking on buffer semaphore', NAMEINSOURCE '"SWITCH_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_OPEN_COUNT long OPTIONS (ANNOTATION 'Count of ignored still-open buffer switches (resolved races)', NAMEINSOURCE '"SWITCH_OPEN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LOG_BUFFERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LOG_BUFFERS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOG_MODE string(16) OPTIONS (ANNOTATION 'Log mode', NAMEINSOURCE '"LOG_MODE"', NATIVE_TYPE 'VARCHAR'),
    BUFFER_SIZE long OPTIONS (ANNOTATION 'Size of one log buffer in memory', NAMEINSOURCE '"BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BUFFER_COUNT long OPTIONS (ANNOTATION 'Count of log buffers in memory', NAMEINSOURCE '"BUFFER_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEGMENT_SIZE long OPTIONS (ANNOTATION 'Maximum size of one log segment', NAMEINSOURCE '"SEGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKUP_ENABLED string(5) OPTIONS (ANNOTATION 'Log segment backup enabled: ''TRUE''/''FALSE'' (''FALSE'' on log backup history broken)', NAMEINSOURCE '"BACKUP_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    BACKUP_TIMEOUT long OPTIONS (ANNOTATION 'Log segment backup timeout', NAMEINSOURCE '"BACKUP_TIMEOUT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_NOWAIT_COUNT long OPTIONS (ANNOTATION 'Count of buffer switches without blocking on buffer semaphore', NAMEINSOURCE '"SWITCH_NOWAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of buffer switches with blocking on buffer semaphore', NAMEINSOURCE '"SWITCH_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_OPEN_COUNT long OPTIONS (ANNOTATION 'Count of ignored still-open buffer switches (resolved races)', NAMEINSOURCE '"SWITCH_OPEN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LOG_BUFFERS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LOG_PARTITIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARTITION_ID long OPTIONS (ANNOTATION 'Log partition ID', NAMEINSOURCE '"PARTITION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PATH string(512) OPTIONS (ANNOTATION 'Log partition root path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    LAST_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (last)', NAMEINSOURCE '"LAST_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (max)', NAMEINSOURCE '"MAX_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (min)', NAMEINSOURCE '"MIN_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (total)', NAMEINSOURCE '"SUM_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (avg)', NAMEINSOURCE '"AVG_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (last)', NAMEINSOURCE '"LAST_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (max)', NAMEINSOURCE '"MAX_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (min)', NAMEINSOURCE '"MIN_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (total)', NAMEINSOURCE '"SUM_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (avg)', NAMEINSOURCE '"AVG_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (last)', NAMEINSOURCE '"LAST_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (max)', NAMEINSOURCE '"MAX_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (min)', NAMEINSOURCE '"MIN_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (total)', NAMEINSOURCE '"SUM_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (avg)', NAMEINSOURCE '"AVG_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (last)', NAMEINSOURCE '"LAST_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (max)', NAMEINSOURCE '"MAX_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (min)', NAMEINSOURCE '"MIN_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (total)', NAMEINSOURCE '"SUM_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (avg)', NAMEINSOURCE '"AVG_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (last)', NAMEINSOURCE '"LAST_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (max)', NAMEINSOURCE '"MAX_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (min)', NAMEINSOURCE '"MIN_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (total)', NAMEINSOURCE '"SUM_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (avg)', NAMEINSOURCE '"AVG_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARED_BUFFERS long OPTIONS (ANNOTATION 'Count of buffers prepared for I/O', NAMEINSOURCE '"PREPARED_BUFFERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITTEN_BUFFERS long OPTIONS (ANNOTATION 'Count of completed and written buffers', NAMEINSOURCE '"WRITTEN_BUFFERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITTEN_BUFFERS_OOO long OPTIONS (ANNOTATION 'Count of buffers written out-of-order', NAMEINSOURCE '"WRITTEN_BUFFERS_OOO"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_SEGMENT_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of new log segment requests', NAMEINSOURCE '"NEW_SEGMENT_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently free log segments', NAMEINSOURCE '"FREE_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently in-backup log segments', NAMEINSOURCE '"IN_BACKUP_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP_TRUNCATED_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently in-backup truncated log segments', NAMEINSOURCE '"IN_BACKUP_TRUNCATED_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKED_UP_SEGMENTS long OPTIONS (ANNOTATION 'Count of log segments backed up so far', NAMEINSOURCE '"BACKED_UP_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SEGMENTS long OPTIONS (ANNOTATION 'Total log segment count in the partition', NAMEINSOURCE '"TOTAL_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_IN_LOAD long OPTIONS (ANNOTATION 'Count of segments in-load during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_IN_LOAD"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_WAITING_FOR_LOAD long OPTIONS (ANNOTATION 'Count of segments waiting for load during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_WAITING_FOR_LOAD"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_IN_PROCESS long OPTIONS (ANNOTATION 'Count of segments in process during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_IN_PROCESS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_PROCESSED long OPTIONS (ANNOTATION 'Count of segments processed during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_PROCESSED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_COUNT long OPTIONS (ANNOTATION 'Count of commits', NAMEINSOURCE '"COMMIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (last)', NAMEINSOURCE '"LAST_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (max)', NAMEINSOURCE '"MAX_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (min)', NAMEINSOURCE '"MIN_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (total)', NAMEINSOURCE '"SUM_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (avg)', NAMEINSOURCE '"AVG_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LOG_PARTITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LOG_PARTITIONS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARTITION_ID long OPTIONS (ANNOTATION 'Log partition ID', NAMEINSOURCE '"PARTITION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PATH string(512) OPTIONS (ANNOTATION 'Log partition root path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    LAST_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (last)', NAMEINSOURCE '"LAST_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (max)', NAMEINSOURCE '"MAX_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (min)', NAMEINSOURCE '"MIN_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (total)', NAMEINSOURCE '"SUM_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (avg)', NAMEINSOURCE '"AVG_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (last)', NAMEINSOURCE '"LAST_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (max)', NAMEINSOURCE '"MAX_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (min)', NAMEINSOURCE '"MIN_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (total)', NAMEINSOURCE '"SUM_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (avg)', NAMEINSOURCE '"AVG_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (last)', NAMEINSOURCE '"LAST_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (max)', NAMEINSOURCE '"MAX_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (min)', NAMEINSOURCE '"MIN_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (total)', NAMEINSOURCE '"SUM_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (avg)', NAMEINSOURCE '"AVG_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (last)', NAMEINSOURCE '"LAST_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (max)', NAMEINSOURCE '"MAX_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (min)', NAMEINSOURCE '"MIN_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (total)', NAMEINSOURCE '"SUM_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (avg)', NAMEINSOURCE '"AVG_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (last)', NAMEINSOURCE '"LAST_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (max)', NAMEINSOURCE '"MAX_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (min)', NAMEINSOURCE '"MIN_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (total)', NAMEINSOURCE '"SUM_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (avg)', NAMEINSOURCE '"AVG_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARED_BUFFERS long OPTIONS (ANNOTATION 'Count of buffers prepared for I/O', NAMEINSOURCE '"PREPARED_BUFFERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITTEN_BUFFERS long OPTIONS (ANNOTATION 'Count of completed and written buffers', NAMEINSOURCE '"WRITTEN_BUFFERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITTEN_BUFFERS_OOO long OPTIONS (ANNOTATION 'Count of buffers written out-of-order', NAMEINSOURCE '"WRITTEN_BUFFERS_OOO"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_SEGMENT_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of new log segment requests', NAMEINSOURCE '"NEW_SEGMENT_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently free log segments', NAMEINSOURCE '"FREE_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently in-backup log segments', NAMEINSOURCE '"IN_BACKUP_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP_TRUNCATED_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently in-backup truncated log segments', NAMEINSOURCE '"IN_BACKUP_TRUNCATED_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKED_UP_SEGMENTS long OPTIONS (ANNOTATION 'Count of log segments backed up so far', NAMEINSOURCE '"BACKED_UP_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SEGMENTS long OPTIONS (ANNOTATION 'Total log segment count in the partition', NAMEINSOURCE '"TOTAL_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_IN_LOAD long OPTIONS (ANNOTATION 'Count of segments in-load during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_IN_LOAD"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_WAITING_FOR_LOAD long OPTIONS (ANNOTATION 'Count of segments waiting for load during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_WAITING_FOR_LOAD"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_IN_PROCESS long OPTIONS (ANNOTATION 'Count of segments in process during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_IN_PROCESS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_PROCESSED long OPTIONS (ANNOTATION 'Count of segments processed during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_PROCESSED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_COUNT long OPTIONS (ANNOTATION 'Count of commits', NAMEINSOURCE '"COMMIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (last)', NAMEINSOURCE '"LAST_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (max)', NAMEINSOURCE '"MAX_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (min)', NAMEINSOURCE '"MIN_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (total)', NAMEINSOURCE '"SUM_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (avg)', NAMEINSOURCE '"AVG_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LOG_PARTITIONS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LOG_SEGMENTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARTITION_ID long OPTIONS (ANNOTATION 'Log partition ID', NAMEINSOURCE '"PARTITION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEGMENT_ID long OPTIONS (ANNOTATION 'Log segment ID within partition', NAMEINSOURCE '"SEGMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILE_NAME string(512) OPTIONS (ANNOTATION 'Log segment file name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILE_OFFSET long OPTIONS (ANNOTATION 'Start position of log segment in the file', NAMEINSOURCE '"FILE_OFFSET"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATE string(16) OPTIONS (ANNOTATION 'Log segment state', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    MIN_POSITION long OPTIONS (ANNOTATION 'First position contained in this log segment', NAMEINSOURCE '"MIN_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_POSITION long OPTIONS (ANNOTATION 'Position behind the last log record in this log segment (closed log segments only)', NAMEINSOURCE '"MAX_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOLE_POSITION long OPTIONS (ANNOTATION 'Start position of the log hole before this log segment (equal to min position if no hole)', NAMEINSOURCE '"HOLE_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'Used log segment size in bytes', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'Total log segment size in bytes', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP string(5) OPTIONS (ANNOTATION 'Flag for log segment in backup: ''TRUE''/''FALSE''', NAMEINSOURCE '"IN_BACKUP"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LOG_SEGMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_LOG_SEGMENTS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARTITION_ID long OPTIONS (ANNOTATION 'Log partition ID', NAMEINSOURCE '"PARTITION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEGMENT_ID long OPTIONS (ANNOTATION 'Log segment ID within partition', NAMEINSOURCE '"SEGMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILE_NAME string(512) OPTIONS (ANNOTATION 'Log segment file name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILE_OFFSET long OPTIONS (ANNOTATION 'Start position of log segment in the file', NAMEINSOURCE '"FILE_OFFSET"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATE string(16) OPTIONS (ANNOTATION 'Log segment state', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    MIN_POSITION long OPTIONS (ANNOTATION 'First position contained in this log segment', NAMEINSOURCE '"MIN_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_POSITION long OPTIONS (ANNOTATION 'Position behind the last log record in this log segment (closed log segments only)', NAMEINSOURCE '"MAX_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOLE_POSITION long OPTIONS (ANNOTATION 'Start position of the log hole before this log segment (equal to min position if no hole)', NAMEINSOURCE '"HOLE_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'Used log segment size in bytes', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'Total log segment size in bytes', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP string(5) OPTIONS (ANNOTATION 'Flag for log segment in backup: ''TRUE''/''FALSE''', NAMEINSOURCE '"IN_BACKUP"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_LOG_SEGMENTS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NAME string(256) OPTIONS (ANNOTATION 'Type of memory', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" long OPTIONS (ANNOTATION 'Size of memory', NAMEINSOURCE '"VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_MEMORY_OBJECT_DISPOSITIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(128) OPTIONS (ANNOTATION 'Object (statistic) type)', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    TEMPORARY_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of temporary objects', NAMEINSOURCE '"TEMPORARY_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EARLY_UNLOAD_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of early unload objects', NAMEINSOURCE '"EARLY_UNLOAD_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERNAL_SHORT_TERM_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of internal short term objects', NAMEINSOURCE '"INTERNAL_SHORT_TERM_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_TERM_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of short term objects', NAMEINSOURCE '"SHORT_TERM_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MID_TERM_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of mid term objects', NAMEINSOURCE '"MID_TERM_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LONG_TERM_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of long term objects', NAMEINSOURCE '"LONG_TERM_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NON_SWAPPABLE_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of non swappable objects', NAMEINSOURCE '"NON_SWAPPABLE_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEMPORARY_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of temporary objects', NAMEINSOURCE '"TEMPORARY_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EARLY_UNLOAD_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of early unload objects', NAMEINSOURCE '"EARLY_UNLOAD_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERNAL_SHORT_TERM_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of internal short term objects', NAMEINSOURCE '"INTERNAL_SHORT_TERM_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_TERM_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of short term objects', NAMEINSOURCE '"SHORT_TERM_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MID_TERM_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of mid term objects', NAMEINSOURCE '"MID_TERM_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LONG_TERM_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of long term objects', NAMEINSOURCE '"LONG_TERM_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NON_SWAPPABLE_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of non swappable objects', NAMEINSOURCE '"NON_SWAPPABLE_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_MEMORY_OBJECT_DISPOSITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_MEMORY_OBJECTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(128) OPTIONS (ANNOTATION 'Object (statistic) type', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of objects currently in memory object container', NAMEINSOURCE '"OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of objects currently in memory object container', NAMEINSOURCE '"OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NON_SWAPPABLE_SIZE long OPTIONS (ANNOTATION 'Size of non swappable objects currently in memory object container', NAMEINSOURCE '"NON_SWAPPABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWAPPABLE_SIZE long OPTIONS (ANNOTATION 'Size of swappable objects currently in memory object container', NAMEINSOURCE '"SWAPPABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PUT_COUNT long OPTIONS (ANNOTATION 'Total number of put objects', NAMEINSOURCE '"PUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PUT_SIZE long OPTIONS (ANNOTATION 'Total size of put objects', NAMEINSOURCE '"PUT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICT_COUNT long OPTIONS (ANNOTATION 'Total number of evicted objects', NAMEINSOURCE '"EVICT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICT_SIZE long OPTIONS (ANNOTATION 'Total size of evicted objects', NAMEINSOURCE '"EVICT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEMP_EVICT_COUNT long OPTIONS (ANNOTATION 'Total number of temp-evicted objects', NAMEINSOURCE '"TEMP_EVICT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEMP_EVICT_SIZE long OPTIONS (ANNOTATION 'Total size of temp-evicted objects', NAMEINSOURCE '"TEMP_EVICT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_COUNT long OPTIONS (ANNOTATION 'Total number of resizes', NAMEINSOURCE '"RESIZE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_DELTA_SIZE long OPTIONS (ANNOTATION 'Total size delta changed by resize of objects', NAMEINSOURCE '"RESIZE_DELTA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHRINK_COUNT long OPTIONS (ANNOTATION 'Total number of shrunk objects', NAMEINSOURCE '"SHRINK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHRINK_SIZE long OPTIONS (ANNOTATION 'Total size of shrunk objects', NAMEINSOURCE '"SHRINK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_SHRINK_COUNT long OPTIONS (ANNOTATION 'Total number of objects shrink failed to remove', NAMEINSOURCE '"FAILED_SHRINK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_SHRINK_SIZE long OPTIONS (ANNOTATION 'Total size of objects shrink failed to remove', NAMEINSOURCE '"FAILED_SHRINK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_MEMORY_OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_MEMORY_OBJECTS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(128) OPTIONS (ANNOTATION 'Object (statistic) type', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of objects currently in memory object container', NAMEINSOURCE '"OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of objects currently in memory object container', NAMEINSOURCE '"OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NON_SWAPPABLE_SIZE long OPTIONS (ANNOTATION 'Size of non swappable objects currently in memory object container', NAMEINSOURCE '"NON_SWAPPABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWAPPABLE_SIZE long OPTIONS (ANNOTATION 'Size of swappable objects currently in memory object container', NAMEINSOURCE '"SWAPPABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PUT_COUNT long OPTIONS (ANNOTATION 'Total number of put objects', NAMEINSOURCE '"PUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PUT_SIZE long OPTIONS (ANNOTATION 'Total size of put objects', NAMEINSOURCE '"PUT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICT_COUNT long OPTIONS (ANNOTATION 'Total number of evicted objects', NAMEINSOURCE '"EVICT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICT_SIZE long OPTIONS (ANNOTATION 'Total size of evicted objects', NAMEINSOURCE '"EVICT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEMP_EVICT_COUNT long OPTIONS (ANNOTATION 'Total number of temp-evicted objects', NAMEINSOURCE '"TEMP_EVICT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEMP_EVICT_SIZE long OPTIONS (ANNOTATION 'Total size of temp-evicted objects', NAMEINSOURCE '"TEMP_EVICT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_COUNT long OPTIONS (ANNOTATION 'Total number of resizes', NAMEINSOURCE '"RESIZE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_DELTA_SIZE long OPTIONS (ANNOTATION 'Total size delta changed by resize of objects', NAMEINSOURCE '"RESIZE_DELTA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHRINK_COUNT long OPTIONS (ANNOTATION 'Total number of shrunk objects', NAMEINSOURCE '"SHRINK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHRINK_SIZE long OPTIONS (ANNOTATION 'Total size of shrunk objects', NAMEINSOURCE '"SHRINK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_SHRINK_COUNT long OPTIONS (ANNOTATION 'Total number of objects shrink failed to remove', NAMEINSOURCE '"FAILED_SHRINK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_SHRINK_SIZE long OPTIONS (ANNOTATION 'Total size of objects shrink failed to remove', NAMEINSOURCE '"FAILED_SHRINK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_MEMORY_OBJECTS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_MERGED_TRACES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'Database user', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Application user', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service Name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Update transaction ID', NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATEMENT_ID long OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    THREAD_ID long OPTIONS (ANNOTATION 'ID of thread that wrote trace entry', NAMEINSOURCE '"THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Time when trace entry was written', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TRACE_LEVEL string(16) OPTIONS (ANNOTATION 'Trace level', NAMEINSOURCE '"TRACE_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT string(16) OPTIONS (ANNOTATION 'Trace component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_FILE_NAME string(512) OPTIONS (ANNOTATION 'Source file which contains trace', NAMEINSOURCE '"SOURCE_FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_FILE_LINE long OPTIONS (ANNOTATION 'Source file line', NAMEINSOURCE '"SOURCE_FILE_LINE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRACE_TEXT clob OPTIONS (ANNOTATION 'Traced text', NAMEINSOURCE '"TRACE_TEXT"', NATIVE_TYPE 'NCLOB'),
    TRACE_FILE_NAME string(256) OPTIONS (ANNOTATION 'Name of trace file containing trace entry', NAMEINSOURCE '"TRACE_FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    TRACE_FILE_LINE integer OPTIONS (ANNOTATION 'Trace file line', NAMEINSOURCE '"TRACE_FILE_LINE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Application name', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_SOURCE string(256) OPTIONS (ANNOTATION 'Application source', NAMEINSOURCE '"APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR'),
    PASSPORT_ROOT_CONTEXT_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying source of request', NAMEINSOURCE '"PASSPORT_ROOT_CONTEXT_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_TRANSACTION_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying business transaction', NAMEINSOURCE '"PASSPORT_TRANSACTION_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_CONNECTION_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying connection', NAMEINSOURCE '"PASSPORT_CONNECTION_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_CONNECTION_COUNTER long OPTIONS (ANNOTATION 'SAP EPP Passport connection counter', NAMEINSOURCE '"PASSPORT_CONNECTION_COUNTER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PASSPORT_COMPONENT_NAME string(32) OPTIONS (ANNOTATION 'SAP EPP Passport component name of initial/root context', NAMEINSOURCE '"PASSPORT_COMPONENT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PASSPORT_ACTION string(40) OPTIONS (ANNOTATION 'SAP EPP Passport action', NAMEINSOURCE '"PASSPORT_ACTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_MERGED_TRACES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_MONITOR_COLUMNS" (
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of monitoring view', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of monitoring view column', NAMEINSOURCE '"VIEW_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'Column data type ID', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Column data type name', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the column in a record', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEFAULT_VALUE string(5000) OPTIONS (ANNOTATION 'Default value ', NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    UNIT string(16) OPTIONS (ANNOTATION 'Unit for the value', NAMEINSOURCE '"UNIT"', NATIVE_TYPE 'VARCHAR'),
    COLLATION string(256) OPTIONS (ANNOTATION 'Collation', NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'Length', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Scale', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'TRUE, if NULL value is allowed', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) OPTIONS (ANNOTATION 'Short description of the monitoring view column', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_MONITOR_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_MONITORS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'Name of monitoring view', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(2000) OPTIONS (ANNOTATION 'Short description of the monitoring view', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    RESETTABLE string(5) OPTIONS (ANNOTATION 'Set to TRUE, if values of this monitor can be reset', NAMEINSOURCE '"RESETTABLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_MONITORS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_MUTEXES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_COUNT long OPTIONS (ANNOTATION 'Count of lock calls', NAMEINSOURCE '"LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking lock calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SPURIOUS_WAKEUP_COUNT long OPTIONS (ANNOTATION 'Count of spurious wakeups (collisions on futex)', NAMEINSOURCE '"SPURIOUS_WAKEUP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate in percent', NAMEINSOURCE '"COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OWNER_ID long OPTIONS (ANNOTATION 'Context ID of the owner context', NAMEINSOURCE '"OWNER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (last)', NAMEINSOURCE '"LAST_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (max)', NAMEINSOURCE '"MAX_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (min)', NAMEINSOURCE '"MIN_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (total)', NAMEINSOURCE '"SUM_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (avg)', NAMEINSOURCE '"AVG_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of mutex creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of mutex destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_MUTEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_MUTEXES_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_COUNT long OPTIONS (ANNOTATION 'Count of lock calls', NAMEINSOURCE '"LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking lock calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SPURIOUS_WAKEUP_COUNT long OPTIONS (ANNOTATION 'Count of spurious wakeups (collisions on futex)', NAMEINSOURCE '"SPURIOUS_WAKEUP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate in percent', NAMEINSOURCE '"COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OWNER_ID long OPTIONS (ANNOTATION 'Context ID of the owner context', NAMEINSOURCE '"OWNER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (last)', NAMEINSOURCE '"LAST_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (max)', NAMEINSOURCE '"MAX_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (min)', NAMEINSOURCE '"MIN_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (total)', NAMEINSOURCE '"SUM_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (avg)', NAMEINSOURCE '"AVG_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of mutex creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of mutex destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_MUTEXES_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_MVCC_OVERVIEW" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VERSION_COUNT long OPTIONS (ANNOTATION 'Number of all versions in the host', NAMEINSOURCE '"VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_MVCC_SNAPSHOT_TIMESTAMP long OPTIONS (ANNOTATION 'Minimum MVCC timestamp which at least one transaction holds', NAMEINSOURCE '"MIN_MVCC_SNAPSHOT_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GLOBAL_MVCC_TIMESTAMP long OPTIONS (ANNOTATION 'Current Global MVCC timestamp', NAMEINSOURCE '"GLOBAL_MVCC_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TRANSACTION_ID long OPTIONS (ANNOTATION 'All active transactions can see changes of TRANSACTION IDs less than or equal to MIN_READ_TRANSACTION_ID', NAMEINSOURCE '"MIN_READ_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TRANSACTION_ID long OPTIONS (ANNOTATION 'All write transactions with TRANSACTION ID less than or equal to MIN_WRITE_TRANSACTION_ID are closed', NAMEINSOURCE '"MIN_WRITE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_WRITE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Maximum TRANSACTION ID which will be assigned to next write transaction', NAMEINSOURCE '"NEXT_WRITE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_LOCK_COUNT long OPTIONS (ANNOTATION 'Number of Acquired Records Locks', NAMEINSOURCE '"ACQUIRED_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_VERSIONS_PER_PARTITION long OPTIONS (ANNOTATION 'Max number of versions per partition', NAMEINSOURCE '"MAX_VERSIONS_PER_PARTITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_MVCC_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_MVCC_TABLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NAME string(256) OPTIONS (ANNOTATION 'Name column', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(128) OPTIONS (ANNOTATION 'Value column', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_MVCC_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_OBJECT_LOCK_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Object Type: RECORD, TABLE, VIEW, SYNONYM, SEQUENCE.. ', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name that the Object belongs to', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object Name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition no. (0 for non-partitioned tables, -1 for not supported)', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_ID long OPTIONS (ANNOTATION 'Object ID', NAMEINSOURCE '"OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_TYPE string(32) OPTIONS (ANNOTATION 'Lock Type: OBJECT, RECORD', NAMEINSOURCE '"LOCK_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Lock Wait Count', NAMEINSOURCE '"LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Lock Wait Time (unit: micro second)', NAMEINSOURCE '"LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_FAILED_COUNT long OPTIONS (ANNOTATION 'Lock Failed Count (only supported RECORD type lock failed count)', NAMEINSOURCE '"LOCK_FAILED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_OBJECT_LOCK_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_OBJECT_LOCK_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Object Type: RECORD, TABLE, VIEW, SYNONYM, SEQUENCE.. ', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name that the Object belongs to', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object Name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition no. (0 for non-partitioned tables, -1 for not supported)', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_ID long OPTIONS (ANNOTATION 'Object ID', NAMEINSOURCE '"OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_TYPE string(32) OPTIONS (ANNOTATION 'Lock Type: OBJECT, RECORD', NAMEINSOURCE '"LOCK_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Lock Wait Count', NAMEINSOURCE '"LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Lock Wait Time (unit: micro second)', NAMEINSOURCE '"LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_FAILED_COUNT long OPTIONS (ANNOTATION 'Lock Failed Count (only supported RECORD type lock failed count)', NAMEINSOURCE '"LOCK_FAILED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_OBJECT_LOCK_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_OBJECT_LOCKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_TIME timestamp OPTIONS (ANNOTATION 'Lock acquisition time', NAMEINSOURCE '"ACQUIRED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Object type', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_MODE string(32) OPTIONS (ANNOTATION 'Lock mode: EXCLUSIVE, INTENTIONAL EXCLUSIVE', NAMEINSOURCE '"LOCK_MODE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_OBJECT_LOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_PAGEACCESS_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(32) OPTIONS (ANNOTATION 'Type of pageaccess', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CHUNK_SIZE integer OPTIONS (ANNOTATION 'Chunk size', NAMEINSOURCE '"CHUNK_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOCATE_COUNT long OPTIONS (ANNOTATION 'Number of allocations', NAMEINSOURCE '"ALLOCATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GET_COUNT long OPTIONS (ANNOTATION 'Number of gets', NAMEINSOURCE '"GET_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOAD_COUNT long OPTIONS (ANNOTATION 'Number of synchronous loads', NAMEINSOURCE '"LOAD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_LOAD_COUNT long OPTIONS (ANNOTATION 'Number of asynchronous loads', NAMEINSOURCE '"TRIGGER_LOAD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEALLOCATE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations', NAMEINSOURCE '"DEALLOCATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_PAGEACCESS_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_PAGEACCESS_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(32) OPTIONS (ANNOTATION 'Type of pageaccess', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CHUNK_SIZE integer OPTIONS (ANNOTATION 'Chunk size', NAMEINSOURCE '"CHUNK_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOCATE_COUNT long OPTIONS (ANNOTATION 'Number of allocations', NAMEINSOURCE '"ALLOCATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GET_COUNT long OPTIONS (ANNOTATION 'Number of gets', NAMEINSOURCE '"GET_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOAD_COUNT long OPTIONS (ANNOTATION 'Number of synchronous loads', NAMEINSOURCE '"LOAD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_LOAD_COUNT long OPTIONS (ANNOTATION 'Number of asynchronous loads', NAMEINSOURCE '"TRIGGER_LOAD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEALLOCATE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations', NAMEINSOURCE '"DEALLOCATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_PAGEACCESS_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_PASSWORD_POLICY" (
    PROPERTY string(128) OPTIONS (ANNOTATION 'Configuration property', NAMEINSOURCE '"PROPERTY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(16) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_PASSWORD_POLICY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_PERFTRACE" (
    STATUS string(16) OPTIONS (ANNOTATION 'Status: STOPPED, STARTED, SAVING', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STOP_TIME timestamp OPTIONS (ANNOTATION 'Stop time', NAMEINSOURCE '"STOP_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    FILE_SIZE long OPTIONS (ANNOTATION 'Size of collected trace files. Only valid if stopped and not saved', NAMEINSOURCE '"FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMAINING_SECONDS integer OPTIONS (ANNOTATION 'Remaining seconds until automatic stop', NAMEINSOURCE '"REMAINING_SECONDS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'SQL user name filter', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Application user name filter', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Application name filter', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PASSPORT_TRACELEVEL string(8) OPTIONS (ANNOTATION 'Passport filter: ''MEDIUM''/''HIGH''', NAMEINSOURCE '"PASSPORT_TRACELEVEL"', NATIVE_TYPE 'VARCHAR'),
    PLAN_EXECUTION string(5) OPTIONS (ANNOTATION 'Flag if plan execution details are recorded', NAMEINSOURCE '"PLAN_EXECUTION"', NATIVE_TYPE 'VARCHAR'),
    FUNCTION_PROFILER string(5) OPTIONS (ANNOTATION 'Flag if function profiler details are recorded: ''TRUE''/''FALSE''', NAMEINSOURCE '"FUNCTION_PROFILER"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_PERFTRACE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_PERSISTENCE_ENCRYPTION_KEYS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VALID_FROM_SAVEPOINT integer OPTIONS (ANNOTATION 'Valid from savepoint version', NAMEINSOURCE '"VALID_FROM_SAVEPOINT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VALID_FROM_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Valid from timestamp given in UTC', NAMEINSOURCE '"VALID_FROM_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IS_ENCRYPTED string(5) OPTIONS (ANNOTATION 'Persistence encryption is active: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_ENCRYPTED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_PERSISTENCE_ENCRYPTION_KEYS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_PERSISTENCE_ENCRYPTION_STATUS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ENCRYPTION_ACTIVE string(5) OPTIONS (ANNOTATION 'Encryption is currently active for writing into persistence: ''TRUE''/''FALSE''', NAMEINSOURCE '"ENCRYPTION_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    ENCRYPTION_ACTIVE_AFTER_NEXT_SAVEPOINT string(5) OPTIONS (ANNOTATION 'Encryption will be active for writing into persistence after next savepoint: ''TRUE''/''FALSE''', NAMEINSOURCE '"ENCRYPTION_ACTIVE_AFTER_NEXT_SAVEPOINT"', NATIVE_TYPE 'VARCHAR'),
    KEY_CHANGE_WITH_NEXT_SAVEPOINT string(5) OPTIONS (ANNOTATION 'Next savepoint will activate a new key: ''TRUE''/''FALSE''', NAMEINSOURCE '"KEY_CHANGE_WITH_NEXT_SAVEPOINT"', NATIVE_TYPE 'VARCHAR'),
    ROOT_KEY_CHANGE_WITH_NEXT_SAVEPOINT string(5) OPTIONS (ANNOTATION 'Next savepoint will activate a new root key: ''TRUE''/''FALSE''', NAMEINSOURCE '"ROOT_KEY_CHANGE_WITH_NEXT_SAVEPOINT"', NATIVE_TYPE 'VARCHAR'),
    DATA_CONVERSION_ACTIVE string(5) OPTIONS (ANNOTATION 'Conversion of data to latest encryption status or key active: ''TRUE''/''FALSE''', NAMEINSOURCE '"DATA_CONVERSION_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    KEY_PAGE_ENTRY_COUNT long OPTIONS (ANNOTATION 'Number of entries within key page', NAMEINSOURCE '"KEY_PAGE_ENTRY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_PERSISTENCE_ENCRYPTION_STATUS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_PERSISTENCE_MANAGERS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TID long OPTIONS (ANNOTATION 'Maximum known TID', NAMEINSOURCE '"MAX_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CCH_COUNT long OPTIONS (ANNOTATION 'Count of normal consistent changes (terminated sessions)', NAMEINSOURCE '"CCH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MASS_CCH_COUNT long OPTIONS (ANNOTATION 'Count of consistent changes for mass operations (terminated sessions)', NAMEINSOURCE '"MASS_CCH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (last)', NAMEINSOURCE '"LAST_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (max)', NAMEINSOURCE '"MAX_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (min)', NAMEINSOURCE '"MIN_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (total)', NAMEINSOURCE '"SUM_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (avg)', NAMEINSOURCE '"AVG_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (last)', NAMEINSOURCE '"LAST_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (max)', NAMEINSOURCE '"MAX_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (min)', NAMEINSOURCE '"MIN_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (total)', NAMEINSOURCE '"SUM_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (avg)', NAMEINSOURCE '"AVG_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARE_COMMIT_POS long OPTIONS (ANNOTATION 'Newest known log position of prepare commit (slave only)', NAMEINSOURCE '"PREPARE_COMMIT_POS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MASTER_COMMIT_POS long OPTIONS (ANNOTATION 'Newest known log position of commit record on transaction master from the point of view of this node', NAMEINSOURCE '"MASTER_COMMIT_POS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_WAITERS long OPTIONS (ANNOTATION 'Count of in-doubt waiters for currently-running COMMIT (master only)', NAMEINSOURCE '"INDOUBT_WAITERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_RESTART_COUNT long OPTIONS (ANNOTATION 'Count of open in-doubt transactions before restart (master only)', NAMEINSOURCE '"INDOUBT_RESTART_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_ONLINE_COUNT long OPTIONS (ANNOTATION 'Count of open in-doubt transactions since last restart (master only)', NAMEINSOURCE '"INDOUBT_ONLINE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINT_CONFIG_FREQUENCY long OPTIONS (ANNOTATION 'Configured savepoint frequency', NAMEINSOURCE '"SAVEPOINT_CONFIG_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINT_ACTIVE_FREQUENCY long OPTIONS (ANNOTATION 'Currently active savepoint frequency', NAMEINSOURCE '"SAVEPOINT_ACTIVE_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CHECKSUM_ALGORITHM string(16) OPTIONS (ANNOTATION 'Currently used checksum algorithm for modified pages and log buffers', NAMEINSOURCE '"CHECKSUM_ALGORITHM"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_PERSISTENCE_MANAGERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_PERSISTENCE_MANAGERS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TID long OPTIONS (ANNOTATION 'Maximum known TID', NAMEINSOURCE '"MAX_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CCH_COUNT long OPTIONS (ANNOTATION 'Count of normal consistent changes (terminated sessions)', NAMEINSOURCE '"CCH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MASS_CCH_COUNT long OPTIONS (ANNOTATION 'Count of consistent changes for mass operations (terminated sessions)', NAMEINSOURCE '"MASS_CCH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (last)', NAMEINSOURCE '"LAST_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (max)', NAMEINSOURCE '"MAX_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (min)', NAMEINSOURCE '"MIN_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (total)', NAMEINSOURCE '"SUM_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (avg)', NAMEINSOURCE '"AVG_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (last)', NAMEINSOURCE '"LAST_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (max)', NAMEINSOURCE '"MAX_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (min)', NAMEINSOURCE '"MIN_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (total)', NAMEINSOURCE '"SUM_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (avg)', NAMEINSOURCE '"AVG_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARE_COMMIT_POS long OPTIONS (ANNOTATION 'Newest known log position of prepare commit (slave only)', NAMEINSOURCE '"PREPARE_COMMIT_POS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MASTER_COMMIT_POS long OPTIONS (ANNOTATION 'Newest known log position of commit record on transaction master from the point of view of this node', NAMEINSOURCE '"MASTER_COMMIT_POS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_WAITERS long OPTIONS (ANNOTATION 'Count of in-doubt waiters for currently-running COMMIT (master only)', NAMEINSOURCE '"INDOUBT_WAITERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_RESTART_COUNT long OPTIONS (ANNOTATION 'Count of open in-doubt transactions before restart (master only)', NAMEINSOURCE '"INDOUBT_RESTART_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_ONLINE_COUNT long OPTIONS (ANNOTATION 'Count of open in-doubt transactions since last restart (master only)', NAMEINSOURCE '"INDOUBT_ONLINE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINT_CONFIG_FREQUENCY long OPTIONS (ANNOTATION 'Configured savepoint frequency', NAMEINSOURCE '"SAVEPOINT_CONFIG_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINT_ACTIVE_FREQUENCY long OPTIONS (ANNOTATION 'Currently active savepoint frequency', NAMEINSOURCE '"SAVEPOINT_ACTIVE_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CHECKSUM_ALGORITHM string(16) OPTIONS (ANNOTATION 'Currently used checksum algorithm for modified pages and log buffers', NAMEINSOURCE '"CHECKSUM_ALGORITHM"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_PERSISTENCE_MANAGERS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_PLUGIN_MANIFESTS" (
    PLUGIN_NAME string(32) OPTIONS (ANNOTATION 'Plugin name', NAMEINSOURCE '"PLUGIN_NAME"', NATIVE_TYPE 'VARCHAR'),
    KEY string(64) OPTIONS (ANNOTATION 'Key', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_PLUGIN_MANIFESTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_PREPARED_STATEMENTS" (
    HOST string(64) NOT NULL OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer NOT NULL OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer NOT NULL OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Prepared statement ID', NAMEINSOURCE '"STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    START_MVCC_TIMESTAMP long OPTIONS (ANNOTATION 'Internal MVCC timestamp of the transaction start time', NAMEINSOURCE '"START_MVCC_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPILED_TIME timestamp OPTIONS (ANNOTATION 'Compilation timestamp of the statement', NAMEINSOURCE '"COMPILED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATEMENT_STATUS string(128) OPTIONS (ANNOTATION 'Status of SQL statement', NAMEINSOURCE '"STATEMENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'SQL statement', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    ALLOCATED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Current snapshot of allocated memory size for executing this statement', NAMEINSOURCE '"ALLOCATED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Current snapshot of used memory size for executing this statement', NAMEINSOURCE '"USED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_ID long OPTIONS (ANNOTATION 'Logical plan ID', NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_EXECUTED_TIME timestamp OPTIONS (ANNOTATION 'Recently executed time of statement. This timestamp is updated when opening cursors and executing DML/DDL but not when fetching cursor results or closing cursors.', NAMEINSOURCE '"LAST_EXECUTED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_ACTION_TIME timestamp OPTIONS (ANNOTATION 'Recently performed time of action against the statement. This timestamp is updated when opening cursors, executing DML/DDL, fetching results, and closing cursors.', NAMEINSOURCE '"LAST_ACTION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RECOMPILE_COUNT long OPTIONS (ANNOTATION 'Recompile count', NAMEINSOURCE '"RECOMPILE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT long OPTIONS (ANNOTATION 'Count of executions', NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_TIME long OPTIONS (ANNOTATION 'Average time of statement execution', NAMEINSOURCE '"AVG_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum time of statement execution', NAMEINSOURCE '"MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_TIME long OPTIONS (ANNOTATION 'Minimum time of statement execution', NAMEINSOURCE '"MIN_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Sum of statement execution time', NAMEINSOURCE '"TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CURSOR_DURATION long OPTIONS (ANNOTATION 'Average time of statement execution including communication time with clients', NAMEINSOURCE '"AVG_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CURSOR_DURATION long OPTIONS (ANNOTATION 'Maximum time of statement execution including communication time with clients', NAMEINSOURCE '"MAX_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Minimum time of statement execution including communication time with clients', NAMEINSOURCE '"MIN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CURSOR_DURATION long OPTIONS (ANNOTATION 'Sum of statement execution time including communication time with clients', NAMEINSOURCE '"TOTAL_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Average memory size used during each execution', NAMEINSOURCE '"AVG_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Maximum memory size used during each execution', NAMEINSOURCE '"MAX_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Minimum memory size used during each execution', NAMEINSOURCE '"MIN_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Sum of memory size used during each execution', NAMEINSOURCE '"TOTAL_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Average lock wait time for the statement', NAMEINSOURCE '"AVG_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Maximum lock wait time for the statement', NAMEINSOURCE '"MAX_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Minimum lock wait time for the statement', NAMEINSOURCE '"MIN_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCKWAIT_COUNT long OPTIONS (ANNOTATION 'Total lock wait count for the statement', NAMEINSOURCE '"TOTAL_LOCKWAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Accumulated lock wait time for the statement', NAMEINSOURCE '"TOTAL_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (ANNOTATION 'Average time of statement preparation', NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (ANNOTATION 'Maximum time of statement preparation', NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Minimum time of statement preparation', NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (ANNOTATION 'Total time of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_COUNT long OPTIONS (ANNOTATION 'Total count of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HAS_HOLDABLE_CURSOR string(5) OPTIONS (ANNOTATION 'Holdable cursor existence', NAMEINSOURCE '"HAS_HOLDABLE_CURSOR"', NATIVE_TYPE 'VARCHAR'),
    CURSOR_TYPE string(18) OPTIONS (ANNOTATION 'Type of cursor', NAMEINSOURCE '"CURSOR_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PARENT_STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Parent prepared statement ID', NAMEINSOURCE '"PARENT_STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    APPLICATION_SOURCE string(256) OPTIONS (ANNOTATION 'Application source information', NAMEINSOURCE '"APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_PREPARED_STATEMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_QUERY_CACHED_PLANS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'Username who prepared the plan', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name where the query plan belongs to . ', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ABAP_VARCHAR_MODE string(5) OPTIONS (NAMEINSOURCE '"ABAP_VARCHAR_MODE"', NATIVE_TYPE 'VARCHAR'),
    IS_REMOTE string(5) OPTIONS (NAMEINSOURCE '"IS_REMOTE"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_STRING clob OPTIONS (NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    PLAN_ID long OPTIONS (NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REFERENCE_COUNT long OPTIONS (NAMEINSOURCE '"REFERENCE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_MEMORY_SIZE long OPTIONS (NAMEINSOURCE '"USED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARING_TYPE string(128) OPTIONS (NAMEINSOURCE '"SHARING_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OWNER_CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"OWNER_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_QUERY_CACHED_PLANS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_READWRITELOCKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_ID long OPTIONS (ANNOTATION 'Context ID of the owner context (for exclusive/intent locks)', NAMEINSOURCE '"OWNER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of exclusive lock calls', NAMEINSOURCE '"EXCLUSIVE_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking exclusive lock calls', NAMEINSOURCE '"EXCLUSIVE_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on exclusive lock', NAMEINSOURCE '"EXCLUSIVE_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on exclusive lock in percent', NAMEINSOURCE '"EXCLUSIVE_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (last)', NAMEINSOURCE '"LAST_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (max)', NAMEINSOURCE '"MAX_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (min)', NAMEINSOURCE '"MIN_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (total)', NAMEINSOURCE '"SUM_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (avg)', NAMEINSOURCE '"AVG_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of intent lock calls', NAMEINSOURCE '"INTENT_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking intent lock calls', NAMEINSOURCE '"INTENT_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on intent lock', NAMEINSOURCE '"INTENT_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timed out intent lock calls', NAMEINSOURCE '"INTENT_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on intent lock in percent', NAMEINSOURCE '"INTENT_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (last)', NAMEINSOURCE '"LAST_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (max)', NAMEINSOURCE '"MAX_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (min)', NAMEINSOURCE '"MIN_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (total)', NAMEINSOURCE '"SUM_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (avg)', NAMEINSOURCE '"AVG_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of shared lock calls', NAMEINSOURCE '"SHARED_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking shared lock calls', NAMEINSOURCE '"SHARED_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on shared lock', NAMEINSOURCE '"SHARED_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timed out shared lock calls', NAMEINSOURCE '"SHARED_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on shared lock in percent', NAMEINSOURCE '"SHARED_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (last)', NAMEINSOURCE '"LAST_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (max)', NAMEINSOURCE '"MAX_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (min)', NAMEINSOURCE '"MIN_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (total)', NAMEINSOURCE '"SUM_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (avg)', NAMEINSOURCE '"AVG_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLLISION_RATE double OPTIONS (ANNOTATION 'Global collision rate', NAMEINSOURCE '"COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of read/write lock creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of read/write lock destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_READWRITELOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_READWRITELOCKS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_ID long OPTIONS (ANNOTATION 'Context ID of the owner context (for exclusive/intent locks)', NAMEINSOURCE '"OWNER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of exclusive lock calls', NAMEINSOURCE '"EXCLUSIVE_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking exclusive lock calls', NAMEINSOURCE '"EXCLUSIVE_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on exclusive lock', NAMEINSOURCE '"EXCLUSIVE_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on exclusive lock in percent', NAMEINSOURCE '"EXCLUSIVE_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (last)', NAMEINSOURCE '"LAST_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (max)', NAMEINSOURCE '"MAX_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (min)', NAMEINSOURCE '"MIN_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (total)', NAMEINSOURCE '"SUM_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (avg)', NAMEINSOURCE '"AVG_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of intent lock calls', NAMEINSOURCE '"INTENT_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking intent lock calls', NAMEINSOURCE '"INTENT_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on intent lock', NAMEINSOURCE '"INTENT_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timed out intent lock calls', NAMEINSOURCE '"INTENT_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on intent lock in percent', NAMEINSOURCE '"INTENT_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (last)', NAMEINSOURCE '"LAST_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (max)', NAMEINSOURCE '"MAX_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (min)', NAMEINSOURCE '"MIN_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (total)', NAMEINSOURCE '"SUM_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (avg)', NAMEINSOURCE '"AVG_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of shared lock calls', NAMEINSOURCE '"SHARED_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking shared lock calls', NAMEINSOURCE '"SHARED_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on shared lock', NAMEINSOURCE '"SHARED_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timed out shared lock calls', NAMEINSOURCE '"SHARED_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on shared lock in percent', NAMEINSOURCE '"SHARED_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (last)', NAMEINSOURCE '"LAST_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (max)', NAMEINSOURCE '"MAX_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (min)', NAMEINSOURCE '"MIN_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (total)', NAMEINSOURCE '"SUM_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (avg)', NAMEINSOURCE '"AVG_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLLISION_RATE double OPTIONS (ANNOTATION 'Global collision rate', NAMEINSOURCE '"COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of read/write lock creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of read/write lock destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_READWRITELOCKS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_RECORD_LOCKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_TIME timestamp OPTIONS (ANNOTATION 'Lock acquisition time', NAMEINSOURCE '"ACQUIRED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RECORD_ID string(256) OPTIONS (ANNOTATION 'Record ID', NAMEINSOURCE '"RECORD_ID"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    LOCK_MODE string(32) OPTIONS (ANNOTATION 'Lock mode:I (Exclusive Lock)', NAMEINSOURCE '"LOCK_MODE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_RECORD_LOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_REMOTE_CONNECTIONS" (
    CONNECTION_ID integer NOT NULL OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOTE_SOURCE_NAME string(256) OPTIONS (ANNOTATION 'Remote source name', NAMEINSOURCE '"REMOTE_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ADAPTER_NAME string(256) OPTIONS (ANNOTATION 'Adapter name', NAMEINSOURCE '"ADAPTER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_SOURCE_USER_NAME string(256) OPTIONS (ANNOTATION 'Remote source user name', NAMEINSOURCE '"REMOTE_SOURCE_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Connected time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CONNECTION_STATUS string(16) OPTIONS (ANNOTATION 'Connection status: CONNECTED or DISCONNECTED', NAMEINSOURCE '"CONNECTION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    DETAILS string(512) OPTIONS (ANNOTATION 'Adapter properties', NAMEINSOURCE '"DETAILS"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_COUNT long OPTIONS (ANNOTATION 'Number of executed statements', NAMEINSOURCE '"STATEMENT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_REMOTE_CONNECTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_REMOTE_STATEMENTS" (
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOTE_SOURCE_NAME string(256) OPTIONS (ANNOTATION 'Remote source name', NAMEINSOURCE '"REMOTE_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Statement start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_TIME timestamp OPTIONS (ANNOTATION 'Time when the statement is closed', NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    FETCHED_RECORD_COUNT long OPTIONS (ANNOTATION 'Number of fetched records', NAMEINSOURCE '"FETCHED_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_STATEMENT_STATUS string(16) OPTIONS (ANNOTATION 'Statement status: ''EXECUTING''/''CLOSED''', NAMEINSOURCE '"REMOTE_STATEMENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    REMOTE_STATEMENT_STRING clob OPTIONS (ANNOTATION 'Statement string', NAMEINSOURCE '"REMOTE_STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_REMOTE_STATEMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_REORG_ALGORITHMS" (
    ALGORITHM_ID integer OPTIONS (ANNOTATION 'ID of algorithm', NAMEINSOURCE '"ALGORITHM_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESCRIPTION string(256) OPTIONS (ANNOTATION 'Description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR'),
    PARAMETERS string(256) OPTIONS (ANNOTATION 'Optional parameters', NAMEINSOURCE '"PARAMETERS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_REORG_ALGORITHMS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_REPO_TRANSPORT_FILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME string(256) OPTIONS (ANNOTATION 'File name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILE_SIZE long OPTIONS (ANNOTATION 'File size', NAMEINSOURCE '"FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILE_MTIME timestamp OPTIONS (ANNOTATION 'File date', NAMEINSOURCE '"FILE_MTIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_REPO_TRANSPORT_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_RS_INDEXES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Index name', NAMEINSOURCE '"INDEX_NAME"', NATIVE_TYPE 'NVARCHAR'),
    KEY_TYPE string(128) OPTIONS (ANNOTATION 'Key type (data type or composite)', NAMEINSOURCE '"KEY_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_STATUS string(16) OPTIONS (ANNOTATION 'Index status: ''VALID''/''INVALID''/''UNUSABLE''', NAMEINSOURCE '"INDEX_STATUS"', NATIVE_TYPE 'VARCHAR'),
    TREE_HEIGHT long OPTIONS (ANNOTATION 'B-tree level', NAMEINSOURCE '"TREE_HEIGHT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LEAF_NODE_COUNT long OPTIONS (ANNOTATION 'Number of leaf nodes', NAMEINSOURCE '"LEAF_NODE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NONLEAF_NODE_COUNT long OPTIONS (ANNOTATION 'Number of intermediate nodes', NAMEINSOURCE '"NONLEAF_NODE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NODE_SIZE long OPTIONS (ANNOTATION 'Node size', NAMEINSOURCE '"NODE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FANOUT double OPTIONS (ANNOTATION 'Index fan-out', NAMEINSOURCE '"FANOUT"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    BULKLOAD_FACTOR double OPTIONS (ANNOTATION 'Fill factor of creating or recovering indexes', NAMEINSOURCE '"BULKLOAD_FACTOR"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    INDEX_SIZE long OPTIONS (ANNOTATION 'Index size in memory = number of nodes * node size', NAMEINSOURCE '"INDEX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTRY_COUNT long OPTIONS (ANNOTATION 'Number of indexed records', NAMEINSOURCE '"ENTRY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_LEAF_NODE_COUNT long OPTIONS (ANNOTATION 'Number of fixed leaf nodes. ''FIXED'' means that the key lengths of all entries in the node have the same value', NAMEINSOURCE '"FIXED_LEAF_NODE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_NONLEAF_NODE_COUNT long OPTIONS (ANNOTATION 'Number of fixed non-leaf nodes', NAMEINSOURCE '"FIXED_NONLEAF_NODE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_LEAF_OFFSET_SIZE double OPTIONS (ANNOTATION 'Average offset size of leaf nodes', NAMEINSOURCE '"AVG_LEAF_OFFSET_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    AVG_NONLEAF_OFFSET_SIZE double OPTIONS (ANNOTATION 'Average offset size of non-leaf nodes', NAMEINSOURCE '"AVG_NONLEAF_OFFSET_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    AVG_LEAF_POINTER_SIZE double OPTIONS (ANNOTATION 'Average pointer size of leaf nodes', NAMEINSOURCE '"AVG_LEAF_POINTER_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    AVG_NONLEAF_POINTER_SIZE double OPTIONS (ANNOTATION 'Average pointer size of non-leaf nodes', NAMEINSOURCE '"AVG_NONLEAF_POINTER_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LEAF_PARTIAL_KEY_SIZE long OPTIONS (ANNOTATION 'Partial key length of leaf node', NAMEINSOURCE '"LEAF_PARTIAL_KEY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NONLEAF_PARTIAL_KEY_SIZE long OPTIONS (ANNOTATION 'Partial key length of non-leaf node', NAMEINSOURCE '"NONLEAF_PARTIAL_KEY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_UTILIZATION double OPTIONS (ANNOTATION 'Index utilization (num_entries / max_entries)', NAMEINSOURCE '"INDEX_UTILIZATION"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    IS_UNIQUE string(5) OPTIONS (ANNOTATION 'Information whether the index is unique: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNIQUE"', NATIVE_TYPE 'VARCHAR'),
    SEARCH_COUNT long OPTIONS (ANNOTATION 'Number of search operations on this CPB-tree index since monitoring level was changed to 2', NAMEINSOURCE '"SEARCH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSERT_COUNT long OPTIONS (ANNOTATION 'Number of insert operations on this CPB-tree index since monitoring level was changed to 2', NAMEINSOURCE '"INSERT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOVE_COUNT long OPTIONS (ANNOTATION 'Number of remove operations on this CPB-tree index since monitoring level was changed to 2', NAMEINSOURCE '"REMOVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_KEY_REFERENCE_COUNT long OPTIONS (ANNOTATION 'Number of references of full keys on this CPB-tree index since monitoring level was changed to 2. Full key references occur when keys cannot be resolved by partial keys in CPB-tree nodes', NAMEINSOURCE '"FULL_KEY_REFERENCE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DISTINCT_KEY_COUNT long OPTIONS (ANNOTATION 'Number of distinct keys', NAMEINSOURCE '"DISTINCT_KEY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_COUNT long OPTIONS (ANNOTATION 'Number of keys', NAMEINSOURCE '"KEY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ELIMINATED_DUPLICATE_LEAF_NODE_COUNT long OPTIONS (ANNOTATION 'Number of leaf nodes whose duplicate keys are eliminated', NAMEINSOURCE '"ELIMINATED_DUPLICATE_LEAF_NODE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNUSED_LEAF_SLOTS_PER_NODE double OPTIONS (ANNOTATION 'Number of unused slots per leaf node', NAMEINSOURCE '"UNUSED_LEAF_SLOTS_PER_NODE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_RS_INDEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_RS_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Module name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Allocated memory size of the module', NAMEINSOURCE '"ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'Used memory size of the module', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_SIZE long OPTIONS (ANNOTATION 'Free memory size of the module', NAMEINSOURCE '"FREE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_RS_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_RS_TABLE_VERSION_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Name of schema to which the container belongs', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of the container', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_ID integer OPTIONS (ANNOTATION 'Some tables may have several containers to store its data. Container ID is an unique identifier of each container', NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_SYSTEM_TABLE string(5) OPTIONS (ANNOTATION 'TRUE if the table is a system table', NAMEINSOURCE '"IS_SYSTEM_TABLE"', NATIVE_TYPE 'VARCHAR'),
    VERSION_COUNT long OPTIONS (ANNOTATION 'Number of all versions in the container. This includes all versions regardless of their version type and status.', NAMEINSOURCE '"VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSERT_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of insert-versions in the container', NAMEINSOURCE '"INSERT_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of update-versions in the container', NAMEINSOURCE '"UPDATE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete-versions in the container', NAMEINSOURCE '"DELETE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of all committed versions in the container (includes all types)', NAMEINSOURCE '"COMMITTED_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_INSERT_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of committed insert-versions in the container', NAMEINSOURCE '"COMMITTED_INSERT_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_UPDATE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of committed update-versions in the container', NAMEINSOURCE '"COMMITTED_UPDATE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_DELETE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of committed delete-versions in the container', NAMEINSOURCE '"COMMITTED_DELETE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of all uncommitted versions in the container (includes all types)', NAMEINSOURCE '"UNCOMMITTED_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_INSERT_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of uncommitted insert-versions in the container', NAMEINSOURCE '"UNCOMMITTED_INSERT_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_UPDATE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of uncommitted update-versions in the container', NAMEINSOURCE '"UNCOMMITTED_UPDATE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_DELETE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of uncommitted delete-versions in the container', NAMEINSOURCE '"UNCOMMITTED_DELETE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of versions in the container. This includes all versions regardless of their version type and status.', NAMEINSOURCE '"VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSERT_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of insert-versions in the container', NAMEINSOURCE '"INSERT_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of update-versions in the container', NAMEINSOURCE '"UPDATE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of delete-versions in the container', NAMEINSOURCE '"DELETE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of all committed versions in the container (includes all types)', NAMEINSOURCE '"COMMITTED_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_INSERT_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of committed insert-versions in the container', NAMEINSOURCE '"COMMITTED_INSERT_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_UPDATE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of committed update-versions in the container', NAMEINSOURCE '"COMMITTED_UPDATE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_DELETE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of committed delete-versions in the container', NAMEINSOURCE '"COMMITTED_DELETE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of all uncommitted versions in the container (includes all types)', NAMEINSOURCE '"UNCOMMITTED_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_INSERT_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of uncommitted insert-versions in the container', NAMEINSOURCE '"UNCOMMITTED_INSERT_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_UPDATE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of uncommitted update-versions in the container', NAMEINSOURCE '"UNCOMMITTED_UPDATE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_DELETE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of uncommitted delete-versions in the container', NAMEINSOURCE '"UNCOMMITTED_DELETE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_COMMIT_ID long OPTIONS (ANNOTATION 'Each committed version has its commit ID. MIN_COMMIT_ID refers to the minimum value of commit ID among all committed versions', NAMEINSOURCE '"MIN_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_RS_TABLE_VERSION_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_RS_TABLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RECORD_COUNT long OPTIONS (ANNOTATION 'Number of records in this table', NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_FIXED_PART_SIZE long OPTIONS (ANNOTATION 'Allocated memory size for fixed-size part', NAMEINSOURCE '"ALLOCATED_FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_PAGE_HEADER_SIZE long OPTIONS (ANNOTATION 'Allocated and used memory size for page headers of fixed-size part', NAMEINSOURCE '"FIXED_PAGE_HEADER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_PAGE_FRAGMENT_SIZE long OPTIONS (ANNOTATION 'Fragmented memory size of fixed-size part', NAMEINSOURCE '"FIXED_PAGE_FRAGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_FIXED_PART_SIZE long OPTIONS (ANNOTATION 'Used memory size for fixed-size part', NAMEINSOURCE '"USED_FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_PART_FRAGMENT_SIZE long OPTIONS (ANNOTATION 'Fragmented memory size of used fixed-size part', NAMEINSOURCE '"FIXED_PART_FRAGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_PART_FREE_SIZE long OPTIONS (ANNOTATION 'Free memory size in the pages of fixed-size part', NAMEINSOURCE '"FIXED_PART_FREE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_VARIABLE_PART_SIZE long OPTIONS (ANNOTATION 'Allocated memory size for variable-size part', NAMEINSOURCE '"ALLOCATED_VARIABLE_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_VARIABLE_PART_SIZE long OPTIONS (ANNOTATION 'Used memory size for variable-size part', NAMEINSOURCE '"USED_VARIABLE_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VARIABLE_PART_FRAGMENT_SIZE long OPTIONS (ANNOTATION 'Fragmented memory size of used variable-size part', NAMEINSOURCE '"VARIABLE_PART_FRAGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOAD_STATUS string(32) OPTIONS (ANNOTATION 'Loading state of table: ''LOADED''/''NOW_LOADING''/''PREPARING_UNLOAD''/''NOW_UNLOADING''/''UNLOADED''/''NOT_SUPPORTED''', NAMEINSOURCE '"LOAD_STATUS"', NATIVE_TYPE 'VARCHAR'),
    IS_REPLICA string(5) OPTIONS (ANNOTATION 'Flag to indicate replica', NAMEINSOURCE '"IS_REPLICA"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_RS_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SAVEPOINT_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SAVEPOINTS long OPTIONS (ANNOTATION 'Count of executed savepoints', NAMEINSOURCE '"SAVEPOINTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Last savepoint start time clock)', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE string(16) OPTIONS (ANNOTATION 'Last savepoint state', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    VERSION integer OPTIONS (ANNOTATION 'Last savepoint version', NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REQUESTED_FREQUENCY long OPTIONS (ANNOTATION 'Currently active configured savepoint frequency', NAMEINSOURCE '"REQUESTED_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FREQUENCY long OPTIONS (ANNOTATION 'Actual savepoint frequency (time between last two savepoints) (last)', NAMEINSOURCE '"LAST_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FREQUENCY long OPTIONS (ANNOTATION 'Actual savepoint frequency (time between last two savepoints) (avg)', NAMEINSOURCE '"AVG_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_DURATION long OPTIONS (ANNOTATION 'Total time spent creating savepoint (last)', NAMEINSOURCE '"LAST_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_DURATION long OPTIONS (ANNOTATION 'Total time spent creating savepoint (avg)', NAMEINSOURCE '"AVG_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CRITICAL_PHASE_DURATION long OPTIONS (ANNOTATION 'Time spent in critical phase (updates are blocked during this phase) (last)', NAMEINSOURCE '"LAST_CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CRITICAL_PHASE_DURATION long OPTIONS (ANNOTATION 'Time spent in critical phase (updates are blocked during this phase) (avg)', NAMEINSOURCE '"AVG_CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_TOTAL_SIZE long OPTIONS (ANNOTATION 'Total amount of bytes written for a savepoint (last)', NAMEINSOURCE '"LAST_TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TOTAL_SIZE long OPTIONS (ANNOTATION 'Total amount of bytes written for a savepoint (avg)', NAMEINSOURCE '"AVG_TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed pages (last)', NAMEINSOURCE '"LAST_FLUSHED_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_PAGES double OPTIONS (ANNOTATION 'Count of asynchronously flushed pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_PAGES"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_PAGES_IN_CRITICAL_PHASE double OPTIONS (ANNOTATION 'Count of pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_PAGES_IN_CRITICAL_PHASE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_ROWSTORE_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed row store pages (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_PAGES double OPTIONS (ANNOTATION 'Count of asynchronously flushed row store pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_PAGES"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of row store pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE double OPTIONS (ANNOTATION 'Count of row store pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed pages (last)', NAMEINSOURCE '"LAST_FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed row store pages (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed row store pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of row store pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of row store pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_RTT_SIZE long OPTIONS (ANNOTATION 'Total size of rollback transaction table at last savepoint (may be less than sum of components if there are duplicate TIDs)', NAMEINSOURCE '"LAST_RTT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SAVEPOINT_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SAVEPOINT_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SAVEPOINTS long OPTIONS (ANNOTATION 'Count of executed savepoints', NAMEINSOURCE '"SAVEPOINTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Last savepoint start time clock)', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE string(16) OPTIONS (ANNOTATION 'Last savepoint state', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    VERSION integer OPTIONS (ANNOTATION 'Last savepoint version', NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REQUESTED_FREQUENCY long OPTIONS (ANNOTATION 'Currently active configured savepoint frequency', NAMEINSOURCE '"REQUESTED_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FREQUENCY long OPTIONS (ANNOTATION 'Actual savepoint frequency (time between last two savepoints) (last)', NAMEINSOURCE '"LAST_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FREQUENCY long OPTIONS (ANNOTATION 'Actual savepoint frequency (time between last two savepoints) (avg)', NAMEINSOURCE '"AVG_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_DURATION long OPTIONS (ANNOTATION 'Total time spent creating savepoint (last)', NAMEINSOURCE '"LAST_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_DURATION long OPTIONS (ANNOTATION 'Total time spent creating savepoint (avg)', NAMEINSOURCE '"AVG_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CRITICAL_PHASE_DURATION long OPTIONS (ANNOTATION 'Time spent in critical phase (updates are blocked during this phase) (last)', NAMEINSOURCE '"LAST_CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CRITICAL_PHASE_DURATION long OPTIONS (ANNOTATION 'Time spent in critical phase (updates are blocked during this phase) (avg)', NAMEINSOURCE '"AVG_CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_TOTAL_SIZE long OPTIONS (ANNOTATION 'Total amount of bytes written for a savepoint (last)', NAMEINSOURCE '"LAST_TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TOTAL_SIZE long OPTIONS (ANNOTATION 'Total amount of bytes written for a savepoint (avg)', NAMEINSOURCE '"AVG_TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed pages (last)', NAMEINSOURCE '"LAST_FLUSHED_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_PAGES double OPTIONS (ANNOTATION 'Count of asynchronously flushed pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_PAGES"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_PAGES_IN_CRITICAL_PHASE double OPTIONS (ANNOTATION 'Count of pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_PAGES_IN_CRITICAL_PHASE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_ROWSTORE_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed row store pages (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_PAGES double OPTIONS (ANNOTATION 'Count of asynchronously flushed row store pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_PAGES"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of row store pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE double OPTIONS (ANNOTATION 'Count of row store pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed pages (last)', NAMEINSOURCE '"LAST_FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed row store pages (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed row store pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of row store pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of row store pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_RTT_SIZE long OPTIONS (ANNOTATION 'Total size of rollback transaction table at last savepoint (may be less than sum of components if there are duplicate TIDs)', NAMEINSOURCE '"LAST_RTT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SAVEPOINT_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SAVEPOINTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Savepoint start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE string(16) OPTIONS (ANNOTATION 'Savepoint state', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    VERSION integer OPTIONS (ANNOTATION 'Savepoint version', NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REQUESTED_FREQUENCY long OPTIONS (ANNOTATION 'Configured savepoint frequency', NAMEINSOURCE '"REQUESTED_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIME_SINCE_PREVIOUS long OPTIONS (ANNOTATION 'Time between previous and this savepoint', NAMEINSOURCE '"TIME_SINCE_PREVIOUS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DURATION long OPTIONS (ANNOTATION 'Total time spent for creating savepoint', NAMEINSOURCE '"DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CRITICAL_PHASE_START_TIME timestamp OPTIONS (ANNOTATION 'Last critical phase start time)', NAMEINSOURCE '"CRITICAL_PHASE_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CRITICAL_PHASE_DURATION long OPTIONS (ANNOTATION 'Time spent in critical phase (updates are blocked during this)', NAMEINSOURCE '"CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CRITICAL_PHASE_WAIT_TIME long OPTIONS (ANNOTATION 'Wait time for critical phase', NAMEINSOURCE '"CRITICAL_PHASE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'Total amount of bytes written for this savepoint', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed pages', NAMEINSOURCE '"FLUSHED_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of pages flushed in critical phase', NAMEINSOURCE '"FLUSHED_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed row store pages', NAMEINSOURCE '"FLUSHED_ROWSTORE_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of row store pages flushed in critical phase', NAMEINSOURCE '"FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed pages', NAMEINSOURCE '"FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of pages flushed in critical phase', NAMEINSOURCE '"FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed row store pages', NAMEINSOURCE '"FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of row store pages flushed in critical phase', NAMEINSOURCE '"FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RTT_SIZE long OPTIONS (ANNOTATION 'Total size of rollback transaction table at this savepoint', NAMEINSOURCE '"RTT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SAVEPOINTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SEMAPHORES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of wait calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKING_COUNT long OPTIONS (ANNOTATION 'Count of blocking wait calls', NAMEINSOURCE '"BLOCKING_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timeouts', NAMEINSOURCE '"TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_RATE double OPTIONS (ANNOTATION 'Wait rate', NAMEINSOURCE '"WAIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (last)', NAMEINSOURCE '"LAST_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (max)', NAMEINSOURCE '"MAX_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (min)', NAMEINSOURCE '"MIN_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (total)', NAMEINSOURCE '"SUM_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (avg)', NAMEINSOURCE '"AVG_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of semaphore creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of semaphore destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SEMAPHORES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SEMAPHORES_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of wait calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKING_COUNT long OPTIONS (ANNOTATION 'Count of blocking wait calls', NAMEINSOURCE '"BLOCKING_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timeouts', NAMEINSOURCE '"TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_RATE double OPTIONS (ANNOTATION 'Wait rate', NAMEINSOURCE '"WAIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (last)', NAMEINSOURCE '"LAST_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (max)', NAMEINSOURCE '"MAX_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (min)', NAMEINSOURCE '"MIN_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (total)', NAMEINSOURCE '"SUM_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (avg)', NAMEINSOURCE '"AVG_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of semaphore creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of semaphore destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SEMAPHORES_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SEQUENCES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host where the sequence cache exists', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port where the sequence cache exists', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the sequence', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEQUENCE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Sequence name', NAMEINSOURCE '"SEQUENCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CACHE_SIZE short OPTIONS (ANNOTATION 'Cache size of the sequence cache', NAMEINSOURCE '"CACHE_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    START_VALUE long OPTIONS (ANNOTATION 'Start value of the sequence cache', NAMEINSOURCE '"START_VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    END_VALUE long OPTIONS (ANNOTATION 'End value of the sequence cache', NAMEINSOURCE '"END_VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CURRENT_VALUE long OPTIONS (ANNOTATION 'Current value of the sequence cache', NAMEINSOURCE '"CURRENT_VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SEQUENCES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICE_COMPONENT_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host where the service is running', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port where the service is running', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMPONENT string(64) OPTIONS (ANNOTATION 'The logical component for which memory usage is reported', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR'),
    USED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Amount of memory which is currently actually used for the logical component', NAMEINSOURCE '"USED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICE_COMPONENT_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICE_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PROCESS_ID integer OPTIONS (ANNOTATION 'Process ID', NAMEINSOURCE '"PROCESS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOGICAL_MEMORY_SIZE long OPTIONS (ANNOTATION 'Virtual memory size (operating system perspective)', NAMEINSOURCE '"LOGICAL_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PHYSICAL_MEMORY_SIZE long OPTIONS (ANNOTATION 'Physical/resident memory size (operating system perspective)', NAMEINSOURCE '"PHYSICAL_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CODE_SIZE long OPTIONS (ANNOTATION 'Code size, including shared libraries', NAMEINSOURCE '"CODE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STACK_SIZE long OPTIONS (ANNOTATION 'Stack size', NAMEINSOURCE '"STACK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HEAP_MEMORY_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Heap part of the memory pool', NAMEINSOURCE '"HEAP_MEMORY_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HEAP_MEMORY_USED_SIZE long OPTIONS (ANNOTATION 'Amount of pool heap memory that is currently actually in use', NAMEINSOURCE '"HEAP_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_MEMORY_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Shared memory part of the memory pool', NAMEINSOURCE '"SHARED_MEMORY_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_MEMORY_USED_SIZE long OPTIONS (ANNOTATION 'Amount of pool shared memory that is currently actually in use', NAMEINSOURCE '"SHARED_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPACTORS_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Part of the memory pool that can potentially (=if unpinned) be freed on memory shortage', NAMEINSOURCE '"COMPACTORS_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPACTORS_FREEABLE_SIZE long OPTIONS (ANNOTATION 'Memory which can actually be freed on memory shortage', NAMEINSOURCE '"COMPACTORS_FREEABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATION_LIMIT long OPTIONS (ANNOTATION 'Maximum memory pool size (configurable value)', NAMEINSOURCE '"ALLOCATION_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EFFECTIVE_ALLOCATION_LIMIT long OPTIONS (ANNOTATION 'Effective maximum memory pool size, considering pool sizes of other processes (computed value)', NAMEINSOURCE '"EFFECTIVE_ALLOCATION_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_MEMORY_USED_SIZE long OPTIONS (ANNOTATION 'Amount of memory from the memory pool that is currently actually in use', NAMEINSOURCE '"TOTAL_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICE_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICE_NETWORK_IO" (
    SENDER_HOST string(64) OPTIONS (ANNOTATION 'Host name of the sending service', NAMEINSOURCE '"SENDER_HOST"', NATIVE_TYPE 'VARCHAR'),
    SENDER_PORT integer OPTIONS (ANNOTATION 'Port that the sending service listens on', NAMEINSOURCE '"SENDER_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RECEIVER_HOST string(64) OPTIONS (ANNOTATION 'Host name of the receiving service', NAMEINSOURCE '"RECEIVER_HOST"', NATIVE_TYPE 'VARCHAR'),
    RECEIVER_PORT integer OPTIONS (ANNOTATION 'Port that the receiving service listens on', NAMEINSOURCE '"RECEIVER_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEND_SIZE long OPTIONS (ANNOTATION 'Number of bytes sent', NAMEINSOURCE '"SEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVE_SIZE long OPTIONS (ANNOTATION 'Number of bytes received', NAMEINSOURCE '"RECEIVE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEND_DURATION long OPTIONS (ANNOTATION 'Time spent sending', NAMEINSOURCE '"SEND_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVE_DURATION long OPTIONS (ANNOTATION 'Time spent receiving', NAMEINSOURCE '"RECEIVE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUEST_COUNT long OPTIONS (ANNOTATION 'Number of requests handled', NAMEINSOURCE '"REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICE_NETWORK_IO"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICE_NETWORK_IO_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SENDER_HOST string(64) OPTIONS (ANNOTATION 'Host name of the sending service', NAMEINSOURCE '"SENDER_HOST"', NATIVE_TYPE 'VARCHAR'),
    SENDER_PORT integer OPTIONS (ANNOTATION 'Port that the sending service listens on', NAMEINSOURCE '"SENDER_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RECEIVER_HOST string(64) OPTIONS (ANNOTATION 'Host name of the receiving service', NAMEINSOURCE '"RECEIVER_HOST"', NATIVE_TYPE 'VARCHAR'),
    RECEIVER_PORT integer OPTIONS (ANNOTATION 'Port that the receiving service listens on', NAMEINSOURCE '"RECEIVER_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEND_SIZE long OPTIONS (ANNOTATION 'Number of bytes sent', NAMEINSOURCE '"SEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVE_SIZE long OPTIONS (ANNOTATION 'Number of bytes received', NAMEINSOURCE '"RECEIVE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEND_DURATION long OPTIONS (ANNOTATION 'Time spent sending', NAMEINSOURCE '"SEND_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVE_DURATION long OPTIONS (ANNOTATION 'Time spent receiving', NAMEINSOURCE '"RECEIVE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUEST_COUNT long OPTIONS (ANNOTATION 'Number of requests handled', NAMEINSOURCE '"REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICE_NETWORK_IO_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICE_REPLICATION" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SITE_ID integer OPTIONS (ANNOTATION 'Generated site ID', NAMEINSOURCE '"SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SITE_NAME string(256) OPTIONS (ANNOTATION 'Logical site name', NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SECONDARY_HOST string(64) OPTIONS (ANNOTATION 'Secondary Host Name', NAMEINSOURCE '"SECONDARY_HOST"', NATIVE_TYPE 'VARCHAR'),
    SECONDARY_PORT integer OPTIONS (ANNOTATION 'Secondary Port', NAMEINSOURCE '"SECONDARY_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SECONDARY_SITE_ID integer OPTIONS (ANNOTATION 'Generated ID of secondary site', NAMEINSOURCE '"SECONDARY_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SECONDARY_SITE_NAME string(256) OPTIONS (ANNOTATION 'Secondary logical site name', NAMEINSOURCE '"SECONDARY_SITE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SECONDARY_ACTIVE_STATUS string(16) OPTIONS (ANNOTATION 'Secondary Active Status', NAMEINSOURCE '"SECONDARY_ACTIVE_STATUS"', NATIVE_TYPE 'VARCHAR'),
    SECONDARY_CONNECT_TIME timestamp OPTIONS (ANNOTATION 'Time the connection was established from the secondary', NAMEINSOURCE '"SECONDARY_CONNECT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SECONDARY_RECONNECT_COUNT integer OPTIONS (ANNOTATION 'Secondary Reconnect Count', NAMEINSOURCE '"SECONDARY_RECONNECT_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SECONDARY_FAILOVER_COUNT integer OPTIONS (ANNOTATION 'Secondary Failover Count', NAMEINSOURCE '"SECONDARY_FAILOVER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REPLICATION_MODE string(16) OPTIONS (ANNOTATION 'Replication Mode', NAMEINSOURCE '"REPLICATION_MODE"', NATIVE_TYPE 'VARCHAR'),
    REPLICATION_STATUS string(16) OPTIONS (ANNOTATION 'Replication Status', NAMEINSOURCE '"REPLICATION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    REPLICATION_STATUS_DETAILS string(1024) OPTIONS (ANNOTATION 'Replication Status Details', NAMEINSOURCE '"REPLICATION_STATUS_DETAILS"', NATIVE_TYPE 'VARCHAR'),
    FULL_SYNC string(16) OPTIONS (ANNOTATION 'Full sync status', NAMEINSOURCE '"FULL_SYNC"', NATIVE_TYPE 'VARCHAR'),
    LAST_LOG_POSITION long OPTIONS (ANNOTATION 'Current Log Pos', NAMEINSOURCE '"LAST_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_LOG_POSITION_TIME timestamp OPTIONS (ANNOTATION 'Current Log Pos Timestamp', NAMEINSOURCE '"LAST_LOG_POSITION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_SAVEPOINT_VERSION integer OPTIONS (ANNOTATION 'Current Savepoint Version', NAMEINSOURCE '"LAST_SAVEPOINT_VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_SAVEPOINT_LOG_POSITION long OPTIONS (ANNOTATION 'Current Savepoint Log Position', NAMEINSOURCE '"LAST_SAVEPOINT_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_SAVEPOINT_START_TIME timestamp OPTIONS (ANNOTATION 'Current Savepoint Timestamp', NAMEINSOURCE '"LAST_SAVEPOINT_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_LOG_POSITION long OPTIONS (ANNOTATION 'Shipped Log Positon', NAMEINSOURCE '"SHIPPED_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LOG_POSITION_TIME timestamp OPTIONS (ANNOTATION 'Shipped Log Position Timestamp', NAMEINSOURCE '"SHIPPED_LOG_POSITION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_LOG_BUFFERS_COUNT long OPTIONS (ANNOTATION 'Shipped Log Buffers Count', NAMEINSOURCE '"SHIPPED_LOG_BUFFERS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LOG_BUFFERS_SIZE long OPTIONS (ANNOTATION 'Shipped Log Buffers Size in Bytes', NAMEINSOURCE '"SHIPPED_LOG_BUFFERS_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LOG_BUFFERS_DURATION long OPTIONS (ANNOTATION 'Shipped Log Buffer Duration in microseconds', NAMEINSOURCE '"SHIPPED_LOG_BUFFERS_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_SAVEPOINT_VERSION integer OPTIONS (ANNOTATION 'Shipped Savepoint Version', NAMEINSOURCE '"SHIPPED_SAVEPOINT_VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SHIPPED_SAVEPOINT_LOG_POSITION long OPTIONS (ANNOTATION 'Shipped Savepoint Log Position', NAMEINSOURCE '"SHIPPED_SAVEPOINT_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_SAVEPOINT_START_TIME timestamp OPTIONS (ANNOTATION 'Shipped Savepoint Start Time', NAMEINSOURCE '"SHIPPED_SAVEPOINT_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_FULL_REPLICA_COUNT long OPTIONS (ANNOTATION 'Shipped Full Replica Count', NAMEINSOURCE '"SHIPPED_FULL_REPLICA_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_FULL_REPLICA_SIZE long OPTIONS (ANNOTATION 'Shipped Full Replica Size in Bytes', NAMEINSOURCE '"SHIPPED_FULL_REPLICA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_FULL_REPLICA_DURATION long OPTIONS (ANNOTATION 'Shipped Full Replica Duration in microseconds', NAMEINSOURCE '"SHIPPED_FULL_REPLICA_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LAST_FULL_REPLICA_SIZE long OPTIONS (ANNOTATION 'Shipped Last Full Replica Size in Bytes', NAMEINSOURCE '"SHIPPED_LAST_FULL_REPLICA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LAST_FULL_REPLICA_START_TIME timestamp OPTIONS (ANNOTATION 'Shipped Last Full Replica Start Time', NAMEINSOURCE '"SHIPPED_LAST_FULL_REPLICA_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_LAST_FULL_REPLICA_END_TIME timestamp OPTIONS (ANNOTATION 'Shipped Last Full Replica End Time', NAMEINSOURCE '"SHIPPED_LAST_FULL_REPLICA_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_DELTA_REPLICA_COUNT long OPTIONS (ANNOTATION 'Shipped Delta Replica Count', NAMEINSOURCE '"SHIPPED_DELTA_REPLICA_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_DELTA_REPLICA_SIZE long OPTIONS (ANNOTATION 'Shipped Delta Replica Size in Bytes', NAMEINSOURCE '"SHIPPED_DELTA_REPLICA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_DELTA_REPLICA_DURATION long OPTIONS (ANNOTATION 'Shipped Delta Replica Duration in microseconds', NAMEINSOURCE '"SHIPPED_DELTA_REPLICA_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LAST_DELTA_REPLICA_SIZE long OPTIONS (ANNOTATION 'Shipped Last Delta Replica Size in Bytes', NAMEINSOURCE '"SHIPPED_LAST_DELTA_REPLICA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LAST_DELTA_REPLICA_START_TIME timestamp OPTIONS (ANNOTATION 'Shipped Last Delta Replica Start Time', NAMEINSOURCE '"SHIPPED_LAST_DELTA_REPLICA_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_LAST_DELTA_REPLICA_END_TIME timestamp OPTIONS (ANNOTATION 'Shipped Last Delta Replica End Time', NAMEINSOURCE '"SHIPPED_LAST_DELTA_REPLICA_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICE_REPLICATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICE_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PROCESS_ID integer OPTIONS (ANNOTATION 'Process ID', NAMEINSOURCE '"PROCESS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DETAIL string(128) OPTIONS (ANNOTATION 'Detail information, similar to COORDINATOR_TYPE in M_SERVICES', NAMEINSOURCE '"DETAIL"', NATIVE_TYPE 'VARCHAR'),
    ACTIVE_STATUS string(16) OPTIONS (ANNOTATION 'NO, YES, UNKNOWN, STARTING, STOPPING', NAMEINSOURCE '"ACTIVE_STATUS"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Process start timestamp', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SYS_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Current system timestamp', NAMEINSOURCE '"SYS_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PROCESS_CPU short OPTIONS (ANNOTATION 'CPU usage of current process', NAMEINSOURCE '"PROCESS_CPU"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    PROCESS_CPU_TIME long OPTIONS (ANNOTATION 'CPU usage of current process since start', NAMEINSOURCE '"PROCESS_CPU_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU short OPTIONS (ANNOTATION 'CPU usage of all processes', NAMEINSOURCE '"TOTAL_CPU"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TOTAL_CPU_TIME long OPTIONS (ANNOTATION 'CPU usage of all processes since start', NAMEINSOURCE '"TOTAL_CPU_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESS_MEMORY long OPTIONS (ANNOTATION 'Process logical memory usage', NAMEINSOURCE '"PROCESS_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESS_PHYSICAL_MEMORY long OPTIONS (ANNOTATION 'Process physical memory usage', NAMEINSOURCE '"PROCESS_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_MEMORY long OPTIONS (ANNOTATION 'Host physical+swap memory usage', NAMEINSOURCE '"TOTAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVAILABLE_MEMORY long OPTIONS (ANNOTATION 'Host physical+swap memory size', NAMEINSOURCE '"AVAILABLE_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PHYSICAL_MEMORY long OPTIONS (ANNOTATION 'Host physical memory size', NAMEINSOURCE '"PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_PER_SEC double OPTIONS (ANNOTATION 'Requests per second. Average over last 1000 requests', NAMEINSOURCE '"REQUESTS_PER_SEC"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    RESPONSE_TIME integer OPTIONS (ANNOTATION 'Request response time. Average over last 1000 requests', NAMEINSOURCE '"RESPONSE_TIME"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FINISHED_NON_INTERNAL_REQUEST_COUNT long OPTIONS (ANNOTATION 'Finished requests', NAMEINSOURCE '"FINISHED_NON_INTERNAL_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALL_FINISHED_REQUEST_COUNT long OPTIONS (ANNOTATION 'Finished requests including internal requests', NAMEINSOURCE '"ALL_FINISHED_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_REQUEST_COUNT integer OPTIONS (ANNOTATION 'Number of active requests', NAMEINSOURCE '"ACTIVE_REQUEST_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PENDING_REQUEST_COUNT integer OPTIONS (ANNOTATION 'Number of pending requests', NAMEINSOURCE '"PENDING_REQUEST_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ACTIVE_THREAD_COUNT integer OPTIONS (ANNOTATION 'Number of active threads', NAMEINSOURCE '"ACTIVE_THREAD_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    THREAD_COUNT integer OPTIONS (ANNOTATION 'Number of total threads', NAMEINSOURCE '"THREAD_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OPEN_FILE_COUNT integer OPTIONS (ANNOTATION 'Number of open files', NAMEINSOURCE '"OPEN_FILE_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICE_THREAD_CALLSTACKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name. See M_SERVICE_TYPES for all known service names', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    THREAD_ID long OPTIONS (ANNOTATION 'Thread ID', NAMEINSOURCE '"THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FRAME_LEVEL integer OPTIONS (ANNOTATION 'Level of stack frame', NAMEINSOURCE '"FRAME_LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FRAME_NAME string(256) OPTIONS (ANNOTATION 'Name of stack frame (function, file, library, ...)', NAMEINSOURCE '"FRAME_NAME"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICE_THREAD_CALLSTACKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICE_THREAD_SAMPLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Timestamp of the record', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    THREAD_ID long OPTIONS (ANNOTATION 'Thread ID', NAMEINSOURCE '"THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    THREAD_TYPE string(128) OPTIONS (ANNOTATION 'Thread type', NAMEINSOURCE '"THREAD_TYPE"', NATIVE_TYPE 'VARCHAR'),
    THREAD_METHOD string(256) OPTIONS (ANNOTATION 'Thread method', NAMEINSOURCE '"THREAD_METHOD"', NATIVE_TYPE 'VARCHAR'),
    THREAD_DETAIL string(256) OPTIONS (ANNOTATION 'Thread detail (truncated)', NAMEINSOURCE '"THREAD_DETAIL"', NATIVE_TYPE 'NVARCHAR'),
    THREAD_STATE string(32) OPTIONS (ANNOTATION 'Thread state', NAMEINSOURCE '"THREAD_STATE"', NATIVE_TYPE 'VARCHAR'),
    DURATION long OPTIONS (ANNOTATION 'Duration of the operation', NAMEINSOURCE '"DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATEMENT_ID string(20) OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_HASH string(32) OPTIONS (ANNOTATION 'Unique identifier for an SQL string', NAMEINSOURCE '"STATEMENT_HASH"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID (This number increments)', NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'SQL user name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Name of the application', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Application user name', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_SOURCE string(256) OPTIONS (ANNOTATION 'Application can define which source file SAP HANA is called from. Usage is up to the application. This value is also displayed in M_PREPARED_STATEMENTS.APPLICATION_SOURCE', NAMEINSOURCE '"APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT_IP string(16) OPTIONS (ANNOTATION 'IP of client machine', NAMEINSOURCE '"CLIENT_IP"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (ANNOTATION 'Client process ID', NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_WAIT_COMPONENT string(32) OPTIONS (ANNOTATION 'Waiting for lock component', NAMEINSOURCE '"LOCK_WAIT_COMPONENT"', NATIVE_TYPE 'VARCHAR'),
    LOCK_WAIT_NAME string(128) OPTIONS (ANNOTATION 'Waiting for lock ID (can be joined with STATISTICS_NAME from e.g. M_MUTEXES)', NAMEINSOURCE '"LOCK_WAIT_NAME"', NATIVE_TYPE 'VARCHAR'),
    LOCK_OWNER_THREAD_ID long OPTIONS (ANNOTATION 'Waiting for thread ID', NAMEINSOURCE '"LOCK_OWNER_THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICE_THREAD_SAMPLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICE_THREADS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name. See M_SERVICE_TYPES for all known service names', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    HIERARCHY string(128) OPTIONS (ANNOTATION 'Thread grouping information. Filled with Connection-ID/Update-Transaction-ID/Transaction-ID or left empty for inactive threads', NAMEINSOURCE '"HIERARCHY"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    THREAD_ID long OPTIONS (ANNOTATION 'Thread ID', NAMEINSOURCE '"THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    THREAD_TYPE string(128) OPTIONS (ANNOTATION 'Thread Type', NAMEINSOURCE '"THREAD_TYPE"', NATIVE_TYPE 'VARCHAR'),
    THREAD_METHOD string(256) OPTIONS (ANNOTATION 'Thread method', NAMEINSOURCE '"THREAD_METHOD"', NATIVE_TYPE 'VARCHAR'),
    THREAD_DETAIL clob OPTIONS (ANNOTATION 'Thread detail', NAMEINSOURCE '"THREAD_DETAIL"', NATIVE_TYPE 'NCLOB'),
    THREAD_STATE string(32) OPTIONS (ANNOTATION 'Thread state', NAMEINSOURCE '"THREAD_STATE"', NATIVE_TYPE 'VARCHAR'),
    IS_ACTIVE string(5) OPTIONS (ANNOTATION 'Is thread active', NAMEINSOURCE '"IS_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    DURATION long OPTIONS (ANNOTATION 'Thread Duration', NAMEINSOURCE '"DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CALLER string(256) OPTIONS (ANNOTATION 'The service which called this thread', NAMEINSOURCE '"CALLER"', NATIVE_TYPE 'VARCHAR'),
    CALLING string(256) OPTIONS (ANNOTATION 'The service which the thread calls', NAMEINSOURCE '"CALLING"', NATIVE_TYPE 'VARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'SQL user name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Application user name', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CPU_TIME_SELF long OPTIONS (ANNOTATION 'CPU time of thread', NAMEINSOURCE '"CPU_TIME_SELF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CPU_TIME_CUMULATIVE long OPTIONS (ANNOTATION 'CPU time of thread and associated children', NAMEINSOURCE '"CPU_TIME_CUMULATIVE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Update transaction ID', NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_WAIT_COMPONENT string(32) OPTIONS (ANNOTATION 'Waiting for lock component', NAMEINSOURCE '"LOCK_WAIT_COMPONENT"', NATIVE_TYPE 'VARCHAR'),
    LOCK_WAIT_NAME string(128) OPTIONS (ANNOTATION 'Waiting for lock ID (can be joined with STATISTICS_NAME from e.g. M_MUTEXES)', NAMEINSOURCE '"LOCK_WAIT_NAME"', NATIVE_TYPE 'VARCHAR'),
    LOCK_OWNER_THREAD_ID long OPTIONS (ANNOTATION 'Waiting for thread ID', NAMEINSOURCE '"LOCK_OWNER_THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICE_THREADS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICE_TRACES" (
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT_NAME string(32) OPTIONS (ANNOTATION 'Trace component name', NAMEINSOURCE '"COMPONENT_NAME"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICE_TRACES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICE_TYPES" (
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    INIFILE string(36) OPTIONS (ANNOTATION 'Configuration file name of service', NAMEINSOURCE '"INIFILE"', NATIVE_TYPE 'VARCHAR'),
    HAS_DETAIL string(5) OPTIONS (ANNOTATION 'Service shows details in M_SERVICE_STATISTICS: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_DETAIL"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICE_TYPES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SERVICES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name. See M_SERVICE_TYPES for all known service names', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PROCESS_ID integer OPTIONS (ANNOTATION 'Process ID', NAMEINSOURCE '"PROCESS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DETAIL string(128) OPTIONS (ANNOTATION 'Only for display. Use COORDINATOR_TYPE to test service role', NAMEINSOURCE '"DETAIL"', NATIVE_TYPE 'VARCHAR'),
    ACTIVE_STATUS string(16) OPTIONS (ANNOTATION 'NO, YES, UNKNOWN, STARTING, STOPPING', NAMEINSOURCE '"ACTIVE_STATUS"', NATIVE_TYPE 'VARCHAR'),
    SQL_PORT integer OPTIONS (ANNOTATION 'SQL port', NAMEINSOURCE '"SQL_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COORDINATOR_TYPE string(16) OPTIONS (ANNOTATION 'Coordinator type in distributed landscape: MASTER, SLAVE, STANDBY, NONE', NAMEINSOURCE '"COORDINATOR_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SERVICES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SESSION_CONTEXT" (
    HOST string(64) NOT NULL OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer NOT NULL OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer NOT NULL OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY string(32) OPTIONS (ANNOTATION 'Key name of a session context variable', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(512) OPTIONS (ANNOTATION 'Value of a session context variable', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    SECTION string(8) OPTIONS (ANNOTATION 'Section name to distinguish system and user variables: USER=application defined variable using SET command or client API call, SYSTEM=predefined variable or server property', NAMEINSOURCE '"SECTION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SESSION_CONTEXT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SHARED_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Module name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Allocated shared memory size on the module', NAMEINSOURCE '"ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'Used shared memory size on the module', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_SIZE long OPTIONS (ANNOTATION 'Free shared memory size on the module', NAMEINSOURCE '"FREE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SHARED_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SNAPSHOTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ID long OPTIONS (ANNOTATION 'Snapshot ID', NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Creation time', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    FOR_BACKUP string(5) OPTIONS (ANNOTATION 'Created for backup: ''TRUE''/''FALSE''', NAMEINSOURCE '"FOR_BACKUP"', NATIVE_TYPE 'VARCHAR'),
    ANCHOR long OPTIONS (ANNOTATION 'Anchor', NAMEINSOURCE '"ANCHOR"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SNAPSHOTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SQL_CLIENT_NETWORK_IO" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CLIENT_HOST string(64) OPTIONS (ANNOTATION 'The host of the client machine, also found in M_CONNECTIONS.CLIENT_HOST', NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'The connection ID of the physical server connection', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MESSAGE_ID long OPTIONS (ANNOTATION 'The client message ID on the physical server connection', NAMEINSOURCE '"MESSAGE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLIENT_DURATION long OPTIONS (ANNOTATION 'Elapsed time on client side including send, server execution and receive', NAMEINSOURCE '"CLIENT_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SERVER_DURATION long OPTIONS (ANNOTATION 'Execution time on server side. Transport time is the delta between CLIENT_DURATION and SERVER_DURATION', NAMEINSOURCE '"SERVER_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SERVER_RECEIVED_TIME timestamp OPTIONS (ANNOTATION 'Time when message was received on server side and begin of execution', NAMEINSOURCE '"SERVER_RECEIVED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RECEIVED_MESSAGE_SIZE long OPTIONS (ANNOTATION 'Size of messages received on server side', NAMEINSOURCE '"RECEIVED_MESSAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEND_MESSAGE_SIZE long OPTIONS (ANNOTATION 'Size of messages sent to client side', NAMEINSOURCE '"SEND_MESSAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SQL_CLIENT_NETWORK_IO"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SQL_PLAN_CACHE" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'Statement string', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    STATEMENT_HASH string(32) OPTIONS (ANNOTATION 'MD5 hash value for STATEMENT_STRING', NAMEINSOURCE '"STATEMENT_HASH"', NATIVE_TYPE 'VARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name who prepared the plan', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name that the SQL plan belongs to. SQL plans are generated in each schema even though the statement string is the same since the query optimizer statistics might be different', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_VALID string(5) OPTIONS (ANNOTATION 'TRUE if the plan is currently valid. A plan is invalidated whenever its corresponding schema objects, such as table and view, are changed. Invalidated plans are recompiled if the same statement is executed, otherwise they are evicted by another plan when newly compiled', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR'),
    IS_INTERNAL string(5) OPTIONS (ANNOTATION 'TRUE if the plan is executed from a database internal connection. FALSE if it is executed from a remote connection', NAMEINSOURCE '"IS_INTERNAL"', NATIVE_TYPE 'VARCHAR'),
    IS_DISTRIBUTED_EXECUTION string(5) OPTIONS (ANNOTATION 'TRUE if tables are located in multi nodes, FALSE otherwise', NAMEINSOURCE '"IS_DISTRIBUTED_EXECUTION"', NATIVE_TYPE 'VARCHAR'),
    IS_PINNED_PLAN string(5) OPTIONS (ANNOTATION 'TRUE if plan is explicitly stored by PlanViz utility, mainly used by PlanViz', NAMEINSOURCE '"IS_PINNED_PLAN"', NATIVE_TYPE 'VARCHAR'),
    ABAP_VARCHAR_MODE string(5) OPTIONS (ANNOTATION 'TRUE if ABAP VARCHAR mode enabled, FALSE otherwise. ABAP application developers concern this mode, which indicates null terminated string or not', NAMEINSOURCE '"ABAP_VARCHAR_MODE"', NATIVE_TYPE 'VARCHAR'),
    ACCESSED_OBJECTS string(5000) OPTIONS (ANNOTATION 'Relevant table object ID list accessed in the plan. Format is <OID>(<metadata version>) for a list entry, entries separated by comma', NAMEINSOURCE '"ACCESSED_OBJECTS"', NATIVE_TYPE 'VARCHAR'),
    TABLE_LOCATIONS string(2000) OPTIONS (ANNOTATION 'Relevant table locations for the plan', NAMEINSOURCE '"TABLE_LOCATIONS"', NATIVE_TYPE 'VARCHAR'),
    TABLE_TYPES string(128) OPTIONS (ANNOTATION 'Specification whether the plan refers Column store only, Row store only or mixed, displayed as one of three possible values ''ROW''/''COLUMN''/''ROW, COLUMN''', NAMEINSOURCE '"TABLE_TYPES"', NATIVE_TYPE 'VARCHAR'),
    PLAN_SHARING_TYPE string(128) OPTIONS (ANNOTATION 'Plan sharing type: ''GLOBAL''/''SESSION EXCLUSIVE GLOBAL''/''SESSION LOCAL''', NAMEINSOURCE '"PLAN_SHARING_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OWNER_CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection owning the plan', NAMEINSOURCE '"OWNER_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PLAN_ID long OPTIONS (ANNOTATION 'Logical plan ID which is a non-negative value', NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory size used by the plan', NAMEINSOURCE '"PLAN_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REFERENCE_COUNT long OPTIONS (ANNOTATION 'Number of statements using the plan. When the count reaches zero, it can be evicted by the victim selection policy of plan cache', NAMEINSOURCE '"REFERENCE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMETER_COUNT long OPTIONS (ANNOTATION 'Number of parameters to be assigned for the execution', NAMEINSOURCE '"PARAMETER_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATED_TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the updated table for the plan', NAMEINSOURCE '"UPDATED_TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT long OPTIONS (ANNOTATION 'Accumulated count of plan execution', NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT_BY_ROUTING long OPTIONS (ANNOTATION 'Accumulated count of plan execution by client-routed connection in statement routing. This column shows how many times the statement is executed in routed connection. The routed connection means a physical connection in a part of the logical session', NAMEINSOURCE '"EXECUTION_COUNT_BY_ROUTING"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CURSOR_DURATION long OPTIONS (ANNOTATION 'Sum of time of plan execution including communication time with clients', NAMEINSOURCE '"TOTAL_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CURSOR_DURATION long OPTIONS (ANNOTATION 'Average time of plan execution including communicate time with clients', NAMEINSOURCE '"AVG_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Minimum time of plan execution including communicate time with clients', NAMEINSOURCE '"MIN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CURSOR_DURATION long OPTIONS (ANNOTATION 'Maximum time of plan execution including communicate time with clients', NAMEINSOURCE '"MAX_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Sum of time of plan executions', NAMEINSOURCE '"TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_TIME long OPTIONS (ANNOTATION 'Average time of plan execution', NAMEINSOURCE '"AVG_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_TIME long OPTIONS (ANNOTATION 'Minimum time of plan execution', NAMEINSOURCE '"MIN_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum time of plan execution', NAMEINSOURCE '"MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Sum of time of establishing result sets', NAMEINSOURCE '"TOTAL_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Average time for cursor open', NAMEINSOURCE '"AVG_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor close', NAMEINSOURCE '"MIN_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor close', NAMEINSOURCE '"MAX_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Sum of time for transferring rows', NAMEINSOURCE '"TOTAL_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Average time for cursor fetch', NAMEINSOURCE '"AVG_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor fetch', NAMEINSOURCE '"MIN_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor fetch', NAMEINSOURCE '"MAX_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Sum of time for cleanup of result sets', NAMEINSOURCE '"TOTAL_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Average time for cursor close', NAMEINSOURCE '"AVG_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor close', NAMEINSOURCE '"MIN_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor close', NAMEINSOURCE '"MAX_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_METADATA_CACHE_MISS_COUNT long OPTIONS (ANNOTATION 'Accumulated count of metadata cache misses during plan preparation and plan execution. When a metadata object is first requested to be accessed in a slave server instance, it gets the object from a master server instance via network communication, if the object does not exist or is out of date.', NAMEINSOURCE '"TOTAL_METADATA_CACHE_MISS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Sum of table loading time during plan preparation', NAMEINSOURCE '"TOTAL_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Average table loading time during plan preparation', NAMEINSOURCE '"AVG_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Minimum table loading time during plan preparation', NAMEINSOURCE '"MIN_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Maximum table loading time during plan preparation', NAMEINSOURCE '"MAX_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARATION_COUNT long OPTIONS (ANNOTATION 'Number of plan preparations', NAMEINSOURCE '"PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (ANNOTATION 'Sum of time of plan preparation', NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (ANNOTATION 'Average time of plan preparation', NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Minimum time of plan preparation', NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (ANNOTATION 'Maximum time of plan preparation', NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_RESULT_RECORD_COUNT long OPTIONS (ANNOTATION 'Accumulated number of records during plan execution.', NAMEINSOURCE '"TOTAL_RESULT_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Accumulated lock wait count for the plan', NAMEINSOURCE '"TOTAL_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_DURATION long OPTIONS (ANNOTATION 'Accumulated lock wait duration for the plan', NAMEINSOURCE '"TOTAL_LOCK_WAIT_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CONNECTION_ID integer OPTIONS (ANNOTATION 'The last connection ID that executed the plan', NAMEINSOURCE '"LAST_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Last execution timestamp', NAMEINSOURCE '"LAST_EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_PREPARATION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Last preparation timestamp', NAMEINSOURCE '"LAST_PREPARATION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SQL_PLAN_CACHE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SQL_PLAN_CACHE_OVERVIEW" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PLAN_CACHE_ENABLED integer OPTIONS (ANNOTATION 'TRUE if SQL Plan Cache is turned on<br><font color="red"> ALTER SYSTEM ALTER CONFIGURATION (''indexserver.ini'',''system'') SET(''sql'', ''plan_cache_enabled'') = <''True'' or ''False''> WITH RECONFIGURE</font>', NAMEINSOURCE '"PLAN_CACHE_ENABLED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_COLLECTION_ENABLED string(5) OPTIONS (ANNOTATION 'TRUE if runtime statistics are collected<br><font color="red"> ALTER SYSTEM ALTER CONFIGURATION (''indexserver.ini'',''system'') SET(''sql'', ''plan_cache_statistics_enabled'') = <''True'' or ''False''> WITH RECONFIGURE</font>', NAMEINSOURCE '"STATISTICS_COLLECTION_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    PLAN_CACHE_CAPACITY long OPTIONS (ANNOTATION 'Maximum SQL Plan Cache size<br><font color="red"> ALTER SYSTEM ALTER CONFIGURATION (''indexserver.ini'',''system'') SET(''sql'', ''plan_cache_size'') = ''268435456'' WITH RECONFIGURE</font>', NAMEINSOURCE '"PLAN_CACHE_CAPACITY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_SIZE long OPTIONS (ANNOTATION 'Total size of SQL Plan Cache', NAMEINSOURCE '"CACHED_PLAN_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_CACHE_HIT_RATIO float OPTIONS (ANNOTATION 'SQL Plan Cache hit ratio', NAMEINSOURCE '"PLAN_CACHE_HIT_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    PLAN_CACHE_LOOKUP_COUNT long OPTIONS (ANNOTATION 'Number of plan lookup count from SQL Plan Cache', NAMEINSOURCE '"PLAN_CACHE_LOOKUP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_CACHE_HIT_COUNT long OPTIONS (ANNOTATION 'Number of hit count from SQL Plan Cache', NAMEINSOURCE '"PLAN_CACHE_HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_AVG_CACHE_TIME long OPTIONS (ANNOTATION 'Average Duration between plan cache insertion and eviction  ', NAMEINSOURCE '"EVICTED_PLAN_AVG_CACHE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_COUNT long OPTIONS (ANNOTATION 'Number of evicted plans from SQL Plan Cache', NAMEINSOURCE '"EVICTED_PLAN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_PREPARATION_COUNT long OPTIONS (ANNOTATION 'Total plan preparation count for evicted plans', NAMEINSOURCE '"EVICTED_PLAN_PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_EXECUTION_COUNT long OPTIONS (ANNOTATION 'Total plan execution count for evicted plans', NAMEINSOURCE '"EVICTED_PLAN_EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Total duration for plan preparation for all evicted plans. Sum of evicted plan''s TOTAL_PREPARATION_TIME', NAMEINSOURCE '"EVICTED_PLAN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Total cursor duration for evicted plans. Sum of evicted plan''s TOTAL_CUSOR_DURATION', NAMEINSOURCE '"EVICTED_PLAN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time for evicted plans. Sum of evicted plan''s TOTAL_EXECUTION_TIME', NAMEINSOURCE '"EVICTED_PLAN_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_SIZE long OPTIONS (ANNOTATION 'Accumulated total size of evicted plans', NAMEINSOURCE '"EVICTED_PLAN_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_COUNT long OPTIONS (ANNOTATION 'Total cached plan count in SQL Plan Cache', NAMEINSOURCE '"CACHED_PLAN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_PREPARATION_COUNT long OPTIONS (ANNOTATION 'Total plan preparation count for cached plans', NAMEINSOURCE '"CACHED_PLAN_PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_EXECUTION_COUNT long OPTIONS (ANNOTATION 'Total execution count for cached plans', NAMEINSOURCE '"CACHED_PLAN_EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Total plan preparation duration for cached plans', NAMEINSOURCE '"CACHED_PLAN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Total cursor duration for cached plans', NAMEINSOURCE '"CACHED_PLAN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time for cached plans', NAMEINSOURCE '"CACHED_PLAN_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLEAR_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Timestamp when SQL Plan Cache was cleared for the last time using ALTER SYSTEM CLEAR SQL PLAN CACHE', NAMEINSOURCE '"CLEAR_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SQL_PLAN_CACHE_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SQL_PLAN_CACHE_PARAMETERS" (
    PLAN_ID long OPTIONS (ANNOTATION 'Logical plan ID which is a non-negative value, same with the one in M_SQL_PLAN_CACHE', NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Data type of the parameter', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Position of the parameter in SQL statement', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARAMETER_VALUE clob OPTIONS (ANNOTATION 'Value of the captured parameter', NAMEINSOURCE '"PARAMETER_VALUE"', NATIVE_TYPE 'NCLOB'),
    BATCH_EXECUTION_ORDER integer OPTIONS (ANNOTATION 'Execution order in a batch processing', NAMEINSOURCE '"BATCH_EXECUTION_ORDER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Timestamp when the parameter value is captured', NAMEINSOURCE '"EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SQL_PLAN_CACHE_PARAMETERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SQL_PLAN_CACHE_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'Statement string', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    STATEMENT_HASH string(32) OPTIONS (ANNOTATION 'MD5 hash value for STATEMENT_STRING', NAMEINSOURCE '"STATEMENT_HASH"', NATIVE_TYPE 'VARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name who prepared the plan', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name that the SQL plan belongs to. SQL plans are generated in each schema even though the statement string is the same since the query optimizer statistics might be different', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_VALID string(5) OPTIONS (ANNOTATION 'TRUE if the plan is currently valid. A plan is invalidated whenever its corresponding schema objects, such as table and view, are changed. Invalidated plans are recompiled if the same statement is executed, otherwise they are evicted by another plan when newly compiled', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR'),
    IS_INTERNAL string(5) OPTIONS (ANNOTATION 'TRUE if the plan is executed from a database internal connection. FALSE if it is executed from a remote connection', NAMEINSOURCE '"IS_INTERNAL"', NATIVE_TYPE 'VARCHAR'),
    IS_DISTRIBUTED_EXECUTION string(5) OPTIONS (ANNOTATION 'TRUE if tables are located in multi nodes, FALSE otherwise', NAMEINSOURCE '"IS_DISTRIBUTED_EXECUTION"', NATIVE_TYPE 'VARCHAR'),
    IS_PINNED_PLAN string(5) OPTIONS (ANNOTATION 'TRUE if plan is explicitly stored by PlanViz utility, mainly used by PlanViz', NAMEINSOURCE '"IS_PINNED_PLAN"', NATIVE_TYPE 'VARCHAR'),
    ABAP_VARCHAR_MODE string(5) OPTIONS (ANNOTATION 'TRUE if ABAP VARCHAR mode enabled, FALSE otherwise. ABAP application developers concern this mode, which indicates null terminated string or not', NAMEINSOURCE '"ABAP_VARCHAR_MODE"', NATIVE_TYPE 'VARCHAR'),
    ACCESSED_OBJECTS string(5000) OPTIONS (ANNOTATION 'Relevant table object ID list accessed in the plan. Format is <OID>(<metadata version>) for a list entry, entries separated by comma', NAMEINSOURCE '"ACCESSED_OBJECTS"', NATIVE_TYPE 'VARCHAR'),
    TABLE_LOCATIONS string(2000) OPTIONS (ANNOTATION 'Relevant table locations for the plan', NAMEINSOURCE '"TABLE_LOCATIONS"', NATIVE_TYPE 'VARCHAR'),
    TABLE_TYPES string(128) OPTIONS (ANNOTATION 'Specification whether the plan refers Column store only, Row store only or mixed, displayed as one of three possible values ''ROW''/''COLUMN''/''ROW, COLUMN''', NAMEINSOURCE '"TABLE_TYPES"', NATIVE_TYPE 'VARCHAR'),
    PLAN_SHARING_TYPE string(128) OPTIONS (ANNOTATION 'Plan sharing type: ''GLOBAL''/''SESSION EXCLUSIVE GLOBAL''/''SESSION LOCAL''', NAMEINSOURCE '"PLAN_SHARING_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OWNER_CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection owning the plan', NAMEINSOURCE '"OWNER_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PLAN_ID long OPTIONS (ANNOTATION 'Logical plan ID which is a non-negative value', NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory size used by the plan', NAMEINSOURCE '"PLAN_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REFERENCE_COUNT long OPTIONS (ANNOTATION 'Number of statements using the plan. When the count reaches zero, it can be evicted by the victim selection policy of plan cache', NAMEINSOURCE '"REFERENCE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMETER_COUNT long OPTIONS (ANNOTATION 'Number of parameters to be assigned for the execution', NAMEINSOURCE '"PARAMETER_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATED_TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the updated table for the plan', NAMEINSOURCE '"UPDATED_TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT long OPTIONS (ANNOTATION 'Accumulated count of plan execution', NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT_BY_ROUTING long OPTIONS (ANNOTATION 'Accumulated count of plan execution by client-routed connection in statement routing. This column shows how many times the statement is executed in routed connection. The routed connection means a physical connection in a part of the logical session', NAMEINSOURCE '"EXECUTION_COUNT_BY_ROUTING"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CURSOR_DURATION long OPTIONS (ANNOTATION 'Sum of time of plan execution including communication time with clients', NAMEINSOURCE '"TOTAL_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CURSOR_DURATION long OPTIONS (ANNOTATION 'Average time of plan execution including communicate time with clients', NAMEINSOURCE '"AVG_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Minimum time of plan execution including communicate time with clients', NAMEINSOURCE '"MIN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CURSOR_DURATION long OPTIONS (ANNOTATION 'Maximum time of plan execution including communicate time with clients', NAMEINSOURCE '"MAX_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Sum of time of plan executions', NAMEINSOURCE '"TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_TIME long OPTIONS (ANNOTATION 'Average time of plan execution', NAMEINSOURCE '"AVG_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_TIME long OPTIONS (ANNOTATION 'Minimum time of plan execution', NAMEINSOURCE '"MIN_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum time of plan execution', NAMEINSOURCE '"MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Sum of time of establishing result sets', NAMEINSOURCE '"TOTAL_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Average time for cursor open', NAMEINSOURCE '"AVG_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor close', NAMEINSOURCE '"MIN_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor close', NAMEINSOURCE '"MAX_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Sum of time for transferring rows', NAMEINSOURCE '"TOTAL_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Average time for cursor fetch', NAMEINSOURCE '"AVG_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor fetch', NAMEINSOURCE '"MIN_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor fetch', NAMEINSOURCE '"MAX_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Sum of time for cleanup of result sets', NAMEINSOURCE '"TOTAL_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Average time for cursor close', NAMEINSOURCE '"AVG_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor close', NAMEINSOURCE '"MIN_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor close', NAMEINSOURCE '"MAX_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_METADATA_CACHE_MISS_COUNT long OPTIONS (ANNOTATION 'Accumulated count of metadata cache misses during plan preparation and plan execution. When a metadata object is first requested to be accessed in a slave server instance, it gets the object from a master server instance via network communication, if the object does not exist or is out of date.', NAMEINSOURCE '"TOTAL_METADATA_CACHE_MISS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Sum of table loading time during plan preparation', NAMEINSOURCE '"TOTAL_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Average table loading time during plan preparation', NAMEINSOURCE '"AVG_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Minimum table loading time during plan preparation', NAMEINSOURCE '"MIN_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Maximum table loading time during plan preparation', NAMEINSOURCE '"MAX_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARATION_COUNT long OPTIONS (ANNOTATION 'Number of plan preparations', NAMEINSOURCE '"PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (ANNOTATION 'Sum of time of plan preparation', NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (ANNOTATION 'Average time of plan preparation', NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Minimum time of plan preparation', NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (ANNOTATION 'Maximum time of plan preparation', NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_RESULT_RECORD_COUNT long OPTIONS (ANNOTATION 'Accumulated number of records during plan execution.', NAMEINSOURCE '"TOTAL_RESULT_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Accumulated lock wait count for the plan', NAMEINSOURCE '"TOTAL_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_DURATION long OPTIONS (ANNOTATION 'Accumulated lock wait duration for the plan', NAMEINSOURCE '"TOTAL_LOCK_WAIT_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CONNECTION_ID integer OPTIONS (ANNOTATION 'The last connection ID that executed the plan', NAMEINSOURCE '"LAST_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Last execution timestamp', NAMEINSOURCE '"LAST_EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_PREPARATION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Last preparation timestamp', NAMEINSOURCE '"LAST_PREPARATION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SQL_PLAN_CACHE_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_STATISTICS_LASTVALUES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port name', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NAME string(128) OPTIONS (ANNOTATION 'Value name', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX string(1024) OPTIONS (ANNOTATION 'Index of value', NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    REACHED_AT timestamp OPTIONS (ANNOTATION 'Value reached at', NAMEINSOURCE '"REACHED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Last value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_STATISTICS_LASTVALUES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SYSTEM_INFORMATION_STATEMENTS" (
    NAME string(64) OPTIONS (ANNOTATION 'Statement name', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(256) OPTIONS (ANNOTATION 'Statement description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT clob OPTIONS (ANNOTATION 'Actual SQL statement', NAMEINSOURCE '"STATEMENT"', NATIVE_TYPE 'NCLOB')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SYSTEM_INFORMATION_STATEMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SYSTEM_LIMITS" (
    CATEGORY string(128) OPTIONS (ANNOTATION 'Category of system limit is adaptable ', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    NAME string(256) OPTIONS (ANNOTATION 'Name of system limit ', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Value of system limit', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(128) OPTIONS (ANNOTATION 'Type of value ', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    UNIT string(256) OPTIONS (ANNOTATION 'Unit of value', NAMEINSOURCE '"UNIT"', NATIVE_TYPE 'VARCHAR'),
    COMMENT string(2000) OPTIONS (ANNOTATION 'Additional comment for system limits', NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SYSTEM_LIMITS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_SYSTEM_OVERVIEW" (
    SECTION string(16) OPTIONS (ANNOTATION 'Section name', NAMEINSOURCE '"SECTION"', NATIVE_TYPE 'VARCHAR'),
    NAME string(32) OPTIONS (ANNOTATION 'Key name in section', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    STATUS string(8) OPTIONS (ANNOTATION 'Status value: OK, ERROR, WARNING or empty for info items', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Key value in section', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_SYSTEM_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TABLE_LOB_FILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Part ID of split table', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_OID long OPTIONS (ANNOTATION 'Table OID, same as owner_oid if the table is found; 0 otherwise', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_ID long OPTIONS (ANNOTATION 'Container ID', NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PHYSICAL_SIZE long OPTIONS (ANNOTATION 'File size', NAMEINSOURCE '"PHYSICAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BINARY_SIZE long OPTIONS (ANNOTATION 'LOB size', NAMEINSOURCE '"BINARY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CHARACTER_SIZE integer OPTIONS (ANNOTATION 'Number of characters in NCLOB', NAMEINSOURCE '"CHARACTER_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PAGE_COUNT long OPTIONS (ANNOTATION 'Number of pages used for a LOB file', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOB_TYPE string(5) OPTIONS (ANNOTATION 'Type of the lob', NAMEINSOURCE '"LOB_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TABLE_LOB_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TABLE_LOCATIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host where table data is located. Empty for Views', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port where table data is located. 0 for Views', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCATION string(75) OPTIONS (ANNOTATION 'Host and port where the table data is located', NAMEINSOURCE '"LOCATION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TABLE_LOCATIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TABLE_LOCKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_TIME timestamp OPTIONS (ANNOTATION 'Lock acquisition time', NAMEINSOURCE '"ACQUIRED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) NOT NULL OPTIONS (ANNOTATION 'Object type', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_MODE string(32) OPTIONS (ANNOTATION 'Lock mode: EXCLUSIVE, INTENTIONAL EXCLUSIVE', NAMEINSOURCE '"LOCK_MODE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TABLE_LOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TABLE_PERSISTENCE_LOCATIONS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_HISTORY string(5) OPTIONS (ANNOTATION 'Is this the history part of a table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_HISTORY"', NATIVE_TYPE 'VARCHAR'),
    PERSISTENCE_HOST string(64) OPTIONS (ANNOTATION 'Host where table data is located', NAMEINSOURCE '"PERSISTENCE_HOST"', NATIVE_TYPE 'VARCHAR'),
    PERSISTENCE_PORT integer OPTIONS (ANNOTATION 'Port where table data is located', NAMEINSOURCE '"PERSISTENCE_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TABLE_PERSISTENCE_LOCATIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TABLE_PERSISTENCE_STATISTICS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema Name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table Name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DISK_SIZE long NOT NULL OPTIONS (ANNOTATION 'Total disk size of all table parts', NAMEINSOURCE '"DISK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_COUNT long NOT NULL OPTIONS (ANNOTATION 'Total number of pages of all table parts', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTES_WRITTEN long NOT NULL OPTIONS (ANNOTATION 'Number of bytes written to the table', NAMEINSOURCE '"BYTES_WRITTEN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTES_APPENDED long NOT NULL OPTIONS (ANNOTATION 'Number of bytes appended to the table', NAMEINSOURCE '"BYTES_APPENDED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTES_READ long NOT NULL OPTIONS (ANNOTATION 'Number of bytes read from the table', NAMEINSOURCE '"BYTES_READ"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTESTREAM_WRITTEN long NOT NULL OPTIONS (ANNOTATION 'Number of bytes written to the table via streaming interface', NAMEINSOURCE '"BYTESTREAM_WRITTEN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    APPEND_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was appended to', NAMEINSOURCE '"APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was written to', NAMEINSOURCE '"WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OPTIMIZE_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was written to optimized', NAMEINSOURCE '"OPTIMIZE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was read from', NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRUNCATE_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was truncated', NAMEINSOURCE '"TRUNCATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COPY_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was copied', NAMEINSOURCE '"COPY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TABLE_PERSISTENCE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TABLE_SNAPSHOTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema Name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table Name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Table Object ID', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_TYPE string(16) OPTIONS (ANNOTATION 'Table Type: Row, Column', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    MIN_MVCC_SNAPSHOT_TIMESTAMP long OPTIONS (ANNOTATION 'Minimum MVCC Timestamp which is held by table-wise GC blocker transaction or cursor', NAMEINSOURCE '"MIN_MVCC_SNAPSHOT_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_COUNT long OPTIONS (ANNOTATION 'Number of versions (For column table, the number of unconsolidated udivlists', NAMEINSOURCE '"VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TABLE_SNAPSHOTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TABLE_VIRTUAL_FILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_HISTORY string(5) OPTIONS (ANNOTATION 'Is this the history part of a table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_HISTORY"', NATIVE_TYPE 'VARCHAR'),
    CONTAINER_ID long NOT NULL OPTIONS (ANNOTATION 'Container ID', NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAMESPACE string(512) OPTIONS (ANNOTATION 'Namespace address in the database storage system', NAMEINSOURCE '"NAMESPACE"', NATIVE_TYPE 'VARCHAR'),
    NAME string(512) OPTIONS (ANNOTATION 'Name in the database storage system', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    PHYSICAL_SIZE long OPTIONS (ANNOTATION 'Storage size used for the file', NAMEINSOURCE '"PHYSICAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_COUNT long OPTIONS (ANNOTATION 'Number of storage pages used for the file', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TABLE_VIRTUAL_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TABLES" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RECORD_COUNT long OPTIONS (ANNOTATION 'Number of records in this table', NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_SIZE long OPTIONS (ANNOTATION 'Allocated memory size for fixed-size and variable-size part', NAMEINSOURCE '"TABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_COLUMN_TABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table is a column table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_TABLE"', NATIVE_TYPE 'VARCHAR'),
    TABLE_TYPE string(16) NOT NULL OPTIONS (ANNOTATION 'Specifies type of the table: ''ROW''/''COLUMN''/''HYBRID''', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_PARTITIONED string(5) OPTIONS (ANNOTATION 'Specifies whether the table is partitioned: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_PARTITIONED"', NATIVE_TYPE 'VARCHAR'),
    IS_REPLICATED string(5) OPTIONS (ANNOTATION 'Specifies whether the table is replicated: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_REPLICATED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TEMPORARY_JOIN_CONDITIONS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONDITION_NAME string(256) OPTIONS (ANNOTATION 'Join condition name', NAMEINSOURCE '"JOIN_CONDITION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_ORDER long OPTIONS (ANNOTATION 'Join order number', NAMEINSOURCE '"JOIN_ORDER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_SCHEMA_NAME1 string(256) OPTIONS (ANNOTATION 'Schema name of column1', NAMEINSOURCE '"TABLE_SCHEMA_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME1 string(256) OPTIONS (ANNOTATION 'Table name of column1', NAMEINSOURCE '"TABLE_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME1 string(256) OPTIONS (ANNOTATION 'Name of column1', NAMEINSOURCE '"COLUMN_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER1 integer OPTIONS (ANNOTATION 'Alias number of table name1', NAMEINSOURCE '"ALIAS_NUMBER1"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_SCHEMA_NAME2 string(256) OPTIONS (ANNOTATION 'Schema name of column2', NAMEINSOURCE '"TABLE_SCHEMA_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME2 string(256) OPTIONS (ANNOTATION 'Table name of column2', NAMEINSOURCE '"TABLE_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME2 string(256) OPTIONS (ANNOTATION 'Name of column2', NAMEINSOURCE '"COLUMN_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER2 integer OPTIONS (ANNOTATION 'Alias number of table name2', NAMEINSOURCE '"ALIAS_NUMBER2"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONSTRAINTS string(256) OPTIONS (ANNOTATION 'Join constraint name', NAMEINSOURCE '"CONSTRAINTS"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_TYPE string(5) OPTIONS (ANNOTATION 'Join type', NAMEINSOURCE '"JOIN_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CARDINALITY string(3) OPTIONS (ANNOTATION 'Join cardinality', NAMEINSOURCE '"CARDINALITY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TEMPORARY_JOIN_CONDITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TEMPORARY_JOIN_CONSTRAINTS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'View name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONSTRAINT_NAME string(256) OPTIONS (ANNOTATION 'Join constraint name', NAMEINSOURCE '"JOIN_CONSTRAINT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONSTRAINT_TYPE string(32) OPTIONS (ANNOTATION 'Operator', NAMEINSOURCE '"CONSTRAINT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCATION string(256) OPTIONS (ANNOTATION 'Name of constraint owner', NAMEINSOURCE '"LOCATION"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of column', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OPERATOR string(256) OPTIONS (ANNOTATION 'Operator', NAMEINSOURCE '"OPERATOR"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TEMPORARY_JOIN_CONSTRAINTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TEMPORARY_KEY_FIGURES" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    KEY_FIGURE_NAME string(256) OPTIONS (ANNOTATION 'Key figure name', NAMEINSOURCE '"KEY_FIGURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_AGGREGATION_TYPE string(32) OPTIONS (ANNOTATION 'Aggregation type', NAMEINSOURCE '"DEFAULT_AGGREGATION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) OPTIONS (ANNOTATION 'Description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    UNIT_CONVERSION_NAME string(256) OPTIONS (ANNOTATION 'Name of Unit Conversion', NAMEINSOURCE '"UNIT_CONVERSION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema Name of Column', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table Name of Column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    EXPRESSION_FLAGS string(32) OPTIONS (ANNOTATION 'Expression flags', NAMEINSOURCE '"EXPRESSION_FLAGS"', NATIVE_TYPE 'VARCHAR'),
    EXPRESSION string(256) OPTIONS (ANNOTATION 'Expression', NAMEINSOURCE '"EXPRESSION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TEMPORARY_KEY_FIGURES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TEMPORARY_OBJECT_DEPENDENCIES" (
    BASE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the base object', NAMEINSOURCE '"BASE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BASE_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the base object', NAMEINSOURCE '"BASE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BASE_OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the base object', NAMEINSOURCE '"BASE_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    BASE_OBJECT_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the base object', NAMEINSOURCE '"BASE_OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BASE_OBJECT_IS_TEMPORARY string(5) NOT NULL OPTIONS (ANNOTATION 'Temporary property of the base object', NAMEINSOURCE '"BASE_OBJECT_IS_TEMPORARY"', NATIVE_TYPE 'VARCHAR'),
    DEPENDENT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the dependent object', NAMEINSOURCE '"DEPENDENT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the dependent object', NAMEINSOURCE '"DEPENDENT_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the dependent dependent', NAMEINSOURCE '"DEPENDENT_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DEPENDENT_OBJECT_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the dependent dependent', NAMEINSOURCE '"DEPENDENT_OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEPENDENT_OBJECT_IS_TEMPORARY string(5) NOT NULL OPTIONS (ANNOTATION 'Temporary property of the dependent dependent', NAMEINSOURCE '"DEPENDENT_OBJECT_IS_TEMPORARY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TEMPORARY_OBJECT_DEPENDENCIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TEMPORARY_TABLE_COLUMNS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Name of the column', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the table column', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'SQL data type ID of the column', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'SQL data type name of the column', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "OFFSET" short OPTIONS (ANNOTATION 'Offset of the column in the record', NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LENGTH integer OPTIONS (ANNOTATION '# of chars for char types; # of max digits for numeric types; # of chars for datetime types; # of bytes for LOB types', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Numeric types: the maximum number of digits to the right of the decimal point; time, timestamp: the decimal digits are defined as the number of digits to the right of the decimal point in the second''s component of the data', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the column is allowed to accept a null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (ANNOTATION 'Default value of the column', NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    COLLATION string(5000) OPTIONS (ANNOTATION 'Collation of the column', NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Comments on the column', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(5000) OPTIONS (ANNOTATION 'Maximum value', NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    MIN_VALUE string(5000) OPTIONS (ANNOTATION 'Minimum value', NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    CS_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'Column store data type ID', NAMEINSOURCE '"CS_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Column store data type name', NAMEINSOURCE '"CS_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DDIC_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'DDIC data type ID', NAMEINSOURCE '"DDIC_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DDIC_DATA_TYPE_NAME string(7) OPTIONS (ANNOTATION 'DDIC data type name', NAMEINSOURCE '"DDIC_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMPRESSION_TYPE string(9) NOT NULL OPTIONS (ANNOTATION 'Type of compression: ''DEFAULT''/''PREFIXED''/''SPARSE''/''CLUSTERED''/''INDIRECT''/''RLE''', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(4) NOT NULL OPTIONS (ANNOTATION 'Type of index: ''NONE''/''FULL''', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_ID long OPTIONS (ANNOTATION 'ID of the column', NAMEINSOURCE '"COLUMN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRELOAD string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if a column is preloaded: ''TRUE''/''FALSE''', NAMEINSOURCE '"PRELOAD"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TEMPORARY_TABLE_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TEMPORARY_TABLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Comment on the table', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    FIXED_PART_SIZE short OPTIONS (ANNOTATION 'Fixed-size part of record', NAMEINSOURCE '"FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    IS_LOGGED string(5) OPTIONS (ANNOTATION 'Specifies whether logging is enabled for the table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_LOGGED"', NATIVE_TYPE 'VARCHAR'),
    IS_SYSTEM_TABLE string(5) OPTIONS (ANNOTATION 'Specifies whether the table is a system table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_SYSTEM_TABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_COLUMN_TABLE string(5) OPTIONS (ANNOTATION 'Specifies whether the table is a column table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_TABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_INSERT_ONLY string(5) OPTIONS (ANNOTATION 'Specifies whether the table is an ''insert only'' table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_INSERT_ONLY"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED_DATA string(5) OPTIONS (ANNOTATION 'Specifies whether the table can be shared among other instances: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED_DATA"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED_METADATA string(5) OPTIONS (ANNOTATION 'Specifies whether the table is a global table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED_METADATA"', NATIVE_TYPE 'VARCHAR'),
    SESSION_TYPE string(16) OPTIONS (ANNOTATION 'Session type: ''NONE''/''SIMPLE''/''HISTORY''. For ''HISTORY'', time travel is possible', NAMEINSOURCE '"SESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_TEMPORARY string(5) OPTIONS (ANNOTATION 'Specifies whether the table is a temporary table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TEMPORARY"', NATIVE_TYPE 'VARCHAR'),
    TEMPORARY_TABLE_TYPE string(8) OPTIONS (ANNOTATION 'Temporary table type', NAMEINSOURCE '"TEMPORARY_TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_USER_DEFINED_TYPE string(5) OPTIONS (ANNOTATION '''TRUE'' if user defined table type, ''FALSE'' otherwise', NAMEINSOURCE '"IS_USER_DEFINED_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PRELOAD string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses preloading, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"PRELOAD"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TEMPORARY_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TEMPORARY_VIEW_COLUMNS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'View name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_OID long OPTIONS (ANNOTATION 'Object ID of the view', NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'View column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the view column', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'SQL data type ID of the column', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'SQL data type name of the column', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "OFFSET" short OPTIONS (ANNOTATION 'Offset of the column in a record', NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LENGTH integer OPTIONS (ANNOTATION '# of chars for char types; # of max digits for numeric types; # of chars for datetime types; # of bytes for LOB types', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Numeric types: the maximum number of digits to the right of the decimal point; time, timestamp: the decimal digits are defined as the number of digits to the right of the decimal point in the second''s component of the data', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the column is allowed to accept null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (ANNOTATION 'Default value', NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    COLLATION string(5000) OPTIONS (ANNOTATION 'Collation', NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Description for this column', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(5000) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    MIN_VALUE string(5000) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    CS_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'Column store data type ID', NAMEINSOURCE '"CS_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Column store data type name', NAMEINSOURCE '"CS_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DDIC_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'DDIC data type ID', NAMEINSOURCE '"DDIC_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DDIC_DATA_TYPE_NAME string(7) OPTIONS (ANNOTATION 'DDIC data type name', NAMEINSOURCE '"DDIC_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMPRESSION_TYPE string(9) NOT NULL OPTIONS (ANNOTATION 'Type of compression: ''DEFAULT''/''PREFIXED''/''SPARSE''/''CLUSTERED''/''INDIRECT''/''RLE''', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(4) NOT NULL OPTIONS (ANNOTATION 'Type of index: ''NONE''/''FULL''', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_ID long OPTIONS (ANNOTATION 'ID of the column', NAMEINSOURCE '"COLUMN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRELOAD string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column is preloaded: ''TRUE''/''FALSE''', NAMEINSOURCE '"PRELOAD"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TEMPORARY_VIEW_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TEMPORARY_VIEWS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'View name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_OID long OPTIONS (ANNOTATION 'Object ID of the view', NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_UNICODE string(5) OPTIONS (ANNOTATION 'Specifies whether the query string contains Unicode: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNICODE"', NATIVE_TYPE 'VARCHAR'),
    IS_READ_ONLY string(5) OPTIONS (ANNOTATION 'Specifies whether this view is a read-only or an updatable view: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_READ_ONLY"', NATIVE_TYPE 'VARCHAR'),
    HAS_CHECK_OPTION string(5) OPTIONS (ANNOTATION 'Specifies whether this view has an updatable view condition: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_CHECK_OPTION"', NATIVE_TYPE 'VARCHAR'),
    HAS_COLUMN_ALIASE string(5) OPTIONS (ANNOTATION 'Specifies whether the view has a columns alias : ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_COLUMN_ALIASE"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION clob OPTIONS (ANNOTATION 'Definition of the view', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NCLOB'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Description on the view', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    IS_COLUMN_VIEW string(5) OPTIONS (ANNOTATION 'Specifies whether this view is a column view or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_VIEW"', NATIVE_TYPE 'VARCHAR'),
    VIEW_TYPE string(16) OPTIONS (ANNOTATION 'Type of view : ''ROW''/''OLAP''/''JOIN''/''HIERARCHY''/''CALC''', NAMEINSOURCE '"VIEW_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED string(5) OPTIONS (ANNOTATION 'Specifies whether the view metadata can be shared across tenants: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TEMPORARY_VIEWS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TENANTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Tenant service host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Tenant service internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TENANT_NAME string(256) OPTIONS (ANNOTATION 'Tenant name', NAMEINSOURCE '"TENANT_NAME"', NATIVE_TYPE 'VARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Creation time', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TENANT_STATUS string(16) OPTIONS (ANNOTATION 'Suspend status:  SUSPENDED, ACTIVE, PENDING', NAMEINSOURCE '"TENANT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    SQL_PORT integer OPTIONS (ANNOTATION 'Tenant service SQL port', NAMEINSOURCE '"SQL_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TENANTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TEXT_ANALYSIS_LANGUAGES" (
    LANGUAGE_NAME string(256) OPTIONS (ANNOTATION 'Language name', NAMEINSOURCE '"LANGUAGE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LANGUAGE_CODE string(2) OPTIONS (ANNOTATION 'Language ISO 639-1 code', NAMEINSOURCE '"LANGUAGE_CODE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TEXT_ANALYSIS_LANGUAGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TEXT_ANALYSIS_MIME_TYPES" (
    MIME_TYPE_NAME string(256) OPTIONS (ANNOTATION 'Name of the mime type', NAMEINSOURCE '"MIME_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    MIME_TYPE_DESCRIPTION string(256) OPTIONS (ANNOTATION 'Description of the mime type', NAMEINSOURCE '"MIME_TYPE_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TEXT_ANALYSIS_MIME_TYPES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TOPOLOGY_TREE" (
    PATH string(512) OPTIONS (ANNOTATION 'Path to Key', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    NAME string(256) OPTIONS (ANNOTATION 'Key name', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Key value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR'),
    LEAF string(5) OPTIONS (ANNOTATION 'Leaf flag: ''TRUE''/''FALSE''', NAMEINSOURCE '"LEAF"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TOPOLOGY_TREE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TRACE_CONFIGURATION" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    TRACE_DIRECTORY string(512) OPTIONS (ANNOTATION 'Default Trace level', NAMEINSOURCE '"TRACE_DIRECTORY"', NATIVE_TYPE 'VARCHAR'),
    FORMATTER string(16) OPTIONS (ANNOTATION 'Trace formatter name', NAMEINSOURCE '"FORMATTER"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME_PREFIX string(512) OPTIONS (ANNOTATION 'Trace file name prefix', NAMEINSOURCE '"FILE_NAME_PREFIX"', NATIVE_TYPE 'VARCHAR'),
    ALERT_FORMATTER string(16) OPTIONS (ANNOTATION 'Alert trace formatter name', NAMEINSOURCE '"ALERT_FORMATTER"', NATIVE_TYPE 'VARCHAR'),
    ALERT_FILE_NAME_PREFIX string(512) OPTIONS (ANNOTATION 'Alert trace file name prefix', NAMEINSOURCE '"ALERT_FILE_NAME_PREFIX"', NATIVE_TYPE 'VARCHAR'),
    TRACE_FLUSH_INTERVAL integer OPTIONS (ANNOTATION 'Trace flush interval', NAMEINSOURCE '"TRACE_FLUSH_INTERVAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_TRACE_LEVEL string(16) OPTIONS (ANNOTATION 'Trace level for alert traces', NAMEINSOURCE '"ALERT_TRACE_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_TRACE_LEVEL string(16) OPTIONS (ANNOTATION 'Default Trace level', NAMEINSOURCE '"DEFAULT_TRACE_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    TRACE_BUFFER_SIZE integer OPTIONS (ANNOTATION 'Trace buffer size', NAMEINSOURCE '"TRACE_BUFFER_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TRACE_FILE_SIZE long OPTIONS (ANNOTATION 'Max trace file size', NAMEINSOURCE '"MAX_TRACE_FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRACE_FILE_ID integer OPTIONS (ANNOTATION 'Max trace file id', NAMEINSOURCE '"MAX_TRACE_FILE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TRACE_FILES integer OPTIONS (ANNOTATION 'Max trace files to keep', NAMEINSOURCE '"MAX_TRACE_FILES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_TRACE_BUFFER_SIZE integer OPTIONS (ANNOTATION 'Alert trace buffer size', NAMEINSOURCE '"ALERT_TRACE_BUFFER_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_ALERT_TRACE_FILE_SIZE long OPTIONS (ANNOTATION 'Max alert trace file size', NAMEINSOURCE '"MAX_ALERT_TRACE_FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRACE_COMPRESSION_INTERVAL integer OPTIONS (ANNOTATION 'Interval to check for trace files that need to be compressed', NAMEINSOURCE '"TRACE_COMPRESSION_INTERVAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TRACE_CONFIGURATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TRACE_CONFIGURATION_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    TRACE_DIRECTORY string(512) OPTIONS (ANNOTATION 'Default Trace level', NAMEINSOURCE '"TRACE_DIRECTORY"', NATIVE_TYPE 'VARCHAR'),
    FORMATTER string(16) OPTIONS (ANNOTATION 'Trace formatter name', NAMEINSOURCE '"FORMATTER"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME_PREFIX string(512) OPTIONS (ANNOTATION 'Trace file name prefix', NAMEINSOURCE '"FILE_NAME_PREFIX"', NATIVE_TYPE 'VARCHAR'),
    ALERT_FORMATTER string(16) OPTIONS (ANNOTATION 'Alert trace formatter name', NAMEINSOURCE '"ALERT_FORMATTER"', NATIVE_TYPE 'VARCHAR'),
    ALERT_FILE_NAME_PREFIX string(512) OPTIONS (ANNOTATION 'Alert trace file name prefix', NAMEINSOURCE '"ALERT_FILE_NAME_PREFIX"', NATIVE_TYPE 'VARCHAR'),
    TRACE_FLUSH_INTERVAL integer OPTIONS (ANNOTATION 'Trace flush interval', NAMEINSOURCE '"TRACE_FLUSH_INTERVAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_TRACE_LEVEL string(16) OPTIONS (ANNOTATION 'Trace level for alert traces', NAMEINSOURCE '"ALERT_TRACE_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_TRACE_LEVEL string(16) OPTIONS (ANNOTATION 'Default Trace level', NAMEINSOURCE '"DEFAULT_TRACE_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    TRACE_BUFFER_SIZE integer OPTIONS (ANNOTATION 'Trace buffer size', NAMEINSOURCE '"TRACE_BUFFER_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TRACE_FILE_SIZE long OPTIONS (ANNOTATION 'Max trace file size', NAMEINSOURCE '"MAX_TRACE_FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRACE_FILE_ID integer OPTIONS (ANNOTATION 'Max trace file id', NAMEINSOURCE '"MAX_TRACE_FILE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TRACE_FILES integer OPTIONS (ANNOTATION 'Max trace files to keep', NAMEINSOURCE '"MAX_TRACE_FILES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_TRACE_BUFFER_SIZE integer OPTIONS (ANNOTATION 'Alert trace buffer size', NAMEINSOURCE '"ALERT_TRACE_BUFFER_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_ALERT_TRACE_FILE_SIZE long OPTIONS (ANNOTATION 'Max alert trace file size', NAMEINSOURCE '"MAX_ALERT_TRACE_FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRACE_COMPRESSION_INTERVAL integer OPTIONS (ANNOTATION 'Interval to check for trace files that need to be compressed', NAMEINSOURCE '"TRACE_COMPRESSION_INTERVAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TRACE_CONFIGURATION_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TRACEFILE_CONTENTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME string(256) OPTIONS (ANNOTATION 'File name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "OFFSET" long OPTIONS (ANNOTATION 'File offset', NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTENT string(1000) OPTIONS (ANNOTATION 'File content at offset', NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TRACEFILE_CONTENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TRACEFILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME string(256) OPTIONS (ANNOTATION 'File name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILE_SIZE long OPTIONS (ANNOTATION 'File size', NAMEINSOURCE '"FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILE_MTIME timestamp OPTIONS (ANNOTATION 'File date', NAMEINSOURCE '"FILE_MTIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TRACEFILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_TRANSACTIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID (This number is reused after a transaction is closed)', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Volume ID where the transaction has started', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PRIMARY_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Primary transaction object ID for the external transaction', NAMEINSOURCE '"PRIMARY_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_SEQUENCE integer OPTIONS (ANNOTATION 'Transaction sequence number in a transaction', NAMEINSOURCE '"TRANSACTION_SEQUENCE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID (This number is ever increasing)', NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRANSACTION_STATUS string(128) NOT NULL OPTIONS (ANNOTATION 'Transaction status; INACTIVE, ACTIVE, PRECOMMITTED, ABORTING, PARTIAL_ABORTING, ACTIVE_PREPARE_COMMIT', NAMEINSOURCE '"TRANSACTION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    TRANSACTION_TYPE string(128) NOT NULL OPTIONS (ANNOTATION 'Transaction type; USER, VERSION GARBAGE COLLECTION, DDL VERSION GARBAGE COLLECTION, INTERNAL, EXTERNAL', NAMEINSOURCE '"TRANSACTION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_TIME timestamp OPTIONS (ANNOTATION 'End time', NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    START_MVCC_TIMESTAMP long OPTIONS (ANNOTATION 'Internal MVCC timestamp of the transaction start time', NAMEINSOURCE '"START_MVCC_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    END_MVCC_TIMESTAMP long OPTIONS (ANNOTATION 'Internal MVCC timestamp of the transaction end time', NAMEINSOURCE '"END_MVCC_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTED_STATEMENT_COUNT integer OPTIONS (ANNOTATION 'Number of executed statements in the transaction', NAMEINSOURCE '"EXECUTED_STATEMENT_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CREATED_VERSION_COUNT integer OPTIONS (ANNOTATION 'Number of created versions in the transaction', NAMEINSOURCE '"CREATED_VERSION_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOCATED_VERSION_SIZE long OPTIONS (ANNOTATION 'Allocated version size in the transaction', NAMEINSOURCE '"ALLOCATED_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_LOCK_COUNT integer OPTIONS (ANNOTATION 'Number of acquired locks in the transaction', NAMEINSOURCE '"ACQUIRED_LOCK_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_WAIT_COUNT integer OPTIONS (ANNOTATION 'Number of lock waits in the transaction', NAMEINSOURCE '"LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_WAIT_TIME double OPTIONS (ANNOTATION 'Accumulated lock wait time in the transaction', NAMEINSOURCE '"LOCK_WAIT_TIME"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LOCK_WAIT_TIMEOUT integer OPTIONS (ANNOTATION 'Number of milliseconds a statement waits for a lock to be released', NAMEINSOURCE '"LOCK_WAIT_TIMEOUT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOG_SIZE long OPTIONS (ANNOTATION 'Generated log amount in the transaction', NAMEINSOURCE '"LOG_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CURRENT_STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Current statement ID', NAMEINSOURCE '"CURRENT_STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    CURRENT_STATEMENT_SEQUENCE integer OPTIONS (ANNOTATION 'Sequence number of the currently executed statement', NAMEINSOURCE '"CURRENT_STATEMENT_SEQUENCE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOCATED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory size occupied by the transaction', NAMEINSOURCE '"ALLOCATED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_METALOCK_INDEX integer OPTIONS (ANNOTATION 'Index of acquired metalock', NAMEINSOURCE '"ACQUIRED_METALOCK_INDEX"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOG_PARTITION_ID short OPTIONS (ANNOTATION 'Log partition ID of the transaction', NAMEINSOURCE '"LOG_PARTITION_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    REDO_LOG_AMOUNT long NOT NULL OPTIONS (ANNOTATION 'Size of redo log amount generated by the transaction', NAMEINSOURCE '"REDO_LOG_AMOUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNDO_LOG_AMOUNT long NOT NULL OPTIONS (ANNOTATION 'Size of undo log amount generated by the transaction', NAMEINSOURCE '"UNDO_LOG_AMOUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_MVCC_SNAPSHOT_TIMESTAMP long OPTIONS (ANNOTATION 'Logical timestamp of the first executed statement in the transaction', NAMEINSOURCE '"MIN_MVCC_SNAPSHOT_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMMIT_ID long OPTIONS (ANNOTATION 'Last commit ID of the transaction', NAMEINSOURCE '"LAST_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_STATEMENT_COUNT integer OPTIONS (ANNOTATION 'Number of opened cursors in the transaction', NAMEINSOURCE '"ACTIVE_STATEMENT_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ISOLATION_LEVEL string(128) OPTIONS (ANNOTATION 'Isolation level of each transaction: READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE', NAMEINSOURCE '"ISOLATION_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    LOG_FLUSH_ENABLED string(5) OPTIONS (ANNOTATION 'TRUE if logging is enabled for the transaction, FALSE otherwise', NAMEINSOURCE '"LOG_FLUSH_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    LOGGING_ENABLED string(5) OPTIONS (ANNOTATION 'TRUE if logging is enabled for the transaction, FALSE otherwise', NAMEINSOURCE '"LOGGING_ENABLED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_TRANSACTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_UNDO_CLEANUP_FILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(16) OPTIONS (ANNOTATION 'File type (UNDO, CLEANUP, FREE)', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    TID long OPTIONS (ANNOTATION 'Transaction ID', NAMEINSOURCE '"TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_COUNT long OPTIONS (ANNOTATION 'Page count', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_SIZE long OPTIONS (ANNOTATION 'Raw size', NAMEINSOURCE '"RAW_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLEANUP_MARK long OPTIONS (ANNOTATION 'Cleanup position mark', NAMEINSOURCE '"CLEANUP_MARK"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NESTED_SESSION_ID integer OPTIONS (ANNOTATION 'Nested session ID', NAMEINSOURCE '"NESTED_SESSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NESTED_SESSION_PARENT_ID integer OPTIONS (ANNOTATION 'Nested session parent ID', NAMEINSOURCE '"NESTED_SESSION_PARENT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEPENDENT_INDEX integer OPTIONS (ANNOTATION 'Dependent index during redo', NAMEINSOURCE '"DEPENDENT_INDEX"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INDOUBT_FLAG string(5) OPTIONS (ANNOTATION 'Indoubt flag for distributed transaction: ''TRUE''/''FALSE''', NAMEINSOURCE '"INDOUBT_FLAG"', NATIVE_TYPE 'VARCHAR'),
    TENTATIVE_PRECOMMIT_POSITION long OPTIONS (ANNOTATION 'Tentative precommit position', NAMEINSOURCE '"TENTATIVE_PRECOMMIT_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_UNDO_CLEANUP_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VERSION_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOCATED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Size of memory allocated for row-store version space', NAMEINSOURCE '"ALLOCATED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Size of memory actually used by row-store versions', NAMEINSOURCE '"USED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECLAIMED_VERSION_SIZE long OPTIONS (ANNOTATION 'Size of memory reclaimed by row-store version garbage collection', NAMEINSOURCE '"RECLAIMED_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_MEMORY_SIZE long OPTIONS (ANNOTATION 'Size of memory freed and reusable in row-store version space', NAMEINSOURCE '"FREE_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VERSION_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_FILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FILE_TYPE string(16) OPTIONS (ANNOTATION 'Type of file (DATA, LOG, TRACER, ...)', NAMEINSOURCE '"FILE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME string(256) OPTIONS (ANNOTATION 'File name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    USED_SIZE long OPTIONS (ANNOTATION 'Size of used data within file', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'Total file size', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_IO_DETAILED_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER_SIZE long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    APPEND_COUNT long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of active appends', NAMEINSOURCE '"ACTIVE_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (min)', NAMEINSOURCE '"MIN_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (avg)', NAMEINSOURCE '"AVG_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (max)', NAMEINSOURCE '"MAX_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (min)', NAMEINSOURCE '"MIN_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (avg)', NAMEINSOURCE '"AVG_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (max)', NAMEINSOURCE '"MAX_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COUNT long OPTIONS (ANNOTATION 'Count of writes', NAMEINSOURCE '"WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of active writes', NAMEINSOURCE '"ACTIVE_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (min)', NAMEINSOURCE '"MIN_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (avg)', NAMEINSOURCE '"AVG_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (max)', NAMEINSOURCE '"MAX_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (min)', NAMEINSOURCE '"MIN_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (avg)', NAMEINSOURCE '"AVG_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (max)', NAMEINSOURCE '"MAX_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of trigger asynchronous writes', NAMEINSOURCE '"TRIGGER_ASYNC_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_TRIGGER_ASYNC_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of active trigger asynchronous writes', NAMEINSOURCE '"ACTIVE_TRIGGER_ASYNC_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COUNT long OPTIONS (ANNOTATION 'Count of reads', NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_READ_COUNT long OPTIONS (ANNOTATION 'Count of active reads', NAMEINSOURCE '"ACTIVE_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (min)', NAMEINSOURCE '"MIN_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (avg)', NAMEINSOURCE '"AVG_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (max)', NAMEINSOURCE '"MAX_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (min)', NAMEINSOURCE '"MIN_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (avg)', NAMEINSOURCE '"AVG_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (max)', NAMEINSOURCE '"MAX_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_READ_COUNT long OPTIONS (ANNOTATION 'Count of trigger asynchronous reads', NAMEINSOURCE '"TRIGGER_ASYNC_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_TRIGGER_ASYNC_READ_COUNT long OPTIONS (ANNOTATION 'Count of active trigger asynchronous reads', NAMEINSOURCE '"ACTIVE_TRIGGER_ASYNC_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_IO_DETAILED_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_IO_DETAILED_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER_SIZE long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    APPEND_COUNT long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of active appends', NAMEINSOURCE '"ACTIVE_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (min)', NAMEINSOURCE '"MIN_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (avg)', NAMEINSOURCE '"AVG_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (max)', NAMEINSOURCE '"MAX_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (min)', NAMEINSOURCE '"MIN_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (avg)', NAMEINSOURCE '"AVG_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (max)', NAMEINSOURCE '"MAX_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COUNT long OPTIONS (ANNOTATION 'Count of writes', NAMEINSOURCE '"WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of active writes', NAMEINSOURCE '"ACTIVE_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (min)', NAMEINSOURCE '"MIN_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (avg)', NAMEINSOURCE '"AVG_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (max)', NAMEINSOURCE '"MAX_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (min)', NAMEINSOURCE '"MIN_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (avg)', NAMEINSOURCE '"AVG_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (max)', NAMEINSOURCE '"MAX_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of trigger asynchronous writes', NAMEINSOURCE '"TRIGGER_ASYNC_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_TRIGGER_ASYNC_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of active trigger asynchronous writes', NAMEINSOURCE '"ACTIVE_TRIGGER_ASYNC_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COUNT long OPTIONS (ANNOTATION 'Count of reads', NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_READ_COUNT long OPTIONS (ANNOTATION 'Count of active reads', NAMEINSOURCE '"ACTIVE_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (min)', NAMEINSOURCE '"MIN_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (avg)', NAMEINSOURCE '"AVG_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (max)', NAMEINSOURCE '"MAX_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (min)', NAMEINSOURCE '"MIN_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (avg)', NAMEINSOURCE '"AVG_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (max)', NAMEINSOURCE '"MAX_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_READ_COUNT long OPTIONS (ANNOTATION 'Count of trigger asynchronous reads', NAMEINSOURCE '"TRIGGER_ASYNC_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_TRIGGER_ASYNC_READ_COUNT long OPTIONS (ANNOTATION 'Count of active trigger asynchronous reads', NAMEINSOURCE '"ACTIVE_TRIGGER_ASYNC_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_IO_DETAILED_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_IO_PERFORMANCE_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_SYNC long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"READ_SYNC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_SYNC long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"WRITE_SYNC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_REQUESTS long OPTIONS (ANNOTATION 'Count of read requests', NAMEINSOURCE '"READ_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of write requests', NAMEINSOURCE '"WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COMPLETIONS long OPTIONS (ANNOTATION 'Count of read completions', NAMEINSOURCE '"READ_COMPLETIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COMPLETIONS long OPTIONS (ANNOTATION 'Count of write completions', NAMEINSOURCE '"WRITE_COMPLETIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_READS long OPTIONS (ANNOTATION 'Count of short reads', NAMEINSOURCE '"SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_WRITES long OPTIONS (ANNOTATION 'Count of short writes', NAMEINSOURCE '"SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELAYED_READ_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of delayed read requests', NAMEINSOURCE '"DELAYED_READ_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELAYED_WRITE_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of delayed write requests', NAMEINSOURCE '"DELAYED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEQUEUED_DELAYED_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of dequeued delayed requests', NAMEINSOURCE '"DEQUEUED_DELAYED_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESUBMITTED_DELAYED_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of resubmitted delayed requests', NAMEINSOURCE '"RESUBMITTED_DELAYED_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESUBMITTED_DELAYED_REQUESTS_DELAYED_AGAIN long NOT NULL OPTIONS (ANNOTATION 'Count of resubmitted delayed requests delayed', NAMEINSOURCE '"RESUBMITTED_DELAYED_REQUESTS_DELAYED_AGAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITEMS_IN_DELAY_QUEUE long NOT NULL OPTIONS (ANNOTATION 'Count of items in delay queue', NAMEINSOURCE '"ITEMS_IN_DELAY_QUEUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ITEMS_IN_DELAY_QUEUE long NOT NULL OPTIONS (ANNOTATION 'Maximum size of delay queue', NAMEINSOURCE '"MAX_ITEMS_IN_DELAY_QUEUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (last)', NAMEINSOURCE '"LAST_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (max)', NAMEINSOURCE '"MAX_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (min)', NAMEINSOURCE '"MIN_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (total)', NAMEINSOURCE '"SUM_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (avg)', NAMEINSOURCE '"AVG_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (last)', NAMEINSOURCE '"LAST_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (max)', NAMEINSOURCE '"MAX_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (min)', NAMEINSOURCE '"MIN_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (total)', NAMEINSOURCE '"SUM_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (avg)', NAMEINSOURCE '"AVG_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (last)', NAMEINSOURCE '"LAST_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (max)', NAMEINSOURCE '"MAX_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (min)', NAMEINSOURCE '"MIN_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (total)', NAMEINSOURCE '"SUM_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (avg)', NAMEINSOURCE '"AVG_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (last)', NAMEINSOURCE '"LAST_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (max)', NAMEINSOURCE '"MAX_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (min)', NAMEINSOURCE '"MIN_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (total)', NAMEINSOURCE '"SUM_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (avg)', NAMEINSOURCE '"AVG_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (last)', NAMEINSOURCE '"LAST_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (max)', NAMEINSOURCE '"MAX_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (min)', NAMEINSOURCE '"MIN_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (total)', NAMEINSOURCE '"SUM_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (avg)', NAMEINSOURCE '"AVG_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (last)', NAMEINSOURCE '"LAST_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (max)', NAMEINSOURCE '"MAX_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (min)', NAMEINSOURCE '"MIN_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (total)', NAMEINSOURCE '"SUM_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (avg)', NAMEINSOURCE '"AVG_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (last)', NAMEINSOURCE '"LAST_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (max)', NAMEINSOURCE '"MAX_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (min)', NAMEINSOURCE '"MIN_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (total)', NAMEINSOURCE '"SUM_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (avg)', NAMEINSOURCE '"AVG_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (last)', NAMEINSOURCE '"LAST_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (max)', NAMEINSOURCE '"MAX_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (min)', NAMEINSOURCE '"MIN_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (total)', NAMEINSOURCE '"SUM_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (avg)', NAMEINSOURCE '"AVG_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (last)', NAMEINSOURCE '"LAST_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (max)', NAMEINSOURCE '"MAX_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (min)', NAMEINSOURCE '"MIN_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (total)', NAMEINSOURCE '"SUM_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (avg)', NAMEINSOURCE '"AVG_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (last)', NAMEINSOURCE '"LAST_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (max)', NAMEINSOURCE '"MAX_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (min)', NAMEINSOURCE '"MIN_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (total)', NAMEINSOURCE '"SUM_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (avg)', NAMEINSOURCE '"AVG_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_IO_PERFORMANCE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_IO_PERFORMANCE_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_SYNC long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"READ_SYNC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_SYNC long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"WRITE_SYNC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_REQUESTS long OPTIONS (ANNOTATION 'Count of read requests', NAMEINSOURCE '"READ_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of write requests', NAMEINSOURCE '"WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COMPLETIONS long OPTIONS (ANNOTATION 'Count of read completions', NAMEINSOURCE '"READ_COMPLETIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COMPLETIONS long OPTIONS (ANNOTATION 'Count of write completions', NAMEINSOURCE '"WRITE_COMPLETIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_READS long OPTIONS (ANNOTATION 'Count of short reads', NAMEINSOURCE '"SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_WRITES long OPTIONS (ANNOTATION 'Count of short writes', NAMEINSOURCE '"SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELAYED_READ_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of delayed read requests', NAMEINSOURCE '"DELAYED_READ_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELAYED_WRITE_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of delayed write requests', NAMEINSOURCE '"DELAYED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEQUEUED_DELAYED_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of dequeued delayed requests', NAMEINSOURCE '"DEQUEUED_DELAYED_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESUBMITTED_DELAYED_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of resubmitted delayed requests', NAMEINSOURCE '"RESUBMITTED_DELAYED_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESUBMITTED_DELAYED_REQUESTS_DELAYED_AGAIN long NOT NULL OPTIONS (ANNOTATION 'Count of resubmitted delayed requests delayed', NAMEINSOURCE '"RESUBMITTED_DELAYED_REQUESTS_DELAYED_AGAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITEMS_IN_DELAY_QUEUE long NOT NULL OPTIONS (ANNOTATION 'Count of items in delay queue', NAMEINSOURCE '"ITEMS_IN_DELAY_QUEUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ITEMS_IN_DELAY_QUEUE long NOT NULL OPTIONS (ANNOTATION 'Maximum size of delay queue', NAMEINSOURCE '"MAX_ITEMS_IN_DELAY_QUEUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (last)', NAMEINSOURCE '"LAST_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (max)', NAMEINSOURCE '"MAX_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (min)', NAMEINSOURCE '"MIN_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (total)', NAMEINSOURCE '"SUM_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (avg)', NAMEINSOURCE '"AVG_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (last)', NAMEINSOURCE '"LAST_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (max)', NAMEINSOURCE '"MAX_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (min)', NAMEINSOURCE '"MIN_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (total)', NAMEINSOURCE '"SUM_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (avg)', NAMEINSOURCE '"AVG_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (last)', NAMEINSOURCE '"LAST_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (max)', NAMEINSOURCE '"MAX_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (min)', NAMEINSOURCE '"MIN_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (total)', NAMEINSOURCE '"SUM_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (avg)', NAMEINSOURCE '"AVG_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (last)', NAMEINSOURCE '"LAST_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (max)', NAMEINSOURCE '"MAX_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (min)', NAMEINSOURCE '"MIN_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (total)', NAMEINSOURCE '"SUM_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (avg)', NAMEINSOURCE '"AVG_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (last)', NAMEINSOURCE '"LAST_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (max)', NAMEINSOURCE '"MAX_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (min)', NAMEINSOURCE '"MIN_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (total)', NAMEINSOURCE '"SUM_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (avg)', NAMEINSOURCE '"AVG_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (last)', NAMEINSOURCE '"LAST_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (max)', NAMEINSOURCE '"MAX_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (min)', NAMEINSOURCE '"MIN_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (total)', NAMEINSOURCE '"SUM_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (avg)', NAMEINSOURCE '"AVG_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (last)', NAMEINSOURCE '"LAST_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (max)', NAMEINSOURCE '"MAX_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (min)', NAMEINSOURCE '"MIN_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (total)', NAMEINSOURCE '"SUM_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (avg)', NAMEINSOURCE '"AVG_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (last)', NAMEINSOURCE '"LAST_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (max)', NAMEINSOURCE '"MAX_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (min)', NAMEINSOURCE '"MIN_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (total)', NAMEINSOURCE '"SUM_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (avg)', NAMEINSOURCE '"AVG_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (last)', NAMEINSOURCE '"LAST_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (max)', NAMEINSOURCE '"MAX_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (min)', NAMEINSOURCE '"MIN_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (total)', NAMEINSOURCE '"SUM_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (avg)', NAMEINSOURCE '"AVG_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (last)', NAMEINSOURCE '"LAST_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (max)', NAMEINSOURCE '"MAX_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (min)', NAMEINSOURCE '"MIN_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (total)', NAMEINSOURCE '"SUM_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (avg)', NAMEINSOURCE '"AVG_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_IO_PERFORMANCE_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_IO_RETRY_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER_SIZE long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of all appends', NAMEINSOURCE '"TOTAL_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of failed appends', NAMEINSOURCE '"FAILED_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of all writes', NAMEINSOURCE '"TOTAL_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"FAILED_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of short writes', NAMEINSOURCE '"SHORT_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_SHORT_WRITES_COUNT long OPTIONS (ANNOTATION 'Count of requests with short writes', NAMEINSOURCE '"REQUESTS_WITH_SHORT_WRITES_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHORT_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short writes per request with short writes (avg)', NAMEINSOURCE '"AVG_SHORT_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHORT_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short writes per request (max)', NAMEINSOURCE '"MAX_SHORT_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"FULL_RETRY_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_FULL_RETRY_WRITES_COUNT long OPTIONS (ANNOTATION 'Count of requests with full retry writes', NAMEINSOURCE '"REQUESTS_WITH_FULL_RETRY_WRITES_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FULL_RETRY_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes per request with full retry writes (avg)', NAMEINSOURCE '"AVG_FULL_RETRY_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_FULL_RETRY_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes per request (max)', NAMEINSOURCE '"MAX_FULL_RETRY_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_COUNT long OPTIONS (ANNOTATION 'Count of all reads', NAMEINSOURCE '"TOTAL_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_READ_COUNT long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"FAILED_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_READ_COUNT long OPTIONS (ANNOTATION 'Count of short reads', NAMEINSOURCE '"SHORT_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_SHORT_READS_COUNT long OPTIONS (ANNOTATION 'Count of requests with short reads', NAMEINSOURCE '"REQUESTS_WITH_SHORT_READS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHORT_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short reads per request with short reads (avg)', NAMEINSOURCE '"AVG_SHORT_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHORT_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short reads per request (max)', NAMEINSOURCE '"MAX_SHORT_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_READ_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"FULL_RETRY_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_FULL_RETRY_READS_COUNT long OPTIONS (ANNOTATION 'Count of requests with full retry reads', NAMEINSOURCE '"REQUESTS_WITH_FULL_RETRY_READS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FULL_RETRY_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads per request with full retry reads (avg)', NAMEINSOURCE '"AVG_FULL_RETRY_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_FULL_RETRY_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads per request (max)', NAMEINSOURCE '"MAX_FULL_RETRY_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_IO_RETRY_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_IO_RETRY_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER_SIZE long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of all appends', NAMEINSOURCE '"TOTAL_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of failed appends', NAMEINSOURCE '"FAILED_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of all writes', NAMEINSOURCE '"TOTAL_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"FAILED_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of short writes', NAMEINSOURCE '"SHORT_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_SHORT_WRITES_COUNT long OPTIONS (ANNOTATION 'Count of requests with short writes', NAMEINSOURCE '"REQUESTS_WITH_SHORT_WRITES_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHORT_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short writes per request with short writes (avg)', NAMEINSOURCE '"AVG_SHORT_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHORT_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short writes per request (max)', NAMEINSOURCE '"MAX_SHORT_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"FULL_RETRY_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_FULL_RETRY_WRITES_COUNT long OPTIONS (ANNOTATION 'Count of requests with full retry writes', NAMEINSOURCE '"REQUESTS_WITH_FULL_RETRY_WRITES_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FULL_RETRY_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes per request with full retry writes (avg)', NAMEINSOURCE '"AVG_FULL_RETRY_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_FULL_RETRY_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes per request (max)', NAMEINSOURCE '"MAX_FULL_RETRY_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_COUNT long OPTIONS (ANNOTATION 'Count of all reads', NAMEINSOURCE '"TOTAL_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_READ_COUNT long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"FAILED_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_READ_COUNT long OPTIONS (ANNOTATION 'Count of short reads', NAMEINSOURCE '"SHORT_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_SHORT_READS_COUNT long OPTIONS (ANNOTATION 'Count of requests with short reads', NAMEINSOURCE '"REQUESTS_WITH_SHORT_READS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHORT_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short reads per request with short reads (avg)', NAMEINSOURCE '"AVG_SHORT_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHORT_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short reads per request (max)', NAMEINSOURCE '"MAX_SHORT_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_READ_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"FULL_RETRY_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_FULL_RETRY_READS_COUNT long OPTIONS (ANNOTATION 'Count of requests with full retry reads', NAMEINSOURCE '"REQUESTS_WITH_FULL_RETRY_READS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FULL_RETRY_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads per request with full retry reads (avg)', NAMEINSOURCE '"AVG_FULL_RETRY_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_FULL_RETRY_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads per request (max)', NAMEINSOURCE '"MAX_FULL_RETRY_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_IO_RETRY_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_IO_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    OPEN_CALL_COUNT long OPTIONS (ANNOTATION 'Count of open calls', NAMEINSOURCE '"OPEN_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLOSE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of close calls', NAMEINSOURCE '"CLOSE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXISTS_CALL_COUNT long OPTIONS (ANNOTATION 'Count of exists calls', NAMEINSOURCE '"EXISTS_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOVE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of remove calls', NAMEINSOURCE '"REMOVE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of resize calls', NAMEINSOURCE '"RESIZE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SYNC_CALL_COUNT long OPTIONS (ANNOTATION 'Count of sync calls', NAMEINSOURCE '"SYNC_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETSIZE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get size calls', NAMEINSOURCE '"GETSIZE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETMODIFICATIONTIME_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get modification time calls', NAMEINSOURCE '"GETMODIFICATIONTIME_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETDEVICEID_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get DeviceID calls', NAMEINSOURCE '"GETDEVICEID_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENQUEUED_WRITE_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of enqueued write requests (deprecated)', NAMEINSOURCE '"ENQUEUED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of blocked write requests', NAMEINSOURCE '"BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Max. count of blocked write requests', NAMEINSOURCE '"MAX_BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EOF_READS long OPTIONS (ANNOTATION 'Count of EOF reads', NAMEINSOURCE '"EOF_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SYNC_READS long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"TOTAL_SYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ASYNC_READS long NOT NULL OPTIONS (ANNOTATION 'Count of asynchronous reads with waiting', NAMEINSOURCE '"TOTAL_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_READS long OPTIONS (ANNOTATION 'Count of triggered asynchronous reads', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_READ_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous reads', NAMEINSOURCE '"TRIGGER_ASYNC_READ_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_READS long OPTIONS (ANNOTATION 'Count of reads that read less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"TOTAL_FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"TOTAL_FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data', NAMEINSOURCE '"TOTAL_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_TIME long OPTIONS (ANNOTATION 'Total read time', NAMEINSOURCE '"TOTAL_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPENDS long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"TOTAL_APPENDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SYNC_WRITES long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"TOTAL_SYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ASYNC_WRITES long NOT NULL OPTIONS (ANNOTATION 'Count of asynchronous writes with waiting', NAMEINSOURCE '"TOTAL_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_WRITES long OPTIONS (ANNOTATION 'Count of triggered asynchronous writes', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_WRITE_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous writes', NAMEINSOURCE '"TRIGGER_ASYNC_WRITE_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_WRITES long OPTIONS (ANNOTATION 'Count of writes that wrote less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"TOTAL_FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"TOTAL_FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data', NAMEINSOURCE '"TOTAL_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_TIME long OPTIONS (ANNOTATION 'Total write time', NAMEINSOURCE '"TOTAL_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_IO_TIME long OPTIONS (ANNOTATION 'Total IO time', NAMEINSOURCE '"TOTAL_IO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_IO_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_IO_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    OPEN_CALL_COUNT long OPTIONS (ANNOTATION 'Count of open calls', NAMEINSOURCE '"OPEN_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLOSE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of close calls', NAMEINSOURCE '"CLOSE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXISTS_CALL_COUNT long OPTIONS (ANNOTATION 'Count of exists calls', NAMEINSOURCE '"EXISTS_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOVE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of remove calls', NAMEINSOURCE '"REMOVE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of resize calls', NAMEINSOURCE '"RESIZE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SYNC_CALL_COUNT long OPTIONS (ANNOTATION 'Count of sync calls', NAMEINSOURCE '"SYNC_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETSIZE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get size calls', NAMEINSOURCE '"GETSIZE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETMODIFICATIONTIME_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get modification time calls', NAMEINSOURCE '"GETMODIFICATIONTIME_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETDEVICEID_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get DeviceID calls', NAMEINSOURCE '"GETDEVICEID_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENQUEUED_WRITE_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of enqueued write requests (deprecated)', NAMEINSOURCE '"ENQUEUED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of blocked write requests', NAMEINSOURCE '"BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Max. count of blocked write requests', NAMEINSOURCE '"MAX_BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EOF_READS long OPTIONS (ANNOTATION 'Count of EOF reads', NAMEINSOURCE '"EOF_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SYNC_READS long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"TOTAL_SYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ASYNC_READS long NOT NULL OPTIONS (ANNOTATION 'Count of asynchronous reads with waiting', NAMEINSOURCE '"TOTAL_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_READS long OPTIONS (ANNOTATION 'Count of triggered asynchronous reads', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_READ_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous reads', NAMEINSOURCE '"TRIGGER_ASYNC_READ_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_READS long OPTIONS (ANNOTATION 'Count of reads that read less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"TOTAL_FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"TOTAL_FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data', NAMEINSOURCE '"TOTAL_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_TIME long OPTIONS (ANNOTATION 'Total read time', NAMEINSOURCE '"TOTAL_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPENDS long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"TOTAL_APPENDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SYNC_WRITES long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"TOTAL_SYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ASYNC_WRITES long NOT NULL OPTIONS (ANNOTATION 'Count of asynchronous writes with waiting', NAMEINSOURCE '"TOTAL_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_WRITES long OPTIONS (ANNOTATION 'Count of triggered asynchronous writes', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_WRITE_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous writes', NAMEINSOURCE '"TRIGGER_ASYNC_WRITE_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_WRITES long OPTIONS (ANNOTATION 'Count of writes that wrote less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"TOTAL_FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"TOTAL_FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data', NAMEINSOURCE '"TOTAL_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_TIME long OPTIONS (ANNOTATION 'Total write time', NAMEINSOURCE '"TOTAL_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_IO_TIME long OPTIONS (ANNOTATION 'Total IO time', NAMEINSOURCE '"TOTAL_IO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_IO_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_IO_TOTAL_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of blocked write requests', NAMEINSOURCE '"BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Max. count of blocked write requests', NAMEINSOURCE '"MAX_BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READS long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"TOTAL_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_READS long OPTIONS (ANNOTATION 'Count of triggered asynchronous reads', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_READ_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous reads', NAMEINSOURCE '"TRIGGER_READ_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_READS long OPTIONS (ANNOTATION 'Count of reads that read less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"TOTAL_FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"TOTAL_FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data', NAMEINSOURCE '"TOTAL_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_TIME long OPTIONS (ANNOTATION 'Total read time', NAMEINSOURCE '"TOTAL_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPENDS long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"TOTAL_APPENDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITES long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"TOTAL_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_WRITES long OPTIONS (ANNOTATION 'Count of triggered asynchronous writes', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_WRITE_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous writes', NAMEINSOURCE '"TRIGGER_WRITE_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_WRITES long OPTIONS (ANNOTATION 'Count of writes that wrote less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"TOTAL_FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"TOTAL_FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data', NAMEINSOURCE '"TOTAL_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_TIME long OPTIONS (ANNOTATION 'Total write time', NAMEINSOURCE '"TOTAL_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_IO_TIME long OPTIONS (ANNOTATION 'Total IO time', NAMEINSOURCE '"TOTAL_IO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_IO_TOTAL_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_IO_TOTAL_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of blocked write requests', NAMEINSOURCE '"BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Max. count of blocked write requests', NAMEINSOURCE '"MAX_BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READS long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"TOTAL_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_READS long OPTIONS (ANNOTATION 'Count of triggered asynchronous reads', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_READ_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous reads', NAMEINSOURCE '"TRIGGER_READ_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_READS long OPTIONS (ANNOTATION 'Count of reads that read less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"TOTAL_FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"TOTAL_FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data', NAMEINSOURCE '"TOTAL_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_TIME long OPTIONS (ANNOTATION 'Total read time', NAMEINSOURCE '"TOTAL_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPENDS long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"TOTAL_APPENDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITES long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"TOTAL_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_WRITES long OPTIONS (ANNOTATION 'Count of triggered asynchronous writes', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_WRITE_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous writes', NAMEINSOURCE '"TRIGGER_WRITE_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_WRITES long OPTIONS (ANNOTATION 'Count of writes that wrote less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"TOTAL_FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"TOTAL_FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data', NAMEINSOURCE '"TOTAL_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_TIME long OPTIONS (ANNOTATION 'Total write time', NAMEINSOURCE '"TOTAL_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_IO_TIME long OPTIONS (ANNOTATION 'Total IO time', NAMEINSOURCE '"TOTAL_IO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_IO_TOTAL_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUME_SIZES" (
    VOLUME_ID integer OPTIONS (ANNOTATION 'Volume ID. See M_VOLUMES', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DISK_ID integer OPTIONS (ANNOTATION 'Disk ID. See M_DISKS', NAMEINSOURCE '"DISK_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_SIZE long OPTIONS (ANNOTATION 'Data area size', NAMEINSOURCE '"DATA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOG_SIZE long OPTIONS (ANNOTATION 'Log area size', NAMEINSOURCE '"LOG_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUME_SIZES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_VOLUMES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUBPATH string(512) OPTIONS (ANNOTATION 'Subpath appended to M_DISKS.PATH', NAMEINSOURCE '"SUBPATH"', NATIVE_TYPE 'VARCHAR'),
    LIVECACHE_STORE string(10) OPTIONS (ANNOTATION 'Livecache is enabled', NAMEINSOURCE '"LIVECACHE_STORE"', NATIVE_TYPE 'VARCHAR'),
    REMOVE_STATUS string(16) OPTIONS (ANNOTATION 'Remove progress', NAMEINSOURCE '"REMOVE_STATUS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_VOLUMES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_WORKLOAD" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXECUTION_COUNT long OPTIONS (ANNOTATION 'Total count of all executed statements for data manipulation, data definition, and system control', NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPILATION_COUNT long OPTIONS (ANNOTATION 'Number of statement preparation', NAMEINSOURCE '"COMPILATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_COUNT long OPTIONS (ANNOTATION 'Number of update transactions', NAMEINSOURCE '"UPDATE_TRANSACTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_COUNT long OPTIONS (ANNOTATION 'Number of transaction commits', NAMEINSOURCE '"COMMIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLLBACK_COUNT long OPTIONS (ANNOTATION 'Number of transaction rollbacks', NAMEINSOURCE '"ROLLBACK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CURRENT_EXECUTION_RATE double OPTIONS (ANNOTATION 'Current statement execution count per minute', NAMEINSOURCE '"CURRENT_EXECUTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_EXECUTION_RATE double OPTIONS (ANNOTATION 'Peak statement execution count per minute', NAMEINSOURCE '"PEAK_EXECUTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_COMPILATION_RATE double OPTIONS (ANNOTATION 'Current statement preparation count per minute', NAMEINSOURCE '"CURRENT_COMPILATION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_COMPILATION_RATE double OPTIONS (ANNOTATION 'Peak statement preparation count per minute', NAMEINSOURCE '"PEAK_COMPILATION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_UPDATE_TRANSACTION_RATE double OPTIONS (ANNOTATION 'Current update transaction count per minute', NAMEINSOURCE '"CURRENT_UPDATE_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_UPDATE_TRANSACTION_RATE double OPTIONS (ANNOTATION 'Peak update transaction count per minute', NAMEINSOURCE '"PEAK_UPDATE_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_TRANSACTION_RATE double OPTIONS (ANNOTATION 'Current transaction count per minute', NAMEINSOURCE '"CURRENT_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_TRANSACTION_RATE double OPTIONS (ANNOTATION 'Peak transaction count per minute', NAMEINSOURCE '"PEAK_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_COMMIT_RATE double OPTIONS (ANNOTATION 'Total number of commits per minute', NAMEINSOURCE '"CURRENT_COMMIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_COMMIT_RATE double OPTIONS (ANNOTATION 'Peak commit counts per minute', NAMEINSOURCE '"PEAK_COMMIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_ROLLBACK_RATE double OPTIONS (ANNOTATION 'Total number of rollbacks per minute', NAMEINSOURCE '"CURRENT_ROLLBACK_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_ROLLBACK_RATE double OPTIONS (ANNOTATION 'Peak rollback count per minute', NAMEINSOURCE '"PEAK_ROLLBACK_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_MEMORY_USAGE_RATE double OPTIONS (ANNOTATION 'Total size of used memory per minute', NAMEINSOURCE '"CURRENT_MEMORY_USAGE_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_MEMORY_USAGE_RATE double OPTIONS (ANNOTATION 'Peak size of used memory per minute', NAMEINSOURCE '"PEAK_MEMORY_USAGE_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_WORKLOAD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_XS_APPLICATION_ISSUES" (
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Name of the application', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ERROR_MESSAGE string(1024) OPTIONS (ANNOTATION 'Textual description of the issue', NAMEINSOURCE '"ERROR_MESSAGE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_XS_APPLICATION_ISSUES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.M_XS_APPLICATIONS" (
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Name of the application', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERY_UNIT string(256) OPTIONS (ANNOTATION 'Name of the delivery unit that this application belongs to', NAMEINSOURCE '"DELIVERY_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    VENDOR string(256) OPTIONS (ANNOTATION 'Vendor of the delivery unit', NAMEINSOURCE '"VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    VERSION string(256) OPTIONS (ANNOTATION 'Version information of the delivery unit', NAMEINSOURCE '"VERSION"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_SP string(16) OPTIONS (ANNOTATION 'SP version information of the delivery unit', NAMEINSOURCE '"VERSION_SP"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_PATCH string(16) OPTIONS (ANNOTATION 'Patch version information of the delivery unit', NAMEINSOURCE '"VERSION_PATCH"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."M_XS_APPLICATIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.OBJECT_DEPENDENCIES" (
    BASE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the base object', NAMEINSOURCE '"BASE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BASE_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the base object', NAMEINSOURCE '"BASE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BASE_OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the base object', NAMEINSOURCE '"BASE_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DEPENDENT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the dependent object', NAMEINSOURCE '"DEPENDENT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the dependent object', NAMEINSOURCE '"DEPENDENT_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the base dependent', NAMEINSOURCE '"DEPENDENT_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DEPENDENCY_TYPE integer OPTIONS (ANNOTATION 'Type of dependency between base and dependent object', NAMEINSOURCE '"DEPENDENCY_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."OBJECT_DEPENDENCIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.OBJECTS" (
    OBJECT_CATEGORY string(1) OPTIONS (ANNOTATION 'Object category of the object (default = null)', NAMEINSOURCE '"OBJECT_CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the object', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) NOT NULL OPTIONS (ANNOTATION 'Object type', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_OID long OPTIONS (ANNOTATION 'Object ID', NAMEINSOURCE '"OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.OWNERSHIP" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the object', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OWNER_NAME string(256) OPTIONS (ANNOTATION 'Name of the object owner', NAMEINSOURCE '"OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Object type', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_OID long OPTIONS (ANNOTATION 'Object ID', NAMEINSOURCE '"OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."OWNERSHIP"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.PRIVILEGES" (
    NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Privilege name', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(32) OPTIONS (ANNOTATION '''SYSTEMPRIVILEGE'', ''OBJECTPRIVILEGE'', ''PACKAGEPRIVILEGE'', ''APPLICATIONPRIVILEGE''', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."PRIVILEGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.PROCEDURE_DATAFLOWS" (
    DEFINER_NAME string(256) OPTIONS (NAMEINSOURCE '"DEFINER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_NAME string(256) OPTIONS (NAMEINSOURCE '"PROCEDURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATAFLOW_NAME string(128) OPTIONS (NAMEINSOURCE '"DATAFLOW_NAME"', NATIVE_TYPE 'VARCHAR'),
    DATAFLOW_ID long OPTIONS (NAMEINSOURCE '"DATAFLOW_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARENT_DATAFLOW_NAME string(128) OPTIONS (NAMEINSOURCE '"PARENT_DATAFLOW_NAME"', NATIVE_TYPE 'VARCHAR'),
    INLINED_DATAFLOW_NAME string(128) OPTIONS (NAMEINSOURCE '"INLINED_DATAFLOW_NAME"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(128) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."PROCEDURE_DATAFLOWS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.PROCEDURE_MAPPING" (
    DEFINER_NAME string(256) OPTIONS (NAMEINSOURCE '"DEFINER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_NAME string(256) OPTIONS (NAMEINSOURCE '"PROCEDURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT_ID long OPTIONS (NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE string(24) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    LINE integer OPTIONS (NAMEINSOURCE '"LINE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "COLUMN" integer OPTIONS (NAMEINSOURCE '"COLUMN"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT clob OPTIONS (NAMEINSOURCE '"STATEMENT"', NATIVE_TYPE 'NCLOB'),
    RENAMED_STATEMENT clob OPTIONS (NAMEINSOURCE '"RENAMED_STATEMENT"', NATIVE_TYPE 'NCLOB'),
    DATAFLOW_NAME string(128) OPTIONS (NAMEINSOURCE '"DATAFLOW_NAME"', NATIVE_TYPE 'VARCHAR'),
    VARIABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"VARIABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCENARIO_NAME string(256) OPTIONS (NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NODE_NAME string(256) OPTIONS (NAMEINSOURCE '"NODE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."PROCEDURE_MAPPING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.PROCEDURE_OBJECTS" (
    SCHEMA_NAME string(128) OPTIONS (ANNOTATION 'Schema name of the stored procedure', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_NAME string(128) OPTIONS (ANNOTATION 'Procedure name of the stored procedure', NAMEINSOURCE '"PROCEDURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SCHEMA string(128) OPTIONS (ANNOTATION 'Schema name of the object in the stored procedure code', NAMEINSOURCE '"OBJECT_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(128) OPTIONS (ANNOTATION 'Object name of the object in the  stored procedure code', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE_ID integer OPTIONS (ANNOTATION 'Type ID of the object in the stored procedure code', NAMEINSOURCE '"OBJECT_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the object in the stored procedure code', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    START_POSITION integer OPTIONS (ANNOTATION 'Start position of the object in the stored procedure code', NAMEINSOURCE '"START_POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    END_POSITION integer OPTIONS (ANNOTATION 'End position of the object in the stored procedure code', NAMEINSOURCE '"END_POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."PROCEDURE_OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.PROCEDURE_PARAMETERS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the stored procedure', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the stored procedure', NAMEINSOURCE '"PROCEDURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the stored procedure', NAMEINSOURCE '"PROCEDURE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMETER_NAME string(256) OPTIONS (ANNOTATION 'Parameter name', NAMEINSOURCE '"PARAMETER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'Data type ID', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Data type name', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'Parameter length', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Scale of the parameter', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the parameter', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_TYPE_SCHEMA string(256) OPTIONS (ANNOTATION 'Schema name of table type if DATA_TYPE_NAME is TABLE_TYPE', NAMEINSOURCE '"TABLE_TYPE_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE_NAME string(256) OPTIONS (ANNOTATION 'Name of table type if DATA_TYPE_NAME is TABLE_TYPE', NAMEINSOURCE '"TABLE_TYPE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PARAMETER_TYPE string(7) OPTIONS (ANNOTATION 'Parameter mode: ''IN''/''OUT''/''INOUT''', NAMEINSOURCE '"PARAMETER_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HAS_DEFAULT_VALUE string(5) OPTIONS (ANNOTATION 'Specifies whether the parameter has a default value or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_DEFAULT_VALUE"', NATIVE_TYPE 'VARCHAR'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the parameter accepts a null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."PROCEDURE_PARAMETERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.PROCEDURES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the stored procedure', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the stored procedure', NAMEINSOURCE '"PROCEDURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_OID long OPTIONS (ANNOTATION 'Object ID of the stored procedure', NAMEINSOURCE '"PROCEDURE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEFAULT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the unqualified objects in the procedure', NAMEINSOURCE '"DEFAULT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INPUT_PARAMETER_COUNT integer OPTIONS (ANNOTATION 'Input type parameter count', NAMEINSOURCE '"INPUT_PARAMETER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OUTPUT_PARAMETER_COUNT integer OPTIONS (ANNOTATION 'Output type parameter count', NAMEINSOURCE '"OUTPUT_PARAMETER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INOUT_PARAMETER_COUNT integer OPTIONS (ANNOTATION 'In-out type parameter count', NAMEINSOURCE '"INOUT_PARAMETER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RESULT_SET_COUNT integer OPTIONS (ANNOTATION 'Result set count', NAMEINSOURCE '"RESULT_SET_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_UNICODE string(5) OPTIONS (ANNOTATION 'Specifies whether the stored procedure contains Unicode or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNICODE"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION clob OPTIONS (ANNOTATION 'Query string of the stored procedure', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NCLOB'),
    PROCEDURE_TYPE string(10) NOT NULL OPTIONS (ANNOTATION 'Type of the stored procedure', NAMEINSOURCE '"PROCEDURE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    READ_ONLY string(5) OPTIONS (ANNOTATION 'Specifies whether the procedure is read-only or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"READ_ONLY"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the procedure is valid or not. This becomes ''FALSE'' when its base objects are changed or dropped: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."PROCEDURES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.QUERY_PLANS" (
    PLAN_ID string(256) OPTIONS (ANNOTATION 'Plan ID', NAMEINSOURCE '"PLAN_ID"', NATIVE_TYPE 'VARCHAR'),
    OPERATOR_NAME string(5000) OPTIONS (ANNOTATION 'Operator name', NAMEINSOURCE '"OPERATOR_NAME"', NATIVE_TYPE 'VARCHAR'),
    OPERATOR_DETAILS clob OPTIONS (ANNOTATION 'Detailed information on operators in the query plan', NAMEINSOURCE '"OPERATOR_DETAILS"', NATIVE_TYPE 'NCLOB'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUBTREE_COST double OPTIONS (ANNOTATION 'Subtree cost', NAMEINSOURCE '"SUBTREE_COST"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    INPUT_CARDINALITY double OPTIONS (ANNOTATION 'Input cardinality', NAMEINSOURCE '"INPUT_CARDINALITY"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OUTPUT_CARDINALITY double OPTIONS (ANNOTATION 'Output cardinality', NAMEINSOURCE '"OUTPUT_CARDINALITY"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OPERATOR_ID integer OPTIONS (ANNOTATION 'Operator ID', NAMEINSOURCE '"OPERATOR_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARENT_OPERATOR_ID integer OPTIONS (ANNOTATION 'Parent operator ID', NAMEINSOURCE '"PARENT_OPERATOR_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL integer OPTIONS (ANNOTATION 'Level', NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POSITION integer OPTIONS (ANNOTATION 'Position', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Timestamp', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(256) OPTIONS (ANNOTATION 'Host where the plan operator is executed', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port where the plan operator is executed', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."QUERY_PLANS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.REFERENTIAL_CONSTRAINTS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short NOT NULL OPTIONS (ANNOTATION 'Column position in this constraint', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    CONSTRAINT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Constraint name', NAMEINSOURCE '"CONSTRAINT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REFERENCED_SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the table referenced by this constraint', NAMEINSOURCE '"REFERENCED_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REFERENCED_TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name of the table referenced by this constraint', NAMEINSOURCE '"REFERENCED_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REFERENCED_COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of column referenced by this column', NAMEINSOURCE '"REFERENCED_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REFERENCED_CONSTRAINT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of unique constraint referenced by this constraint', NAMEINSOURCE '"REFERENCED_CONSTRAINT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UPDATE_RULE string(16) OPTIONS (ANNOTATION 'Update rule: ''CASCADE''/''SET NULL''/''SET DEFAULT''/''RESTRICT''', NAMEINSOURCE '"UPDATE_RULE"', NATIVE_TYPE 'VARCHAR'),
    DELETE_RULE string(16) OPTIONS (ANNOTATION 'Delete rule: ''CASCADE''/''SET NULL''/''SET DEFAULT''/''RESTRICT''', NAMEINSOURCE '"DELETE_RULE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."REFERENTIAL_CONSTRAINTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.REMOTE_SOURCES" (
    REMOTE_SOURCE_NAME string(256) OPTIONS (ANNOTATION 'Remote source name', NAMEINSOURCE '"REMOTE_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ADAPTER_NAME string(256) OPTIONS (ANNOTATION 'Adapter name', NAMEINSOURCE '"ADAPTER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONNECTION_INFO string(256) OPTIONS (ANNOTATION 'Connection information', NAMEINSOURCE '"CONNECTION_INFO"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."REMOTE_SOURCES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.REORG_OVERVIEW" (
    REORG_ID integer NOT NULL OPTIONS (ANNOTATION 'Reorg ID', NAMEINSOURCE '"REORG_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS string(32) OPTIONS (ANNOTATION 'Status message', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    START_DATE timestamp OPTIONS (ANNOTATION 'Start date', NAMEINSOURCE '"START_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_DATE timestamp OPTIONS (ANNOTATION 'End date', NAMEINSOURCE '"END_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    "USER" string(256) OPTIONS (ANNOTATION 'User', NAMEINSOURCE '"USER"', NATIVE_TYPE 'VARCHAR'),
    ALGORITHM_ID integer OPTIONS (ANNOTATION 'Algorithm ID', NAMEINSOURCE '"ALGORITHM_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARAMETERS string(1024) OPTIONS (ANNOTATION 'Parameter values for algorithm', NAMEINSOURCE '"PARAMETERS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."REORG_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.REORG_PLAN" (
    STEP_ID integer OPTIONS (ANNOTATION 'Step ID', NAMEINSOURCE '"STEP_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NEW_PARTITION_SPEC clob OPTIONS (ANNOTATION 'New partition specification', NAMEINSOURCE '"NEW_PARTITION_SPEC"', NATIVE_TYPE 'NCLOB'),
    OLD_PARTITION_SPEC clob OPTIONS (ANNOTATION 'Old partition specification', NAMEINSOURCE '"OLD_PARTITION_SPEC"', NATIVE_TYPE 'NCLOB'),
    "PARTITION" integer OPTIONS (ANNOTATION 'Partition ID', NAMEINSOURCE '"PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NEW_HOST string(64) OPTIONS (ANNOTATION 'Host where the table/partition is moved to', NAMEINSOURCE '"NEW_HOST"', NATIVE_TYPE 'VARCHAR'),
    NEW_PORT integer OPTIONS (ANNOTATION 'Port where the table/partition is moved to', NAMEINSOURCE '"NEW_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OLD_HOST string(64) OPTIONS (ANNOTATION 'Host where the table/partition was located', NAMEINSOURCE '"OLD_HOST"', NATIVE_TYPE 'VARCHAR'),
    OLD_PORT integer OPTIONS (ANNOTATION 'Port where the table/partition was located', NAMEINSOURCE '"OLD_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."REORG_PLAN"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.REORG_PLAN_INFOS" (
    KEY string(256) OPTIONS (ANNOTATION 'Key', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(1024) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."REORG_PLAN_INFOS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.REORG_STEPS" (
    REORG_ID integer NOT NULL OPTIONS (ANNOTATION 'Reorg ID', NAMEINSOURCE '"REORG_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STEP_ID integer NOT NULL OPTIONS (ANNOTATION 'Step ID', NAMEINSOURCE '"STEP_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NEW_PARTITION_SPEC clob OPTIONS (ANNOTATION 'New partition specification', NAMEINSOURCE '"NEW_PARTITION_SPEC"', NATIVE_TYPE 'NCLOB'),
    OLD_PARTITION_SPEC clob OPTIONS (ANNOTATION 'Old partition specification', NAMEINSOURCE '"OLD_PARTITION_SPEC"', NATIVE_TYPE 'NCLOB'),
    "PARTITION" integer OPTIONS (ANNOTATION 'Partition ID', NAMEINSOURCE '"PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NEW_HOST string(64) OPTIONS (ANNOTATION 'Host where the table/partition is moved to', NAMEINSOURCE '"NEW_HOST"', NATIVE_TYPE 'VARCHAR'),
    NEW_PORT integer OPTIONS (ANNOTATION 'Port where the table/partition is moved to', NAMEINSOURCE '"NEW_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OLD_HOST string(64) OPTIONS (ANNOTATION 'Host where the table/partition was located', NAMEINSOURCE '"OLD_HOST"', NATIVE_TYPE 'VARCHAR'),
    OLD_PORT integer OPTIONS (ANNOTATION 'Port where the table/partition was located', NAMEINSOURCE '"OLD_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS string(32) OPTIONS (ANNOTATION 'Status message', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    "ERROR" string(1024) OPTIONS (ANNOTATION 'Error message', NAMEINSOURCE '"ERROR"', NATIVE_TYPE 'VARCHAR'),
    START_DATE timestamp OPTIONS (ANNOTATION 'Start date', NAMEINSOURCE '"START_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_DATE timestamp OPTIONS (ANNOTATION 'End date', NAMEINSOURCE '"END_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."REORG_STEPS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.RESERVED_KEYWORDS" (
    RESERVED_KEYWORD string(256) OPTIONS (ANNOTATION 'Reserved keyword', NAMEINSOURCE '"RESERVED_KEYWORD"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."RESERVED_KEYWORDS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.ROLES" (
    ROLE_NAME string(256) OPTIONS (ANNOTATION 'Role name', NAMEINSOURCE '"ROLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROLE_ID long OPTIONS (ANNOTATION 'Role ID', NAMEINSOURCE '"ROLE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLE_MODE string(5) NOT NULL OPTIONS (ANNOTATION 'Mode of the role: ''LOCAL''', NAMEINSOURCE '"ROLE_MODE"', NATIVE_TYPE 'VARCHAR'),
    GLOBAL_IDENTITY string(256) OPTIONS (ANNOTATION 'Identity specified for role with ROLE_MODE GLOBAL', NAMEINSOURCE '"GLOBAL_IDENTITY"', NATIVE_TYPE 'NVARCHAR'),
    CREATOR string(256) OPTIONS (ANNOTATION 'Name of user who created the role', NAMEINSOURCE '"CREATOR"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Time the role was created', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CONTEXT string(2048) OPTIONS (ANNOTATION 'Context the role is valid for', NAMEINSOURCE '"CONTEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."ROLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.SAML_PROVIDERS" (
    SAML_PROVIDER_NAME string(256) OPTIONS (ANNOTATION 'Provider name', NAMEINSOURCE '"SAML_PROVIDER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_NAME string(512) OPTIONS (ANNOTATION 'Subject of the X.509 certificate of the SAML provider', NAMEINSOURCE '"SUBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ISSUER_NAME string(512) OPTIONS (ANNOTATION 'Issuer of the X.509 certificate of the SAML provider', NAMEINSOURCE '"ISSUER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."SAML_PROVIDERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.SAML_USER_MAPPINGS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SAML_PROVIDER_NAME string(256) OPTIONS (ANNOTATION 'Provider name', NAMEINSOURCE '"SAML_PROVIDER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    EXTERNAL_IDENTITY string(256) OPTIONS (ANNOTATION 'Name of the user known to the provider', NAMEINSOURCE '"EXTERNAL_IDENTITY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."SAML_USER_MAPPINGS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::ALLOCATOR_HISTORY" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    Allocator string(128) OPTIONS (NAMEINSOURCE '"Allocator"', NATIVE_TYPE 'VARCHAR'),
    SnapshotId timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SnapshotId"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SnapshotIdText string(5000) OPTIONS (NAMEINSOURCE '"SnapshotIdText"', NATIVE_TYPE 'VARCHAR'),
    ValueExclusive long OPTIONS (NAMEINSOURCE '"ValueExclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ValueInclusive long OPTIONS (NAMEINSOURCE '"ValueInclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ComponentName string(64) OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::ALLOCATOR_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::ALLOCATORS" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ComponentName string(64) OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    Allocator string(128) OPTIONS (NAMEINSOURCE '"Allocator"', NATIVE_TYPE 'VARCHAR'),
    UsedMemoryExclusive long OPTIONS (NAMEINSOURCE '"UsedMemoryExclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UsedMemoryInclusive long OPTIONS (NAMEINSOURCE '"UsedMemoryInclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UsedMemoryInclusivePercentage bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"UsedMemoryInclusivePercentage"', NATIVE_TYPE 'DECIMAL'),
    TotalUsedMemory long OPTIONS (NAMEINSOURCE '"TotalUsedMemory"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    Depth long OPTIONS (NAMEINSOURCE '"Depth"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::ALLOCATORS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::ALLOCATORS_PIE" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ComponentName string(64) OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    Allocator string(128) OPTIONS (NAMEINSOURCE '"Allocator"', NATIVE_TYPE 'VARCHAR'),
    UsedMemoryExclusive long OPTIONS (NAMEINSOURCE '"UsedMemoryExclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::ALLOCATORS_PIE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::COMPONENT_ALLOCATOR_HISTORY" (
    Host string(64) NOT NULL OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer NOT NULL OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SnapshotId timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SnapshotId"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SnapshotIdText string(5000) OPTIONS (NAMEINSOURCE '"SnapshotIdText"', NATIVE_TYPE 'VARCHAR'),
    Allocator string(128) NOT NULL OPTIONS (NAMEINSOURCE '"Allocator"', NATIVE_TYPE 'VARCHAR'),
    UsedMemoryExclusive long OPTIONS (NAMEINSOURCE '"UsedMemoryExclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UsedMemoryInclusive long OPTIONS (NAMEINSOURCE '"UsedMemoryInclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ComponentName string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    UsedMemoryInclusivePercentage bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"UsedMemoryInclusivePercentage"', NATIVE_TYPE 'DECIMAL'),
    TotalUsedMemory long OPTIONS (NAMEINSOURCE '"TotalUsedMemory"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "Value" long OPTIONS (NAMEINSOURCE '"Value"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::COMPONENT_ALLOCATOR_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::COMPONENT_HISTORY" (
    Host string(64) NOT NULL OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer NOT NULL OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ComponentName string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    SnapshotId timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SnapshotId"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SnapshotIdText string(5000) OPTIONS (NAMEINSOURCE '"SnapshotIdText"', NATIVE_TYPE 'VARCHAR'),
    "Value" long OPTIONS (NAMEINSOURCE '"Value"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AllocatorsCount long NOT NULL OPTIONS (NAMEINSOURCE '"AllocatorsCount"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::COMPONENT_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::COMPONENTS" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ComponentName string(64) OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    UsedMemorySize long OPTIONS (NAMEINSOURCE '"UsedMemorySize"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AllocatorsCount long OPTIONS (NAMEINSOURCE '"AllocatorsCount"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::COMPONENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::COMPONENTS_PIE" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ComponentName string(64) OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    UsedMemorySize long OPTIONS (NAMEINSOURCE '"UsedMemorySize"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AllocatorsCount long OPTIONS (NAMEINSOURCE '"AllocatorsCount"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::COMPONENTS_PIE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::FEATURES" (
    FEATURE_NAME string(32) NOT NULL OPTIONS (ANNOTATION 'feature name', NAMEINSOURCE '"FEATURE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FEATURE_VERSION integer NOT NULL OPTIONS (ANNOTATION 'feature version', NAMEINSOURCE '"FEATURE_VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::FEATURES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::HOST_INFORMATION" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Key string(32) OPTIONS (NAMEINSOURCE '"Key"', NATIVE_TYPE 'VARCHAR'),
    "Value" string(256) OPTIONS (NAMEINSOURCE '"Value"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::HOST_INFORMATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::HOSTS" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::HOSTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::MEMORY_OVERVIEW" (
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    RUUP long NOT NULL OPTIONS (NAMEINSOURCE '"RUUP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUFP long NOT NULL OPTIONS (NAMEINSOURCE '"RUFP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUIU long NOT NULL OPTIONS (NAMEINSOURCE '"RUIU"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUAS long NOT NULL OPTIONS (NAMEINSOURCE '"RUAS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUAL long NOT NULL OPTIONS (NAMEINSOURCE '"RUAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUCS long NOT NULL OPTIONS (NAMEINSOURCE '"RUCS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CSUT long NOT NULL OPTIONS (NAMEINSOURCE '"CSUT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CSST long NOT NULL OPTIONS (NAMEINSOURCE '"CSST"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RSUT long NOT NULL OPTIONS (NAMEINSOURCE '"RSUT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RSUI long NOT NULL OPTIONS (NAMEINSOURCE '"RSUI"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RSST long NOT NULL OPTIONS (NAMEINSOURCE '"RSST"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RSSI long NOT NULL OPTIONS (NAMEINSOURCE '"RSSI"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SMSS long NOT NULL OPTIONS (NAMEINSOURCE '"SMSS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HMPM long NOT NULL OPTIONS (NAMEINSOURCE '"HMPM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SMNS long NOT NULL OPTIONS (NAMEINSOURCE '"SMNS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHTP long NOT NULL OPTIONS (NAMEINSOURCE '"SHTP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHVR long NOT NULL OPTIONS (NAMEINSOURCE '"SHVR"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HMMM long NOT NULL OPTIONS (NAMEINSOURCE '"HMMM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HMST long NOT NULL OPTIONS (NAMEINSOURCE '"HMST"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HMRT long NOT NULL OPTIONS (NAMEINSOURCE '"HMRT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HMRS long NOT NULL OPTIONS (NAMEINSOURCE '"HMRS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHCT long NOT NULL OPTIONS (NAMEINSOURCE '"SHCT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHPL long NOT NULL OPTIONS (NAMEINSOURCE '"SHPL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CSTN long NOT NULL OPTIONS (NAMEINSOURCE '"CSTN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RSTN long NOT NULL OPTIONS (NAMEINSOURCE '"RSTN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::MEMORY_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::RESOURCE_INFORMATION" (
    ID integer NOT NULL OPTIONS (ANNOTATION 'id', NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RESOURCE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'resource name', NAMEINSOURCE '"RESOURCE_NAME"', NATIVE_TYPE 'VARCHAR'),
    CATEGORY_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'category name', NAMEINSOURCE '"CATEGORY_NAME"', NATIVE_TYPE 'VARCHAR'),
    MEASURE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'measure name', NAMEINSOURCE '"MEASURE_NAME"', NATIVE_TYPE 'VARCHAR'),
    UNIT string(12) OPTIONS (ANNOTATION 'the unit bytes,kb,mb,gb,tb,%', NAMEINSOURCE '"UNIT"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_TYPE string(8) OPTIONS (ANNOTATION 'source type', NAMEINSOURCE '"SOURCE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'source schema name', NAMEINSOURCE '"SOURCE_SCHEMA_NAME"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_TABLE_NAME string(256) OPTIONS (ANNOTATION 'source table name', NAMEINSOURCE '"SOURCE_TABLE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_COLUMN_NAME string(256) OPTIONS (ANNOTATION 'source column name', NAMEINSOURCE '"SOURCE_COLUMN_NAME"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_CONDITION string(256) OPTIONS (ANNOTATION 'source condition', NAMEINSOURCE '"SOURCE_CONDITION"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_GROUPBY string(256) OPTIONS (ANNOTATION 'source group by', NAMEINSOURCE '"SOURCE_GROUPBY"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_AGGREGATION string(256) OPTIONS (ANNOTATION 'source aggregation', NAMEINSOURCE '"SOURCE_AGGREGATION"', NATIVE_TYPE 'VARCHAR'),
    USE_DELTA string(5) OPTIONS (ANNOTATION 'use delta', NAMEINSOURCE '"USE_DELTA"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::RESOURCE_INFORMATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::RESOURCE_INFORMATION_IN" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TABLE_NAME string(1) NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_POINT long NOT NULL OPTIONS (NAMEINSOURCE '"DATA_POINT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::RESOURCE_INFORMATION_IN"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::RESOURCE_INFORMATION_OUT" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_POINT long NOT NULL OPTIONS (NAMEINSOURCE '"DATA_POINT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::RESOURCE_INFORMATION_OUT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::SERVICE_MEMORY" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EffectiveAllocationLimit long OPTIONS (NAMEINSOURCE '"EffectiveAllocationLimit"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::SERVICE_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::SERVICES" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ServiceName string(32) OPTIONS (NAMEINSOURCE '"ServiceName"', NATIVE_TYPE 'VARCHAR'),
    ProcessId integer OPTIONS (NAMEINSOURCE '"ProcessId"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    Status string(16) OPTIONS (NAMEINSOURCE '"Status"', NATIVE_TYPE 'VARCHAR'),
    SqlPort integer OPTIONS (NAMEINSOURCE '"SqlPort"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CoordinatorType string(16) OPTIONS (NAMEINSOURCE '"CoordinatorType"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::SERVICES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.admin.ds::SYS_TIMESTAMP" (
    SYS_TIMESTAMP string(5000) OPTIONS (NAMEINSOURCE '"SYS_TIMESTAMP"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.admin.ds::SYS_TIMESTAMP"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Conversions.T006" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    MSEHI string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MSEHI"', NATIVE_TYPE 'NVARCHAR'),
    KZEX3 string(1) OPTIONS (NAMEINSOURCE '"KZEX3"', NATIVE_TYPE 'NVARCHAR'),
    KZEX6 string(1) OPTIONS (NAMEINSOURCE '"KZEX6"', NATIVE_TYPE 'NVARCHAR'),
    ANDEC integer OPTIONS (NAMEINSOURCE '"ANDEC"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KZKEH string(1) OPTIONS (NAMEINSOURCE '"KZKEH"', NATIVE_TYPE 'NVARCHAR'),
    KZWOB string(1) OPTIONS (NAMEINSOURCE '"KZWOB"', NATIVE_TYPE 'NVARCHAR'),
    KZ1EH string(1) OPTIONS (NAMEINSOURCE '"KZ1EH"', NATIVE_TYPE 'NVARCHAR'),
    KZ2EH string(1) OPTIONS (NAMEINSOURCE '"KZ2EH"', NATIVE_TYPE 'NVARCHAR'),
    DIMID string(6) OPTIONS (NAMEINSOURCE '"DIMID"', NATIVE_TYPE 'NVARCHAR'),
    ZAEHL integer OPTIONS (NAMEINSOURCE '"ZAEHL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NENNR integer OPTIONS (NAMEINSOURCE '"NENNR"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXP10 integer OPTIONS (NAMEINSOURCE '"EXP10"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ADDKO bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"ADDKO"', NATIVE_TYPE 'DECIMAL'),
    EXPON integer OPTIONS (NAMEINSOURCE '"EXPON"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DECAN integer OPTIONS (NAMEINSOURCE '"DECAN"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ISOCODE string(3) OPTIONS (NAMEINSOURCE '"ISOCODE"', NATIVE_TYPE 'NVARCHAR'),
    "PRIMARY" string(1) OPTIONS (NAMEINSOURCE '"PRIMARY"', NATIVE_TYPE 'NVARCHAR'),
    TEMP_VALUE double OPTIONS (NAMEINSOURCE '"TEMP_VALUE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TEMP_UNIT string(3) OPTIONS (NAMEINSOURCE '"TEMP_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    FAMUNIT string(3) OPTIONS (NAMEINSOURCE '"FAMUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRESS_VAL double OPTIONS (NAMEINSOURCE '"PRESS_VAL"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PRESS_UNIT string(3) OPTIONS (NAMEINSOURCE '"PRESS_UNIT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Conversions.T006"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Conversions.T006A" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    SPRAS string(1) NOT NULL OPTIONS (NAMEINSOURCE '"SPRAS"', NATIVE_TYPE 'NVARCHAR'),
    MSEHI string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MSEHI"', NATIVE_TYPE 'NVARCHAR'),
    KZEX3 string(3) OPTIONS (NAMEINSOURCE '"KZEX3"', NATIVE_TYPE 'NVARCHAR'),
    KZEX6 string(6) OPTIONS (NAMEINSOURCE '"KZEX6"', NATIVE_TYPE 'NVARCHAR'),
    MSEHT string(10) OPTIONS (NAMEINSOURCE '"MSEHT"', NATIVE_TYPE 'NVARCHAR'),
    MSEHL string(30) OPTIONS (NAMEINSOURCE '"MSEHL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Conversions.T006A"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Conversions.TCURC" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    WAERS string(5) NOT NULL OPTIONS (NAMEINSOURCE '"WAERS"', NATIVE_TYPE 'NVARCHAR'),
    ISOCD string(3) OPTIONS (NAMEINSOURCE '"ISOCD"', NATIVE_TYPE 'NVARCHAR'),
    ALTWR string(3) OPTIONS (NAMEINSOURCE '"ALTWR"', NATIVE_TYPE 'NVARCHAR'),
    GDATU string(8) OPTIONS (NAMEINSOURCE '"GDATU"', NATIVE_TYPE 'NVARCHAR'),
    XPRIMARY string(1) OPTIONS (NAMEINSOURCE '"XPRIMARY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Conversions.TCURC"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Conversions.TCURF" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    KURST string(4) NOT NULL OPTIONS (NAMEINSOURCE '"KURST"', NATIVE_TYPE 'NVARCHAR'),
    FCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"FCURR"', NATIVE_TYPE 'NVARCHAR'),
    TCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"TCURR"', NATIVE_TYPE 'NVARCHAR'),
    GDATU string(8) NOT NULL OPTIONS (NAMEINSOURCE '"GDATU"', NATIVE_TYPE 'NVARCHAR'),
    FFACT bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"FFACT"', NATIVE_TYPE 'DECIMAL'),
    TFACT bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"TFACT"', NATIVE_TYPE 'DECIMAL'),
    ABWCT string(4) OPTIONS (NAMEINSOURCE '"ABWCT"', NATIVE_TYPE 'NVARCHAR'),
    ABWGA string(8) OPTIONS (NAMEINSOURCE '"ABWGA"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Conversions.TCURF"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Conversions.TCURN" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    FCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"FCURR"', NATIVE_TYPE 'NVARCHAR'),
    TCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"TCURR"', NATIVE_TYPE 'NVARCHAR'),
    GDATU string(8) NOT NULL OPTIONS (NAMEINSOURCE '"GDATU"', NATIVE_TYPE 'NVARCHAR'),
    NOTATION string(1) OPTIONS (NAMEINSOURCE '"NOTATION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Conversions.TCURN"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Conversions.TCURR" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    KURST string(4) NOT NULL OPTIONS (NAMEINSOURCE '"KURST"', NATIVE_TYPE 'NVARCHAR'),
    FCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"FCURR"', NATIVE_TYPE 'NVARCHAR'),
    TCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"TCURR"', NATIVE_TYPE 'NVARCHAR'),
    GDATU string(8) NOT NULL OPTIONS (NAMEINSOURCE '"GDATU"', NATIVE_TYPE 'NVARCHAR'),
    UKURS bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"UKURS"', NATIVE_TYPE 'DECIMAL'),
    FFACT bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"FFACT"', NATIVE_TYPE 'DECIMAL'),
    TFACT bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"TFACT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Conversions.TCURR"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Conversions.TCURT" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    SPRAS string(1) NOT NULL OPTIONS (NAMEINSOURCE '"SPRAS"', NATIVE_TYPE 'NVARCHAR'),
    WAERS string(5) NOT NULL OPTIONS (NAMEINSOURCE '"WAERS"', NATIVE_TYPE 'NVARCHAR'),
    LTEXT string(40) OPTIONS (NAMEINSOURCE '"LTEXT"', NATIVE_TYPE 'NVARCHAR'),
    KTEXT string(15) OPTIONS (NAMEINSOURCE '"KTEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Conversions.TCURT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Conversions.TCURV" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    KURST string(4) NOT NULL OPTIONS (NAMEINSOURCE '"KURST"', NATIVE_TYPE 'NVARCHAR'),
    XINVR string(1) OPTIONS (NAMEINSOURCE '"XINVR"', NATIVE_TYPE 'NVARCHAR'),
    BWAER string(5) OPTIONS (NAMEINSOURCE '"BWAER"', NATIVE_TYPE 'NVARCHAR'),
    XBWRL string(1) OPTIONS (NAMEINSOURCE '"XBWRL"', NATIVE_TYPE 'NVARCHAR'),
    GKUZU string(4) OPTIONS (NAMEINSOURCE '"GKUZU"', NATIVE_TYPE 'NVARCHAR'),
    BKUZU string(4) OPTIONS (NAMEINSOURCE '"BKUZU"', NATIVE_TYPE 'NVARCHAR'),
    XFIXD string(1) OPTIONS (NAMEINSOURCE '"XFIXD"', NATIVE_TYPE 'NVARCHAR'),
    XEURO string(1) OPTIONS (NAMEINSOURCE '"XEURO"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Conversions.TCURV"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Conversions.TCURW" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    SPRAS string(1) NOT NULL OPTIONS (NAMEINSOURCE '"SPRAS"', NATIVE_TYPE 'NVARCHAR'),
    KURST string(4) NOT NULL OPTIONS (NAMEINSOURCE '"KURST"', NATIVE_TYPE 'NVARCHAR'),
    CURVW string(40) OPTIONS (NAMEINSOURCE '"CURVW"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Conversions.TCURW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Conversions.TCURX" (
    CURRKEY string(5) NOT NULL OPTIONS (NAMEINSOURCE '"CURRKEY"', NATIVE_TYPE 'NVARCHAR'),
    CURRDEC integer OPTIONS (NAMEINSOURCE '"CURRDEC"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Conversions.TCURX"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.HistT" (
    "CREATEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"CREATEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    CREATEDAT date OPTIONS (NAMEINSOURCE '"CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "CHANGEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"CHANGEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    CHANGEDAT date OPTIONS (NAMEINSOURCE '"CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.HistT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.MapKeys" (
    KEYID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"KEYID"', NATIVE_TYPE 'NVARCHAR'),
    APP_ID string(50) OPTIONS (NAMEINSOURCE '"APP_ID"', NATIVE_TYPE 'NVARCHAR'),
    APP_CODE string(50) OPTIONS (NAMEINSOURCE '"APP_CODE"', NATIVE_TYPE 'NVARCHAR'),
    EXT1 string(50) OPTIONS (NAMEINSOURCE '"EXT1"', NATIVE_TYPE 'NVARCHAR'),
    EXT2 string(50) OPTIONS (NAMEINSOURCE '"EXT2"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.MapKeys"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.MD.Addresses" (
    ADDRESSID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    ADDRESSTYPE string(2) OPTIONS (NAMEINSOURCE '"ADDRESSTYPE"', NATIVE_TYPE 'NVARCHAR'),
    "VALIDITY.STARTDATE" date OPTIONS (NAMEINSOURCE '"VALIDITY.STARTDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "VALIDITY.ENDDATE" date OPTIONS (NAMEINSOURCE '"VALIDITY.ENDDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    LATITUDE double OPTIONS (NAMEINSOURCE '"LATITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LONGITUDE double OPTIONS (NAMEINSOURCE '"LONGITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.MD.Addresses"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.MD.BusinessPartner" (
    PARTNERID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    PHONENUMBER string(30) OPTIONS (NAMEINSOURCE '"PHONENUMBER"', NATIVE_TYPE 'NVARCHAR'),
    FAXNUMBER string(30) OPTIONS (NAMEINSOURCE '"FAXNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    WEBADDRESS string(1024) OPTIONS (NAMEINSOURCE '"WEBADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    "ADDRESSID.ADDRESSID" string(10) OPTIONS (NAMEINSOURCE '"ADDRESSID.ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "HISTORY.CHANGEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CHANGEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.MD.BusinessPartner"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.MD.Employees" (
    EMPLOYEEID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "NAME.FIRST" string(40) OPTIONS (NAMEINSOURCE '"NAME.FIRST"', NATIVE_TYPE 'NVARCHAR'),
    "NAME.MIDDLE" string(40) OPTIONS (NAMEINSOURCE '"NAME.MIDDLE"', NATIVE_TYPE 'NVARCHAR'),
    "NAME.LAST" string(40) OPTIONS (NAMEINSOURCE '"NAME.LAST"', NATIVE_TYPE 'NVARCHAR'),
    "NAME.INITIALS" string(10) OPTIONS (NAMEINSOURCE '"NAME.INITIALS"', NATIVE_TYPE 'NVARCHAR'),
    SEX string(1) OPTIONS (NAMEINSOURCE '"SEX"', NATIVE_TYPE 'NVARCHAR'),
    "LANGUAGE" string(1) OPTIONS (NAMEINSOURCE '"LANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    PHONENUMBER string(30) OPTIONS (NAMEINSOURCE '"PHONENUMBER"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    LOGINNAME string(12) OPTIONS (NAMEINSOURCE '"LOGINNAME"', NATIVE_TYPE 'NVARCHAR'),
    "ADDRESSID.ADDRESSID" string(10) OPTIONS (NAMEINSOURCE '"ADDRESSID.ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    "VALIDITY.STARTDATE" date OPTIONS (NAMEINSOURCE '"VALIDITY.STARTDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "VALIDITY.ENDDATE" date OPTIONS (NAMEINSOURCE '"VALIDITY.ENDDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    SALARYAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALARYAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    ACCOUNTNUMBER string(10) OPTIONS (NAMEINSOURCE '"ACCOUNTNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    BANKID string(10) OPTIONS (NAMEINSOURCE '"BANKID"', NATIVE_TYPE 'NVARCHAR'),
    BANKNAME string(255) OPTIONS (NAMEINSOURCE '"BANKNAME"', NATIVE_TYPE 'NVARCHAR'),
    EMPLOYEEPICURL string(255) OPTIONS (NAMEINSOURCE '"EMPLOYEEPICURL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.MD.Employees"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.MD.NameT" (
    FIRST string(40) OPTIONS (NAMEINSOURCE '"FIRST"', NATIVE_TYPE 'NVARCHAR'),
    MIDDLE string(40) OPTIONS (NAMEINSOURCE '"MIDDLE"', NATIVE_TYPE 'NVARCHAR'),
    LAST string(40) OPTIONS (NAMEINSOURCE '"LAST"', NATIVE_TYPE 'NVARCHAR'),
    INITIALS string(10) OPTIONS (NAMEINSOURCE '"INITIALS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.MD.NameT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.MD.productLog" (
    PRODUCTID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    DATETIME timestamp NOT NULL OPTIONS (NAMEINSOURCE '"DATETIME"', CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'SECONDDATE'),
    USERNAME string(20) NOT NULL OPTIONS (NAMEINSOURCE '"USERNAME"', NATIVE_TYPE 'NVARCHAR'),
    LOGTEXT string(500) OPTIONS (NAMEINSOURCE '"LOGTEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.MD.productLog"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.MD.Products" (
    PRODUCTID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    TYPECODE string(2) OPTIONS (NAMEINSOURCE '"TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    CATEGORY string(40) OPTIONS (NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "HISTORY.CHANGEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CHANGEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    NAMEID string(10) OPTIONS (NAMEINSOURCE '"NAMEID"', NATIVE_TYPE 'NVARCHAR'),
    DESCID string(10) OPTIONS (NAMEINSOURCE '"DESCID"', NATIVE_TYPE 'NVARCHAR'),
    "SUPPLIERID.PARTNERID" string(10) OPTIONS (NAMEINSOURCE '"SUPPLIERID.PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    TAXTARIFFCODE integer OPTIONS (NAMEINSOURCE '"TAXTARIFFCODE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUANTITYUNIT string(3) OPTIONS (NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    WEIGHTUNIT string(3) OPTIONS (NAMEINSOURCE '"WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRICE bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCTPICURL string(255) OPTIONS (NAMEINSOURCE '"PRODUCTPICURL"', NATIVE_TYPE 'NVARCHAR'),
    WIDTH bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"WIDTH"', NATIVE_TYPE 'DECIMAL'),
    DEPTH bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"DEPTH"', NATIVE_TYPE 'DECIMAL'),
    HEIGHT bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"HEIGHT"', NATIVE_TYPE 'DECIMAL'),
    DIMENSIONUNIT string(3) OPTIONS (NAMEINSOURCE '"DIMENSIONUNIT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.MD.Products"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.PO.Header" (
    PURCHASEORDERID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "HISTORY.CHANGEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CHANGEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    NOTEID string(10) OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    "PARTNERID.PARTNERID" string(10) OPTIONS (NAMEINSOURCE '"PARTNERID.PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    LIFECYCLESTATUS string(1) OPTIONS (NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    APPROVALSTATUS string(1) OPTIONS (NAMEINSOURCE '"APPROVALSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    CONFIRMSTATUS string(1) OPTIONS (NAMEINSOURCE '"CONFIRMSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    ORDERINGSTATUS string(1) OPTIONS (NAMEINSOURCE '"ORDERINGSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    INVOICINGSTATUS string(1) OPTIONS (NAMEINSOURCE '"INVOICINGSTATUS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.PO.Header"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.PO.Item" (
    "PURCHASEORDERID.PURCHASEORDERID" string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PURCHASEORDERID.PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERITEM string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PURCHASEORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    "PRODUCTID.PRODUCTID" string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID.PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    NOTEID string(10) OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    QUANTITYUNIT string(3) OPTIONS (NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERYDATE date OPTIONS (NAMEINSOURCE '"DELIVERYDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.PO.Item"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Procedures.tt_bp_addresses" (
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    ADDRESSID string(10) OPTIONS (NAMEINSOURCE '"ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Procedures.tt_bp_addresses"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Procedures.tt_customer_discount_calculation" (
    COMPANY_NAME string(50) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(50) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    SALES bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'DECIMAL'),
    ORDERS integer OPTIONS (NAMEINSOURCE '"ORDERS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SALES_RANK integer OPTIONS (NAMEINSOURCE '"SALES_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ORDER_RANK integer OPTIONS (NAMEINSOURCE '"ORDER_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Procedures.tt_customer_discount_calculation"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Procedures.tt_errors" (
    HTTP_STATUS_CODE integer OPTIONS (NAMEINSOURCE '"HTTP_STATUS_CODE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ERROR_MESSAGE string(100) OPTIONS (NAMEINSOURCE '"ERROR_MESSAGE"', NATIVE_TYPE 'NVARCHAR'),
    DETAIL string(100) OPTIONS (NAMEINSOURCE '"DETAIL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Procedures.tt_errors"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Procedures.tt_product_sale_price" (
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    CATEGORY string(40) OPTIONS (NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRICE bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    SALEPRICE bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALEPRICE"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Procedures.tt_product_sale_price"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Procedures.tt_scookie" (
    SESSIONID string(32) OPTIONS (NAMEINSOURCE '"SESSIONID"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(30) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION string(128) OPTIONS (NAMEINSOURCE '"APPLICATION"', NATIVE_TYPE 'NVARCHAR'),
    EXPIRY timestamp OPTIONS (NAMEINSOURCE '"EXPIRY"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Procedures.tt_scookie"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Procedures.tt_tax_calculation" (
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Procedures.tt_tax_calculation"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Procedures.tt_variable" (
    SESSIONID string(32) OPTIONS (NAMEINSOURCE '"SESSIONID"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(30) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION string(128) OPTIONS (NAMEINSOURCE '"APPLICATION"', NATIVE_TYPE 'NVARCHAR'),
    EXPIRY timestamp OPTIONS (NAMEINSOURCE '"EXPIRY"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA clob OPTIONS (NAMEINSOURCE '"DATA"', NATIVE_TYPE 'NCLOB')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Procedures.tt_variable"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.SO.Filter" (
    MODEL string(30) NOT NULL OPTIONS (NAMEINSOURCE '"MODEL"', NATIVE_TYPE 'NVARCHAR'),
    COLNAME string(8) NOT NULL OPTIONS (NAMEINSOURCE '"COLNAME"', NATIVE_TYPE 'NVARCHAR'),
    COLVALUE string(8) OPTIONS (NAMEINSOURCE '"COLVALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.SO.Filter"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.SO.Header" (
    SALESORDERID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "HISTORY.CHANGEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CHANGEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    NOTEID string(10) OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    "PARTNERID.PARTNERID" string(10) OPTIONS (NAMEINSOURCE '"PARTNERID.PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    LIFECYCLESTATUS string(1) OPTIONS (NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    BILLINGSTATUS string(1) OPTIONS (NAMEINSOURCE '"BILLINGSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERYSTATUS string(1) OPTIONS (NAMEINSOURCE '"DELIVERYSTATUS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.SO.Header"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.SO.Item" (
    "SALESORDERID.SALESORDERID" string(10) NOT NULL OPTIONS (NAMEINSOURCE '"SALESORDERID.SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) NOT NULL OPTIONS (NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    "PRODUCTID.PRODUCTID" string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID.PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    NOTEID string(10) OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    ITEMATPSTATUS string(1) OPTIONS (NAMEINSOURCE '"ITEMATPSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    OPITEMPOS string(10) OPTIONS (NAMEINSOURCE '"OPITEMPOS"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    QUANTITYUNIT string(3) OPTIONS (NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERYDATE date OPTIONS (NAMEINSOURCE '"DELIVERYDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.SO.Item"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.User.Details" (
    PERS_NO string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PERS_NO"', NATIVE_TYPE 'NVARCHAR'),
    FIRSTNAME string(40) OPTIONS (NAMEINSOURCE '"FIRSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    LASTNAME string(40) OPTIONS (NAMEINSOURCE '"LASTNAME"', NATIVE_TYPE 'NVARCHAR'),
    E_MAIL string(255) OPTIONS (NAMEINSOURCE '"E_MAIL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.User.Details"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Util.Attachments" (
    NOTEID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    LINKID string(10) OPTIONS (NAMEINSOURCE '"LINKID"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(30) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR'),
    TITLE string(255) OPTIONS (NAMEINSOURCE '"TITLE"', NATIVE_TYPE 'NVARCHAR'),
    CREATEDAT timestamp OPTIONS (NAMEINSOURCE '"CREATEDAT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DESCRIPTION string(255) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    SIZE string(40) OPTIONS (NAMEINSOURCE '"SIZE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Util.Attachments"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Util.Constants" (
    DOMAIN string(30) NOT NULL OPTIONS (NAMEINSOURCE '"DOMAIN"', NATIVE_TYPE 'NVARCHAR'),
    FIXEDVALUE string(30) NOT NULL OPTIONS (NAMEINSOURCE '"FIXEDVALUE"', NATIVE_TYPE 'NVARCHAR'),
    "LANGUAGE" string(1) NOT NULL OPTIONS (NAMEINSOURCE '"LANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(60) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Util.Constants"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Util.Messages" (
    MESSAGECLASS string(20) NOT NULL OPTIONS (NAMEINSOURCE '"MESSAGECLASS"', NATIVE_TYPE 'NVARCHAR'),
    MESSAGENUMBER string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MESSAGENUMBER"', NATIVE_TYPE 'NVARCHAR'),
    "LANGUAGE" string(2) NOT NULL OPTIONS (NAMEINSOURCE '"LANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(255) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    TEXT clob OPTIONS (NAMEINSOURCE '"TEXT"', NATIVE_TYPE 'NCLOB')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Util.Messages"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Util.Notes" (
    NOTEID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    LINKID string(10) OPTIONS (NAMEINSOURCE '"LINKID"', NATIVE_TYPE 'NVARCHAR'),
    AUTHOR string(30) OPTIONS (NAMEINSOURCE '"AUTHOR"', NATIVE_TYPE 'NVARCHAR'),
    TEXT string(255) OPTIONS (NAMEINSOURCE '"TEXT"', NATIVE_TYPE 'NVARCHAR'),
    CREATEDAT timestamp OPTIONS (NAMEINSOURCE '"CREATEDAT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    THUMBNAIL string(255) OPTIONS (NAMEINSOURCE '"THUMBNAIL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Util.Notes"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Util.SSCOOKIE" (
    SESSIONID string(32) NOT NULL OPTIONS (NAMEINSOURCE '"SESSIONID"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(30) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION string(128) NOT NULL OPTIONS (NAMEINSOURCE '"APPLICATION"', NATIVE_TYPE 'NVARCHAR'),
    EXPIRY timestamp OPTIONS (NAMEINSOURCE '"EXPIRY"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA clob OPTIONS (NAMEINSOURCE '"DATA"', NATIVE_TYPE 'NCLOB')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Util.SSCOOKIE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Util.Texts" (
    TEXTID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"TEXTID"', NATIVE_TYPE 'NVARCHAR'),
    "LANGUAGE" string(1) OPTIONS (NAMEINSOURCE '"LANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    ISOLANGUAGE string(2) OPTIONS (NAMEINSOURCE '"ISOLANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT string(1024) OPTIONS (NAMEINSOURCE '"TEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Util.Texts"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.Util.TimeDimension" (
    DATETIMESTAMP timestamp NOT NULL OPTIONS (NAMEINSOURCE '"DATETIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATE_SQL date OPTIONS (NAMEINSOURCE '"DATE_SQL"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    DATETIME_SAP string(14) OPTIONS (NAMEINSOURCE '"DATETIME_SAP"', NATIVE_TYPE 'NVARCHAR'),
    DATE_SAP string(8) OPTIONS (NAMEINSOURCE '"DATE_SAP"', NATIVE_TYPE 'NVARCHAR'),
    "YEAR" string(4) OPTIONS (NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'NVARCHAR'),
    QUARTER string(2) OPTIONS (NAMEINSOURCE '"QUARTER"', NATIVE_TYPE 'NVARCHAR'),
    "MONTH" string(2) OPTIONS (NAMEINSOURCE '"MONTH"', NATIVE_TYPE 'NVARCHAR'),
    WEEK string(2) OPTIONS (NAMEINSOURCE '"WEEK"', NATIVE_TYPE 'NVARCHAR'),
    WEEK_YEAR string(4) OPTIONS (NAMEINSOURCE '"WEEK_YEAR"', NATIVE_TYPE 'NVARCHAR'),
    DAY_OF_WEEK string(2) OPTIONS (NAMEINSOURCE '"DAY_OF_WEEK"', NATIVE_TYPE 'NVARCHAR'),
    "DAY" string(2) OPTIONS (NAMEINSOURCE '"DAY"', NATIVE_TYPE 'NVARCHAR'),
    "HOUR" string(2) OPTIONS (NAMEINSOURCE '"HOUR"', NATIVE_TYPE 'NVARCHAR'),
    "MINUTE" string(2) OPTIONS (NAMEINSOURCE '"MINUTE"', NATIVE_TYPE 'NVARCHAR'),
    "SECOND" string(2) OPTIONS (NAMEINSOURCE '"SECOND"', NATIVE_TYPE 'NVARCHAR'),
    CALQUARTER string(5) OPTIONS (NAMEINSOURCE '"CALQUARTER"', NATIVE_TYPE 'NVARCHAR'),
    CALMONTH string(6) OPTIONS (NAMEINSOURCE '"CALMONTH"', NATIVE_TYPE 'NVARCHAR'),
    CALWEEK string(6) OPTIONS (NAMEINSOURCE '"CALWEEK"', NATIVE_TYPE 'NVARCHAR'),
    YEAR_INT integer OPTIONS (NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUARTER_INT integer OPTIONS (NAMEINSOURCE '"QUARTER_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MONTH_INT integer OPTIONS (NAMEINSOURCE '"MONTH_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WEEK_INT integer OPTIONS (NAMEINSOURCE '"WEEK_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WEEK_YEAR_INT integer OPTIONS (NAMEINSOURCE '"WEEK_YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DAY_OF_WEEK_INT integer OPTIONS (NAMEINSOURCE '"DAY_OF_WEEK_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DAY_INT integer OPTIONS (NAMEINSOURCE '"DAY_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOUR_INT integer OPTIONS (NAMEINSOURCE '"HOUR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MINUTE_INT integer OPTIONS (NAMEINSOURCE '"MINUTE_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SECOND_INT integer OPTIONS (NAMEINSOURCE '"SECOND_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.Util.TimeDimension"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::EPM.ValidityT" (
    STARTDATE date OPTIONS (NAMEINSOURCE '"STARTDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    ENDDATE date OPTIONS (NAMEINSOURCE '"ENDDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::EPM.ValidityT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::JobsDemo.Details" (
    "TIME" timestamp NOT NULL OPTIONS (NAMEINSOURCE '"TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SOURCE string(30) OPTIONS (NAMEINSOURCE '"SOURCE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::JobsDemo.Details"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.data::purchaseOrderHeaderExternal" (
    PurchaseOrderId string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PurchaseOrderId"', NATIVE_TYPE 'NVARCHAR'),
    "History.CREATEDBY" string(10) OPTIONS (NAMEINSOURCE '"History.CREATEDBY"', NATIVE_TYPE 'NVARCHAR'),
    CreatedByFirstName string(40) OPTIONS (NAMEINSOURCE '"CreatedByFirstName"', NATIVE_TYPE 'NVARCHAR'),
    CreatedByLastName string(40) OPTIONS (NAMEINSOURCE '"CreatedByLastName"', NATIVE_TYPE 'NVARCHAR'),
    CreatedByLoginName string(12) OPTIONS (NAMEINSOURCE '"CreatedByLoginName"', NATIVE_TYPE 'NVARCHAR'),
    "History.CREATEDAT" date OPTIONS (NAMEINSOURCE '"History.CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "History.CHANGEDAT" date OPTIONS (NAMEINSOURCE '"History.CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    PartnerId string(10) OPTIONS (NAMEINSOURCE '"PartnerId"', NATIVE_TYPE 'NVARCHAR'),
    CompanyName string(80) OPTIONS (NAMEINSOURCE '"CompanyName"', NATIVE_TYPE 'NVARCHAR'),
    Currency string(5) OPTIONS (NAMEINSOURCE '"Currency"', NATIVE_TYPE 'NVARCHAR'),
    GrossAmount bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GrossAmount"', NATIVE_TYPE 'DECIMAL'),
    NetAmount bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NetAmount"', NATIVE_TYPE 'DECIMAL'),
    TaxAmount bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TaxAmount"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.data::purchaseOrderHeaderExternal"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AN_PURCHASE_COMMON_CURRENCY" (
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERCOMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"PARTNERCOMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERCITY string(40) OPTIONS (NAMEINSOURCE '"PARTNERCITY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERPOSTALCODE string(10) OPTIONS (NAMEINSOURCE '"PARTNERPOSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    "PURCHASEORDERID.PURCHASEORDERID" string(10) OPTIONS (NAMEINSOURCE '"PURCHASEORDERID.PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERITEM string(10) OPTIONS (NAMEINSOURCE '"PURCHASEORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTCATEGORY string(40) OPTIONS (NAMEINSOURCE '"PRODUCTCATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    POCREATEDAT date OPTIONS (NAMEINSOURCE '"POCREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "CONVGROSSAMOUNT.CURRENCY" string(5) OPTIONS (NAMEINSOURCE '"CONVGROSSAMOUNT.CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    CONVGROSSAMOUNT bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"CONVGROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    "row.count" bigdecimal(18,2147483647) OPTIONS (NAMEINSOURCE '"row.count"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AN_PURCHASE_COMMON_CURRENCY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AN_PURCHASE_OVERVIEW" (
    PURCHASEORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    LIFECYCLESTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITYUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    CREATEDAT date OPTIONS (ANNOTATION '', NAMEINSOURCE '"CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AN_PURCHASE_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AN_SALES_ORDER_DYNAMIC_TIME_PERIOD" (
    History_CREATEDAT date OPTIONS (NAMEINSOURCE '"History_CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    SALESORDERID string(10) OPTIONS (NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) OPTIONS (NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    AT_PROD_POSTALCODE string(10) OPTIONS (NAMEINSOURCE '"AT_PROD_POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    AT_PROD_COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"AT_PROD_COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    CA_StartDate date OPTIONS (NAMEINSOURCE '"CA_StartDate"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    CA_EndDate date OPTIONS (NAMEINSOURCE '"CA_EndDate"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    CM_NetAmount bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"CM_NetAmount"', NATIVE_TYPE 'DECIMAL'),
    "row.count" bigdecimal(18,2147483647) OPTIONS (NAMEINSOURCE '"row.count"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AN_SALES_ORDER_DYNAMIC_TIME_PERIOD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AN_SALES_ORDER_LITE" (
    SALESORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    AT_BUYER_POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_BUYER_POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    AT_BUYER_COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_BUYER_COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    DATETIMESTAMP timestamp OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATE_SQL date OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SQL"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    DATETIME_SAP string(14) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIME_SAP"', NATIVE_TYPE 'VARCHAR'),
    DATE_SAP string(8) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SAP"', NATIVE_TYPE 'VARCHAR'),
    "YEAR" string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'VARCHAR'),
    QUARTER string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER"', NATIVE_TYPE 'VARCHAR'),
    "MONTH" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH"', NATIVE_TYPE 'VARCHAR'),
    WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK"', NATIVE_TYPE 'VARCHAR'),
    WEEK_YEAR string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR"', NATIVE_TYPE 'VARCHAR'),
    DAY_OF_WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK"', NATIVE_TYPE 'VARCHAR'),
    "DAY" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY"', NATIVE_TYPE 'VARCHAR'),
    CALQUARTER string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALQUARTER"', NATIVE_TYPE 'VARCHAR'),
    CALMONTH string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALMONTH"', NATIVE_TYPE 'VARCHAR'),
    CALWEEK string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALWEEK"', NATIVE_TYPE 'VARCHAR'),
    YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUARTER_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MONTH_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DAY_OF_WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DAY_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AN_SALES_ORDER_LITE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AN_SALES_ORDER_RANKING" (
    SALESORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    AT_BUYER_POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_BUYER_POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    AT_BUYER_COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_BUYER_COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    DATETIMESTAMP timestamp OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATE_SQL date OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SQL"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    DATETIME_SAP string(14) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIME_SAP"', NATIVE_TYPE 'VARCHAR'),
    DATE_SAP string(8) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SAP"', NATIVE_TYPE 'VARCHAR'),
    "YEAR" string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'VARCHAR'),
    QUARTER string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER"', NATIVE_TYPE 'VARCHAR'),
    "MONTH" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH"', NATIVE_TYPE 'VARCHAR'),
    WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK"', NATIVE_TYPE 'VARCHAR'),
    WEEK_YEAR string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR"', NATIVE_TYPE 'VARCHAR'),
    DAY_OF_WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK"', NATIVE_TYPE 'VARCHAR'),
    "DAY" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY"', NATIVE_TYPE 'VARCHAR'),
    CALQUARTER string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALQUARTER"', NATIVE_TYPE 'VARCHAR'),
    CALMONTH string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALMONTH"', NATIVE_TYPE 'VARCHAR'),
    CALWEEK string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALWEEK"', NATIVE_TYPE 'VARCHAR'),
    YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUARTER_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MONTH_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DAY_OF_WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DAY_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AN_SALES_ORDER_RANKING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AN_SALES_OVERVIEW_WO_CURR_CONV" (
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    LIFECYCLESTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERYSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DELIVERYSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    POSTING_DATE date OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTING_DATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    SALESORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITYUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    BILLINGSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BILLINGSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_CREATEDBY string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"HISTORY_CREATEDBY"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    AT_PROD_POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_PROD_POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    AT_PROD_COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"AT_PROD_COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_NEW bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_NEW"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_COMPLETED bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_COMPLETED"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_INPROCESS bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_INPROCESS"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_PAID bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_PAID"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_UNPAID bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_UNPAID"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_DELIVERED bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_DELIVERED"', NATIVE_TYPE 'DECIMAL'),
    RM_AMOUNT_UNDELIVERED bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"RM_AMOUNT_UNDELIVERED"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AN_SALES_OVERVIEW_WO_CURR_CONV"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AT_BUYER" (
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AT_BUYER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AT_PO_HEADER" (
    APPROVALSTATUSDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"APPROVALSTATUSDESC"', NATIVE_TYPE 'NVARCHAR'),
    CONFIRMATIONSTATUSDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CONFIRMATIONSTATUSDESC"', NATIVE_TYPE 'NVARCHAR'),
    LIFECYCLESTATUSDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLESTATUSDESC"', NATIVE_TYPE 'NVARCHAR'),
    ORDERINGSTATUSDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"ORDERINGSTATUSDESC"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    NOTEID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    LIFECYCLESTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    APPROVALSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"APPROVALSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    CONFIRMSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CONFIRMSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    ORDERINGSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"ORDERINGSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_CREATEDBY string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"HISTORY_CREATEDBY"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_CREATEDAT date OPTIONS (ANNOTATION '', NAMEINSOURCE '"HISTORY_CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    HISTORY_CHANGEDAT date OPTIONS (ANNOTATION '', NAMEINSOURCE '"HISTORY_CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    INVOICINGSTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"INVOICINGSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_CHANGEDBY string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"HISTORY_CHANGEDBY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AT_PO_HEADER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AT_PO_ITEM" (
    ProductName string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"ProductName"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERYDATE date OPTIONS (ANNOTATION '', NAMEINSOURCE '"DELIVERYDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    PURCHASEORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    QUANTITYUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AT_PO_ITEM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AT_PROD" (
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_PRICE"', NATIVE_TYPE 'DECIMAL'),
    SUPPLIER_CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_STREET"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_REGION"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUPPLIER_ID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIER_ID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCT_WEIGHTUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_DESCRIPTION string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCT_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AT_PROD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AT_PURCHASE_ORDER_WORKLIST" (
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    PURCHASEORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PURCHASEORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    QUANTITYUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTNAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTNAME"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTDESC string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTDESC"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT_1 bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"GROSSAMOUNT_1"', NATIVE_TYPE 'DECIMAL'),
    DELIVERYDATE date OPTIONS (ANNOTATION '', NAMEINSOURCE '"DELIVERYDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCTPICURL string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTPICURL"', NATIVE_TYPE 'NVARCHAR'),
    LIFECYCLEDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLEDESC"', NATIVE_TYPE 'NVARCHAR'),
    APPROVALDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"APPROVALDESC"', NATIVE_TYPE 'NVARCHAR'),
    CONFIRMATIONDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CONFIRMATIONDESC"', NATIVE_TYPE 'NVARCHAR'),
    ORDERINGDESC string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"ORDERINGDESC"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AT_PURCHASE_ORDER_WORKLIST"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AT_SALES_ORDER_WORKLIST" (
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    LIFECYCLESTATUS string(1) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    QUANTITYUNIT string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPECODE string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    CATEGORY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTNAME string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTDESC string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRODUCTDESC"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AT_SALES_ORDER_WORKLIST"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AT_SUPPLIER" (
    SUPPLIERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"SUPPLIERID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AT_SUPPLIER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AT_TIME_DIM" (
    DATETIMESTAMP timestamp OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATE_SQL date OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SQL"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    DATETIME_SAP string(14) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATETIME_SAP"', NATIVE_TYPE 'VARCHAR'),
    DATE_SAP string(8) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DATE_SAP"', NATIVE_TYPE 'VARCHAR'),
    "YEAR" string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'VARCHAR'),
    QUARTER string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER"', NATIVE_TYPE 'VARCHAR'),
    "MONTH" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH"', NATIVE_TYPE 'VARCHAR'),
    WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK"', NATIVE_TYPE 'VARCHAR'),
    WEEK_YEAR string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR"', NATIVE_TYPE 'VARCHAR'),
    DAY_OF_WEEK string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK"', NATIVE_TYPE 'VARCHAR'),
    "DAY" string(2) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY"', NATIVE_TYPE 'VARCHAR'),
    CALQUARTER string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALQUARTER"', NATIVE_TYPE 'VARCHAR'),
    CALMONTH string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALMONTH"', NATIVE_TYPE 'VARCHAR'),
    CALWEEK string(6) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CALWEEK"', NATIVE_TYPE 'VARCHAR'),
    YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUARTER_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"QUARTER_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MONTH_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"MONTH_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WEEK_YEAR_INT integer OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEEK_YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DAY_OF_WEEK_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_OF_WEEK_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DAY_INT byte OPTIONS (ANNOTATION '', NAMEINSOURCE '"DAY_INT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AT_TIME_DIM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::AT_TIME_DIM.Gregorian_Hierarchy" (
    QUERY_NODE string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE"', NATIVE_TYPE 'VARCHAR'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL_NAME string(5000) OPTIONS (NAMEINSOURCE '"LEVEL_NAME"', NATIVE_TYPE 'VARCHAR'),
    ORDINAL integer OPTIONS (NAMEINSOURCE '"ORDINAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_LEAF integer OPTIONS (NAMEINSOURCE '"IS_LEAF"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUERY_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"QUERY_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    RESULT_NODE_NAME string(5000) OPTIONS (NAMEINSOURCE '"RESULT_NODE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PATH string(5000) OPTIONS (NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    PARENTS string(5000) OPTIONS (NAMEINSOURCE '"PARENTS"', NATIVE_TYPE 'VARCHAR'),
    CHILDREN string(5000) OPTIONS (NAMEINSOURCE '"CHILDREN"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::AT_TIME_DIM.Gregorian_Hierarchy"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION" (
    COMPANY_NAME string(80) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(50) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'VARCHAR'),
    DISCOUNT bigdecimal(3,2147483647) OPTIONS (NAMEINSOURCE '"DISCOUNT"', NATIVE_TYPE 'DECIMAL'),
    REGION_CONSTANT string(4) OPTIONS (NAMEINSOURCE '"REGION_CONSTANT"', NATIVE_TYPE 'VARCHAR'),
    SALES_AMER bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES_AMER"', NATIVE_TYPE 'DECIMAL'),
    SALES_AFR bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES_AFR"', NATIVE_TYPE 'DECIMAL'),
    SALES_APJ bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES_APJ"', NATIVE_TYPE 'DECIMAL'),
    SALES_EMEA bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES_EMEA"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::CV_CUSTOMER_DISCOUNT_BY_RANKING_AND_REGION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL" (
    SALES_RANK integer OPTIONS (NAMEINSOURCE '"SALES_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ORDERS integer OPTIONS (NAMEINSOURCE '"ORDERS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REGION string(50) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'VARCHAR'),
    ORDER_RANK integer OPTIONS (NAMEINSOURCE '"ORDER_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SALES bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'DECIMAL'),
    COMPANY_NAME string(80) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DISCOUNT bigdecimal(3,2147483647) OPTIONS (NAMEINSOURCE '"DISCOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::CV_SALES_ORDER_RANKING_AND_DISCOUNT_SQL"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::CV_SALES_YEAR_COMPARISON" (
    PRODUCT_CATEGORY string(40) OPTIONS (NAMEINSOURCE '"PRODUCT_CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    YEAR1_NET_AMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"YEAR1_NET_AMOUNT"', NATIVE_TYPE 'DECIMAL'),
    YEAR2_NET_AMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"YEAR2_NET_AMOUNT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::CV_SALES_YEAR_COMPARISON"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::CV_SALESORDER_DYNAMIC_JOIN" (
    REGION string(4) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_NAME string(1024) OPTIONS (NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TOTAL_SALES bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TOTAL_SALES"', NATIVE_TYPE 'DECIMAL'),
    SALES bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'DECIMAL'),
    SHARE_SALES bigdecimal(12,2147483647) OPTIONS (NAMEINSOURCE '"SHARE_SALES"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::CV_SALESORDER_DYNAMIC_JOIN"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::CV_SALESORDER_RANKING" (
    COMPANY_NAME string(20) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'VARCHAR'),
    SALES string(20) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'VARCHAR'),
    ORDERS string(20) OPTIONS (NAMEINSOURCE '"ORDERS"', NATIVE_TYPE 'VARCHAR'),
    SALES_RANK string(20) OPTIONS (NAMEINSOURCE '"SALES_RANK"', NATIVE_TYPE 'VARCHAR'),
    ORDER_RANK string(20) OPTIONS (NAMEINSOURCE '"ORDER_RANK"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::CV_SALESORDER_RANKING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.models::CV_SALESORDER_RANKING_SQL" (
    COMPANY_NAME string(20) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'VARCHAR'),
    SALES string(20) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'VARCHAR'),
    ORDERS string(20) OPTIONS (NAMEINSOURCE '"ORDERS"', NATIVE_TYPE 'VARCHAR'),
    SALES_RANK string(20) OPTIONS (NAMEINSOURCE '"SALES_RANK"', NATIVE_TYPE 'VARCHAR'),
    ORDER_RANK string(20) OPTIONS (NAMEINSOURCE '"ORDER_RANK"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.models::CV_SALESORDER_RANKING_SQL"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.spatial.models::BP_ADDRESS_DETAILS" (
    ADDRESSID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (ANNOTATION '', NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (ANNOTATION '', NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    LATITUDE double OPTIONS (ANNOTATION '', NAMEINSOURCE '"LATITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LONGITUDE double OPTIONS (ANNOTATION '', NAMEINSOURCE '"LONGITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PARTNERID string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (ANNOTATION '', NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    PHONENUMBER string(30) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PHONENUMBER"', NATIVE_TYPE 'NVARCHAR'),
    FAXNUMBER string(30) OPTIONS (ANNOTATION '', NAMEINSOURCE '"FAXNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    WEBADDRESS string(1024) OPTIONS (ANNOTATION '', NAMEINSOURCE '"WEBADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (ANNOTATION '', NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (ANNOTATION '', NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.spatial.models::BP_ADDRESS_DETAILS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.democontent.epm.spatial.models::REGION_SALES_BP" (
    SALESORDERID string(10) OPTIONS (NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    HISTORY_CREATEDAT date OPTIONS (NAMEINSOURCE '"HISTORY_CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    ADDRESSID string(10) OPTIONS (NAMEINSOURCE '"ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    LATITUDE double OPTIONS (NAMEINSOURCE '"LATITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LONGITUDE double OPTIONS (NAMEINSOURCE '"LONGITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    PHONENUMBER string(30) OPTIONS (NAMEINSOURCE '"PHONENUMBER"', NATIVE_TYPE 'NVARCHAR'),
    FAXNUMBER string(30) OPTIONS (NAMEINSOURCE '"FAXNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    WEBADDRESS string(1024) OPTIONS (NAMEINSOURCE '"WEBADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    YEAR_OF_SALE string(10) OPTIONS (NAMEINSOURCE '"YEAR_OF_SALE"', NATIVE_TYPE 'VARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    "row.count" bigdecimal(18,2147483647) OPTIONS (NAMEINSOURCE '"row.count"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.democontent.epm.spatial.models::REGION_SALES_BP"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db.personalization::ADD_UPDATE_USER_WIDGET.GET_APPSITE_WIDGET_TEMPLATES" (
    TILE_ID string(50) OPTIONS (NAMEINSOURCE '"TILE_ID"', NATIVE_TYPE 'CHAR'),
    PACKAGE_ID string(256) OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_NAME string(256) OPTIONS (NAMEINSOURCE '"TILE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_URL string(5000) OPTIONS (NAMEINSOURCE '"TILE_URL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_THUMBNAIL string(5000) OPTIONS (NAMEINSOURCE '"TILE_THUMBNAIL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_TYPE string(10) OPTIONS (NAMEINSOURCE '"TILE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db.personalization::ADD_UPDATE_USER_WIDGET.GET_APPSITE_WIDGET_TEMPLATES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db.personalization::TEMP_USER_PAGES" (
    PG_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Page ID', NAMEINSOURCE '"PG_ID"', NATIVE_TYPE 'CHAR'),
    PG_NAME string(256) OPTIONS (ANNOTATION 'Page Name', NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob OPTIONS (ANNOTATION 'Page Layout', NAMEINSOURCE '"PG_LAYOUT"', NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) OPTIONS (ANNOTATION 'ID of the page in the site layout', NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (ANNOTATION 'Parent page in case of sub page', NAMEINSOURCE '"PARENT_PAGE_ID"', NATIVE_TYPE 'CHAR'),
    TEMP_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Unique ID for the current transaction', NAMEINSOURCE '"TEMP_ID"', NATIVE_TYPE 'CHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db.personalization::TEMP_USER_PAGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db.personalization::TEMP_USER_PROPERTIES" (
    ENTITY_TYPE string(10) NOT NULL OPTIONS (ANNOTATION 'Type of entity (page/widget/site)', NAMEINSOURCE '"ENTITY_TYPE"', NATIVE_TYPE 'VARCHAR'),
    ENTITY_ID string(50) NOT NULL OPTIONS (ANNOTATION 'ID of the entity', NAMEINSOURCE '"ENTITY_ID"', NATIVE_TYPE 'CHAR'),
    KEY string(256) NOT NULL OPTIONS (ANNOTATION 'Key of the property', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Value of the property', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    TEMP_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Unique ID for the current transaction', NAMEINSOURCE '"TEMP_ID"', NATIVE_TYPE 'CHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db.personalization::TEMP_USER_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db.personalization::TEMP_USER_WIDGET_PROPERTIES" (
    WG_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Widget ID', NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'CHAR'),
    KEY string(256) NOT NULL OPTIONS (ANNOTATION 'Prop Key', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Prop Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    TEMP_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Unique ID for the current transaction', NAMEINSOURCE '"TEMP_ID"', NATIVE_TYPE 'CHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db.personalization::TEMP_USER_WIDGET_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db.personalization::TEMP_USER_WIDGETS" (
    WG_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Widget ID', NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'CHAR'),
    WG_NAME string(256) OPTIONS (ANNOTATION 'Widget Name', NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WG_DESC string(5000) OPTIONS (ANNOTATION 'Widget Description', NAMEINSOURCE '"WG_DESC"', NATIVE_TYPE 'NVARCHAR'),
    WG_LAYOUT_ID string(50) OPTIONS (ANNOTATION 'ID of the widget in the page layout', NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    SPEC_URL string(5000) OPTIONS (ANNOTATION 'Location of spec xml file', NAMEINSOURCE '"SPEC_URL"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (ANNOTATION 'Location of spec xml file', NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    PG_ID string(50) OPTIONS (ANNOTATION 'Widget''s page ID', NAMEINSOURCE '"PG_ID"', NATIVE_TYPE 'CHAR'),
    WG_TEMPLATE_ID string(5000) OPTIONS (ANNOTATION 'Widget''s template ID', NAMEINSOURCE '"WG_TEMPLATE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_PACKAGE_ID string(256) OPTIONS (ANNOTATION 'Widget''s template package', NAMEINSOURCE '"WG_TEMPLATE_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Widget''s template object name', NAMEINSOURCE '"WG_TEMPLATE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TEMP_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Unique ID for the current transaction', NAMEINSOURCE '"TEMP_ID"', NATIVE_TYPE 'CHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db.personalization::TEMP_USER_WIDGETS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db.tabletypes::GET_SITE_TABLE_TYPE" (
    SITE_NAME string(256) OPTIONS (NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_LAYOUT clob OPTIONS (NAMEINSOURCE '"SITE_LAYOUT"', NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'NVARCHAR'),
    PG_ID string(50) OPTIONS (NAMEINSOURCE '"PG_ID"', NATIVE_TYPE 'CHAR'),
    PG_NAME string(256) OPTIONS (NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob OPTIONS (NAMEINSOURCE '"PG_LAYOUT"', NATIVE_TYPE 'CLOB'),
    WG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'CHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    WG_TYPE string(256) OPTIONS (NAMEINSOURCE '"WG_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (NAMEINSOURCE '"PARENT_PAGE_ID"', NATIVE_TYPE 'CHAR'),
    WG_TEMPLATE_ID string(50) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_ID"', NATIVE_TYPE 'CHAR'),
    WG_TEMPLATE_PACKAGE_ID string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(256) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db.tabletypes::GET_SITE_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::GET_APPSITE.GET_APPSITE_TABLE_TYPE" (
    SITE_NAME string(256) OPTIONS (NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_LAYOUT clob OPTIONS (NAMEINSOURCE '"SITE_LAYOUT"', NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    PG_ID string(50) OPTIONS (NAMEINSOURCE '"PG_ID"', NATIVE_TYPE 'CHAR'),
    PG_NAME string(256) OPTIONS (NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob OPTIONS (NAMEINSOURCE '"PG_LAYOUT"', NATIVE_TYPE 'CLOB'),
    WG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'CHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    WG_TYPE string(256) OPTIONS (NAMEINSOURCE '"WG_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (NAMEINSOURCE '"PARENT_PAGE_ID"', NATIVE_TYPE 'CHAR'),
    RECORD_TYPE string(256) OPTIONS (NAMEINSOURCE '"RECORD_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::GET_APPSITE.GET_APPSITE_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::GET_APPSITE_V3.GET_APPSITE_TABLE_TYPE" (
    SITE_NAME string(256) OPTIONS (NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_LAYOUT clob OPTIONS (NAMEINSOURCE '"SITE_LAYOUT"', NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    PG_ID string(50) OPTIONS (NAMEINSOURCE '"PG_ID"', NATIVE_TYPE 'CHAR'),
    PG_NAME string(256) OPTIONS (NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob OPTIONS (NAMEINSOURCE '"PG_LAYOUT"', NATIVE_TYPE 'CLOB'),
    WG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'CHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    WG_TYPE string(256) OPTIONS (NAMEINSOURCE '"WG_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (NAMEINSOURCE '"PARENT_PAGE_ID"', NATIVE_TYPE 'CHAR'),
    RECORD_TYPE string(256) OPTIONS (NAMEINSOURCE '"RECORD_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::GET_APPSITE_V3.GET_APPSITE_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::GET_NAVIGATION_TARGET_DATA" (
    id string(256) OPTIONS (NAMEINSOURCE '"id"', NATIVE_TYPE 'VARCHAR'),
    applicationType string(50) OPTIONS (NAMEINSOURCE '"applicationType"', NATIVE_TYPE 'VARCHAR'),
    applicationData string(100) OPTIONS (NAMEINSOURCE '"applicationData"', NATIVE_TYPE 'VARCHAR'),
    postParameters string(2000) OPTIONS (NAMEINSOURCE '"postParameters"', NATIVE_TYPE 'VARCHAR'),
    text string(2000) OPTIONS (NAMEINSOURCE '"text"', NATIVE_TYPE 'VARCHAR'),
    applicationAlias string(100) OPTIONS (NAMEINSOURCE '"applicationAlias"', NATIVE_TYPE 'VARCHAR'),
    url string(2000) OPTIONS (NAMEINSOURCE '"url"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::GET_NAVIGATION_TARGET_DATA"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::GET_NAVIGATION_URL.NAV_TARGETS_DATA_TABLE_TYPE" (
    id string(1024) OPTIONS (NAMEINSOURCE '"id"', NATIVE_TYPE 'VARCHAR'),
    applicationType string(64) OPTIONS (NAMEINSOURCE '"applicationType"', NATIVE_TYPE 'VARCHAR'),
    applicationData string(512) OPTIONS (NAMEINSOURCE '"applicationData"', NATIVE_TYPE 'VARCHAR'),
    postParameters string(2048) OPTIONS (NAMEINSOURCE '"postParameters"', NATIVE_TYPE 'VARCHAR'),
    text string(512) OPTIONS (NAMEINSOURCE '"text"', NATIVE_TYPE 'VARCHAR'),
    applicationAlias string(512) OPTIONS (NAMEINSOURCE '"applicationAlias"', NATIVE_TYPE 'VARCHAR'),
    url string(2048) OPTIONS (NAMEINSOURCE '"url"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::GET_NAVIGATION_URL.NAV_TARGETS_DATA_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::GET_WIDGET_DATA.WIDGET_DATA_TABLE_TYPE" (
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'CHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::GET_WIDGET_DATA.WIDGET_DATA_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::GET_WIDGET_DATA.WIDGET_USER_PROPERTIES_TABLE_TYPE" (
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'CHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::GET_WIDGET_DATA.WIDGET_USER_PROPERTIES_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::INTENT_ALIAS_MAPPING_V2" (
    ID string(64) NOT NULL OPTIONS (ANNOTATION 'The Intent ID', NAMEINSOURCE '"ID"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_OBJECT string(64) NOT NULL OPTIONS (ANNOTATION 'The Semantic Object part of the Intent', NAMEINSOURCE '"SEMANTIC_OBJECT"', NATIVE_TYPE 'VARCHAR'),
    ACTION string(64) NOT NULL OPTIONS (ANNOTATION 'The Action part of the Intent', NAMEINSOURCE '"ACTION"', NATIVE_TYPE 'VARCHAR'),
    AREA string(64) NOT NULL OPTIONS (ANNOTATION 'The Area part of the Alias', NAMEINSOURCE '"AREA"', NATIVE_TYPE 'VARCHAR'),
    ALIAS string(256) NOT NULL OPTIONS (ANNOTATION 'Alias', NAMEINSOURCE '"ALIAS"', NATIVE_TYPE 'VARCHAR'),
    CONTEXT string(256) DEFAULT 'None' OPTIONS (ANNOTATION 'Optional. Used to link this mapping with specific Widget List Catalog', NAMEINSOURCE '"CONTEXT"', NATIVE_TYPE 'VARCHAR'),
    INFO string(4096) DEFAULT 'None' OPTIONS (ANNOTATION 'Optional. Intent Information', NAMEINSOURCE '"INFO"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::INTENT_ALIAS_MAPPING_V2"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::NAVIGATION_TARGET" (
    URI string(2048) NOT NULL OPTIONS (ANNOTATION 'Navigation target URI', NAMEINSOURCE '"URI"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(64) NOT NULL OPTIONS (ANNOTATION 'Navigation object type', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) OPTIONS (ANNOTATION 'Navigation target description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR'),
    AREA string(64) NOT NULL OPTIONS (ANNOTATION 'The Area part of the Alias', NAMEINSOURCE '"AREA"', NATIVE_TYPE 'VARCHAR'),
    ALIAS string(256) NOT NULL OPTIONS (ANNOTATION 'Alias', NAMEINSOURCE '"ALIAS"', NATIVE_TYPE 'VARCHAR'),
    TITLE string(256) OPTIONS (ANNOTATION 'Navigation target title', NAMEINSOURCE '"TITLE"', NATIVE_TYPE 'VARCHAR'),
    VIEW_NAME string(512) OPTIONS (ANNOTATION 'UI5 View name for displaying objects of this type', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'VARCHAR'),
    APPLICATION_PARAMETERS string(2048) OPTIONS (ANNOTATION 'Parameters passed to the target application', NAMEINSOURCE '"APPLICATION_PARAMETERS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::NAVIGATION_TARGET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::NAVIGATION_VIEW" (
    id string(129) NOT NULL OPTIONS (NAMEINSOURCE '"id"', NATIVE_TYPE 'VARCHAR'),
    applicationType string(64) NOT NULL OPTIONS (NAMEINSOURCE '"applicationType"', NATIVE_TYPE 'VARCHAR'),
    applicationData string(512) OPTIONS (NAMEINSOURCE '"applicationData"', NATIVE_TYPE 'VARCHAR'),
    postParameters string(2048) OPTIONS (NAMEINSOURCE '"postParameters"', NATIVE_TYPE 'VARCHAR'),
    text string(256) OPTIONS (NAMEINSOURCE '"text"', NATIVE_TYPE 'VARCHAR'),
    applicationAlias string(256) NOT NULL OPTIONS (NAMEINSOURCE '"applicationAlias"', NATIVE_TYPE 'VARCHAR'),
    semanticObject string(64) NOT NULL OPTIONS (NAMEINSOURCE '"semanticObject"', NATIVE_TYPE 'VARCHAR'),
    action string(64) NOT NULL OPTIONS (NAMEINSOURCE '"action"', NATIVE_TYPE 'VARCHAR'),
    url string(5000) OPTIONS (NAMEINSOURCE '"url"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::NAVIGATION_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::SEMANTIC_OBJECT_VIEW" (
    SEMANTIC_OBJECT string(64) NOT NULL OPTIONS (NAMEINSOURCE '"SEMANTIC_OBJECT"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SEMANTIC_OBJECT_NAME"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_OBJECT_DESC string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"SEMANTIC_OBJECT_DESC"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::SEMANTIC_OBJECT_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::SEMANTIC_OBJECTS" (
    SEMANTIC_OBJECT string(64) NOT NULL OPTIONS (ANNOTATION 'Semantic Object', NAMEINSOURCE '"SEMANTIC_OBJECT"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Semantic Object Name', NAMEINSOURCE '"SEMANTIC_OBJECT_NAME"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_OBJECT_DESC string(5000) NOT NULL OPTIONS (ANNOTATION 'Semantic Object Description', NAMEINSOURCE '"SEMANTIC_OBJECT_DESC"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::SEMANTIC_OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::THEMES" (
    ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"ID"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROOT_PATH string(5000) OPTIONS (NAMEINSOURCE '"ROOT_PATH"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::THEMES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::UIS_APPSITES_DATA_VIEW" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SITE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_LAYOUT clob OPTIONS (NAMEINSOURCE '"SITE_LAYOUT"', NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    PG_ID string(50) OPTIONS (NAMEINSOURCE '"PG_ID"', NATIVE_TYPE 'CHAR'),
    PG_NAME string(256) OPTIONS (NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob OPTIONS (NAMEINSOURCE '"PG_LAYOUT"', NATIVE_TYPE 'CLOB'),
    WG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'CHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (NAMEINSOURCE '"PARENT_PAGE_ID"', NATIVE_TYPE 'CHAR'),
    WG_TEMPLATE_ID string(5000) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_PACKAGE_ID string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(256) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::UIS_APPSITES_DATA_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::UIS_APPSITES_VIEW" (
    ID integer NOT NULL OPTIONS (NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    name string(256) NOT NULL OPTIONS (NAMEINSOURCE '"name"', NATIVE_TYPE 'NVARCHAR'),
    description string(5000) OPTIONS (NAMEINSOURCE '"description"', NATIVE_TYPE 'NVARCHAR'),
    package_id string(256) NOT NULL OPTIONS (NAMEINSOURCE '"package_id"', NATIVE_TYPE 'NVARCHAR'),
    object_name string(256) NOT NULL OPTIONS (NAMEINSOURCE '"object_name"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::UIS_APPSITES_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::UIS_CATALOGS" (
    ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"ID"', NATIVE_TYPE 'VARCHAR'),
    NAME string(1000) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    CATALOG_PROPERTIES string(5000) OPTIONS (NAMEINSOURCE '"CATALOG_PROPERTIES"', NATIVE_TYPE 'NVARCHAR'),
    ITEMS_SOURCE_SYSTEM string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ITEMS_SOURCE_SYSTEM"', NATIVE_TYPE 'NVARCHAR'),
    ITEM_TYPES string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ITEM_TYPES"', NATIVE_TYPE 'NVARCHAR'),
    ITEM_PROPERTIES string(5000) OPTIONS (NAMEINSOURCE '"ITEM_PROPERTIES"', NATIVE_TYPE 'NVARCHAR'),
    ITEM_ACTIONS string(5000) OPTIONS (NAMEINSOURCE '"ITEM_ACTIONS"', NATIVE_TYPE 'NVARCHAR'),
    URI string(5000) OPTIONS (NAMEINSOURCE '"URI"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(1000) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::UIS_CATALOGS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::UIS_CATALOGS_VIEW" (
    ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"ID"', NATIVE_TYPE 'VARCHAR'),
    name string(1000) NOT NULL OPTIONS (NAMEINSOURCE '"name"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(1000) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    URI string(5000) OPTIONS (NAMEINSOURCE '"URI"', NATIVE_TYPE 'NVARCHAR'),
    properties string(5000) OPTIONS (NAMEINSOURCE '"properties"', NATIVE_TYPE 'NVARCHAR'),
    itemTypes string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"itemTypes"', NATIVE_TYPE 'NVARCHAR'),
    itemProperties string(5000) OPTIONS (NAMEINSOURCE '"itemProperties"', NATIVE_TYPE 'NVARCHAR'),
    itemActions string(5000) OPTIONS (NAMEINSOURCE '"itemActions"', NATIVE_TYPE 'NVARCHAR'),
    remoteAlias string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"remoteAlias"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::UIS_CATALOGS_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::UIS_FIORI_CATALOGS_VIEW" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_ID string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"TILE_ID"', NATIVE_TYPE 'NVARCHAR'),
    CATALOG_NAME string(256) OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_NAME string(256) OPTIONS (NAMEINSOURCE '"TILE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_URL string(5000) OPTIONS (NAMEINSOURCE '"TILE_URL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_THUMBNAIL string(5000) OPTIONS (NAMEINSOURCE '"TILE_THUMBNAIL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_TYPE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TILE_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    TILE_DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"TILE_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::UIS_FIORI_CATALOGS_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::UIS_PAGES_NAV_VIEW" (
    TYPE string(4) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    REAL_PATH string(615) OPTIONS (NAMEINSOURCE '"REAL_PATH"', NATIVE_TYPE 'NVARCHAR'),
    READABLE_PATH string(1027) OPTIONS (NAMEINSOURCE '"READABLE_PATH"', NATIVE_TYPE 'NVARCHAR'),
    ICON string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::UIS_PAGES_NAV_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::UIS_SITES_NAV_VIEW" (
    TYPE string(4) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    REAL_PATH string(513) NOT NULL OPTIONS (NAMEINSOURCE '"REAL_PATH"', NATIVE_TYPE 'NVARCHAR'),
    READABLE_PATH string(513) NOT NULL OPTIONS (NAMEINSOURCE '"READABLE_PATH"', NATIVE_TYPE 'NVARCHAR'),
    ICON string(1) NOT NULL OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(1) NOT NULL OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::UIS_SITES_NAV_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::UIS_WIDGET_TEMPLATES_PROPERTIES_VIEW" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WG_ID string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::UIS_WIDGET_TEMPLATES_PROPERTIES_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::UIS_WIDGET_TEMPLATES_VIEW" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_ID string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"TILE_ID"', NATIVE_TYPE 'NVARCHAR'),
    TILE_NAME string(256) OPTIONS (NAMEINSOURCE '"TILE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_URL string(5000) OPTIONS (NAMEINSOURCE '"TILE_URL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_THUMBNAIL string(5000) OPTIONS (NAMEINSOURCE '"TILE_THUMBNAIL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_TYPE string(256) OPTIONS (NAMEINSOURCE '"TILE_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    TILE_DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"TILE_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::UIS_WIDGET_TEMPLATES_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::UIS_WIDGETS_NAV_VIEW" (
    TYPE string(6) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    REAL_PATH string(666) OPTIONS (NAMEINSOURCE '"REAL_PATH"', NATIVE_TYPE 'NVARCHAR'),
    READABLE_PATH string(1284) OPTIONS (NAMEINSOURCE '"READABLE_PATH"', NATIVE_TYPE 'NVARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::UIS_WIDGETS_NAV_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.uis.db::UIS_WIDGETS_VIEW" (
    ID string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ID"', NATIVE_TYPE 'NVARCHAR'),
    name string(256) OPTIONS (NAMEINSOURCE '"name"', NATIVE_TYPE 'NVARCHAR'),
    description string(5000) OPTIONS (NAMEINSOURCE '"description"', NATIVE_TYPE 'NVARCHAR'),
    URI string(5000) OPTIONS (NAMEINSOURCE '"URI"', NATIVE_TYPE 'NVARCHAR'),
    type string(6) NOT NULL OPTIONS (NAMEINSOURCE '"type"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.uis.db::UIS_WIDGETS_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.dt.base.server.persistency::ExtensionWhitelist" (
    ExtensionID integer NOT NULL OPTIONS (ANNOTATION 'Extension Identifier', NAMEINSOURCE '"ExtensionID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ExtensionPointCaller string(128) NOT NULL OPTIONS (ANNOTATION 'Extension Point Caller', NAMEINSOURCE '"ExtensionPointCaller"', NATIVE_TYPE 'VARCHAR'),
    ExtensionPointMode string(20) NOT NULL OPTIONS (ANNOTATION 'Extension Point Mode', NAMEINSOURCE '"ExtensionPointMode"', NATIVE_TYPE 'VARCHAR'),
    ExtensionLibName string(60) NOT NULL OPTIONS (ANNOTATION 'Extension Libname', NAMEINSOURCE '"ExtensionLibName"', NATIVE_TYPE 'VARCHAR'),
    ExtensionLibLocation string(256) NOT NULL OPTIONS (ANNOTATION 'Extension LibLocation', NAMEINSOURCE '"ExtensionLibLocation"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.dt.base.server.persistency::ExtensionWhitelist"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::ACTION_LOG" (
    PROCESS_ID string(60) NOT NULL OPTIONS (NAMEINSOURCE '"PROCESS_ID"', NATIVE_TYPE 'NVARCHAR'),
    LOG_ID string(60) OPTIONS (NAMEINSOURCE '"LOG_ID"', NATIVE_TYPE 'NVARCHAR'),
    "USER" string(40) NOT NULL OPTIONS (NAMEINSOURCE '"USER"', NATIVE_TYPE 'NVARCHAR'),
    "TIME" timestamp NOT NULL OPTIONS (NAMEINSOURCE '"TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RC integer DEFAULT '0' OPTIONS (NAMEINSOURCE '"RC"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(40) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR'),
    MESSAGE string(5000) OPTIONS (NAMEINSOURCE '"MESSAGE"', NATIVE_TYPE 'NVARCHAR'),
    SID string(3) OPTIONS (NAMEINSOURCE '"SID"', NATIVE_TYPE 'VARCHAR'),
    HOST string(255) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::ACTION_LOG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::CONF_HISTORY" (
    ENTITY string(30) NOT NULL OPTIONS (NAMEINSOURCE '"ENTITY"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    ACTION string(8) NOT NULL OPTIONS (NAMEINSOURCE '"ACTION"', NATIVE_TYPE 'NVARCHAR'),
    NEW_VALUE clob OPTIONS (NAMEINSOURCE '"NEW_VALUE"', NATIVE_TYPE 'NCLOB'),
    MODIFIED_BY string(40) NOT NULL OPTIONS (NAMEINSOURCE '"MODIFIED_BY"', NATIVE_TYPE 'NVARCHAR'),
    MODIFIED_AT timestamp NOT NULL OPTIONS (NAMEINSOURCE '"MODIFIED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::CONF_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::CONFIGURATION" (
    KEY string(30) NOT NULL OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" clob NOT NULL OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NCLOB')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::CONFIGURATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::IMPORTED_DU" (
    PROCESS_ID string(60) NOT NULL OPTIONS (NAMEINSOURCE '"PROCESS_ID"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT_ID long NOT NULL OPTIONS (NAMEINSOURCE '"CONTENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IMPORTED_AT timestamp NOT NULL OPTIONS (NAMEINSOURCE '"IMPORTED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IMPORT_TYPE string(1) OPTIONS (NAMEINSOURCE '"IMPORT_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::IMPORTED_DU"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::LOG_SYNC" (
    PROCESS_ID string(60) NOT NULL OPTIONS (NAMEINSOURCE '"PROCESS_ID"', NATIVE_TYPE 'NVARCHAR'),
    SYSTEM_ID long NOT NULL OPTIONS (NAMEINSOURCE '"SYSTEM_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUNNING byte NOT NULL DEFAULT '1' OPTIONS (NAMEINSOURCE '"RUNNING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::LOG_SYNC"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::PROCESS" (
    PROCESS_ID string(60) NOT NULL OPTIONS (NAMEINSOURCE '"PROCESS_ID"', NATIVE_TYPE 'NVARCHAR'),
    SRC_HOST string(255) OPTIONS (NAMEINSOURCE '"SRC_HOST"', NATIVE_TYPE 'NVARCHAR'),
    SRC_SID string(3) OPTIONS (NAMEINSOURCE '"SRC_SID"', NATIVE_TYPE 'VARCHAR'),
    TARGET_HOST string(255) OPTIONS (NAMEINSOURCE '"TARGET_HOST"', NATIVE_TYPE 'NVARCHAR'),
    TARGET_SID string(3) OPTIONS (NAMEINSOURCE '"TARGET_SID"', NATIVE_TYPE 'VARCHAR'),
    "USER" string(40) NOT NULL OPTIONS (NAMEINSOURCE '"USER"', NATIVE_TYPE 'NVARCHAR'),
    START_TIME timestamp NOT NULL OPTIONS (NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_TIME timestamp OPTIONS (NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RC integer OPTIONS (NAMEINSOURCE '"RC"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(1) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    DUS string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"DUS"', NATIVE_TYPE 'NVARCHAR'),
    TRANSPORT_UNIT string(1) NOT NULL DEFAULT 'D' OPTIONS (NAMEINSOURCE '"TRANSPORT_UNIT"', NATIVE_TYPE 'VARCHAR'),
    PRODUCT_NAME string(256) OPTIONS (NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_VENDOR string(256) OPTIONS (NAMEINSOURCE '"PRODUCT_VENDOR"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::PROCESS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::SYSTEM" (
    SYSTEM_ID long NOT NULL OPTIONS (NAMEINSOURCE '"SYSTEM_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SID string(3) OPTIONS (NAMEINSOURCE '"SID"', NATIVE_TYPE 'VARCHAR'),
    INSTANCE bigdecimal(2,2147483647) OPTIONS (NAMEINSOURCE '"INSTANCE"', NATIVE_TYPE 'DECIMAL'),
    COMMENT string(255) OPTIONS (NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'NVARCHAR'),
    DESTINATION string(255) OPTIONS (NAMEINSOURCE '"DESTINATION"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    IS_CTS string(1) OPTIONS (NAMEINSOURCE '"IS_CTS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::SYSTEM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::SYSTEM_STATE" (
    SYSTEM_ID long NOT NULL OPTIONS (NAMEINSOURCE '"SYSTEM_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATUS integer OPTIONS (NAMEINSOURCE '"STATUS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS_UPDATED_AT timestamp OPTIONS (NAMEINSOURCE '"STATUS_UPDATED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::SYSTEM_STATE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::TRANSPORT_CONTENT" (
    TRANSPORT_CONTENT_ID long NOT NULL OPTIONS (NAMEINSOURCE '"TRANSPORT_CONTENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DU_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DU_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DU_VENDOR string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DU_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION string(256) OPTIONS (NAMEINSOURCE '"DU_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION_SP string(256) OPTIONS (NAMEINSOURCE '"DU_VERSION_SP"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION_PATCH string(256) OPTIONS (NAMEINSOURCE '"DU_VERSION_PATCH"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT blob OPTIONS (NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'BLOB'),
    TRANSPORT_UNIT_TYPE integer NOT NULL OPTIONS (NAMEINSOURCE '"TRANSPORT_UNIT_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REPOSITORY_VERSION integer NOT NULL OPTIONS (NAMEINSOURCE '"REPOSITORY_VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INCL_OBJS_FROM timestamp OPTIONS (NAMEINSOURCE '"INCL_OBJS_FROM"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INCL_OBJS_TO timestamp OPTIONS (NAMEINSOURCE '"INCL_OBJS_TO"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SRC_SYSTEM_SID string(3) OPTIONS (NAMEINSOURCE '"SRC_SYSTEM_SID"', NATIVE_TYPE 'VARCHAR'),
    SRC_SYSTEM_HOST string(255) OPTIONS (NAMEINSOURCE '"SRC_SYSTEM_HOST"', NATIVE_TYPE 'NVARCHAR'),
    KEEP_CONTENT string(1) OPTIONS (NAMEINSOURCE '"KEEP_CONTENT"', NATIVE_TYPE 'VARCHAR'),
    SAVED_AT timestamp OPTIONS (NAMEINSOURCE '"SAVED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::TRANSPORT_CONTENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::TRANSPORT_ROUTE" (
    TRANSPORT_ROUTE_ID long NOT NULL OPTIONS (NAMEINSOURCE '"TRANSPORT_ROUTE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SRC_SYSTEM long NOT NULL OPTIONS (NAMEINSOURCE '"SRC_SYSTEM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TARGET_SYSTEM long NOT NULL OPTIONS (NAMEINSOURCE '"TARGET_SYSTEM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMENT string(1024) OPTIONS (NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'NVARCHAR'),
    TRANSPORT_MODE string(1) NOT NULL DEFAULT 'U' OPTIONS (NAMEINSOURCE '"TRANSPORT_MODE"', NATIVE_TYPE 'VARCHAR'),
    VALID string(1) NOT NULL DEFAULT 'Y' OPTIONS (NAMEINSOURCE '"VALID"', NATIVE_TYPE 'VARCHAR'),
    TRANSPORT_UNIT string(1) NOT NULL DEFAULT 'D' OPTIONS (NAMEINSOURCE '"TRANSPORT_UNIT"', NATIVE_TYPE 'VARCHAR'),
    PRODUCT_NAME string(256) OPTIONS (NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_VENDOR string(256) OPTIONS (NAMEINSOURCE '"PRODUCT_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_INSTANCE string(3) OPTIONS (NAMEINSOURCE '"PRODUCT_INSTANCE"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(30) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::TRANSPORT_ROUTE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::TRANSPORT_ROUTE_DU" (
    TRANSPORT_ROUTE_ID long NOT NULL OPTIONS (NAMEINSOURCE '"TRANSPORT_ROUTE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VENDOR string(256) NOT NULL OPTIONS (NAMEINSOURCE '"VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::TRANSPORT_ROUTE_DU"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.sap.hana.xs.lm.db::TRANSPORTED_CHANGE" (
    PROCESS_ID string(60) NOT NULL OPTIONS (NAMEINSOURCE '"PROCESS_ID"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE string(256) OPTIONS (NAMEINSOURCE '"PACKAGE"', NATIVE_TYPE 'NVARCHAR'),
    DU_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DU_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DU_VENDOR string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DU_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    CHANGE_ID integer OPTIONS (NAMEINSOURCE '"CHANGE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CHANGE_RELEASE_TIME timestamp OPTIONS (NAMEINSOURCE '"CHANGE_RELEASE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TRANSPORTED_BY string(8) OPTIONS (NAMEINSOURCE '"TRANSPORTED_BY"', NATIVE_TYPE 'NVARCHAR'),
    SRC_SYSTEM string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SRC_SYSTEM"', NATIVE_TYPE 'NVARCHAR'),
    RELEASED string(1) OPTIONS (NAMEINSOURCE '"RELEASED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."sap.hana.xs.lm.db::TRANSPORTED_CHANGE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.SCHEMAS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_OWNER string(256) OPTIONS (ANNOTATION 'Schema owner', NAMEINSOURCE '"SCHEMA_OWNER"', NATIVE_TYPE 'NVARCHAR'),
    HAS_PRIVILEGES string(5) NOT NULL OPTIONS (ANNOTATION 'Shows if user is schema owner or has any privilege for the schema or any object within the schema: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_PRIVILEGES"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."SCHEMAS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.SEARCH_RULE_SET_CONDITIONS" (
    SEARCH_RULE_SET_PACKAGE_ID string(256) OPTIONS (ANNOTATION 'Name of the repository package of the search rule set', NAMEINSOURCE '"SEARCH_RULE_SET_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    SEARCH_RULE_SET_NAME string(256) OPTIONS (ANNOTATION 'Name of the search rule set', NAMEINSOURCE '"SEARCH_RULE_SET_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RULE_NUMBER integer OPTIONS (ANNOTATION 'Number of the rule that contains the column', NAMEINSOURCE '"RULE_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RULE_ID string(256) OPTIONS (ANNOTATION 'Unique ID/name of the rule that contains the column', NAMEINSOURCE '"RULE_ID"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Name of a column that is used by a search rule set', NAMEINSOURCE '"SEARCHED_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_COLUMN_CONDITION string(20) OPTIONS (ANNOTATION 'The condition. Possible values are EQUALS, NOT EMPTY, MISSING', NAMEINSOURCE '"SEARCHED_COLUMN_CONDITION"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_COLUMN_VALUE string(5000) OPTIONS (ANNOTATION 'The value the user input is compared to, if condition is EQUALS', NAMEINSOURCE '"SEARCHED_COLUMN_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_COLUMN_VALUE_REPLACED_BY string(5000) OPTIONS (ANNOTATION 'The user input is replaced by this value if the action is REPLACE', NAMEINSOURCE '"SEARCHED_COLUMN_VALUE_REPLACED_BY"', NATIVE_TYPE 'NVARCHAR'),
    ACTION string(20) OPTIONS (ANNOTATION 'Action that is done when the condition is true. Possible values are SKIP COLUMN, SKIP RULE, REPLACE', NAMEINSOURCE '"ACTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."SEARCH_RULE_SET_CONDITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.SEARCH_RULE_SETS" (
    SEARCH_RULE_SET_PACKAGE_ID string(256) OPTIONS (ANNOTATION 'Name of the repository package of the search rule set', NAMEINSOURCE '"SEARCH_RULE_SET_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    SEARCH_RULE_SET_NAME string(256) OPTIONS (ANNOTATION 'Name of the search rule set', NAMEINSOURCE '"SEARCH_RULE_SET_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the catalog object that is searched by the given search rule set', NAMEINSOURCE '"SEARCHED_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the catalog object that is searched by the given search rule set', NAMEINSOURCE '"SEARCHED_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_REPOSITORY_PACKAGE_ID string(256) OPTIONS (ANNOTATION 'Name of the repository package of the repository object that is searched by the given search rule set', NAMEINSOURCE '"SEARCHED_REPOSITORY_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_REPOSITORY_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the repository object that is searched by the given search rule set', NAMEINSOURCE '"SEARCHED_REPOSITORY_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."SEARCH_RULE_SETS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.SEQUENCES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the sequence', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEQUENCE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the sequence', NAMEINSOURCE '"SEQUENCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEQUENCE_OID long OPTIONS (ANNOTATION 'Object ID of the sequence', NAMEINSOURCE '"SEQUENCE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    START_NUMBER long OPTIONS (ANNOTATION 'Start number', NAMEINSOURCE '"START_NUMBER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_VALUE long OPTIONS (ANNOTATION 'Minimum value of the sequence', NAMEINSOURCE '"MIN_VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_VALUE long OPTIONS (ANNOTATION 'Maximum value of the sequence', NAMEINSOURCE '"MAX_VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCREMENT_BY long OPTIONS (ANNOTATION 'Incremental value', NAMEINSOURCE '"INCREMENT_BY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_CYCLED string(5) OPTIONS (ANNOTATION 'Specifies whether the sequence will start with MIN_VALUE after having reached MAX_VALUE in case of INCREMENT_BY greater than 0 or start with MAX_VALUE after having reached MIN_VALUE in case of INCREMENT_BY less than 0: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_CYCLED"', NATIVE_TYPE 'VARCHAR'),
    RESET_BY_QUERY clob OPTIONS (ANNOTATION 'Reset by query string for the sequence', NAMEINSOURCE '"RESET_BY_QUERY"', NATIVE_TYPE 'NCLOB'),
    CACHE_SIZE short OPTIONS (ANNOTATION 'Cache size of the sequence', NAMEINSOURCE '"CACHE_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."SEQUENCES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.SESSION_COOKIES" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user this session cookie was created for', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT_HOST string(64) OPTIONS (ANNOTATION 'Host name of client machine', NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT_PID long OPTIONS (ANNOTATION 'Client Process ID', NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'The time the session cookie was created', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_CONNECT_TIME timestamp OPTIONS (ANNOTATION 'The last time the session cookie was used for successful re-connection', NAMEINSOURCE '"LAST_CONNECT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SESSION_END_TIME timestamp OPTIONS (ANNOTATION 'The time the main connection has ended', NAMEINSOURCE '"SESSION_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."SESSION_COOKIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.SQLSCRIPT_TRACE" (
    TRACE_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Timestamp generated when a TRACE is performed', NAMEINSOURCE '"TRACE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID ', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_ID long OPTIONS (ANNOTATION 'Logical ID of the outmost user statement, which triggers the procedure execution (direct or indirect)', NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCEDURE_OID long OPTIONS (ANNOTATION 'The procedure object ID', NAMEINSOURCE '"PROCEDURE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VARIABLE_NAME string(256) OPTIONS (ANNOTATION 'The internal variable name used for the variable to which the TRACE operator is assigned', NAMEINSOURCE '"VARIABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'The name of the local temporary table containing the table result', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."SQLSCRIPT_TRACE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.ST_GEOMETRY_COLUMNS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the schema to which the table containing the spatial column belongs', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the table containing the spatial column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the spatial column', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRS_ID integer NOT NULL OPTIONS (ANNOTATION 'Numeric identifier (SRID) for the spatial reference system (SRS) associated with the spatial column', NAMEINSOURCE '"SRS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SRS_NAME string(256) OPTIONS (ANNOTATION 'Name of the SRS associated with the spatial column', NAMEINSOURCE '"SRS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Spatial data type', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."ST_GEOMETRY_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.ST_SPATIAL_REFERENCE_SYSTEMS" (
    OWNER_NAME string(256) OPTIONS (ANNOTATION 'Owner name of this spatial reference system (SRS)', NAMEINSOURCE '"OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRS_ID integer OPTIONS (ANNOTATION 'Numeric identifier (SRID) of this spatial reference system', NAMEINSOURCE '"SRS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SRS_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of this spatial reference system', NAMEINSOURCE '"SRS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROUND_EARTH string(7) NOT NULL OPTIONS (ANNOTATION 'Whether the SRS type is ROUND EARTH (''TRUE'') or PLANAR (''FALSE'')', NAMEINSOURCE '"ROUND_EARTH"', NATIVE_TYPE 'VARCHAR'),
    AXIS_ORDER string(12) NOT NULL OPTIONS (ANNOTATION 'Describes how the database server interprets points with regards to latitude and longitude: ''x/y/z/m''/''long/lat/z/m''/''lat/long/z/m''', NAMEINSOURCE '"AXIS_ORDER"', NATIVE_TYPE 'VARCHAR'),
    SNAP_TO_GRID double OPTIONS (ANNOTATION 'Defines the size of the grid when performing calculations', NAMEINSOURCE '"SNAP_TO_GRID"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOLERANCE double OPTIONS (ANNOTATION 'Defines the precision to use when comparing points', NAMEINSOURCE '"TOLERANCE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    SEMI_MAJOR_AXIS double OPTIONS (ANNOTATION 'Distance from center of the ellipsoid to the equator for a ROUND EARTH SRS', NAMEINSOURCE '"SEMI_MAJOR_AXIS"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    SEMI_MINOR_AXIS double OPTIONS (ANNOTATION 'Distance from center of the ellipsoid to the poles for a ROUND EARTH SRS', NAMEINSOURCE '"SEMI_MINOR_AXIS"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    INV_FLATTENING double OPTIONS (ANNOTATION 'The inverse flattening used for the ellipsoid in a ROUND EARTH SRS', NAMEINSOURCE '"INV_FLATTENING"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_X double OPTIONS (ANNOTATION 'Minimum x value allowed in coordinates', NAMEINSOURCE '"MIN_X"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_X double OPTIONS (ANNOTATION 'Maximum x value allowed in coordinates', NAMEINSOURCE '"MAX_X"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_Y double OPTIONS (ANNOTATION 'Minimum y value allowed in coordinates', NAMEINSOURCE '"MIN_Y"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_Y double OPTIONS (ANNOTATION 'Maximum y value allowed in coordinates', NAMEINSOURCE '"MAX_Y"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_Z double OPTIONS (ANNOTATION 'Minimum z value allowed in coordinates', NAMEINSOURCE '"MIN_Z"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_Z double OPTIONS (ANNOTATION 'Maximum z value allowed in coordinates', NAMEINSOURCE '"MAX_Z"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    ORGANIZATION string(256) OPTIONS (ANNOTATION 'Name of the organization that created the coordinate system used by this spatial reference system', NAMEINSOURCE '"ORGANIZATION"', NATIVE_TYPE 'NVARCHAR'),
    ORGANIZATION_COORDSYS_ID integer OPTIONS (ANNOTATION 'ID given to the coordinate system by the organization that created it', NAMEINSOURCE '"ORGANIZATION_COORDSYS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SRS_TYPE string(11) NOT NULL OPTIONS (ANNOTATION 'Type of SRS as defined by the SQL/MM standard: ''GEOGRAPHIC''/''PROJECTED''/''ENGINEERING''', NAMEINSOURCE '"SRS_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LINEAR_UNIT_OF_MEASURE string(256) NOT NULL OPTIONS (ANNOTATION 'Linear unit of measure used by this spatial reference system', NAMEINSOURCE '"LINEAR_UNIT_OF_MEASURE"', NATIVE_TYPE 'NVARCHAR'),
    ANGULAR_UNIT_OF_MEASURE string(256) OPTIONS (ANNOTATION 'Angular unit of measure used by this spatial reference system', NAMEINSOURCE '"ANGULAR_UNIT_OF_MEASURE"', NATIVE_TYPE 'NVARCHAR'),
    POLYGON_FORMAT string(16) NOT NULL OPTIONS (ANNOTATION 'Orientation of the rings in a polygon: ''COUNTERCLOCKWISE''/''CLOCKWISE''/''EVENODD''', NAMEINSOURCE '"POLYGON_FORMAT"', NATIVE_TYPE 'VARCHAR'),
    STORAGE_FORMAT string(8) NOT NULL OPTIONS (ANNOTATION 'Whether the data is stored in normalized format (''INTERNAL''), unnormalized format (''ORIGINAL''), or both (''MIXED'')', NAMEINSOURCE '"STORAGE_FORMAT"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION string(256) OPTIONS (ANNOTATION 'WKT definition of this spatial reference system in the format defined by the OGC standard', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NVARCHAR'),
    TRANSFORM_DEFINITION string(256) OPTIONS (ANNOTATION 'Transform definition settings for use when transforming data from this SRS to another', NAMEINSOURCE '"TRANSFORM_DEFINITION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."ST_SPATIAL_REFERENCE_SYSTEMS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.ST_UNITS_OF_MEASURE" (
    OWNER_NAME string(256) OPTIONS (ANNOTATION 'Owner name of this unit of measure', NAMEINSOURCE '"OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNIT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of this unit of measure', NAMEINSOURCE '"UNIT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNIT_TYPE string(7) NOT NULL OPTIONS (ANNOTATION 'Type of this unit of measure: ''ANGULAR''/''LINEAR''', NAMEINSOURCE '"UNIT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONVERSION_FACTOR double OPTIONS (ANNOTATION 'Conversion factor of this unit of measure', NAMEINSOURCE '"CONVERSION_FACTOR"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."ST_UNITS_OF_MEASURE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.STATISTICS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short NOT NULL OPTIONS (ANNOTATION 'Ordinal position of the column in the table', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    MINVALUE double OPTIONS (ANNOTATION 'Min value of the column. The value is manipulated into the Double type value', NAMEINSOURCE '"MINVALUE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MINVALUE_STR string(256) OPTIONS (ANNOTATION 'String representation of the column', NAMEINSOURCE '"MINVALUE_STR"', NATIVE_TYPE 'NVARCHAR'),
    MAXVALUE double OPTIONS (ANNOTATION 'Max value of the column. The value is manipulated into the Double type value', NAMEINSOURCE '"MAXVALUE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAXVALUE_STR string(256) OPTIONS (ANNOTATION 'String representation of the column', NAMEINSOURCE '"MAXVALUE_STR"', NATIVE_TYPE 'NVARCHAR'),
    COUNT double OPTIONS (ANNOTATION 'Number of not null value of the column', NAMEINSOURCE '"COUNT"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    DCOUNT double OPTIONS (ANNOTATION 'Number of distinct value of the column', NAMEINSOURCE '"DCOUNT"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    NULLCOUNT double OPTIONS (ANNOTATION 'Number of null values of the column', NAMEINSOURCE '"NULLCOUNT"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.STRUCTURED_PRIVILEGES" (
    STRUCTURED_PRIVILEGE_ID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the structured privilege', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STRUCTURED_PRIVILEGE_NAME string(256) OPTIONS (ANNOTATION 'Name of the structured privilege', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RESTRICTION_TYPE string(256) NOT NULL OPTIONS (ANNOTATION 'Type of the restriction: ''CUBERESTRICTION''/''ACTIVITYRESTRICTION''/''VALIDITYRESTRICTION''/''DIMENSIONRESTRICTION''', NAMEINSOURCE '"RESTRICTION_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    DIMENSION_ATTRIBUTE string(256) OPTIONS (ANNOTATION 'Name of the dimension attribute', NAMEINSOURCE '"DIMENSION_ATTRIBUTE"', NATIVE_TYPE 'NVARCHAR'),
    FILTER_ID long OPTIONS (ANNOTATION 'Number of filter to be able to combine all operators/ operands belonging to one filter', NAMEINSOURCE '"FILTER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILTER_TYPE string(16) OPTIONS (ANNOTATION 'Type of filter: ''STATIC''/''DYNAMIC''', NAMEINSOURCE '"FILTER_TYPE"', NATIVE_TYPE 'VARCHAR'),
    NEGATED string(5) OPTIONS (ANNOTATION 'Operator was negated in filter; ''TRUE''/''FALSE''', NAMEINSOURCE '"NEGATED"', NATIVE_TYPE 'VARCHAR'),
    OPERATOR string(16) NOT NULL OPTIONS (ANNOTATION 'Type of operator: ''CONTAINS PATTERN''/''BETWEEN''/''EQUAL''/''IN''/''LESS THAN''/''LESS EQUAL''/''GREATER THAN''/''GREATER EQUAL''', NAMEINSOURCE '"OPERATOR"', NATIVE_TYPE 'VARCHAR'),
    OPERAND_ORDER integer OPTIONS (ANNOTATION 'Sequence of operands per filter ID', NAMEINSOURCE '"OPERAND_ORDER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OPERAND string(513) OPTIONS (ANNOTATION 'Value the operator will be compared to', NAMEINSOURCE '"OPERAND"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."STRUCTURED_PRIVILEGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.SYNONYMS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the synonym', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SYNONYM_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the synonym', NAMEINSOURCE '"SYNONYM_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SYNONYM_OID long OPTIONS (ANNOTATION 'Object ID of the synonym', NAMEINSOURCE '"SYNONYM_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SCHEMA string(256) OPTIONS (ANNOTATION 'Schema name of the referenced object', NAMEINSOURCE '"OBJECT_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the referenced object', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) NOT NULL OPTIONS (ANNOTATION 'Type of the referenced object', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_COLUMN_OBJECT string(5) OPTIONS (ANNOTATION 'Specifies whether this view is a column object or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_OBJECT"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) OPTIONS (ANNOTATION 'Specifies whether the synonym is valid or not. This becomes ''FALSE'' when its base object is dropped: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."SYNONYMS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.TABLE_COLUMNS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the column', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the column in a record', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'SQL data type ID of the column', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'SQL data type name of the column', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "OFFSET" short OPTIONS (ANNOTATION 'Offset of the column in the record', NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LENGTH integer OPTIONS (ANNOTATION 'Number of chars for char types, number of max digits for numeric types; number of chars for datetime types, number of bytes for LOB types', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Numeric types: the maximum number of digits to the right of the decimal point; time, timestamp: the decimal digits are defined as the number of digits to the right of the decimal point in the second''s component of the data', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the column is allowed to accept null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (ANNOTATION 'Default value of the column', NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    COLLATION string(256) OPTIONS (ANNOTATION 'Collation used for this column', NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Description for this column', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(1) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'VARCHAR'),
    MIN_VALUE string(1) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'VARCHAR'),
    CS_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'Column store data type ID', NAMEINSOURCE '"CS_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Column store data type name', NAMEINSOURCE '"CS_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DDIC_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'DDIC data type ID', NAMEINSOURCE '"DDIC_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DDIC_DATA_TYPE_NAME string(7) OPTIONS (ANNOTATION 'DDIC data type name', NAMEINSOURCE '"DDIC_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMPRESSION_TYPE string(9) NOT NULL OPTIONS (ANNOTATION 'Type of compression: ''DEFAULT''/''PREFIXED''/''SPARSE''/''CLUSTERED''/''INDIRECT''/''RLE''. Columns in TABLE_COLUMNS show the default value which can be specified during table creation. They can also be updated using an ''ALTER TABLE'' statement.', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(4) NOT NULL OPTIONS (ANNOTATION 'Type of index: ''NONE''/''FULL''', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_ID long OPTIONS (ANNOTATION 'ID of the column', NAMEINSOURCE '"COLUMN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRELOAD string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column is preloaded: ''TRUE''/''FALSE''', NAMEINSOURCE '"PRELOAD"', NATIVE_TYPE 'VARCHAR'),
    GENERATED_ALWAYS_AS string(1000) OPTIONS (ANNOTATION 'Specifies the expression of the column created by GENERATED ... AS', NAMEINSOURCE '"GENERATED_ALWAYS_AS"', NATIVE_TYPE 'NVARCHAR'),
    HAS_SCHEMA_FLEXIBILITY string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column has schema flexibility: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_SCHEMA_FLEXIBILITY"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_INDEX string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column has fuzzy search index: ''TRUE''/''FALSE''', NAMEINSOURCE '"FUZZY_SEARCH_INDEX"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_MODE string(16) OPTIONS (ANNOTATION 'Specifies fuzzy search mode', NAMEINSOURCE '"FUZZY_SEARCH_MODE"', NATIVE_TYPE 'VARCHAR'),
    MEMORY_THRESHOLD integer OPTIONS (ANNOTATION 'Specifies memory threshold in bytes for LOB types', NAMEINSOURCE '"MEMORY_THRESHOLD"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOAD_UNIT string(6) OPTIONS (ANNOTATION 'Specifies unit of column data loading: ''TABLE''/''COLUMN''/''PAGE''', NAMEINSOURCE '"LOAD_UNIT"', NATIVE_TYPE 'VARCHAR'),
    GENERATION_TYPE string(22) OPTIONS (ANNOTATION '''ALWAYS AS'' if the column is generation column, ''ALWAYS AS IDENTITY''/''BY DEFAULT AS IDENTITY'' if the column is an identity column whose values are always generated or generated by default, NULL otherwise', NAMEINSOURCE '"GENERATION_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."TABLE_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.TABLE_GROUPS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_TYPE string(256) OPTIONS (ANNOTATION 'Group type', NAMEINSOURCE '"GROUP_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    SUBTYPE string(256) OPTIONS (ANNOTATION 'Subtype', NAMEINSOURCE '"SUBTYPE"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_NAME string(256) OPTIONS (ANNOTATION 'Group name', NAMEINSOURCE '"GROUP_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."TABLE_GROUPS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.TABLE_REPLICAS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SOURCE_TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"SOURCE_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REPLICA_TABLE_NAME string(256) OPTIONS (ANNOTATION 'Replica name', NAMEINSOURCE '"REPLICA_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."TABLE_REPLICAS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.TABLES" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Table description', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    FIXED_PART_SIZE short OPTIONS (ANNOTATION 'Fixed part size of the table', NAMEINSOURCE '"FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    IS_LOGGED string(5) OPTIONS (ANNOTATION 'Specifies whether or not logging was on for the table at last restart time: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_LOGGED"', NATIVE_TYPE 'VARCHAR'),
    IS_SYSTEM_TABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Deprecated: only used internally. Possible values: ''TRUE''/''FALSE''. Cannot be used to distinguish customer tables from predefined tables', NAMEINSOURCE '"IS_SYSTEM_TABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_COLUMN_TABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table is a column table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_TABLE"', NATIVE_TYPE 'VARCHAR'),
    TABLE_TYPE string(16) OPTIONS (ANNOTATION 'Specifies type of the table: ''ROW''/''COLUMN''/''HYBRID''', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_INSERT_ONLY string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table is an ''insert only'' table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_INSERT_ONLY"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED_DATA string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table can be shared among other instances: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED_DATA"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED_METADATA string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table is a global table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED_METADATA"', NATIVE_TYPE 'VARCHAR'),
    SESSION_TYPE string(7) NOT NULL OPTIONS (ANNOTATION 'Session type: ''NONE''/''SIMPLE''/''HISTORY''. For ''HISTORY'', time travel is possible', NAMEINSOURCE '"SESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_TEMPORARY string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table is a temporary table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TEMPORARY"', NATIVE_TYPE 'VARCHAR'),
    TEMPORARY_TABLE_TYPE string(10) NOT NULL OPTIONS (ANNOTATION 'Temporary table type', NAMEINSOURCE '"TEMPORARY_TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    COMMIT_ACTION string(8) OPTIONS (ANNOTATION 'On commit deletion for global temporary tables', NAMEINSOURCE '"COMMIT_ACTION"', NATIVE_TYPE 'VARCHAR'),
    IS_USER_DEFINED_TYPE string(5) NOT NULL OPTIONS (ANNOTATION '''TRUE'' if user defined table type, ''FALSE'' otherwise', NAMEINSOURCE '"IS_USER_DEFINED_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HAS_PRIMARY_KEY string(5) NOT NULL OPTIONS (ANNOTATION '''TRUE'' if the table has a primary key, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"HAS_PRIMARY_KEY"', NATIVE_TYPE 'VARCHAR'),
    PARTITION_SPEC clob OPTIONS (ANNOTATION 'Detail specification of table partitioning. Only valid for column store tables', NAMEINSOURCE '"PARTITION_SPEC"', NATIVE_TYPE 'NCLOB'),
    USES_EXTKEY string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses an external key, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"USES_EXTKEY"', NATIVE_TYPE 'VARCHAR'),
    AUTO_MERGE_ON string(5) OPTIONS (ANNOTATION '''TRUE'' if automatic delta table merge is activated for the table, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"AUTO_MERGE_ON"', NATIVE_TYPE 'VARCHAR'),
    USES_DIMFN_CACHE string(5) OPTIONS (ANNOTATION '''TRUE'' if DimFunctionCache feature is used by the table, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"USES_DIMFN_CACHE"', NATIVE_TYPE 'VARCHAR'),
    IS_PUBLIC string(5) OPTIONS (ANNOTATION '''TRUE'' if the table is public, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"IS_PUBLIC"', NATIVE_TYPE 'VARCHAR'),
    AUTO_OPTIMIZE_COMPRESSION_ON string(5) OPTIONS (ANNOTATION '''TRUE'' if automatic optimize compression is activated for the table, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"AUTO_OPTIMIZE_COMPRESSION_ON"', NATIVE_TYPE 'VARCHAR'),
    COMPRESSED_EXTKEY string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses a compressed external key, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"COMPRESSED_EXTKEY"', NATIVE_TYPE 'VARCHAR'),
    HAS_TEXT_FIELDS string(5) OPTIONS (ANNOTATION '''TRUE'' if the table has at least one column of type TEXT, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"HAS_TEXT_FIELDS"', NATIVE_TYPE 'VARCHAR'),
    USES_QUEUE_TABLE string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses a queue table, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"USES_QUEUE_TABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_PRELOAD string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses preloading, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"IS_PRELOAD"', NATIVE_TYPE 'VARCHAR'),
    IS_PARTIAL_PRELOAD string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses partial preloading, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"IS_PARTIAL_PRELOAD"', NATIVE_TYPE 'VARCHAR'),
    UNLOAD_PRIORITY byte OPTIONS (ANNOTATION 'Specifies unload priority of the table: 0 - 9. 0 means not unloadable, 1 means latest unload, and 9 means earliest unload', NAMEINSOURCE '"UNLOAD_PRIORITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    HAS_SCHEMA_FLEXIBILITY string(5) OPTIONS (ANNOTATION '''TRUE'' if the table has schema flexibility, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"HAS_SCHEMA_FLEXIBILITY"', NATIVE_TYPE 'VARCHAR'),
    IS_REPLICA string(5) NOT NULL OPTIONS (ANNOTATION '''TRUE'' if the table is a replica, else ''FALSE''', NAMEINSOURCE '"IS_REPLICA"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.testRH::CALCFLIGHT" (
    PRICE bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    CARRID string(3) OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    total_price string(10) OPTIONS (NAMEINSOURCE '"total_price"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."testRH::CALCFLIGHT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.testRH::FLIGHT" (
    PRICE bigdecimal(15,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    CURRENCY string(5) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    CITYFROM string(20) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITYFROM"', NATIVE_TYPE 'NVARCHAR'),
    CITYTO string(20) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CITYTO"', NATIVE_TYPE 'NVARCHAR'),
    DISTANCE bigdecimal(9,2147483647) OPTIONS (ANNOTATION '', NAMEINSOURCE '"DISTANCE"', NATIVE_TYPE 'DECIMAL'),
    CARRID string(3) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    CARRNAME string(20) OPTIONS (ANNOTATION '', NAMEINSOURCE '"CARRNAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."testRH::FLIGHT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.TRANSACTION_HISTORY" (
    COMMIT_TIME timestamp NOT NULL OPTIONS (ANNOTATION 'Timestamp', NAMEINSOURCE '"COMMIT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMMIT_ID long NOT NULL OPTIONS (ANNOTATION 'ID of the committed transaction', NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    APP_USER string(256) OPTIONS (ANNOTATION 'User that used the transaction', NAMEINSOURCE '"APP_USER"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."TRANSACTION_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.TRIGGERS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the trigger', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRIGGER_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Trigger name', NAMEINSOURCE '"TRIGGER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRIGGER_OID long OPTIONS (ANNOTATION 'Object ID of the trigger', NAMEINSOURCE '"TRIGGER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_NAME string(256) OPTIONS (ANNOTATION 'Name of the trigger owner', NAMEINSOURCE '"OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OWNER_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the trigger owner', NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBJECT_TABLE_SCHEMA string(256) OPTIONS (ANNOTATION 'Schema name of the table, the trigger is defined for', NAMEINSOURCE '"SUBJECT_TABLE_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of the table, the trigger is defined for', NAMEINSOURCE '"SUBJECT_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRIGGER_ACTION_TIME string(10) NOT NULL OPTIONS (ANNOTATION 'Time the trigger is executed: ''BEFORE''/''AFTER''/''INSTEAD OF'' the specified event', NAMEINSOURCE '"TRIGGER_ACTION_TIME"', NATIVE_TYPE 'VARCHAR'),
    TRIGGER_EVENT string(20) NOT NULL OPTIONS (ANNOTATION 'Event, the trigger is defined for: combination of ''DELETE''/''INSERT''/''UPDATE''', NAMEINSOURCE '"TRIGGER_EVENT"', NATIVE_TYPE 'VARCHAR'),
    TRIGGERED_ACTION_LEVEL string(9) NOT NULL OPTIONS (ANNOTATION 'Level of the event, where the triggered action will happen: ''ROW''/''STATEMENT''', NAMEINSOURCE '"TRIGGERED_ACTION_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION clob OPTIONS (ANNOTATION 'Query string of the trigger', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NCLOB'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the trigger is valid or not. This becomes ''FALSE'' when its base objects are changed or dropped: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR'),
    IS_ENABLED string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the trigger is enabled or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_ENABLED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."TRIGGERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.USER_PARAMETERS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    "PARAMETER" string(256) NOT NULL OPTIONS (ANNOTATION 'Parameter name: CLIENT', NAMEINSOURCE '"PARAMETER"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Parameter value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."USER_PARAMETERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.USERS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_ID long NOT NULL OPTIONS (ANNOTATION 'ID of the user', NAMEINSOURCE '"USER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MODE string(8) NOT NULL OPTIONS (ANNOTATION 'Mode of the user: ''LOCAL''/''GLOBAL''/''EXTERNAL''', NAMEINSOURCE '"USER_MODE"', NATIVE_TYPE 'VARCHAR'),
    EXTERNAL_IDENTITY string(256) OPTIONS (ANNOTATION 'External identity of the user', NAMEINSOURCE '"EXTERNAL_IDENTITY"', NATIVE_TYPE 'NVARCHAR'),
    CREATOR string(256) OPTIONS (ANNOTATION 'Creator of the user', NAMEINSOURCE '"CREATOR"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Creation time', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    VALID_FROM timestamp OPTIONS (ANNOTATION 'Start time of user''s validity', NAMEINSOURCE '"VALID_FROM"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    VALID_UNTIL timestamp OPTIONS (ANNOTATION 'End time of user''s validity', NAMEINSOURCE '"VALID_UNTIL"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_SUCCESSFUL_CONNECT timestamp OPTIONS (ANNOTATION 'Time of the last successful connect of the user', NAMEINSOURCE '"LAST_SUCCESSFUL_CONNECT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_INVALID_CONNECT_ATTEMPT timestamp OPTIONS (ANNOTATION 'Time of the last invalid connect attempt', NAMEINSOURCE '"LAST_INVALID_CONNECT_ATTEMPT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INVALID_CONNECT_ATTEMPTS integer OPTIONS (ANNOTATION 'Number of invalid connect attempts since last successful connect', NAMEINSOURCE '"INVALID_CONNECT_ATTEMPTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ADMIN_GIVEN_PASSWORD string(5) OPTIONS (ANNOTATION 'Specifies if the password was given by administrator or by the user himself: ''TRUE''/''FALSE''', NAMEINSOURCE '"ADMIN_GIVEN_PASSWORD"', NATIVE_TYPE 'VARCHAR'),
    PASSWORD_CHANGE_TIME timestamp OPTIONS (ANNOTATION 'Time of last password change, NULL, if password-lifetime will not be checked for this user', NAMEINSOURCE '"PASSWORD_CHANGE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PASSWORD_CHANGE_NEEDED string(5) OPTIONS (ANNOTATION 'Specifies if user is forced to change his password himself: ''TRUE''/''FALSE''', NAMEINSOURCE '"PASSWORD_CHANGE_NEEDED"', NATIVE_TYPE 'VARCHAR'),
    USER_DEACTIVATED string(5) OPTIONS (ANNOTATION 'Specifies if user is dectivated: ''TRUE''/''FALSE''', NAMEINSOURCE '"USER_DEACTIVATED"', NATIVE_TYPE 'VARCHAR'),
    DEACTIVATION_TIME timestamp OPTIONS (ANNOTATION 'Time given with explicit deactivation command for this user', NAMEINSOURCE '"DEACTIVATION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IS_PASSWORD_ENABLED string(5) OPTIONS (ANNOTATION 'Authentication using password is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_PASSWORD_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_KERBEROS_ENABLED string(5) OPTIONS (ANNOTATION 'Authentication using KERBEROS is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_KERBEROS_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_SAML_ENABLED string(5) OPTIONS (ANNOTATION 'Authentication using SAML is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_SAML_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_X509_ENABLED string(5) OPTIONS (ANNOTATION 'Authentication using an X.509 certificate is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_X509_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_SAP_LOGON_TICKET_ENABLED string(5) NOT NULL OPTIONS (ANNOTATION 'Authentication using a SAP logon ticket is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_SAP_LOGON_TICKET_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_SAP_ASSERTION_TICKET_ENABLED string(5) NOT NULL OPTIONS (ANNOTATION 'Authentication using a SAP assertion ticket is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_SAP_ASSERTION_TICKET_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_RESTRICTED string(5) OPTIONS (ANNOTATION 'User was created with option RESTRICTED: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_RESTRICTED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."USERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.VIEW_COLUMNS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'View name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the view', NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'View column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the view column', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'Data type ID', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Data type name', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "OFFSET" short OPTIONS (ANNOTATION 'Offset of the column in a record', NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LENGTH integer OPTIONS (ANNOTATION 'Number of chars for character types; max number of digits for numeric types; number of chars for datetime types; number of bytes for LOB types', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Numeric types: the maximum number of digits to the right of the decimal point; time, timestamp: the decimal digits are defined as the number of digits to the right of the decimal point in the second''s component of the data', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the column is allowed to accept null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (ANNOTATION 'Default value', NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    COLLATION string(256) OPTIONS (ANNOTATION 'Collation', NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Description for this column', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(1) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'VARCHAR'),
    MIN_VALUE string(1) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'VARCHAR'),
    CS_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'Column store data type ID', NAMEINSOURCE '"CS_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Column store data type name', NAMEINSOURCE '"CS_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DDIC_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'DDIC data type ID', NAMEINSOURCE '"DDIC_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DDIC_DATA_TYPE_NAME string(7) OPTIONS (ANNOTATION 'DDIC data type name', NAMEINSOURCE '"DDIC_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMPRESSION_TYPE string(9) NOT NULL OPTIONS (ANNOTATION 'Type of compression: ''DEFAULT''/''PREFIXED''/''SPARSE''/''CLUSTERED''/''INDIRECT''/''RLE''', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(4) NOT NULL OPTIONS (ANNOTATION 'Type of index: ''NONE''/''FULL''', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_ID long OPTIONS (ANNOTATION 'ID of the column', NAMEINSOURCE '"COLUMN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRELOAD string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column is preloaded: ''TRUE''/''FALSE''', NAMEINSOURCE '"PRELOAD"', NATIVE_TYPE 'VARCHAR'),
    GENERATED_ALWAYS_AS string(1000) OPTIONS (ANNOTATION 'Specifies the expression of the column created by GENERATED ... AS', NAMEINSOURCE '"GENERATED_ALWAYS_AS"', NATIVE_TYPE 'NVARCHAR'),
    HAS_SCHEMA_FLEXIBILITY string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column has schema flexibility: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_SCHEMA_FLEXIBILITY"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_INDEX string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column has fuzzy search index: ''TRUE''/''FALSE''', NAMEINSOURCE '"FUZZY_SEARCH_INDEX"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_MODE string(16) OPTIONS (ANNOTATION 'Specifies fuzzy search mode', NAMEINSOURCE '"FUZZY_SEARCH_MODE"', NATIVE_TYPE 'VARCHAR'),
    MEMORY_THRESHOLD integer OPTIONS (ANNOTATION 'Specifies memory threshold in bytes for LOB types', NAMEINSOURCE '"MEMORY_THRESHOLD"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOAD_UNIT string(1) OPTIONS (ANNOTATION 'Specifies unit of column data loading: ''TABLE''/''COLUMN''/''PAGE''', NAMEINSOURCE '"LOAD_UNIT"', NATIVE_TYPE 'VARCHAR'),
    GENERATION_TYPE string(1) OPTIONS (ANNOTATION '''ALWAYS AS'' if the column is generation column, ''ALWAYS AS IDENTITY''/''BY DEFAULT AS IDENTITY'' if the column is an identity column whose values are always generated or generated by default, NULL otherwise', NAMEINSOURCE '"GENERATION_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."VIEW_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.VIEWS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'View name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_OID long OPTIONS (ANNOTATION 'Object ID of the view', NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_UNICODE string(5) OPTIONS (ANNOTATION 'Specifies whether the query string contains Unicode: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNICODE"', NATIVE_TYPE 'VARCHAR'),
    IS_READ_ONLY string(5) OPTIONS (ANNOTATION 'Specifies whether this view is read-only or updatable: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_READ_ONLY"', NATIVE_TYPE 'VARCHAR'),
    HAS_CHECK_OPTION string(5) OPTIONS (ANNOTATION 'Specifies whether this view has an updatable view condition: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_CHECK_OPTION"', NATIVE_TYPE 'VARCHAR'),
    HAS_COLUMN_ALIASES string(5) OPTIONS (ANNOTATION 'Specifies whether the view has a columns alias : ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_COLUMN_ALIASES"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION clob OPTIONS (ANNOTATION 'View definition', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NCLOB'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'View description', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    IS_COLUMN_VIEW string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether this view is a column view or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_VIEW"', NATIVE_TYPE 'VARCHAR'),
    VIEW_TYPE string(16) OPTIONS (ANNOTATION 'Type of view : ''ROW''/''OLAP''/''JOIN''/''HIERARCHY''/''CALC''', NAMEINSOURCE '"VIEW_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED_METADATA string(5) OPTIONS (ANNOTATION 'Specifies whether the table is a global table or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED_METADATA"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the view is valid or not. This becomes ''FALSE'' when its base objects are changed or dropped: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."VIEWS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.VIRTUAL_COLUMNS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'SQL data type name of the column', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'Number of chars for char types, number of max digits for numeric types; number of chars for datetime types, number of bytes for LOB types', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Numeric types: the maximum number of digits to the right of the decimal point; time, timestamp: the decimal digits are defined as the number of digits to the right of the decimal point in the second''s component of the data', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOTE_DATA_TYPE_NAME string(32) OPTIONS (ANNOTATION 'Remote data type name', NAMEINSOURCE '"REMOTE_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    REMOTE_LENGTH integer OPTIONS (ANNOTATION 'Remote column length', NAMEINSOURCE '"REMOTE_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOTE_SCALE integer OPTIONS (ANNOTATION 'Remote scale', NAMEINSOURCE '"REMOTE_SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."VIRTUAL_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.VIRTUAL_TABLES" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_SOURCE_NAME string(256) OPTIONS (ANNOTATION 'Remote source name', NAMEINSOURCE '"REMOTE_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_DB_NAME string(256) OPTIONS (ANNOTATION 'Remote database name', NAMEINSOURCE '"REMOTE_DB_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_OWNER_NAME string(256) OPTIONS (ANNOTATION 'Remote owner name', NAMEINSOURCE '"REMOTE_OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Remote object name', NAMEINSOURCE '"REMOTE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."VIRTUAL_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "PUBLIC.X509_USER_MAPPINGS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_NAME string(512) OPTIONS (ANNOTATION 'Subject of the X.509 certificate of the user', NAMEINSOURCE '"SUBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ISSUER_NAME string(512) OPTIONS (ANNOTATION 'Issuer of the X.509 certificate of the user', NAMEINSOURCE '"ISSUER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION '', NAMEINSOURCE '"PUBLIC"."X509_USER_MAPPINGS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::ALLOCATOR_HISTORY" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    Allocator string(128) OPTIONS (NAMEINSOURCE '"Allocator"', NATIVE_TYPE 'VARCHAR'),
    SnapshotId timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SnapshotId"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SnapshotIdText string(5000) OPTIONS (NAMEINSOURCE '"SnapshotIdText"', NATIVE_TYPE 'VARCHAR'),
    ValueExclusive long OPTIONS (NAMEINSOURCE '"ValueExclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ValueInclusive long OPTIONS (NAMEINSOURCE '"ValueInclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ComponentName string(64) OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::ALLOCATOR_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::ALLOCATORS" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ComponentName string(64) OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    Allocator string(128) OPTIONS (NAMEINSOURCE '"Allocator"', NATIVE_TYPE 'VARCHAR'),
    UsedMemoryExclusive long OPTIONS (NAMEINSOURCE '"UsedMemoryExclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UsedMemoryInclusive long OPTIONS (NAMEINSOURCE '"UsedMemoryInclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UsedMemoryInclusivePercentage bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"UsedMemoryInclusivePercentage"', NATIVE_TYPE 'DECIMAL'),
    TotalUsedMemory long OPTIONS (NAMEINSOURCE '"TotalUsedMemory"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    Depth long OPTIONS (NAMEINSOURCE '"Depth"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::ALLOCATORS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::ALLOCATORS_PIE" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ComponentName string(64) OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    Allocator string(128) OPTIONS (NAMEINSOURCE '"Allocator"', NATIVE_TYPE 'VARCHAR'),
    UsedMemoryExclusive long OPTIONS (NAMEINSOURCE '"UsedMemoryExclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::ALLOCATORS_PIE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::COMPONENT_ALLOCATOR_HISTORY" (
    Host string(64) NOT NULL OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer NOT NULL OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SnapshotId timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SnapshotId"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SnapshotIdText string(5000) OPTIONS (NAMEINSOURCE '"SnapshotIdText"', NATIVE_TYPE 'VARCHAR'),
    Allocator string(128) NOT NULL OPTIONS (NAMEINSOURCE '"Allocator"', NATIVE_TYPE 'VARCHAR'),
    UsedMemoryExclusive long OPTIONS (NAMEINSOURCE '"UsedMemoryExclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UsedMemoryInclusive long OPTIONS (NAMEINSOURCE '"UsedMemoryInclusive"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ComponentName string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    UsedMemoryInclusivePercentage bigdecimal(34,2147483647) OPTIONS (NAMEINSOURCE '"UsedMemoryInclusivePercentage"', NATIVE_TYPE 'DECIMAL'),
    TotalUsedMemory long OPTIONS (NAMEINSOURCE '"TotalUsedMemory"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "Value" long OPTIONS (NAMEINSOURCE '"Value"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::COMPONENT_ALLOCATOR_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::COMPONENT_HISTORY" (
    Host string(64) NOT NULL OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer NOT NULL OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ComponentName string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    SnapshotId timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SnapshotId"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SnapshotIdText string(5000) OPTIONS (NAMEINSOURCE '"SnapshotIdText"', NATIVE_TYPE 'VARCHAR'),
    "Value" long OPTIONS (NAMEINSOURCE '"Value"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AllocatorsCount long NOT NULL OPTIONS (NAMEINSOURCE '"AllocatorsCount"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::COMPONENT_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::COMPONENTS" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ComponentName string(64) OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    UsedMemorySize long OPTIONS (NAMEINSOURCE '"UsedMemorySize"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AllocatorsCount long OPTIONS (NAMEINSOURCE '"AllocatorsCount"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::COMPONENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::COMPONENTS_PIE" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ComponentName string(64) OPTIONS (NAMEINSOURCE '"ComponentName"', NATIVE_TYPE 'VARCHAR'),
    UsedMemorySize long OPTIONS (NAMEINSOURCE '"UsedMemorySize"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AllocatorsCount long OPTIONS (NAMEINSOURCE '"AllocatorsCount"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::COMPONENTS_PIE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::FEATURES" (
    FEATURE_NAME string(32) NOT NULL OPTIONS (ANNOTATION 'feature name', NAMEINSOURCE '"FEATURE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FEATURE_VERSION integer NOT NULL OPTIONS (ANNOTATION 'feature version', NAMEINSOURCE '"FEATURE_VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::FEATURES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::HOST_INFORMATION" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Key string(32) OPTIONS (NAMEINSOURCE '"Key"', NATIVE_TYPE 'VARCHAR'),
    "Value" string(256) OPTIONS (NAMEINSOURCE '"Value"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::HOST_INFORMATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::HOSTS" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::HOSTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::MEMORY_OVERVIEW" (
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    RUUP long NOT NULL OPTIONS (NAMEINSOURCE '"RUUP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUFP long NOT NULL OPTIONS (NAMEINSOURCE '"RUFP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUIU long NOT NULL OPTIONS (NAMEINSOURCE '"RUIU"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUAS long NOT NULL OPTIONS (NAMEINSOURCE '"RUAS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUAL long NOT NULL OPTIONS (NAMEINSOURCE '"RUAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUCS long NOT NULL OPTIONS (NAMEINSOURCE '"RUCS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CSUT long NOT NULL OPTIONS (NAMEINSOURCE '"CSUT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CSST long NOT NULL OPTIONS (NAMEINSOURCE '"CSST"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RSUT long NOT NULL OPTIONS (NAMEINSOURCE '"RSUT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RSUI long NOT NULL OPTIONS (NAMEINSOURCE '"RSUI"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RSST long NOT NULL OPTIONS (NAMEINSOURCE '"RSST"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RSSI long NOT NULL OPTIONS (NAMEINSOURCE '"RSSI"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SMSS long NOT NULL OPTIONS (NAMEINSOURCE '"SMSS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HMPM long NOT NULL OPTIONS (NAMEINSOURCE '"HMPM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SMNS long NOT NULL OPTIONS (NAMEINSOURCE '"SMNS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHTP long NOT NULL OPTIONS (NAMEINSOURCE '"SHTP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHVR long NOT NULL OPTIONS (NAMEINSOURCE '"SHVR"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HMMM long NOT NULL OPTIONS (NAMEINSOURCE '"HMMM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HMST long NOT NULL OPTIONS (NAMEINSOURCE '"HMST"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HMRT long NOT NULL OPTIONS (NAMEINSOURCE '"HMRT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HMRS long NOT NULL OPTIONS (NAMEINSOURCE '"HMRS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHCT long NOT NULL OPTIONS (NAMEINSOURCE '"SHCT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHPL long NOT NULL OPTIONS (NAMEINSOURCE '"SHPL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CSTN long NOT NULL OPTIONS (NAMEINSOURCE '"CSTN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RSTN long NOT NULL OPTIONS (NAMEINSOURCE '"RSTN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::MEMORY_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::RESOURCE_INFORMATION" (
    ID integer NOT NULL OPTIONS (ANNOTATION 'id', NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RESOURCE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'resource name', NAMEINSOURCE '"RESOURCE_NAME"', NATIVE_TYPE 'VARCHAR'),
    CATEGORY_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'category name', NAMEINSOURCE '"CATEGORY_NAME"', NATIVE_TYPE 'VARCHAR'),
    MEASURE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'measure name', NAMEINSOURCE '"MEASURE_NAME"', NATIVE_TYPE 'VARCHAR'),
    UNIT string(12) OPTIONS (ANNOTATION 'the unit bytes,kb,mb,gb,tb,%', NAMEINSOURCE '"UNIT"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_TYPE string(8) OPTIONS (ANNOTATION 'source type', NAMEINSOURCE '"SOURCE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'source schema name', NAMEINSOURCE '"SOURCE_SCHEMA_NAME"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_TABLE_NAME string(256) OPTIONS (ANNOTATION 'source table name', NAMEINSOURCE '"SOURCE_TABLE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_COLUMN_NAME string(256) OPTIONS (ANNOTATION 'source column name', NAMEINSOURCE '"SOURCE_COLUMN_NAME"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_CONDITION string(256) OPTIONS (ANNOTATION 'source condition', NAMEINSOURCE '"SOURCE_CONDITION"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_GROUPBY string(256) OPTIONS (ANNOTATION 'source group by', NAMEINSOURCE '"SOURCE_GROUPBY"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_AGGREGATION string(256) OPTIONS (ANNOTATION 'source aggregation', NAMEINSOURCE '"SOURCE_AGGREGATION"', NATIVE_TYPE 'VARCHAR'),
    USE_DELTA string(5) OPTIONS (ANNOTATION 'use delta', NAMEINSOURCE '"USE_DELTA"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::RESOURCE_INFORMATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::RESOURCE_INFORMATION_IN" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TABLE_NAME string(1) NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_POINT long NOT NULL OPTIONS (NAMEINSOURCE '"DATA_POINT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::RESOURCE_INFORMATION_IN"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::RESOURCE_INFORMATION_OUT" (
    SNAPSHOT_ID timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SNAPSHOT_ID"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_POINT long NOT NULL OPTIONS (NAMEINSOURCE '"DATA_POINT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::RESOURCE_INFORMATION_OUT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::SERVICE_MEMORY" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EffectiveAllocationLimit long OPTIONS (NAMEINSOURCE '"EffectiveAllocationLimit"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::SERVICE_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::SERVICES" (
    Host string(64) OPTIONS (NAMEINSOURCE '"Host"', NATIVE_TYPE 'VARCHAR'),
    Port integer OPTIONS (NAMEINSOURCE '"Port"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ServiceName string(32) OPTIONS (NAMEINSOURCE '"ServiceName"', NATIVE_TYPE 'VARCHAR'),
    ProcessId integer OPTIONS (NAMEINSOURCE '"ProcessId"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    Status string(16) OPTIONS (NAMEINSOURCE '"Status"', NATIVE_TYPE 'VARCHAR'),
    SqlPort integer OPTIONS (NAMEINSOURCE '"SqlPort"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CoordinatorType string(16) OPTIONS (NAMEINSOURCE '"CoordinatorType"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::SERVICES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_ADMIN.sap.hana.admin.ds::SYS_TIMESTAMP" (
    SYS_TIMESTAMP string(5000) OPTIONS (NAMEINSOURCE '"SYS_TIMESTAMP"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_ADMIN"."sap.hana.admin.ds::SYS_TIMESTAMP"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Conversions.T006" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    MSEHI string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MSEHI"', NATIVE_TYPE 'NVARCHAR'),
    KZEX3 string(1) OPTIONS (NAMEINSOURCE '"KZEX3"', NATIVE_TYPE 'NVARCHAR'),
    KZEX6 string(1) OPTIONS (NAMEINSOURCE '"KZEX6"', NATIVE_TYPE 'NVARCHAR'),
    ANDEC integer OPTIONS (NAMEINSOURCE '"ANDEC"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KZKEH string(1) OPTIONS (NAMEINSOURCE '"KZKEH"', NATIVE_TYPE 'NVARCHAR'),
    KZWOB string(1) OPTIONS (NAMEINSOURCE '"KZWOB"', NATIVE_TYPE 'NVARCHAR'),
    KZ1EH string(1) OPTIONS (NAMEINSOURCE '"KZ1EH"', NATIVE_TYPE 'NVARCHAR'),
    KZ2EH string(1) OPTIONS (NAMEINSOURCE '"KZ2EH"', NATIVE_TYPE 'NVARCHAR'),
    DIMID string(6) OPTIONS (NAMEINSOURCE '"DIMID"', NATIVE_TYPE 'NVARCHAR'),
    ZAEHL integer OPTIONS (NAMEINSOURCE '"ZAEHL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NENNR integer OPTIONS (NAMEINSOURCE '"NENNR"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXP10 integer OPTIONS (NAMEINSOURCE '"EXP10"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ADDKO bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"ADDKO"', NATIVE_TYPE 'DECIMAL'),
    EXPON integer OPTIONS (NAMEINSOURCE '"EXPON"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DECAN integer OPTIONS (NAMEINSOURCE '"DECAN"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ISOCODE string(3) OPTIONS (NAMEINSOURCE '"ISOCODE"', NATIVE_TYPE 'NVARCHAR'),
    "PRIMARY" string(1) OPTIONS (NAMEINSOURCE '"PRIMARY"', NATIVE_TYPE 'NVARCHAR'),
    TEMP_VALUE double OPTIONS (NAMEINSOURCE '"TEMP_VALUE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TEMP_UNIT string(3) OPTIONS (NAMEINSOURCE '"TEMP_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    FAMUNIT string(3) OPTIONS (NAMEINSOURCE '"FAMUNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRESS_VAL double OPTIONS (NAMEINSOURCE '"PRESS_VAL"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PRESS_UNIT string(3) OPTIONS (NAMEINSOURCE '"PRESS_UNIT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Conversions.T006"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Conversions.T006A" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    SPRAS string(1) NOT NULL OPTIONS (NAMEINSOURCE '"SPRAS"', NATIVE_TYPE 'NVARCHAR'),
    MSEHI string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MSEHI"', NATIVE_TYPE 'NVARCHAR'),
    KZEX3 string(3) OPTIONS (NAMEINSOURCE '"KZEX3"', NATIVE_TYPE 'NVARCHAR'),
    KZEX6 string(6) OPTIONS (NAMEINSOURCE '"KZEX6"', NATIVE_TYPE 'NVARCHAR'),
    MSEHT string(10) OPTIONS (NAMEINSOURCE '"MSEHT"', NATIVE_TYPE 'NVARCHAR'),
    MSEHL string(30) OPTIONS (NAMEINSOURCE '"MSEHL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Conversions.T006A"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Conversions.TCURC" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    WAERS string(5) NOT NULL OPTIONS (NAMEINSOURCE '"WAERS"', NATIVE_TYPE 'NVARCHAR'),
    ISOCD string(3) OPTIONS (NAMEINSOURCE '"ISOCD"', NATIVE_TYPE 'NVARCHAR'),
    ALTWR string(3) OPTIONS (NAMEINSOURCE '"ALTWR"', NATIVE_TYPE 'NVARCHAR'),
    GDATU string(8) OPTIONS (NAMEINSOURCE '"GDATU"', NATIVE_TYPE 'NVARCHAR'),
    XPRIMARY string(1) OPTIONS (NAMEINSOURCE '"XPRIMARY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Conversions.TCURC"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Conversions.TCURF" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    KURST string(4) NOT NULL OPTIONS (NAMEINSOURCE '"KURST"', NATIVE_TYPE 'NVARCHAR'),
    FCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"FCURR"', NATIVE_TYPE 'NVARCHAR'),
    TCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"TCURR"', NATIVE_TYPE 'NVARCHAR'),
    GDATU string(8) NOT NULL OPTIONS (NAMEINSOURCE '"GDATU"', NATIVE_TYPE 'NVARCHAR'),
    FFACT bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"FFACT"', NATIVE_TYPE 'DECIMAL'),
    TFACT bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"TFACT"', NATIVE_TYPE 'DECIMAL'),
    ABWCT string(4) OPTIONS (NAMEINSOURCE '"ABWCT"', NATIVE_TYPE 'NVARCHAR'),
    ABWGA string(8) OPTIONS (NAMEINSOURCE '"ABWGA"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Conversions.TCURF"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Conversions.TCURN" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    FCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"FCURR"', NATIVE_TYPE 'NVARCHAR'),
    TCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"TCURR"', NATIVE_TYPE 'NVARCHAR'),
    GDATU string(8) NOT NULL OPTIONS (NAMEINSOURCE '"GDATU"', NATIVE_TYPE 'NVARCHAR'),
    NOTATION string(1) OPTIONS (NAMEINSOURCE '"NOTATION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Conversions.TCURN"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Conversions.TCURR" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    KURST string(4) NOT NULL OPTIONS (NAMEINSOURCE '"KURST"', NATIVE_TYPE 'NVARCHAR'),
    FCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"FCURR"', NATIVE_TYPE 'NVARCHAR'),
    TCURR string(5) NOT NULL OPTIONS (NAMEINSOURCE '"TCURR"', NATIVE_TYPE 'NVARCHAR'),
    GDATU string(8) NOT NULL OPTIONS (NAMEINSOURCE '"GDATU"', NATIVE_TYPE 'NVARCHAR'),
    UKURS bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"UKURS"', NATIVE_TYPE 'DECIMAL'),
    FFACT bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"FFACT"', NATIVE_TYPE 'DECIMAL'),
    TFACT bigdecimal(9,2147483647) OPTIONS (NAMEINSOURCE '"TFACT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Conversions.TCURR"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Conversions.TCURT" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    SPRAS string(1) NOT NULL OPTIONS (NAMEINSOURCE '"SPRAS"', NATIVE_TYPE 'NVARCHAR'),
    WAERS string(5) NOT NULL OPTIONS (NAMEINSOURCE '"WAERS"', NATIVE_TYPE 'NVARCHAR'),
    LTEXT string(40) OPTIONS (NAMEINSOURCE '"LTEXT"', NATIVE_TYPE 'NVARCHAR'),
    KTEXT string(15) OPTIONS (NAMEINSOURCE '"KTEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Conversions.TCURT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Conversions.TCURV" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    KURST string(4) NOT NULL OPTIONS (NAMEINSOURCE '"KURST"', NATIVE_TYPE 'NVARCHAR'),
    XINVR string(1) OPTIONS (NAMEINSOURCE '"XINVR"', NATIVE_TYPE 'NVARCHAR'),
    BWAER string(5) OPTIONS (NAMEINSOURCE '"BWAER"', NATIVE_TYPE 'NVARCHAR'),
    XBWRL string(1) OPTIONS (NAMEINSOURCE '"XBWRL"', NATIVE_TYPE 'NVARCHAR'),
    GKUZU string(4) OPTIONS (NAMEINSOURCE '"GKUZU"', NATIVE_TYPE 'NVARCHAR'),
    BKUZU string(4) OPTIONS (NAMEINSOURCE '"BKUZU"', NATIVE_TYPE 'NVARCHAR'),
    XFIXD string(1) OPTIONS (NAMEINSOURCE '"XFIXD"', NATIVE_TYPE 'NVARCHAR'),
    XEURO string(1) OPTIONS (NAMEINSOURCE '"XEURO"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Conversions.TCURV"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Conversions.TCURW" (
    MANDT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    SPRAS string(1) NOT NULL OPTIONS (NAMEINSOURCE '"SPRAS"', NATIVE_TYPE 'NVARCHAR'),
    KURST string(4) NOT NULL OPTIONS (NAMEINSOURCE '"KURST"', NATIVE_TYPE 'NVARCHAR'),
    CURVW string(40) OPTIONS (NAMEINSOURCE '"CURVW"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Conversions.TCURW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Conversions.TCURX" (
    CURRKEY string(5) NOT NULL OPTIONS (NAMEINSOURCE '"CURRKEY"', NATIVE_TYPE 'NVARCHAR'),
    CURRDEC integer OPTIONS (NAMEINSOURCE '"CURRDEC"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Conversions.TCURX"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.HistT" (
    "CREATEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"CREATEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    CREATEDAT date OPTIONS (NAMEINSOURCE '"CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "CHANGEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"CHANGEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    CHANGEDAT date OPTIONS (NAMEINSOURCE '"CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.HistT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.MapKeys" (
    KEYID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"KEYID"', NATIVE_TYPE 'NVARCHAR'),
    APP_ID string(50) OPTIONS (NAMEINSOURCE '"APP_ID"', NATIVE_TYPE 'NVARCHAR'),
    APP_CODE string(50) OPTIONS (NAMEINSOURCE '"APP_CODE"', NATIVE_TYPE 'NVARCHAR'),
    EXT1 string(50) OPTIONS (NAMEINSOURCE '"EXT1"', NATIVE_TYPE 'NVARCHAR'),
    EXT2 string(50) OPTIONS (NAMEINSOURCE '"EXT2"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MapKeys"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.MD.Addresses" (
    ADDRESSID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    BUILDING string(10) OPTIONS (NAMEINSOURCE '"BUILDING"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(4) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    ADDRESSTYPE string(2) OPTIONS (NAMEINSOURCE '"ADDRESSTYPE"', NATIVE_TYPE 'NVARCHAR'),
    "VALIDITY.STARTDATE" date OPTIONS (NAMEINSOURCE '"VALIDITY.STARTDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "VALIDITY.ENDDATE" date OPTIONS (NAMEINSOURCE '"VALIDITY.ENDDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    LATITUDE double OPTIONS (NAMEINSOURCE '"LATITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LONGITUDE double OPTIONS (NAMEINSOURCE '"LONGITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MD.Addresses"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.MD.BusinessPartner" (
    PARTNERID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    PHONENUMBER string(30) OPTIONS (NAMEINSOURCE '"PHONENUMBER"', NATIVE_TYPE 'NVARCHAR'),
    FAXNUMBER string(30) OPTIONS (NAMEINSOURCE '"FAXNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    WEBADDRESS string(1024) OPTIONS (NAMEINSOURCE '"WEBADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    "ADDRESSID.ADDRESSID" string(10) OPTIONS (NAMEINSOURCE '"ADDRESSID.ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    LEGALFORM string(10) OPTIONS (NAMEINSOURCE '"LEGALFORM"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "HISTORY.CHANGEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CHANGEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MD.BusinessPartner"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.MD.Employees" (
    EMPLOYEEID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "NAME.FIRST" string(40) OPTIONS (NAMEINSOURCE '"NAME.FIRST"', NATIVE_TYPE 'NVARCHAR'),
    "NAME.MIDDLE" string(40) OPTIONS (NAMEINSOURCE '"NAME.MIDDLE"', NATIVE_TYPE 'NVARCHAR'),
    "NAME.LAST" string(40) OPTIONS (NAMEINSOURCE '"NAME.LAST"', NATIVE_TYPE 'NVARCHAR'),
    "NAME.INITIALS" string(10) OPTIONS (NAMEINSOURCE '"NAME.INITIALS"', NATIVE_TYPE 'NVARCHAR'),
    SEX string(1) OPTIONS (NAMEINSOURCE '"SEX"', NATIVE_TYPE 'NVARCHAR'),
    "LANGUAGE" string(1) OPTIONS (NAMEINSOURCE '"LANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    PHONENUMBER string(30) OPTIONS (NAMEINSOURCE '"PHONENUMBER"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    LOGINNAME string(12) OPTIONS (NAMEINSOURCE '"LOGINNAME"', NATIVE_TYPE 'NVARCHAR'),
    "ADDRESSID.ADDRESSID" string(10) OPTIONS (NAMEINSOURCE '"ADDRESSID.ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    "VALIDITY.STARTDATE" date OPTIONS (NAMEINSOURCE '"VALIDITY.STARTDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "VALIDITY.ENDDATE" date OPTIONS (NAMEINSOURCE '"VALIDITY.ENDDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    SALARYAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALARYAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    ACCOUNTNUMBER string(10) OPTIONS (NAMEINSOURCE '"ACCOUNTNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    BANKID string(10) OPTIONS (NAMEINSOURCE '"BANKID"', NATIVE_TYPE 'NVARCHAR'),
    BANKNAME string(255) OPTIONS (NAMEINSOURCE '"BANKNAME"', NATIVE_TYPE 'NVARCHAR'),
    EMPLOYEEPICURL string(255) OPTIONS (NAMEINSOURCE '"EMPLOYEEPICURL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MD.Employees"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.MD.NameT" (
    FIRST string(40) OPTIONS (NAMEINSOURCE '"FIRST"', NATIVE_TYPE 'NVARCHAR'),
    MIDDLE string(40) OPTIONS (NAMEINSOURCE '"MIDDLE"', NATIVE_TYPE 'NVARCHAR'),
    LAST string(40) OPTIONS (NAMEINSOURCE '"LAST"', NATIVE_TYPE 'NVARCHAR'),
    INITIALS string(10) OPTIONS (NAMEINSOURCE '"INITIALS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MD.NameT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.MD.productLog" (
    PRODUCTID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    DATETIME timestamp NOT NULL OPTIONS (NAMEINSOURCE '"DATETIME"', CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'SECONDDATE'),
    USERNAME string(20) NOT NULL OPTIONS (NAMEINSOURCE '"USERNAME"', NATIVE_TYPE 'NVARCHAR'),
    LOGTEXT string(500) OPTIONS (NAMEINSOURCE '"LOGTEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MD.productLog"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.MD.Products" (
    PRODUCTID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    TYPECODE string(2) OPTIONS (NAMEINSOURCE '"TYPECODE"', NATIVE_TYPE 'NVARCHAR'),
    CATEGORY string(40) OPTIONS (NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "HISTORY.CHANGEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CHANGEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    NAMEID string(10) OPTIONS (NAMEINSOURCE '"NAMEID"', NATIVE_TYPE 'NVARCHAR'),
    DESCID string(10) OPTIONS (NAMEINSOURCE '"DESCID"', NATIVE_TYPE 'NVARCHAR'),
    "SUPPLIERID.PARTNERID" string(10) OPTIONS (NAMEINSOURCE '"SUPPLIERID.PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    TAXTARIFFCODE integer OPTIONS (NAMEINSOURCE '"TAXTARIFFCODE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUANTITYUNIT string(3) OPTIONS (NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    WEIGHTMEASURE bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"WEIGHTMEASURE"', NATIVE_TYPE 'DECIMAL'),
    WEIGHTUNIT string(3) OPTIONS (NAMEINSOURCE '"WEIGHTUNIT"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PRICE bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    PRODUCTPICURL string(255) OPTIONS (NAMEINSOURCE '"PRODUCTPICURL"', NATIVE_TYPE 'NVARCHAR'),
    WIDTH bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"WIDTH"', NATIVE_TYPE 'DECIMAL'),
    DEPTH bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"DEPTH"', NATIVE_TYPE 'DECIMAL'),
    HEIGHT bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"HEIGHT"', NATIVE_TYPE 'DECIMAL'),
    DIMENSIONUNIT string(3) OPTIONS (NAMEINSOURCE '"DIMENSIONUNIT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MD.Products"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.PO.Header" (
    PURCHASEORDERID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "HISTORY.CHANGEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CHANGEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    NOTEID string(10) OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    "PARTNERID.PARTNERID" string(10) OPTIONS (NAMEINSOURCE '"PARTNERID.PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    LIFECYCLESTATUS string(1) OPTIONS (NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    APPROVALSTATUS string(1) OPTIONS (NAMEINSOURCE '"APPROVALSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    CONFIRMSTATUS string(1) OPTIONS (NAMEINSOURCE '"CONFIRMSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    ORDERINGSTATUS string(1) OPTIONS (NAMEINSOURCE '"ORDERINGSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    INVOICINGSTATUS string(1) OPTIONS (NAMEINSOURCE '"INVOICINGSTATUS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.PO.Header"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.PO.Item" (
    "PURCHASEORDERID.PURCHASEORDERID" string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PURCHASEORDERID.PURCHASEORDERID"', NATIVE_TYPE 'NVARCHAR'),
    PURCHASEORDERITEM string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PURCHASEORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    "PRODUCTID.PRODUCTID" string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID.PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    NOTEID string(10) OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    QUANTITYUNIT string(3) OPTIONS (NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERYDATE date OPTIONS (NAMEINSOURCE '"DELIVERYDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.PO.Item"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Procedures.tt_bp_addresses" (
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    PARTNERROLE string(3) OPTIONS (NAMEINSOURCE '"PARTNERROLE"', NATIVE_TYPE 'NVARCHAR'),
    EMAILADDRESS string(255) OPTIONS (NAMEINSOURCE '"EMAILADDRESS"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    ADDRESSID string(10) OPTIONS (NAMEINSOURCE '"ADDRESSID"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(40) OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    POSTALCODE string(10) OPTIONS (NAMEINSOURCE '"POSTALCODE"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(60) OPTIONS (NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Procedures.tt_bp_addresses"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Procedures.tt_customer_discount_calculation" (
    COMPANY_NAME string(50) OPTIONS (NAMEINSOURCE '"COMPANY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(50) OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    SALES bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALES"', NATIVE_TYPE 'DECIMAL'),
    ORDERS integer OPTIONS (NAMEINSOURCE '"ORDERS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SALES_RANK integer OPTIONS (NAMEINSOURCE '"SALES_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ORDER_RANK integer OPTIONS (NAMEINSOURCE '"ORDER_RANK"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Procedures.tt_customer_discount_calculation"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Procedures.tt_errors" (
    HTTP_STATUS_CODE integer OPTIONS (NAMEINSOURCE '"HTTP_STATUS_CODE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ERROR_MESSAGE string(100) OPTIONS (NAMEINSOURCE '"ERROR_MESSAGE"', NATIVE_TYPE 'NVARCHAR'),
    DETAIL string(100) OPTIONS (NAMEINSOURCE '"DETAIL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Procedures.tt_errors"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Procedures.tt_product_sale_price" (
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    CATEGORY string(40) OPTIONS (NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'NVARCHAR'),
    PRICE bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    SALEPRICE bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"SALEPRICE"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Procedures.tt_product_sale_price"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Procedures.tt_scookie" (
    SESSIONID string(32) OPTIONS (NAMEINSOURCE '"SESSIONID"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(30) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION string(128) OPTIONS (NAMEINSOURCE '"APPLICATION"', NATIVE_TYPE 'NVARCHAR'),
    EXPIRY timestamp OPTIONS (NAMEINSOURCE '"EXPIRY"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Procedures.tt_scookie"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Procedures.tt_tax_calculation" (
    PARTNERID string(10) OPTIONS (NAMEINSOURCE '"PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    COMPANYNAME string(80) OPTIONS (NAMEINSOURCE '"COMPANYNAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCTID string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Procedures.tt_tax_calculation"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Procedures.tt_variable" (
    SESSIONID string(32) OPTIONS (NAMEINSOURCE '"SESSIONID"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(30) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION string(128) OPTIONS (NAMEINSOURCE '"APPLICATION"', NATIVE_TYPE 'NVARCHAR'),
    EXPIRY timestamp OPTIONS (NAMEINSOURCE '"EXPIRY"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA clob(24) OPTIONS (NAMEINSOURCE '"DATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Procedures.tt_variable"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.SO.Filter" (
    MODEL string(30) NOT NULL OPTIONS (NAMEINSOURCE '"MODEL"', NATIVE_TYPE 'NVARCHAR'),
    COLNAME string(8) NOT NULL OPTIONS (NAMEINSOURCE '"COLNAME"', NATIVE_TYPE 'NVARCHAR'),
    COLVALUE string(8) OPTIONS (NAMEINSOURCE '"COLVALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.SO.Filter"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.SO.Header" (
    SALESORDERID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CREATEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "HISTORY.CHANGEDBY.EMPLOYEEID" string(10) OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDBY.EMPLOYEEID"', NATIVE_TYPE 'NVARCHAR'),
    "HISTORY.CHANGEDAT" date OPTIONS (NAMEINSOURCE '"HISTORY.CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    NOTEID string(10) OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    "PARTNERID.PARTNERID" string(10) OPTIONS (NAMEINSOURCE '"PARTNERID.PARTNERID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    LIFECYCLESTATUS string(1) OPTIONS (NAMEINSOURCE '"LIFECYCLESTATUS"', NATIVE_TYPE 'NVARCHAR'),
    BILLINGSTATUS string(1) OPTIONS (NAMEINSOURCE '"BILLINGSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERYSTATUS string(1) OPTIONS (NAMEINSOURCE '"DELIVERYSTATUS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.SO.Header"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.SO.Item" (
    "SALESORDERID.SALESORDERID" string(10) NOT NULL OPTIONS (NAMEINSOURCE '"SALESORDERID.SALESORDERID"', NATIVE_TYPE 'NVARCHAR'),
    SALESORDERITEM string(10) NOT NULL OPTIONS (NAMEINSOURCE '"SALESORDERITEM"', NATIVE_TYPE 'NVARCHAR'),
    "PRODUCTID.PRODUCTID" string(10) OPTIONS (NAMEINSOURCE '"PRODUCTID.PRODUCTID"', NATIVE_TYPE 'NVARCHAR'),
    NOTEID string(10) OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    GROSSAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GROSSAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    NETAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NETAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    TAXAMOUNT bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TAXAMOUNT"', NATIVE_TYPE 'DECIMAL'),
    ITEMATPSTATUS string(1) OPTIONS (NAMEINSOURCE '"ITEMATPSTATUS"', NATIVE_TYPE 'NVARCHAR'),
    OPITEMPOS string(10) OPTIONS (NAMEINSOURCE '"OPITEMPOS"', NATIVE_TYPE 'NVARCHAR'),
    QUANTITY bigdecimal(13,2147483647) OPTIONS (NAMEINSOURCE '"QUANTITY"', NATIVE_TYPE 'DECIMAL'),
    QUANTITYUNIT string(3) OPTIONS (NAMEINSOURCE '"QUANTITYUNIT"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERYDATE date OPTIONS (NAMEINSOURCE '"DELIVERYDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.SO.Item"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.User.Details" (
    PERS_NO string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PERS_NO"', NATIVE_TYPE 'NVARCHAR'),
    FIRSTNAME string(40) OPTIONS (NAMEINSOURCE '"FIRSTNAME"', NATIVE_TYPE 'NVARCHAR'),
    LASTNAME string(40) OPTIONS (NAMEINSOURCE '"LASTNAME"', NATIVE_TYPE 'NVARCHAR'),
    E_MAIL string(255) OPTIONS (NAMEINSOURCE '"E_MAIL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.User.Details"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Util.Attachments" (
    NOTEID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    LINKID string(10) OPTIONS (NAMEINSOURCE '"LINKID"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(30) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR'),
    TITLE string(255) OPTIONS (NAMEINSOURCE '"TITLE"', NATIVE_TYPE 'NVARCHAR'),
    CREATEDAT timestamp OPTIONS (NAMEINSOURCE '"CREATEDAT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DESCRIPTION string(255) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    SIZE string(40) OPTIONS (NAMEINSOURCE '"SIZE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.Attachments"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Util.Constants" (
    DOMAIN string(30) NOT NULL OPTIONS (NAMEINSOURCE '"DOMAIN"', NATIVE_TYPE 'NVARCHAR'),
    FIXEDVALUE string(30) NOT NULL OPTIONS (NAMEINSOURCE '"FIXEDVALUE"', NATIVE_TYPE 'NVARCHAR'),
    "LANGUAGE" string(1) NOT NULL OPTIONS (NAMEINSOURCE '"LANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(60) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.Constants"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Util.Messages" (
    MESSAGECLASS string(20) NOT NULL OPTIONS (NAMEINSOURCE '"MESSAGECLASS"', NATIVE_TYPE 'NVARCHAR'),
    MESSAGENUMBER string(3) NOT NULL OPTIONS (NAMEINSOURCE '"MESSAGENUMBER"', NATIVE_TYPE 'NVARCHAR'),
    "LANGUAGE" string(2) NOT NULL OPTIONS (NAMEINSOURCE '"LANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(255) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    TEXT clob(24) OPTIONS (NAMEINSOURCE '"TEXT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.Messages"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Util.Notes" (
    NOTEID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"NOTEID"', NATIVE_TYPE 'NVARCHAR'),
    LINKID string(10) OPTIONS (NAMEINSOURCE '"LINKID"', NATIVE_TYPE 'NVARCHAR'),
    AUTHOR string(30) OPTIONS (NAMEINSOURCE '"AUTHOR"', NATIVE_TYPE 'NVARCHAR'),
    TEXT string(255) OPTIONS (NAMEINSOURCE '"TEXT"', NATIVE_TYPE 'NVARCHAR'),
    CREATEDAT timestamp OPTIONS (NAMEINSOURCE '"CREATEDAT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    THUMBNAIL string(255) OPTIONS (NAMEINSOURCE '"THUMBNAIL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.Notes"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Util.SSCOOKIE" (
    SESSIONID string(32) NOT NULL OPTIONS (NAMEINSOURCE '"SESSIONID"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(30) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION string(128) NOT NULL OPTIONS (NAMEINSOURCE '"APPLICATION"', NATIVE_TYPE 'NVARCHAR'),
    EXPIRY timestamp OPTIONS (NAMEINSOURCE '"EXPIRY"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA clob(24) OPTIONS (NAMEINSOURCE '"DATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.SSCOOKIE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Util.Texts" (
    TEXTID string(10) NOT NULL OPTIONS (NAMEINSOURCE '"TEXTID"', NATIVE_TYPE 'NVARCHAR'),
    "LANGUAGE" string(1) OPTIONS (NAMEINSOURCE '"LANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    ISOLANGUAGE string(2) OPTIONS (NAMEINSOURCE '"ISOLANGUAGE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT string(1024) OPTIONS (NAMEINSOURCE '"TEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.Texts"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.Util.TimeDimension" (
    DATETIMESTAMP timestamp NOT NULL OPTIONS (NAMEINSOURCE '"DATETIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATE_SQL date OPTIONS (NAMEINSOURCE '"DATE_SQL"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    DATETIME_SAP string(14) OPTIONS (NAMEINSOURCE '"DATETIME_SAP"', NATIVE_TYPE 'NVARCHAR'),
    DATE_SAP string(8) OPTIONS (NAMEINSOURCE '"DATE_SAP"', NATIVE_TYPE 'NVARCHAR'),
    "YEAR" string(4) OPTIONS (NAMEINSOURCE '"YEAR"', NATIVE_TYPE 'NVARCHAR'),
    QUARTER string(2) OPTIONS (NAMEINSOURCE '"QUARTER"', NATIVE_TYPE 'NVARCHAR'),
    "MONTH" string(2) OPTIONS (NAMEINSOURCE '"MONTH"', NATIVE_TYPE 'NVARCHAR'),
    WEEK string(2) OPTIONS (NAMEINSOURCE '"WEEK"', NATIVE_TYPE 'NVARCHAR'),
    WEEK_YEAR string(4) OPTIONS (NAMEINSOURCE '"WEEK_YEAR"', NATIVE_TYPE 'NVARCHAR'),
    DAY_OF_WEEK string(2) OPTIONS (NAMEINSOURCE '"DAY_OF_WEEK"', NATIVE_TYPE 'NVARCHAR'),
    "DAY" string(2) OPTIONS (NAMEINSOURCE '"DAY"', NATIVE_TYPE 'NVARCHAR'),
    "HOUR" string(2) OPTIONS (NAMEINSOURCE '"HOUR"', NATIVE_TYPE 'NVARCHAR'),
    "MINUTE" string(2) OPTIONS (NAMEINSOURCE '"MINUTE"', NATIVE_TYPE 'NVARCHAR'),
    "SECOND" string(2) OPTIONS (NAMEINSOURCE '"SECOND"', NATIVE_TYPE 'NVARCHAR'),
    CALQUARTER string(5) OPTIONS (NAMEINSOURCE '"CALQUARTER"', NATIVE_TYPE 'NVARCHAR'),
    CALMONTH string(6) OPTIONS (NAMEINSOURCE '"CALMONTH"', NATIVE_TYPE 'NVARCHAR'),
    CALWEEK string(6) OPTIONS (NAMEINSOURCE '"CALWEEK"', NATIVE_TYPE 'NVARCHAR'),
    YEAR_INT integer OPTIONS (NAMEINSOURCE '"YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    QUARTER_INT integer OPTIONS (NAMEINSOURCE '"QUARTER_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MONTH_INT integer OPTIONS (NAMEINSOURCE '"MONTH_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WEEK_INT integer OPTIONS (NAMEINSOURCE '"WEEK_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WEEK_YEAR_INT integer OPTIONS (NAMEINSOURCE '"WEEK_YEAR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DAY_OF_WEEK_INT integer OPTIONS (NAMEINSOURCE '"DAY_OF_WEEK_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DAY_INT integer OPTIONS (NAMEINSOURCE '"DAY_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOUR_INT integer OPTIONS (NAMEINSOURCE '"HOUR_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MINUTE_INT integer OPTIONS (NAMEINSOURCE '"MINUTE_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SECOND_INT integer OPTIONS (NAMEINSOURCE '"SECOND_INT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.TimeDimension"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::EPM.ValidityT" (
    STARTDATE date OPTIONS (NAMEINSOURCE '"STARTDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    ENDDATE date OPTIONS (NAMEINSOURCE '"ENDDATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.ValidityT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::JobsDemo.Details" (
    "TIME" timestamp NOT NULL OPTIONS (NAMEINSOURCE '"TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SOURCE string(30) OPTIONS (NAMEINSOURCE '"SOURCE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::JobsDemo.Details"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_HANA_DEMO.sap.hana.democontent.epm.data::purchaseOrderHeaderExternal" (
    PurchaseOrderId string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PurchaseOrderId"', NATIVE_TYPE 'NVARCHAR'),
    "History.CREATEDBY" string(10) OPTIONS (NAMEINSOURCE '"History.CREATEDBY"', NATIVE_TYPE 'NVARCHAR'),
    CreatedByFirstName string(40) OPTIONS (NAMEINSOURCE '"CreatedByFirstName"', NATIVE_TYPE 'NVARCHAR'),
    CreatedByLastName string(40) OPTIONS (NAMEINSOURCE '"CreatedByLastName"', NATIVE_TYPE 'NVARCHAR'),
    CreatedByLoginName string(12) OPTIONS (NAMEINSOURCE '"CreatedByLoginName"', NATIVE_TYPE 'NVARCHAR'),
    "History.CREATEDAT" date OPTIONS (NAMEINSOURCE '"History.CREATEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    "History.CHANGEDAT" date OPTIONS (NAMEINSOURCE '"History.CHANGEDAT"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    PartnerId string(10) OPTIONS (NAMEINSOURCE '"PartnerId"', NATIVE_TYPE 'NVARCHAR'),
    CompanyName string(80) OPTIONS (NAMEINSOURCE '"CompanyName"', NATIVE_TYPE 'NVARCHAR'),
    Currency string(5) OPTIONS (NAMEINSOURCE '"Currency"', NATIVE_TYPE 'NVARCHAR'),
    GrossAmount bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"GrossAmount"', NATIVE_TYPE 'DECIMAL'),
    NetAmount bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"NetAmount"', NATIVE_TYPE 'DECIMAL'),
    TaxAmount bigdecimal(15,2147483647) OPTIONS (NAMEINSOURCE '"TaxAmount"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"SAP_HANA_DEMO"."sap.hana.democontent.epm.data::purchaseOrderHeaderExternal"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_REST_API.sap.hana.xs.dt.base.server.persistency::ExtensionWhitelist" (
    ExtensionID integer NOT NULL OPTIONS (ANNOTATION 'Extension Identifier', NAMEINSOURCE '"ExtensionID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ExtensionPointCaller string(128) NOT NULL OPTIONS (ANNOTATION 'Extension Point Caller', NAMEINSOURCE '"ExtensionPointCaller"', NATIVE_TYPE 'VARCHAR'),
    ExtensionPointMode string(20) NOT NULL OPTIONS (ANNOTATION 'Extension Point Mode', NAMEINSOURCE '"ExtensionPointMode"', NATIVE_TYPE 'VARCHAR'),
    ExtensionLibName string(60) NOT NULL OPTIONS (ANNOTATION 'Extension Libname', NAMEINSOURCE '"ExtensionLibName"', NATIVE_TYPE 'VARCHAR'),
    ExtensionLibLocation string(256) NOT NULL OPTIONS (ANNOTATION 'Extension LibLocation', NAMEINSOURCE '"ExtensionLibLocation"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_REST_API"."sap.hana.xs.dt.base.server.persistency::ExtensionWhitelist"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::ACTION_LOG" (
    PROCESS_ID string(60) NOT NULL OPTIONS (NAMEINSOURCE '"PROCESS_ID"', NATIVE_TYPE 'NVARCHAR'),
    LOG_ID string(60) OPTIONS (NAMEINSOURCE '"LOG_ID"', NATIVE_TYPE 'NVARCHAR'),
    "USER" string(40) NOT NULL OPTIONS (NAMEINSOURCE '"USER"', NATIVE_TYPE 'NVARCHAR'),
    "TIME" timestamp NOT NULL OPTIONS (NAMEINSOURCE '"TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RC integer DEFAULT '0' OPTIONS (NAMEINSOURCE '"RC"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(40) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR'),
    MESSAGE string(5000) OPTIONS (NAMEINSOURCE '"MESSAGE"', NATIVE_TYPE 'NVARCHAR'),
    SID string(3) OPTIONS (NAMEINSOURCE '"SID"', NATIVE_TYPE 'VARCHAR'),
    HOST string(255) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::ACTION_LOG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::CONF_HISTORY" (
    ENTITY string(30) NOT NULL OPTIONS (NAMEINSOURCE '"ENTITY"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    ACTION string(8) NOT NULL OPTIONS (NAMEINSOURCE '"ACTION"', NATIVE_TYPE 'NVARCHAR'),
    NEW_VALUE clob(24) OPTIONS (NAMEINSOURCE '"NEW_VALUE"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    MODIFIED_BY string(40) NOT NULL OPTIONS (NAMEINSOURCE '"MODIFIED_BY"', NATIVE_TYPE 'NVARCHAR'),
    MODIFIED_AT timestamp NOT NULL OPTIONS (NAMEINSOURCE '"MODIFIED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::CONF_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::CONFIGURATION" (
    KEY string(30) NOT NULL OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" clob(24) NOT NULL OPTIONS (NAMEINSOURCE '"VALUE"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::CONFIGURATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::IMPORTED_DU" (
    PROCESS_ID string(60) NOT NULL OPTIONS (NAMEINSOURCE '"PROCESS_ID"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT_ID long NOT NULL OPTIONS (NAMEINSOURCE '"CONTENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IMPORTED_AT timestamp NOT NULL OPTIONS (NAMEINSOURCE '"IMPORTED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IMPORT_TYPE string(1) OPTIONS (NAMEINSOURCE '"IMPORT_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::IMPORTED_DU"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::LOG_SYNC" (
    PROCESS_ID string(60) NOT NULL OPTIONS (NAMEINSOURCE '"PROCESS_ID"', NATIVE_TYPE 'NVARCHAR'),
    SYSTEM_ID long NOT NULL OPTIONS (NAMEINSOURCE '"SYSTEM_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RUNNING byte NOT NULL DEFAULT '1' OPTIONS (NAMEINSOURCE '"RUNNING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::LOG_SYNC"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::PROCESS" (
    PROCESS_ID string(60) NOT NULL OPTIONS (NAMEINSOURCE '"PROCESS_ID"', NATIVE_TYPE 'NVARCHAR'),
    SRC_HOST string(255) OPTIONS (NAMEINSOURCE '"SRC_HOST"', NATIVE_TYPE 'NVARCHAR'),
    SRC_SID string(3) OPTIONS (NAMEINSOURCE '"SRC_SID"', NATIVE_TYPE 'VARCHAR'),
    TARGET_HOST string(255) OPTIONS (NAMEINSOURCE '"TARGET_HOST"', NATIVE_TYPE 'NVARCHAR'),
    TARGET_SID string(3) OPTIONS (NAMEINSOURCE '"TARGET_SID"', NATIVE_TYPE 'VARCHAR'),
    "USER" string(40) NOT NULL OPTIONS (NAMEINSOURCE '"USER"', NATIVE_TYPE 'NVARCHAR'),
    START_TIME timestamp NOT NULL OPTIONS (NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_TIME timestamp OPTIONS (NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RC integer OPTIONS (NAMEINSOURCE '"RC"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(1) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    DUS string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"DUS"', NATIVE_TYPE 'NVARCHAR'),
    TRANSPORT_UNIT string(1) NOT NULL DEFAULT 'D' OPTIONS (NAMEINSOURCE '"TRANSPORT_UNIT"', NATIVE_TYPE 'VARCHAR'),
    PRODUCT_NAME string(256) OPTIONS (NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_VENDOR string(256) OPTIONS (NAMEINSOURCE '"PRODUCT_VENDOR"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::PROCESS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::SYSTEM" (
    SYSTEM_ID long NOT NULL OPTIONS (NAMEINSOURCE '"SYSTEM_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SID string(3) OPTIONS (NAMEINSOURCE '"SID"', NATIVE_TYPE 'VARCHAR'),
    INSTANCE bigdecimal(2,2147483647) OPTIONS (NAMEINSOURCE '"INSTANCE"', NATIVE_TYPE 'DECIMAL'),
    COMMENT string(255) OPTIONS (NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'NVARCHAR'),
    DESTINATION string(255) OPTIONS (NAMEINSOURCE '"DESTINATION"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    IS_CTS string(1) OPTIONS (NAMEINSOURCE '"IS_CTS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::SYSTEM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::SYSTEM_STATE" (
    SYSTEM_ID long NOT NULL OPTIONS (NAMEINSOURCE '"SYSTEM_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATUS integer OPTIONS (NAMEINSOURCE '"STATUS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS_UPDATED_AT timestamp OPTIONS (NAMEINSOURCE '"STATUS_UPDATED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::SYSTEM_STATE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::TRANSPORT_CONTENT" (
    TRANSPORT_CONTENT_ID long NOT NULL OPTIONS (NAMEINSOURCE '"TRANSPORT_CONTENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DU_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DU_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DU_VENDOR string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DU_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION string(256) OPTIONS (NAMEINSOURCE '"DU_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION_SP string(256) OPTIONS (NAMEINSOURCE '"DU_VERSION_SP"', NATIVE_TYPE 'NVARCHAR'),
    DU_VERSION_PATCH string(256) OPTIONS (NAMEINSOURCE '"DU_VERSION_PATCH"', NATIVE_TYPE 'NVARCHAR'),
    CONTENT blob(16) OPTIONS (NAMEINSOURCE '"CONTENT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'BLOB'),
    TRANSPORT_UNIT_TYPE integer NOT NULL OPTIONS (NAMEINSOURCE '"TRANSPORT_UNIT_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REPOSITORY_VERSION integer NOT NULL OPTIONS (NAMEINSOURCE '"REPOSITORY_VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INCL_OBJS_FROM timestamp OPTIONS (NAMEINSOURCE '"INCL_OBJS_FROM"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INCL_OBJS_TO timestamp OPTIONS (NAMEINSOURCE '"INCL_OBJS_TO"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SRC_SYSTEM_SID string(3) OPTIONS (NAMEINSOURCE '"SRC_SYSTEM_SID"', NATIVE_TYPE 'VARCHAR'),
    SRC_SYSTEM_HOST string(255) OPTIONS (NAMEINSOURCE '"SRC_SYSTEM_HOST"', NATIVE_TYPE 'NVARCHAR'),
    KEEP_CONTENT string(1) OPTIONS (NAMEINSOURCE '"KEEP_CONTENT"', NATIVE_TYPE 'VARCHAR'),
    SAVED_AT timestamp OPTIONS (NAMEINSOURCE '"SAVED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::TRANSPORT_CONTENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::TRANSPORT_ROUTE" (
    TRANSPORT_ROUTE_ID long NOT NULL OPTIONS (NAMEINSOURCE '"TRANSPORT_ROUTE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SRC_SYSTEM long NOT NULL OPTIONS (NAMEINSOURCE '"SRC_SYSTEM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TARGET_SYSTEM long NOT NULL OPTIONS (NAMEINSOURCE '"TARGET_SYSTEM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMENT string(1024) OPTIONS (NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'NVARCHAR'),
    TRANSPORT_MODE string(1) NOT NULL DEFAULT 'U' OPTIONS (NAMEINSOURCE '"TRANSPORT_MODE"', NATIVE_TYPE 'VARCHAR'),
    VALID string(1) NOT NULL DEFAULT 'Y' OPTIONS (NAMEINSOURCE '"VALID"', NATIVE_TYPE 'VARCHAR'),
    TRANSPORT_UNIT string(1) NOT NULL DEFAULT 'D' OPTIONS (NAMEINSOURCE '"TRANSPORT_UNIT"', NATIVE_TYPE 'VARCHAR'),
    PRODUCT_NAME string(256) OPTIONS (NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_VENDOR string(256) OPTIONS (NAMEINSOURCE '"PRODUCT_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCT_INSTANCE string(3) OPTIONS (NAMEINSOURCE '"PRODUCT_INSTANCE"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(30) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::TRANSPORT_ROUTE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::TRANSPORT_ROUTE_DU" (
    TRANSPORT_ROUTE_ID long NOT NULL OPTIONS (NAMEINSOURCE '"TRANSPORT_ROUTE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VENDOR string(256) NOT NULL OPTIONS (NAMEINSOURCE '"VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::TRANSPORT_ROUTE_DU"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SAP_XS_LM.sap.hana.xs.lm.db::TRANSPORTED_CHANGE" (
    PROCESS_ID string(60) NOT NULL OPTIONS (NAMEINSOURCE '"PROCESS_ID"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE string(256) OPTIONS (NAMEINSOURCE '"PACKAGE"', NATIVE_TYPE 'NVARCHAR'),
    DU_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DU_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DU_VENDOR string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DU_VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    CHANGE_ID integer OPTIONS (NAMEINSOURCE '"CHANGE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CHANGE_RELEASE_TIME timestamp OPTIONS (NAMEINSOURCE '"CHANGE_RELEASE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TRANSPORTED_BY string(8) OPTIONS (NAMEINSOURCE '"TRANSPORTED_BY"', NATIVE_TYPE 'NVARCHAR'),
    SRC_SYSTEM string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SRC_SYSTEM"', NATIVE_TYPE 'NVARCHAR'),
    RELEASED string(1) OPTIONS (NAMEINSOURCE '"RELEASED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SAP_XS_LM"."sap.hana.xs.lm.db::TRANSPORTED_CHANGE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SAIRPORT" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    ID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"ID"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(25) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    TIME_ZONE string(6) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"TIME_ZONE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SAIRPORT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SAPLANE" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    PLANETYPE string(10) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"PLANETYPE"', NATIVE_TYPE 'NVARCHAR'),
    SEATSMAX integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"SEATSMAX"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONSUM double NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"CONSUM"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CON_UNIT string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CON_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    TANKCAP bigdecimal(16,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"TANKCAP"', NATIVE_TYPE 'DECIMAL'),
    CAP_UNIT string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CAP_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    WEIGHT bigdecimal(14,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"WEIGHT"', NATIVE_TYPE 'DECIMAL'),
    WEI_UNIT string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"WEI_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    SPAN double NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"SPAN"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    SPAN_UNIT string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"SPAN_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    LENG double NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"LENG"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LENG_UNIT string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"LENG_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    OP_SPEED bigdecimal(17,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"OP_SPEED"', NATIVE_TYPE 'DECIMAL'),
    SPEED_UNIT string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"SPEED_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    PRODUCER string(5) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"PRODUCER"', NATIVE_TYPE 'NVARCHAR'),
    SEATSMAX_B integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"SEATSMAX_B"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEATSMAX_F integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"SEATSMAX_F"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SAPLANE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SBOOK" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    CONNID string(4) NOT NULL DEFAULT '0000' OPTIONS (NAMEINSOURCE '"CONNID"', NATIVE_TYPE 'NVARCHAR'),
    FLDATE string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"FLDATE"', NATIVE_TYPE 'NVARCHAR'),
    BOOKID string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"BOOKID"', NATIVE_TYPE 'NVARCHAR'),
    CUSTOMID string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"CUSTOMID"', NATIVE_TYPE 'NVARCHAR'),
    CUSTTYPE string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CUSTTYPE"', NATIVE_TYPE 'NVARCHAR'),
    SMOKER string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"SMOKER"', NATIVE_TYPE 'NVARCHAR'),
    LUGGWEIGHT bigdecimal(8,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"LUGGWEIGHT"', NATIVE_TYPE 'DECIMAL'),
    WUNIT string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"WUNIT"', NATIVE_TYPE 'NVARCHAR'),
    INVOICE string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"INVOICE"', NATIVE_TYPE 'NVARCHAR'),
    CLASS string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CLASS"', NATIVE_TYPE 'NVARCHAR'),
    FORCURAM bigdecimal(15,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"FORCURAM"', NATIVE_TYPE 'DECIMAL'),
    FORCURKEY string(5) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"FORCURKEY"', NATIVE_TYPE 'NVARCHAR'),
    LOCCURAM bigdecimal(15,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"LOCCURAM"', NATIVE_TYPE 'DECIMAL'),
    LOCCURKEY string(5) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"LOCCURKEY"', NATIVE_TYPE 'NVARCHAR'),
    ORDER_DATE string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"ORDER_DATE"', NATIVE_TYPE 'NVARCHAR'),
    COUNTER string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"COUNTER"', NATIVE_TYPE 'NVARCHAR'),
    AGENCYNUM string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"AGENCYNUM"', NATIVE_TYPE 'NVARCHAR'),
    CANCELLED string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CANCELLED"', NATIVE_TYPE 'NVARCHAR'),
    RESERVED string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"RESERVED"', NATIVE_TYPE 'NVARCHAR'),
    PASSNAME string(25) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"PASSNAME"', NATIVE_TYPE 'NVARCHAR'),
    PASSFORM string(15) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"PASSFORM"', NATIVE_TYPE 'NVARCHAR'),
    PASSBIRTH string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"PASSBIRTH"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SBOOK"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SBUSPART" (
    MANDANT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDANT"', NATIVE_TYPE 'NVARCHAR'),
    BUSPARTNUM string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"BUSPARTNUM"', NATIVE_TYPE 'NVARCHAR'),
    CONTACT string(25) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CONTACT"', NATIVE_TYPE 'NVARCHAR'),
    CONTPHONO string(30) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CONTPHONO"', NATIVE_TYPE 'NVARCHAR'),
    BUSPATYP string(2) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"BUSPATYP"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SBUSPART"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SCARPLAN" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    PLANETYPE string(10) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"PLANETYPE"', NATIVE_TYPE 'NVARCHAR'),
    SNUMBER bigdecimal(6,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"SNUMBER"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SCARPLAN"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SCARR" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    CARRNAME string(20) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRNAME"', NATIVE_TYPE 'NVARCHAR'),
    CURRCODE string(5) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CURRCODE"', NATIVE_TYPE 'NVARCHAR'),
    URL string(255) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"URL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SCARR"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SCITAIRP" (
    MANDANT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDANT"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(20) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    AIRPORT string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"AIRPORT"', NATIVE_TYPE 'NVARCHAR'),
    MASTERCITY string(20) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"MASTERCITY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SCITAIRP"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SCOUNTER" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    COUNTNUM string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"COUNTNUM"', NATIVE_TYPE 'NVARCHAR'),
    AIRPORT string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"AIRPORT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SCOUNTER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SCPLANE" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    PLANETYPE string(10) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"PLANETYPE"', NATIVE_TYPE 'NVARCHAR'),
    CARGOMAX bigdecimal(16,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"CARGOMAX"', NATIVE_TYPE 'DECIMAL'),
    CAR_UNIT string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CAR_UNIT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SCPLANE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SCURR" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    KURST string(4) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"KURST"', NATIVE_TYPE 'NVARCHAR'),
    FCURR string(5) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"FCURR"', NATIVE_TYPE 'NVARCHAR'),
    TCURR string(5) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"TCURR"', NATIVE_TYPE 'NVARCHAR'),
    GDATU string(8) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"GDATU"', NATIVE_TYPE 'NVARCHAR'),
    UKURS bigdecimal(9,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"UKURS"', NATIVE_TYPE 'DECIMAL'),
    FFACT bigdecimal(9,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"FFACT"', NATIVE_TYPE 'DECIMAL'),
    TFACT bigdecimal(9,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"TFACT"', NATIVE_TYPE 'DECIMAL')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SCURR"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SCURX" (
    CURRKEY string(5) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CURRKEY"', NATIVE_TYPE 'NVARCHAR'),
    CURRDEC short NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"CURRDEC"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SCURX"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SCUSTOM" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    ID string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"ID"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(25) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    FORM string(15) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"FORM"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(30) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    POSTBOX string(10) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"POSTBOX"', NATIVE_TYPE 'NVARCHAR'),
    POSTCODE string(10) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"POSTCODE"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(25) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    TELEPHONE string(30) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"TELEPHONE"', NATIVE_TYPE 'NVARCHAR'),
    CUSTTYPE string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CUSTTYPE"', NATIVE_TYPE 'NVARCHAR'),
    DISCOUNT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"DISCOUNT"', NATIVE_TYPE 'NVARCHAR'),
    LANGU string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"LANGU"', NATIVE_TYPE 'NVARCHAR'),
    EMAIL string(40) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"EMAIL"', NATIVE_TYPE 'NVARCHAR'),
    WEBUSER string(25) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"WEBUSER"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SCUSTOM"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SDESSERT" (
    MANDANT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDANT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    MEALNUMBER string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"MEALNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    HOT string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"HOT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SDESSERT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SFLIGHT" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    CONNID string(4) NOT NULL DEFAULT '0000' OPTIONS (NAMEINSOURCE '"CONNID"', NATIVE_TYPE 'NVARCHAR'),
    FLDATE string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"FLDATE"', NATIVE_TYPE 'NVARCHAR'),
    PRICE bigdecimal(15,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    CURRENCY string(5) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    PLANETYPE string(10) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"PLANETYPE"', NATIVE_TYPE 'NVARCHAR'),
    SEATSMAX integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"SEATSMAX"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEATSOCC integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"SEATSOCC"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PAYMENTSUM bigdecimal(17,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"PAYMENTSUM"', NATIVE_TYPE 'DECIMAL'),
    SEATSMAX_B integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"SEATSMAX_B"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEATSOCC_B integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"SEATSOCC_B"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEATSMAX_F integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"SEATSMAX_F"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEATSOCC_F integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"SEATSOCC_F"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SFLIGHT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SFLIMEAL" (
    MANDANT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDANT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    MEALNUMBER string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"MEALNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    CONNID string(4) NOT NULL DEFAULT '0000' OPTIONS (NAMEINSOURCE '"CONNID"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SFLIMEAL"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SGEOCITY" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(20) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    LATITUDE double NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"LATITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LONGITUDE double NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"LONGITUDE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SGEOCITY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SMACOURSE" (
    MANDANT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDANT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    MEALNUMBER string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"MEALNUMBER"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SMACOURSE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SMEAL" (
    MANDANT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDANT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    MEALNUMBER string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"MEALNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    MEALTYPE string(2) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"MEALTYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SMEAL"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SMEALT" (
    MANDANT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDANT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    MEALNUMBER string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"MEALNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    SPRACHE string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"SPRACHE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT string(40) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"TEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SMEALT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SMENU" (
    MANDANT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDANT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    MENUNUMBER string(4) NOT NULL DEFAULT '0000' OPTIONS (NAMEINSOURCE '"MENUNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    STARTER string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"STARTER"', NATIVE_TYPE 'NVARCHAR'),
    MAINCOURSE string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"MAINCOURSE"', NATIVE_TYPE 'NVARCHAR'),
    DESSERT string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"DESSERT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SMENU"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SNVOICE" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    CONNID string(4) NOT NULL DEFAULT '0000' OPTIONS (NAMEINSOURCE '"CONNID"', NATIVE_TYPE 'NVARCHAR'),
    FLDATE string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"FLDATE"', NATIVE_TYPE 'NVARCHAR'),
    BOOKID string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"BOOKID"', NATIVE_TYPE 'NVARCHAR'),
    CUSTOMID string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"CUSTOMID"', NATIVE_TYPE 'NVARCHAR'),
    INSTNO string(4) NOT NULL DEFAULT '0000' OPTIONS (NAMEINSOURCE '"INSTNO"', NATIVE_TYPE 'NVARCHAR'),
    PAYMETH string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"PAYMETH"', NATIVE_TYPE 'NVARCHAR'),
    AMOUNT bigdecimal(15,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"AMOUNT"', NATIVE_TYPE 'DECIMAL'),
    CURRENCY string(5) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR'),
    ARCHIVE_ string(4) NOT NULL DEFAULT '0000' OPTIONS (NAMEINSOURCE '"ARCHIVE_"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SNVOICE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SPFLI" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    CONNID string(4) NOT NULL DEFAULT '0000' OPTIONS (NAMEINSOURCE '"CONNID"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRYFR string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"COUNTRYFR"', NATIVE_TYPE 'NVARCHAR'),
    CITYFROM string(20) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CITYFROM"', NATIVE_TYPE 'NVARCHAR'),
    AIRPFROM string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"AIRPFROM"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRYTO string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"COUNTRYTO"', NATIVE_TYPE 'NVARCHAR'),
    CITYTO string(20) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CITYTO"', NATIVE_TYPE 'NVARCHAR'),
    AIRPTO string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"AIRPTO"', NATIVE_TYPE 'NVARCHAR'),
    FLTIME integer NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"FLTIME"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEPTIME string(6) NOT NULL DEFAULT '000000' OPTIONS (NAMEINSOURCE '"DEPTIME"', NATIVE_TYPE 'NVARCHAR'),
    ARRTIME string(6) NOT NULL DEFAULT '000000' OPTIONS (NAMEINSOURCE '"ARRTIME"', NATIVE_TYPE 'NVARCHAR'),
    DISTANCE bigdecimal(9,2147483647) NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"DISTANCE"', NATIVE_TYPE 'DECIMAL'),
    DISTID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"DISTID"', NATIVE_TYPE 'NVARCHAR'),
    FLTYPE string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"FLTYPE"', NATIVE_TYPE 'NVARCHAR'),
    PERIOD short NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"PERIOD"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SPFLI"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SPPLANE" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    PLANETYPE string(10) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"PLANETYPE"', NATIVE_TYPE 'NVARCHAR'),
    ANZ_NOTAUS short NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"ANZ_NOTAUS"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ANZ_PERS short NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"ANZ_PERS"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ANZ_SBER short NOT NULL DEFAULT '0' OPTIONS (NAMEINSOURCE '"ANZ_SBER"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SPPLANE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.SSTARTER" (
    MANDANT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDANT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    MEALNUMBER string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"MEALNUMBER"', NATIVE_TYPE 'NVARCHAR'),
    HOT string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"HOT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."SSTARTER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.STICKET" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    CARRID string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'NVARCHAR'),
    CONNID string(4) NOT NULL DEFAULT '0000' OPTIONS (NAMEINSOURCE '"CONNID"', NATIVE_TYPE 'NVARCHAR'),
    FLDATE string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"FLDATE"', NATIVE_TYPE 'NVARCHAR'),
    BOOKID string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"BOOKID"', NATIVE_TYPE 'NVARCHAR'),
    CUSTOMID string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"CUSTOMID"', NATIVE_TYPE 'NVARCHAR'),
    TICKET string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"TICKET"', NATIVE_TYPE 'NVARCHAR'),
    PLACE string(40) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"PLACE"', NATIVE_TYPE 'NVARCHAR'),
    ARCHIVE_ string(4) NOT NULL DEFAULT '0000' OPTIONS (NAMEINSOURCE '"ARCHIVE_"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."STICKET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SFLIGHT.STRAVELAG" (
    MANDT string(3) NOT NULL DEFAULT '000' OPTIONS (NAMEINSOURCE '"MANDT"', NATIVE_TYPE 'NVARCHAR'),
    AGENCYNUM string(8) NOT NULL DEFAULT '00000000' OPTIONS (NAMEINSOURCE '"AGENCYNUM"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(25) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    STREET string(30) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"STREET"', NATIVE_TYPE 'NVARCHAR'),
    POSTBOX string(10) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"POSTBOX"', NATIVE_TYPE 'NVARCHAR'),
    POSTCODE string(10) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"POSTCODE"', NATIVE_TYPE 'NVARCHAR'),
    CITY string(25) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CITY"', NATIVE_TYPE 'NVARCHAR'),
    COUNTRY string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"COUNTRY"', NATIVE_TYPE 'NVARCHAR'),
    REGION string(3) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"REGION"', NATIVE_TYPE 'NVARCHAR'),
    TELEPHONE string(30) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"TELEPHONE"', NATIVE_TYPE 'NVARCHAR'),
    URL string(255) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"URL"', NATIVE_TYPE 'NVARCHAR'),
    LANGU string(1) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"LANGU"', NATIVE_TYPE 'NVARCHAR'),
    CURRENCY string(5) NOT NULL DEFAULT '' OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SFLIGHT"."STRAVELAG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.ACCESSIBLE_VIEWS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user who is authorized to access the view', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the view', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'Name of the view', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ANALYTICAL_PRIVILEGE_NEEDED string(5) OPTIONS (ANNOTATION 'Specifies if this view is secured by means of analytical privileges', NAMEINSOURCE '"ANALYTICAL_PRIVILEGE_NEEDED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Accessible views  for a given user', NAMEINSOURCE '"SYS"."ACCESSIBLE_VIEWS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_AREAS" (
    AREA_OID long OPTIONS (ANNOTATION 'Object ID of the AFL area', NAMEINSOURCE '"AREA_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the AFL area', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL area', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Create timestamp of the AFL area', NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Available AFL areas', NAMEINSOURCE '"SYS"."AFL_AREAS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_AREAS_" (
    AREA_OID long OPTIONS (NAMEINSOURCE '"AREA_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SYS"."AFL_AREAS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_FUNCTION_PARAMETERS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the AFL function', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Area name of the AFL function', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Function name of the AFL function', NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PARAMETER_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Parameter name', NAMEINSOURCE '"PARAMETER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer NOT NULL OPTIONS (ANNOTATION 'Ordinal position of the parameter', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IO_TYPE string(8) OPTIONS (ANNOTATION 'direction of the parameter', NAMEINSOURCE '"IO_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE string(22) OPTIONS (ANNOTATION 'data type', NAMEINSOURCE '"DATA_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CS_DATA_TYPE string(13) OPTIONS (ANNOTATION 'Column store data type', NAMEINSOURCE '"CS_DATA_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CS_DATA_TYPE_EXPRESSION string(256) OPTIONS (ANNOTATION 'Regular experssion of column store data type', NAMEINSOURCE '"CS_DATA_TYPE_EXPRESSION"', NATIVE_TYPE 'NVARCHAR'),
    SQL_NAME string(256) OPTIONS (ANNOTATION 'Sql name', NAMEINSOURCE '"SQL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SQL_DATA_TYPE string(14) OPTIONS (ANNOTATION 'Sql data type', NAMEINSOURCE '"SQL_DATA_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'Parameter length', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RAW_SIZE integer OPTIONS (ANNOTATION 'Parameter raw size', NAMEINSOURCE '"RAW_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Scale of the parameter', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USAGE string(32) OPTIONS (ANNOTATION 'usage', NAMEINSOURCE '"USAGE"', NATIVE_TYPE 'NVARCHAR'),
    BUSINESS_TEXT_ID integer OPTIONS (ANNOTATION 'Business text id of the parameter', NAMEINSOURCE '"BUSINESS_TEXT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Parameters of AFL functions', NAMEINSOURCE '"SYS"."AFL_FUNCTION_PARAMETERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_FUNCTION_PARAMETERS_" (
    FUNCTION_OID long NOT NULL OPTIONS (NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMETER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PARAMETER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IO_TYPE string(8) OPTIONS (NAMEINSOURCE '"IO_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer NOT NULL OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE integer OPTIONS (NAMEINSOURCE '"DATA_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUB_DATA_TYPE integer OPTIONS (NAMEINSOURCE '"SUB_DATA_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE integer OPTIONS (NAMEINSOURCE '"CS_DATA_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SQL_DATA_TYPE integer OPTIONS (NAMEINSOURCE '"SQL_DATA_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    BUSINESS_TEXT_ID integer OPTIONS (NAMEINSOURCE '"BUSINESS_TEXT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OFFSET_SERVER integer OPTIONS (NAMEINSOURCE '"OFFSET_SERVER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OFFSET_CLIENT integer OPTIONS (NAMEINSOURCE '"OFFSET_CLIENT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE_EXPRESSION string(256) OPTIONS (NAMEINSOURCE '"CS_DATA_TYPE_EXPRESSION"', NATIVE_TYPE 'NVARCHAR'),
    SQL_NAME string(256) OPTIONS (NAMEINSOURCE '"SQL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USAGE string(32) OPTIONS (NAMEINSOURCE '"USAGE"', NATIVE_TYPE 'NVARCHAR'),
    RAW_SIZE integer OPTIONS (NAMEINSOURCE '"RAW_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."AFL_FUNCTION_PARAMETERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_FUNCTION_PROPERTIES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema of the AFL function properties', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Area name of the AFL function properties', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Function name of the AFL function properties', NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) NOT NULL OPTIONS (ANNOTATION 'Key of the AFL function properties', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(1024) OPTIONS (ANNOTATION 'Value of the AFL function properties', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Available AFL function properties', NAMEINSOURCE '"SYS"."AFL_FUNCTION_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_FUNCTION_PROPERTIES_" (
    KEY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(1024) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_OID long NOT NULL OPTIONS (NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."AFL_FUNCTION_PROPERTIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_FUNCTIONS" (
    FUNCTION_OID long OPTIONS (ANNOTATION 'Object ID of the AFL function', NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the AFL function', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL area that the AFL function belong to', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL package that the AFL function belong to', NAMEINSOURCE '"PACKAGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL function', NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Create timestamp of the AFL function', NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INPUT_PARAMETER_COUNT integer OPTIONS (ANNOTATION 'Number of the input parameters of the AFL function', NAMEINSOURCE '"INPUT_PARAMETER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RETURN_VALUE_COUNT integer OPTIONS (ANNOTATION 'Number of the out parameters of the AFL function', NAMEINSOURCE '"RETURN_VALUE_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FUNCTION_TYPE string(7) NOT NULL OPTIONS (ANNOTATION 'Type of the AFL function', NAMEINSOURCE '"FUNCTION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TECHNICAL_CATEGORY string(11) NOT NULL OPTIONS (ANNOTATION 'Technical category of the AFL function', NAMEINSOURCE '"TECHNICAL_CATEGORY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Available AFL functions', NAMEINSOURCE '"SYS"."AFL_FUNCTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_FUNCTIONS_" (
    FUNCTION_OID long OPTIONS (NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_OID long NOT NULL OPTIONS (NAMEINSOURCE '"AREA_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PACKAGE_OID long OPTIONS (NAMEINSOURCE '"PACKAGE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    NO_INPUT_PARAMS integer OPTIONS (NAMEINSOURCE '"NO_INPUT_PARAMS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NO_OUTPUT_PARAMS integer OPTIONS (NAMEINSOURCE '"NO_OUTPUT_PARAMS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FUNCTION_TYPE byte OPTIONS (NAMEINSOURCE '"FUNCTION_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TECHNICAL_CATEGORY_ID byte OPTIONS (NAMEINSOURCE '"TECHNICAL_CATEGORY_ID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    BUSINESS_CATEGORY_NAME string(256) OPTIONS (NAMEINSOURCE '"BUSINESS_CATEGORY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BUSINESS_TEXT_ID integer OPTIONS (NAMEINSOURCE '"BUSINESS_TEXT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."AFL_FUNCTIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_PACKAGES" (
    PACKAGE_OID long OPTIONS (ANNOTATION 'Object ID of the AFL package', NAMEINSOURCE '"PACKAGE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the AFL package', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL area that the AFL package belong to', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the AFL package', NAMEINSOURCE '"PACKAGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Create timestamp of the AFL package', NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Available AFL packages', NAMEINSOURCE '"SYS"."AFL_PACKAGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_PACKAGES_" (
    PACKAGE_OID long OPTIONS (NAMEINSOURCE '"PACKAGE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_OID long OPTIONS (NAMEINSOURCE '"AREA_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COCLASSID string(256) OPTIONS (NAMEINSOURCE '"COCLASSID"', NATIVE_TYPE 'NVARCHAR'),
    FILE clob(24) OPTIONS (NAMEINSOURCE '"FILE"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MD5SUM string(256) OPTIONS (NAMEINSOURCE '"MD5SUM"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."AFL_PACKAGES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_TEXTS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the AFL text', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Area name of the AFL text', NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TEXT_ID integer NOT NULL OPTIONS (ANNOTATION 'Text id', NAMEINSOURCE '"TEXT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LANGUAGE_CODE string(5) NOT NULL OPTIONS (ANNOTATION 'Language code of AFL text', NAMEINSOURCE '"LANGUAGE_CODE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT string(512) OPTIONS (ANNOTATION 'Text', NAMEINSOURCE '"TEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Available AFL texts', NAMEINSOURCE '"SYS"."AFL_TEXTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AFL_TEXTS_" (
    LANGUAGE_CODE string(5) NOT NULL OPTIONS (NAMEINSOURCE '"LANGUAGE_CODE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT string(512) OPTIONS (NAMEINSOURCE '"TEXT"', NATIVE_TYPE 'NVARCHAR'),
    AREA_OID long NOT NULL OPTIONS (NAMEINSOURCE '"AREA_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEXT_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"TEXT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."AFL_TEXTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AIS_INFO_" (
    WORKSPACE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"WORKSPACE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."AIS_INFO_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AUDIT_LOG" (
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Time the event occurred', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Name of the host where the event occured', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port number', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Name of the service', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'ID of the connection', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CLIENT_HOST string(64) OPTIONS (ANNOTATION 'IP of the client host', NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_IP string(16) OPTIONS (ANNOTATION 'IP of the client application', NAMEINSOURCE '"CLIENT_IP"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (ANNOTATION 'PID of the client process', NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLIENT_PORT integer OPTIONS (ANNOTATION 'Port of the client process', NAMEINSOURCE '"CLIENT_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of user connected to the database', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the application user', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AUDIT_POLICY_NAME string(256) OPTIONS (ANNOTATION 'Name of the Audit Policy hit', NAMEINSOURCE '"AUDIT_POLICY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    EVENT_STATUS string(32) OPTIONS (ANNOTATION 'Whether the event was successful or not', NAMEINSOURCE '"EVENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    EVENT_LEVEL string(16) OPTIONS (ANNOTATION 'Severity Level of the event', NAMEINSOURCE '"EVENT_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    EVENT_ACTION string(32) OPTIONS (ANNOTATION 'Action performed by the audit event', NAMEINSOURCE '"EVENT_ACTION"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Name of schema', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of object', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRIVILEGE_NAME string(256) OPTIONS (ANNOTATION 'Name of privilege granted', NAMEINSOURCE '"PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROLE_NAME string(256) OPTIONS (ANNOTATION 'Name of role granted', NAMEINSOURCE '"ROLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE string(256) OPTIONS (ANNOTATION 'The grantee in GRANT/REVOKE statements', NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    GRANTABLE string(16) OPTIONS (ANNOTATION 'Whether the privilege/role being granted is grantable or not', NAMEINSOURCE '"GRANTABLE"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME string(256) OPTIONS (ANNOTATION 'Configuration file which was changed', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SECTION string(128) OPTIONS (ANNOTATION 'Configuration which was changed', NAMEINSOURCE '"SECTION"', NATIVE_TYPE 'VARCHAR'),
    KEY string(128) OPTIONS (ANNOTATION 'Attribute being changed', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    PREV_VALUE string(5000) OPTIONS (ANNOTATION 'Old value of the attribute', NAMEINSOURCE '"PREV_VALUE"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'New value of the attribute', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'The SQL statement which caused the event', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    COMMENT string(5000) OPTIONS (ANNOTATION 'Any extra information on the event', NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'This view is used to see audit records', NAMEINSOURCE '"SYS"."AUDIT_LOG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AUDIT_POLICIES" (
    AUDIT_POLICY_NAME string(256) OPTIONS (ANNOTATION 'Audit policy name', NAMEINSOURCE '"AUDIT_POLICY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AUDIT_POLICY_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the audit policy', NAMEINSOURCE '"AUDIT_POLICY_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVENT_STATUS string(32) OPTIONS (ANNOTATION 'Status of events to be audited: ''SUCCESSFUL EVENTS''/''UNSUCCESSFUL EVENTS''/''ALL EVENTS''', NAMEINSOURCE '"EVENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    EVENT_LEVEL string(16) OPTIONS (ANNOTATION 'Level of events to be audited: ''EMERGENCY''/''CRITICAL''/''ALERT''/''WARNING''/''INFO''', NAMEINSOURCE '"EVENT_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    IS_AUDIT_POLICY_ACTIVE string(5) OPTIONS (ANNOTATION 'Audit policy is active: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_AUDIT_POLICY_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    EVENT_ACTION string(32) OPTIONS (ANNOTATION 'Action to be audited, for example: ''SELECT'', ''GRANT PRIVILEGE'', ...', NAMEINSOURCE '"EVENT_ACTION"', NATIVE_TYPE 'VARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User whose actions are to be audited', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    EXCEPT_USER_NAME string(256) OPTIONS (ANNOTATION 'User whose actions are not to be audited', NAMEINSOURCE '"EXCEPT_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of object to be audited, ''INVALID'' in case of change of object type after creation of audit policy', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_SCHEMA string(256) OPTIONS (ANNOTATION 'Schema of object to be audited', NAMEINSOURCE '"OBJECT_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of object to be audited', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Defined audit policies', NAMEINSOURCE '"SYS"."AUDIT_POLICIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AUTHORIZATION_GRAPH" (
    ROOT_DEPENDENT_TYPE_ID short OPTIONS (ANNOTATION 'Object type ID of the root object to show as a graph', NAMEINSOURCE '"ROOT_DEPENDENT_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ROOT_DEPENDENT_OBJECT_ID long OPTIONS (ANNOTATION 'Object ID of the root object to show as a graph', NAMEINSOURCE '"ROOT_DEPENDENT_OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEPENDENT_TYPE_ID short OPTIONS (ANNOTATION 'Object type ID of the dependent object', NAMEINSOURCE '"DEPENDENT_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEPENDENT_TYPE_ID_NAME string(256) OPTIONS (ANNOTATION 'Object type name of the dependent object', NAMEINSOURCE '"DEPENDENT_TYPE_ID_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_SUBTYPE_ID short OPTIONS (ANNOTATION 'Object subtype ID of the dependent object', NAMEINSOURCE '"DEPENDENT_SUBTYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEPENDENT_SUBTYPE_ID_NAME string(256) OPTIONS (ANNOTATION 'Object subtype name of the dependent object', NAMEINSOURCE '"DEPENDENT_SUBTYPE_ID_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_ID long OPTIONS (ANNOTATION 'Object ID of the dependent object', NAMEINSOURCE '"DEPENDENT_OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEPENDENT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name the dependent object belongs to', NAMEINSOURCE '"DEPENDENT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the dependent object', NAMEINSOURCE '"DEPENDENT_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OWNER_OID long OPTIONS (ANNOTATION 'ID of the user owning the dependent object', NAMEINSOURCE '"DEPENDENT_OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEPENDENT_OWNER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user owning the dependent object', NAMEINSOURCE '"DEPENDENT_OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_READONLY integer OPTIONS (ANNOTATION 'Readonly property of the dependent object', NAMEINSOURCE '"DEPENDENT_READONLY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNDERLYING_TYPE_ID short OPTIONS (ANNOTATION 'Object type ID of the underlying object', NAMEINSOURCE '"UNDERLYING_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    UNDERLYING_TYPE_ID_NAME string(256) OPTIONS (ANNOTATION 'Object type name of the underlying object', NAMEINSOURCE '"UNDERLYING_TYPE_ID_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNDERLYING_SUBTYPE_ID short OPTIONS (ANNOTATION 'Object subtype ID of the underlying object', NAMEINSOURCE '"UNDERLYING_SUBTYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    UNDERLYING_SUBTYPE_ID_NAME string(256) OPTIONS (ANNOTATION 'Object subtype name of the underlying object', NAMEINSOURCE '"UNDERLYING_SUBTYPE_ID_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNDERLYING_OBJECT_ID long OPTIONS (ANNOTATION 'Object ID of the underlying object', NAMEINSOURCE '"UNDERLYING_OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNDERLYING_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name the underlying object belongs to', NAMEINSOURCE '"UNDERLYING_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNDERLYING_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the underlying object', NAMEINSOURCE '"UNDERLYING_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNDERLYING_OWNER_OID long OPTIONS (ANNOTATION 'ID of the user owning the underlying object', NAMEINSOURCE '"UNDERLYING_OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNDERLYING_OWNER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user owning the underlying object', NAMEINSOURCE '"UNDERLYING_OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNDERLYING_READONLY integer OPTIONS (ANNOTATION 'Readonly property of the underlying object', NAMEINSOURCE '"UNDERLYING_READONLY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEPENDENCY_USER_OID long OPTIONS (ANNOTATION 'ID of the user required to have a certain privilege on the underlying object in order to validate the dependent object', NAMEINSOURCE '"DEPENDENCY_USER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEPENDENCY_USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user required to have a certain privilege on the underlying object in order to validate the dependent object', NAMEINSOURCE '"DEPENDENCY_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENCY_TYPE short OPTIONS (ANNOTATION 'Type of dependency determines the validation semantics for dependencies sharing the same dependent objects', NAMEINSOURCE '"DEPENDENCY_TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    PRIVILEGE_ID long OPTIONS (ANNOTATION 'ID of the privilege the dependency user is required to have on the underlying object', NAMEINSOURCE '"PRIVILEGE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRIVILEGE_NAME string(256) OPTIONS (ANNOTATION 'Name of the privilege the dependency user is required to have on the underlying object', NAMEINSOURCE '"PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_VALID byte OPTIONS (ANNOTATION 'Current state of the dependency (as integer). It is set by the object validation logic and reflects missing privileges or invalidated objects: 0 .. 3', NAMEINSOURCE '"IS_VALID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DEPENDENCY_STATUS string(40) OPTIONS (ANNOTATION 'Current state of a privilege for the dependent object: ''INVALID''/''NOT AUTHORIZED''/''AUTHORIZED NON GRANTABLE''/''AUTHORIZED GRANTABLE''', NAMEINSOURCE '"DEPENDENCY_STATUS"', NATIVE_TYPE 'VARCHAR'),
    AVAILABLE_PRIVILEGES string(256) OPTIONS (ANNOTATION 'Current state of a privilege on upper node (dependent object): ''INVALID''/''NOT GRANTABLE''/''GRANTABLE''', NAMEINSOURCE '"AVAILABLE_PRIVILEGES"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Represents authorization dependencies of complex database objects', NAMEINSOURCE '"SYS"."AUTHORIZATION_GRAPH"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AUTHORIZATION_OBJECTS" (
    TYPE_ID long OPTIONS (NAMEINSOURCE '"TYPE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBTYPE_ID integer OPTIONS (NAMEINSOURCE '"SUBTYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_ID long OPTIONS (NAMEINSOURCE '"OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_NAME string(256) OPTIONS (NAMEINSOURCE '"OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    READONLY integer OPTIONS (NAMEINSOURCE '"READONLY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."AUTHORIZATION_OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.AUTHORIZATION_TYPES" (
    TYPE_ID long OPTIONS (ANNOTATION 'Id of the authorization object type', NAMEINSOURCE '"TYPE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE_NAME string(256) OPTIONS (ANNOTATION 'Name of the authorization object type', NAMEINSOURCE '"TYPE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUBTYPE_ID long OPTIONS (ANNOTATION 'Id of the authorization object subtype', NAMEINSOURCE '"SUBTYPE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBTYPE_NAME string(256) OPTIONS (ANNOTATION 'Name of the authorization object subtype', NAMEINSOURCE '"SUBTYPE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Object types and subtypes used by authorization object ids', NAMEINSOURCE '"SYS"."AUTHORIZATION_TYPES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_AFL_AREAS_" (
    AREA_OID long OPTIONS (NAMEINSOURCE '"AREA_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_NAME string(256) OPTIONS (NAMEINSOURCE '"AREA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_AFL_AREAS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_AFL_FUNCTION_PARAMETERS_" (
    FUNCTION_OID long OPTIONS (NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMETER_NAME string(256) OPTIONS (NAMEINSOURCE '"PARAMETER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IO_TYPE string(8) OPTIONS (NAMEINSOURCE '"IO_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE integer OPTIONS (NAMEINSOURCE '"DATA_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUB_DATA_TYPE integer OPTIONS (NAMEINSOURCE '"SUB_DATA_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE integer OPTIONS (NAMEINSOURCE '"CS_DATA_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SQL_DATA_TYPE integer OPTIONS (NAMEINSOURCE '"SQL_DATA_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    BUSINESS_TEXT_ID integer OPTIONS (NAMEINSOURCE '"BUSINESS_TEXT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OFFSET_SERVER integer OPTIONS (NAMEINSOURCE '"OFFSET_SERVER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OFFSET_CLIENT integer OPTIONS (NAMEINSOURCE '"OFFSET_CLIENT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE_EXPRESSION string(256) OPTIONS (NAMEINSOURCE '"CS_DATA_TYPE_EXPRESSION"', NATIVE_TYPE 'NVARCHAR'),
    SQL_NAME string(256) OPTIONS (NAMEINSOURCE '"SQL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USAGE string(32) OPTIONS (NAMEINSOURCE '"USAGE"', NATIVE_TYPE 'NVARCHAR'),
    RAW_SIZE integer OPTIONS (NAMEINSOURCE '"RAW_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_AFL_FUNCTION_PARAMETERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_AFL_FUNCTION_PROPERTIES_" (
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(1024) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_OID long OPTIONS (NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_AFL_FUNCTION_PROPERTIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_AFL_FUNCTIONS_" (
    FUNCTION_OID long OPTIONS (NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) OPTIONS (NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_OID long OPTIONS (NAMEINSOURCE '"AREA_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PACKAGE_OID long OPTIONS (NAMEINSOURCE '"PACKAGE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    NO_INPUT_PARAMS integer OPTIONS (NAMEINSOURCE '"NO_INPUT_PARAMS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NO_OUTPUT_PARAMS integer OPTIONS (NAMEINSOURCE '"NO_OUTPUT_PARAMS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FUNCTION_TYPE byte OPTIONS (NAMEINSOURCE '"FUNCTION_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TECHNICAL_CATEGORY_ID byte OPTIONS (NAMEINSOURCE '"TECHNICAL_CATEGORY_ID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    BUSINESS_CATEGORY_NAME string(256) OPTIONS (NAMEINSOURCE '"BUSINESS_CATEGORY_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BUSINESS_TEXT_ID integer OPTIONS (NAMEINSOURCE '"BUSINESS_TEXT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_AFL_FUNCTIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_AFL_PACKAGES_" (
    PACKAGE_OID long OPTIONS (NAMEINSOURCE '"PACKAGE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE_NAME string(256) OPTIONS (NAMEINSOURCE '"PACKAGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    AREA_OID long OPTIONS (NAMEINSOURCE '"AREA_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COCLASSID string(256) OPTIONS (NAMEINSOURCE '"COCLASSID"', NATIVE_TYPE 'NVARCHAR'),
    FILE clob(24) OPTIONS (NAMEINSOURCE '"FILE"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MD5SUM string(256) OPTIONS (NAMEINSOURCE '"MD5SUM"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_AFL_PACKAGES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_AFL_TEXTS_" (
    LANGUAGE_CODE string(5) OPTIONS (NAMEINSOURCE '"LANGUAGE_CODE"', NATIVE_TYPE 'NVARCHAR'),
    TEXT string(512) OPTIONS (NAMEINSOURCE '"TEXT"', NATIVE_TYPE 'NVARCHAR'),
    AREA_OID long OPTIONS (NAMEINSOURCE '"AREA_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEXT_ID integer OPTIONS (NAMEINSOURCE '"TEXT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_AFL_TEXTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_AIS_INFO_" (
    WORKSPACE_NAME string(256) OPTIONS (NAMEINSOURCE '"WORKSPACE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_AIS_INFO_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CE_SCENARIOS_" (
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    LAST_CHANGED_AT timestamp OPTIONS (NAMEINSOURCE '"LAST_CHANGED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCENARIO clob(24) OPTIONS (NAMEINSOURCE '"SCENARIO"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    FORMAT_VERSION string(256) OPTIONS (NAMEINSOURCE '"FORMAT_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    SCENARIO_METADATA clob(24) OPTIONS (NAMEINSOURCE '"SCENARIO_METADATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE long OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CE_SCENARIOS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_ATTRIBUTE_MAPPING_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALIAS_NAME string(256) OPTIONS (NAMEINSOURCE '"ALIAS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FIELD_REF long OPTIONS (NAMEINSOURCE '"FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_ATTRIBUTE_MAPPING_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_BO_VIEWS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_NAME string(256) OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ANCHOR_TABLE_REF long OPTIONS (NAMEINSOURCE '"ANCHOR_TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEFAULT_JOINPATH_REF long OPTIONS (NAMEINSOURCE '"DEFAULT_JOINPATH_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALIAS_NUMBER integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_BO_VIEWS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_CALC_INDEXES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_OID long OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_TYPE integer OPTIONS (NAMEINSOURCE '"VIEW_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    READ_ONLY byte OPTIONS (NAMEINSOURCE '"READ_ONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    CALC_NODE_NAME string(256) OPTIONS (NAMEINSOURCE '"CALC_NODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CALC_SCENARIO_NAME string(256) OPTIONS (NAMEINSOURCE '"CALC_SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE_NAME string(256) OPTIONS (NAMEINSOURCE '"PACKAGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_CALC_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_CHARACTERISTICS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    SID_ATTR_REF long OPTIONS (NAMEINSOURCE '"SID_ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_ATTR_REF long OPTIONS (NAMEINSOURCE '"KEY_ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEXT_ATTR_REF long OPTIONS (NAMEINSOURCE '"TEXT_ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXTERNAL_ATTR_REF long OPTIONS (NAMEINSOURCE '"EXTERNAL_ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_CHARACTERISTICS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_COLUMNS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_REF long OPTIONS (NAMEINSOURCE '"TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMNID long OPTIONS (NAMEINSOURCE '"COLUMNID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERNAL_COLUMN_ID integer OPTIONS (NAMEINSOURCE '"INTERNAL_COLUMN_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    COLLATION string(256) OPTIONS (NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    FIELDTYPE byte OPTIONS (NAMEINSOURCE '"FIELDTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SQL_TYPE_ID byte OPTIONS (NAMEINSOURCE '"SQL_TYPE_ID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TREX_TYPE_ID integer OPTIONS (NAMEINSOURCE '"TREX_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ABAP_TYPE_ID integer OPTIONS (NAMEINSOURCE '"ABAP_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MDRS_TYPE_ID integer OPTIONS (NAMEINSOURCE '"MDRS_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DERIVED byte OPTIONS (NAMEINSOURCE '"DERIVED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    XML_SCHEMA byte OPTIONS (NAMEINSOURCE '"XML_SCHEMA"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    "CONSTRAINT" byte OPTIONS (NAMEINSOURCE '"CONSTRAINT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    "OFFSET" short OPTIONS (NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    POSITION short OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    GROUP_NAME string(5000) OPTIONS (NAMEINSOURCE '"GROUP_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_WEIGHT float OPTIONS (NAMEINSOURCE '"DEFAULT_WEIGHT"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    IMPLEMENTATION_FLAGS integer OPTIONS (NAMEINSOURCE '"IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IMPLEMENTATION_PARAMETERS string(5000) OPTIONS (NAMEINSOURCE '"IMPLEMENTATION_PARAMETERS"', NATIVE_TYPE 'NVARCHAR'),
    MIN_VALUE string(5000) OPTIONS (NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(5000) OPTIONS (NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    USAGE_TYPE_FLAGS integer OPTIONS (NAMEINSOURCE '"USAGE_TYPE_FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FUZZY_SEARCH_MODE byte OPTIONS (NAMEINSOURCE '"FUZZY_SEARCH_MODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FLAGS byte OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SRS_ID integer OPTIONS (NAMEINSOURCE '"SRS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MINIMUM_CARDINALITY integer OPTIONS (NAMEINSOURCE '"MINIMUM_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAXIMUM_CARDINALITY integer OPTIONS (NAMEINSOURCE '"MAXIMUM_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_COLUMNS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_CONCAT_ATTRIBUTES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    EXPRESSION string(256) OPTIONS (NAMEINSOURCE '"EXPRESSION"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_CONCAT_ATTRIBUTES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_EXPRESSIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXPRESSION string(256) OPTIONS (NAMEINSOURCE '"EXPRESSION"', NATIVE_TYPE 'NVARCHAR'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_EXPRESSIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_FREESTYLE_ATTRIBUTES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    WEIGHT float OPTIONS (NAMEINSOURCE '"WEIGHT"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    SEARCH_FLAG short OPTIONS (NAMEINSOURCE '"SEARCH_FLAG"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_FREESTYLE_ATTRIBUTES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_FREESTYLE_TRANSLATIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_ATTR_REF long OPTIONS (NAMEINSOURCE '"VIEW_ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_ATTR_FROM_REF long OPTIONS (NAMEINSOURCE '"VIEW_ATTR_FROM_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_ATTR_TO_REF long OPTIONS (NAMEINSOURCE '"VIEW_ATTR_TO_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_FREESTYLE_TRANSLATIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_HIERARCHY_DEFINITIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_OID long OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FIXED_PART_SIZE short OPTIONS (NAMEINSOURCE '"FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    READ_ONLY byte OPTIONS (NAMEINSOURCE '"READ_ONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DEFINITION clob(24) OPTIONS (NAMEINSOURCE '"DEFINITION"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    DEFINITION_TYPE integer OPTIONS (NAMEINSOURCE '"DEFINITION_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    VIEW_TYPE integer OPTIONS (NAMEINSOURCE '"VIEW_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOGICAL_INDEX_REF long OPTIONS (NAMEINSOURCE '"LOGICAL_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    S_INDEX_REF long OPTIONS (NAMEINSOURCE '"S_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRED_SUCC_INDEX_REF long OPTIONS (NAMEINSOURCE '"PRED_SUCC_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEXT_INDEX_REF long OPTIONS (NAMEINSOURCE '"TEXT_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LEVEL_INDEX_REF long OPTIONS (NAMEINSOURCE '"LEVEL_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NODE_TYPE_INDEX_REF long OPTIONS (NAMEINSOURCE '"NODE_TYPE_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LINK_INDEX_REF long OPTIONS (NAMEINSOURCE '"LINK_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERVAL_INDEX_REF long OPTIONS (NAMEINSOURCE '"INTERVAL_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRED_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"PRED_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUCC_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"SUCC_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"TYPE_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ORDER_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"ORDER_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERVAL_PRED_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"INTERVAL_PRED_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERVAL_MIN_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"INTERVAL_MIN_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERVAL_MAX_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"INTERVAL_MAX_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROOT integer OPTIONS (NAMEINSOURCE '"ROOT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OTHERS integer OPTIONS (NAMEINSOURCE '"OTHERS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEMBER_TYPE integer OPTIONS (NAMEINSOURCE '"MEMBER_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INTERVAL_ATTR_NAME string(256) OPTIONS (NAMEINSOURCE '"INTERVAL_ATTR_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROOT_NODE string(5000) OPTIONS (NAMEINSOURCE '"ROOT_NODE"', NATIVE_TYPE 'NVARCHAR'),
    REST_NODE string(5000) OPTIONS (NAMEINSOURCE '"REST_NODE"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_HIERARCHY_DEFINITIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_INDEX_ALIASES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_REF long OPTIONS (NAMEINSOURCE '"TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALIAS_NAME string(256) OPTIONS (NAMEINSOURCE '"ALIAS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_INDEX_ALIASES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_INDEX_CONFIGS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_REF long OPTIONS (NAMEINSOURCE '"TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DYM_FREQUENCY_THRESHOLD integer OPTIONS (NAMEINSOURCE '"DYM_FREQUENCY_THRESHOLD"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DYM_MIN_TERM_LEN integer OPTIONS (NAMEINSOURCE '"DYM_MIN_TERM_LEN"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DYM_MAX_ALLOWED_ERRORS integer OPTIONS (NAMEINSOURCE '"DYM_MAX_ALLOWED_ERRORS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEARCH_CACHE_MAX_SIZE integer OPTIONS (NAMEINSOURCE '"SEARCH_CACHE_MAX_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WILDCARD string(256) OPTIONS (NAMEINSOURCE '"WILDCARD"', NATIVE_TYPE 'NVARCHAR'),
    SINGLE_WILDCARD string(256) OPTIONS (NAMEINSOURCE '"SINGLE_WILDCARD"', NATIVE_TYPE 'NVARCHAR'),
    NUMBER_SEPARATOR string(256) OPTIONS (NAMEINSOURCE '"NUMBER_SEPARATOR"', NATIVE_TYPE 'NVARCHAR'),
    TOKEN_SEPARATOR string(256) OPTIONS (NAMEINSOURCE '"TOKEN_SEPARATOR"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_INDEX_CONFIGS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_JOIN_CONDITIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_NAME string(256) OPTIONS (NAMEINSOURCE '"JOIN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ATTR_1_REF long OPTIONS (NAMEINSOURCE '"ATTR_1_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ATTR_2_REF long OPTIONS (NAMEINSOURCE '"ATTR_2_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_ORDER long OPTIONS (NAMEINSOURCE '"JOIN_ORDER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_TYPE_CARDINALITY integer OPTIONS (NAMEINSOURCE '"JOIN_TYPE_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALIAS_NUMBER_1 integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER_1"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALIAS_NUMBER_2 integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER_2"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_JOIN_CONDITIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_JOIN_CONSTRAINTS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    ATTR_REF long OPTIONS (NAMEINSOURCE '"ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OPERATOR string(256) OPTIONS (NAMEINSOURCE '"OPERATOR"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_JOIN_CONSTRAINTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_JOIN_INDEXES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_OID long OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_TYPE integer OPTIONS (NAMEINSOURCE '"VIEW_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    READ_ONLY byte OPTIONS (NAMEINSOURCE '"READ_ONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_BOVIEW_REF long OPTIONS (NAMEINSOURCE '"DEFAULT_BOVIEW_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_JOIN_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_JOIN_PATHS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_JOIN_PATHS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_JOIN_PHYSICAL_INDEXES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_INDEX_TYPE integer OPTIONS (NAMEINSOURCE '"JOIN_INDEX_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXPECTED_SIZE integer OPTIONS (NAMEINSOURCE '"EXPECTED_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PHYSICAL_TABLE_REF long OPTIONS (NAMEINSOURCE '"PHYSICAL_TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_JOIN_PHYSICAL_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_KEY_FIGURES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    FIELD_REF long OPTIONS (NAMEINSOURCE '"FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEFAULT_AGGREGATION_TYPE integer OPTIONS (NAMEINSOURCE '"DEFAULT_AGGREGATION_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNIT_CONVERSION_REF long OPTIONS (NAMEINSOURCE '"UNIT_CONVERSION_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXPRESSION_REF long OPTIONS (NAMEINSOURCE '"EXPRESSION_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESTRICTION_REF long OPTIONS (NAMEINSOURCE '"RESTRICTION_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VISIBLE byte OPTIONS (NAMEINSOURCE '"VISIBLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    ALIAS_NUMBER integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_KEY_FIGURES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_LANG_INDEXES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_OID long OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    READ_ONLY byte OPTIONS (NAMEINSOURCE '"READ_ONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    VIEW_TYPE integer OPTIONS (NAMEINSOURCE '"VIEW_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    ONE_PHYSICAL_INDEX byte OPTIONS (NAMEINSOURCE '"ONE_PHYSICAL_INDEX"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_LANG_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_PROPERTY_INDEXES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_OID long OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    READ_ONLY byte OPTIONS (NAMEINSOURCE '"READ_ONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    VIEW_TYPE integer OPTIONS (NAMEINSOURCE '"VIEW_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_PROPERTY_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_RANGE_ATTRIBUTES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    LOW_FIELD_REF long OPTIONS (NAMEINSOURCE '"LOW_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HIGH_FIELD_REF long OPTIONS (NAMEINSOURCE '"HIGH_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OP_FIELD_REF long OPTIONS (NAMEINSOURCE '"OP_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_RANGE_ATTRIBUTES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_RESTRICTIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESTRICTION string(5000) OPTIONS (NAMEINSOURCE '"RESTRICTION"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_RESTRICTIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_TABLES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CSTABLE_VERSION_ID long OPTIONS (NAMEINSOURCE '"CSTABLE_VERSION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    LOGGING byte OPTIONS (NAMEINSOURCE '"LOGGING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TABLE_TYPE integer OPTIONS (NAMEINSOURCE '"TABLE_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FIXED_PART_SIZE short OPTIONS (NAMEINSOURCE '"FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    MAX_COL_ID integer OPTIONS (NAMEINSOURCE '"MAX_COL_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COUNT_NON_INTERNAL_ATTRIBUTES short OPTIONS (NAMEINSOURCE '"COUNT_NON_INTERNAL_ATTRIBUTES"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    PARTITION_SPEC clob(24) OPTIONS (NAMEINSOURCE '"PARTITION_SPEC"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HIGHEST_PART_NUMBER integer OPTIONS (NAMEINSOURCE '"HIGHEST_PART_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SESSION_TYPE integer OPTIONS (NAMEINSOURCE '"SESSION_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_LOCKKEY_ID integer OPTIONS (NAMEINSOURCE '"TABLE_LOCKKEY_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNLOAD_PRIORITY byte OPTIONS (NAMEINSOURCE '"UNLOAD_PRIORITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_TABLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_UNIT_CONVERSIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEST_UNIT string(256) OPTIONS (NAMEINSOURCE '"DEST_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_REF long OPTIONS (NAMEINSOURCE '"TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SOURCE_FIELD_REF long OPTIONS (NAMEINSOURCE '"SOURCE_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FACTOR_FIELD_REF long OPTIONS (NAMEINSOURCE '"FACTOR_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_PATH_REF long OPTIONS (NAMEINSOURCE '"JOIN_PATH_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_UNIT_CONVERSIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_CS_VIEW_ATTRIBUTES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_OID long OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMNID long OPTIONS (NAMEINSOURCE '"COLUMNID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLLATION string(256) OPTIONS (NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    FIELDTYPE byte OPTIONS (NAMEINSOURCE '"FIELDTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SQL_TYPE_ID byte OPTIONS (NAMEINSOURCE '"SQL_TYPE_ID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TREX_TYPE_ID integer OPTIONS (NAMEINSOURCE '"TREX_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ABAP_TYPE_ID integer OPTIONS (NAMEINSOURCE '"ABAP_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MDRS_TYPE_ID integer OPTIONS (NAMEINSOURCE '"MDRS_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DERIVED byte OPTIONS (NAMEINSOURCE '"DERIVED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    XML_SCHEMA byte OPTIONS (NAMEINSOURCE '"XML_SCHEMA"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    "CONSTRAINT" byte OPTIONS (NAMEINSOURCE '"CONSTRAINT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    "OFFSET" short OPTIONS (NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    POSITION short OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    GROUP_NAME string(5000) OPTIONS (NAMEINSOURCE '"GROUP_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_WEIGHT float OPTIONS (NAMEINSOURCE '"DEFAULT_WEIGHT"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    IMPLEMENTATION_FLAGS integer OPTIONS (NAMEINSOURCE '"IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IMPLEMENTATION_PARAMETERS string(5000) OPTIONS (NAMEINSOURCE '"IMPLEMENTATION_PARAMETERS"', NATIVE_TYPE 'NVARCHAR'),
    MIN_VALUE string(5000) OPTIONS (NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(5000) OPTIONS (NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    USAGE_TYPE_FLAGS integer OPTIONS (NAMEINSOURCE '"USAGE_TYPE_FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    FIELD_REF long OPTIONS (NAMEINSOURCE '"FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_PATH_REF long OPTIONS (NAMEINSOURCE '"JOIN_PATH_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BO_VIEW_REF long OPTIONS (NAMEINSOURCE '"BO_VIEW_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VISIBLE byte OPTIONS (NAMEINSOURCE '"VISIBLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SORT_FIELD_REF long OPTIONS (NAMEINSOURCE '"SORT_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXPRESSION_REF long OPTIONS (NAMEINSOURCE '"EXPRESSION_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALIAS_NUMBER integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FUZZINESS_THRESHOLD float OPTIONS (NAMEINSOURCE '"FUZZINESS_THRESHOLD"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_CS_VIEW_ATTRIBUTES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_EPM_MODELS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    MODEL_NAME string(256) OPTIONS (NAMEINSOURCE '"MODEL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(256) OPTIONS (NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    CDATA clob(24) OPTIONS (NAMEINSOURCE '"CDATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    LAST_CHANGED_TIME timestamp OPTIONS (NAMEINSOURCE '"LAST_CHANGED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_EPM_MODELS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_EPM_QUERY_SOURCES_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    QUERY_SOURCE_NAME string(256) OPTIONS (NAMEINSOURCE '"QUERY_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(256) OPTIONS (NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    CDATA clob(24) OPTIONS (NAMEINSOURCE '"CDATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    LAST_CHANGED_TIME timestamp OPTIONS (NAMEINSOURCE '"LAST_CHANGED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_EPM_QUERY_SOURCES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_ASSIGNEDROLES_" (
    GRANTEEID long OPTIONS (NAMEINSOURCE '"GRANTEEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLEID long OPTIONS (NAMEINSOURCE '"ROLEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GRANTERID long OPTIONS (NAMEINSOURCE '"GRANTERID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ADMIN_OPTION byte OPTIONS (NAMEINSOURCE '"ADMIN_OPTION"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_ASSIGNEDROLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_AUDITEDACTIONS_" (
    POLICYID_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"POLICYID_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIONID integer OPTIONS (NAMEINSOURCE '"ACTIONID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_AUDITEDACTIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_AUDITEDOBJECTS_" (
    POLICYID_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"POLICYID_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECTID_TYPEID short OPTIONS (NAMEINSOURCE '"OBJECTID_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    OBJECTID_SUBTYPEID short OPTIONS (NAMEINSOURCE '"OBJECTID_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    OBJECTID_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"OBJECTID_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_AUDITEDOBJECTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_AUDITEDUSERS_" (
    POLICYID_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"POLICYID_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USERID long OPTIONS (NAMEINSOURCE '"USERID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCEPT_USER byte OPTIONS (NAMEINSOURCE '"EXCEPT_USER"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_AUDITEDUSERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_AUDITPOLICIES_" (
    POLICYID_RESERVED integer OPTIONS (NAMEINSOURCE '"POLICYID_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POLICYID_TYPEID short OPTIONS (NAMEINSOURCE '"POLICYID_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    POLICYID_SUBTYPEID short OPTIONS (NAMEINSOURCE '"POLICYID_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    POLICYID_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"POLICYID_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POLICY_TYPEID short OPTIONS (NAMEINSOURCE '"POLICY_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ACTION_STATUS short OPTIONS (NAMEINSOURCE '"ACTION_STATUS"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LEVEL short OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ACTIVE byte OPTIONS (NAMEINSOURCE '"ACTIVE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_AUDITPOLICIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_AUTHDEPENDENCIES_" (
    DEP_RESERVED integer OPTIONS (NAMEINSOURCE '"DEP_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEP_TYPEID short OPTIONS (NAMEINSOURCE '"DEP_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEP_SUBTYPEID short OPTIONS (NAMEINSOURCE '"DEP_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEP_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"DEP_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UND_RESERVED integer OPTIONS (NAMEINSOURCE '"UND_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UND_TYPEID short OPTIONS (NAMEINSOURCE '"UND_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    UND_SUBTYPEID short OPTIONS (NAMEINSOURCE '"UND_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    UND_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"UND_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEP_USER long OPTIONS (NAMEINSOURCE '"DEP_USER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEP_TYPE short OPTIONS (NAMEINSOURCE '"DEP_TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    PRIVILEGEID long OPTIONS (NAMEINSOURCE '"PRIVILEGEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VALIDITY byte OPTIONS (NAMEINSOURCE '"VALIDITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_AUTHDEPENDENCIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_CREDENTIALS_" (
    USER_ID long OPTIONS (NAMEINSOURCE '"USER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(256) OPTIONS (NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'NVARCHAR'),
    PURPOSE string(256) OPTIONS (NAMEINSOURCE '"PURPOSE"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(64) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_CREDENTIALS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_DPAPI_KEY_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CALLER string(20) OPTIONS (NAMEINSOURCE '"CALLER"', NATIVE_TYPE 'NVARCHAR'),
    RECORD_ID string(512) OPTIONS (NAMEINSOURCE '"RECORD_ID"', NATIVE_TYPE 'NVARCHAR'),
    KEY_ID integer OPTIONS (NAMEINSOURCE '"KEY_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY varbinary(128) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARBINARY'),
    CREATE_USER string(256) OPTIONS (NAMEINSOURCE '"CREATE_USER"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_ENCRYPTION_ALGORITHM byte OPTIONS (NAMEINSOURCE '"DATA_ENCRYPTION_ALGORITHM"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_CURRENT_KEY byte OPTIONS (NAMEINSOURCE '"IS_CURRENT_KEY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_DPAPI_KEY_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_EXTENDED_INDEXES_" (
    INDEX_OID long OPTIONS (NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REFERENCED_CONSTRAINT_OID long OPTIONS (NAMEINSOURCE '"REFERENCED_CONSTRAINT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_RULE byte OPTIONS (NAMEINSOURCE '"UPDATE_RULE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DELETE_RULE byte OPTIONS (NAMEINSOURCE '"DELETE_RULE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FLUSH_AFTER_DOCUMENTS integer OPTIONS (NAMEINSOURCE '"FLUSH_AFTER_DOCUMENTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLUSH_EVERY_MINUTES integer OPTIONS (NAMEINSOURCE '"FLUSH_EVERY_MINUTES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_EXTENDED_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_EXTERNALOBJS_" (
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJNAME string(256) OPTIONS (NAMEINSOURCE '"OBJNAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_EXTERNALOBJS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_EXTERNALOWNERSHIPS_" (
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USERID long OPTIONS (NAMEINSOURCE '"USERID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_EXTERNALOWNERSHIPS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_FILTEROPERANDS_" (
    FILTEROPERAND_OID long OPTIONS (NAMEINSOURCE '"FILTEROPERAND_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILTER_OID long OPTIONS (NAMEINSOURCE '"FILTER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OPERAND_ORDER integer OPTIONS (NAMEINSOURCE '"OPERAND_ORDER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OPERAND_STRING string(256) OPTIONS (NAMEINSOURCE '"OPERAND_STRING"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_FILTEROPERANDS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_FILTERS_" (
    FILTER_OID long OPTIONS (NAMEINSOURCE '"FILTER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILTERTYPE byte OPTIONS (NAMEINSOURCE '"FILTERTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    RESTRICTION_RESERVED integer OPTIONS (NAMEINSOURCE '"RESTRICTION_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RESTRICTION_TYPEID short OPTIONS (NAMEINSOURCE '"RESTRICTION_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    RESTRICTION_SUBTYPEID short OPTIONS (NAMEINSOURCE '"RESTRICTION_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    RESTRICTION_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"RESTRICTION_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VALUEFILTEROP integer OPTIONS (NAMEINSOURCE '"VALUEFILTEROP"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NEGATED byte OPTIONS (NAMEINSOURCE '"NEGATED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_FILTERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_FULL_TEXT_INDEXES_" (
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_OID long OPTIONS (NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LANGUAGE_COLUMN string(256) OPTIONS (NAMEINSOURCE '"LANGUAGE_COLUMN"', NATIVE_TYPE 'NVARCHAR'),
    MIME_TYPE_COLUMN string(256) OPTIONS (NAMEINSOURCE '"MIME_TYPE_COLUMN"', NATIVE_TYPE 'NVARCHAR'),
    LANGUAGE_DETECTION string(256) OPTIONS (NAMEINSOURCE '"LANGUAGE_DETECTION"', NATIVE_TYPE 'NVARCHAR'),
    INTERNAL_COLUMN_NAME string(512) OPTIONS (NAMEINSOURCE '"INTERNAL_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONFIGURATION string(256) OPTIONS (NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'NVARCHAR'),
    PHRASE_INDEX_RATIO float OPTIONS (NAMEINSOURCE '"PHRASE_INDEX_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    FLUSH_EVERY_MINUTES integer OPTIONS (NAMEINSOURCE '"FLUSH_EVERY_MINUTES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLUSH_AFTER_DOCUMENTS integer OPTIONS (NAMEINSOURCE '"FLUSH_AFTER_DOCUMENTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MIME_TYPE string(256) OPTIONS (NAMEINSOURCE '"MIME_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    TOKEN_SEPARATORS string(256) OPTIONS (NAMEINSOURCE '"TOKEN_SEPARATORS"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_FULL_TEXT_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_GRANTEDPRIVS_" (
    PRINCIPALID long OPTIONS (NAMEINSOURCE '"PRINCIPALID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GRANTER long OPTIONS (NAMEINSOURCE '"GRANTER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRIVILEGEID long OPTIONS (NAMEINSOURCE '"PRIVILEGEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GRANTABLE byte OPTIONS (NAMEINSOURCE '"GRANTABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    VALIDITY byte OPTIONS (NAMEINSOURCE '"VALIDITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_GRANTEDPRIVS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_INDEXES_" (
    CID long OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA string(256) OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE short OPTIONS (NAMEINSOURCE '"TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    "CONSTRAINT" short OPTIONS (NAMEINSOURCE '"CONSTRAINT"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    KEYLENGTH short OPTIONS (NAMEINSOURCE '"KEYLENGTH"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    BTREEFILLFACTOR short OPTIONS (NAMEINSOURCE '"BTREEFILLFACTOR"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    BTREESPLITTYPE byte OPTIONS (NAMEINSOURCE '"BTREESPLITTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    BTREESPLITPOS byte OPTIONS (NAMEINSOURCE '"BTREESPLITPOS"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CSTABLE byte OPTIONS (NAMEINSOURCE '"CSTABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    INDEX_ARRAY_POS integer OPTIONS (NAMEINSOURCE '"INDEX_ARRAY_POS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_INVALID_CONNECTS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INVALID_CONNECT_ATTEMPTS long OPTIONS (NAMEINSOURCE '"INVALID_CONNECT_ATTEMPTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUCCESSFUL_CONNECT_TIME timestamp OPTIONS (NAMEINSOURCE '"SUCCESSFUL_CONNECT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_INVALID_CONNECTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_LAST_PASSWORDS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PASSWORD string(256) OPTIONS (NAMEINSOURCE '"PASSWORD"', NATIVE_TYPE 'NVARCHAR'),
    PASSWORD_CHANGE_TIME timestamp OPTIONS (NAMEINSOURCE '"PASSWORD_CHANGE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_LAST_PASSWORDS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_OBJECTS_" (
    SCHEMA string(256) OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE byte OPTIONS (NAMEINSOURCE '"TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_OBJECTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_OBJTYPES_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    INTERNALTYPE byte OPTIONS (NAMEINSOURCE '"INTERNALTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_OBJTYPES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_PRINCIPALS_" (
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE byte OPTIONS (NAMEINSOURCE '"TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATOR string(256) OPTIONS (NAMEINSOURCE '"CREATOR"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_PRINCIPALS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_PRIVAVAILABILITY_" (
    PRIVILEGEID long OPTIONS (NAMEINSOURCE '"PRIVILEGEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VALIDITY byte OPTIONS (NAMEINSOURCE '"VALIDITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_PRIVAVAILABILITY_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_PRIVILEGES_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE byte OPTIONS (NAMEINSOURCE '"TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_PRIVILEGES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_PROCEDURES_" (
    SCHEMA string(256) OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROGRAMSTRING clob(24) OPTIONS (NAMEINSOURCE '"PROGRAMSTRING"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    NUM_INPUT_PARAMS integer OPTIONS (NAMEINSOURCE '"NUM_INPUT_PARAMS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUM_OUTPUT_PARAMS integer OPTIONS (NAMEINSOURCE '"NUM_OUTPUT_PARAMS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUM_INOUT_PARAMS integer OPTIONS (NAMEINSOURCE '"NUM_INOUT_PARAMS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUM_RETURN_VALUES integer OPTIONS (NAMEINSOURCE '"NUM_RETURN_VALUES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "LANGUAGE" byte OPTIONS (NAMEINSOURCE '"LANGUAGE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    PROCEDURE_TYPE byte OPTIONS (NAMEINSOURCE '"PROCEDURE_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_TEMPLATE byte OPTIONS (NAMEINSOURCE '"IS_TEMPLATE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_DETERMINISTIC byte OPTIONS (NAMEINSOURCE '"IS_DETERMINISTIC"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SQL_SECURITY byte OPTIONS (NAMEINSOURCE '"SQL_SECURITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    LAST_UPDATED long OPTIONS (NAMEINSOURCE '"LAST_UPDATED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ABAP_SID integer OPTIONS (NAMEINSOURCE '"ABAP_SID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    AFL_CREATE_DATE date OPTIONS (NAMEINSOURCE '"AFL_CREATE_DATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    AFL_CREATE_TIME time OPTIONS (NAMEINSOURCE '"AFL_CREATE_TIME"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'TIME'),
    AFL_PACKAGE string(256) OPTIONS (NAMEINSOURCE '"AFL_PACKAGE"', NATIVE_TYPE 'NVARCHAR'),
    IS_ROUTABLE byte OPTIONS (NAMEINSOURCE '"IS_ROUTABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_PROCEDURES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_PROCEDURES_EXT_" (
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEFAULT_SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"DEFAULT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_PROCEDURES_EXT_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_PROCPARAMS_" (
    PID long OPTIONS (NAMEINSOURCE '"PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMNAME string(256) OPTIONS (NAMEINSOURCE '"PARAMNAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPEID integer OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MODE byte OPTIONS (NAMEINSOURCE '"MODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DEF byte OPTIONS (NAMEINSOURCE '"DEF"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    POSITION integer OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_TYPE_SCHEMA string(256) OPTIONS (NAMEINSOURCE '"TABLE_TYPE_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_TYPE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    IS_TEMPLATE_PARAM byte OPTIONS (NAMEINSOURCE '"IS_TEMPLATE_PARAM"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    LVC_DIMENSION integer OPTIONS (NAMEINSOURCE '"LVC_DIMENSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LVC_OFFSET integer OPTIONS (NAMEINSOURCE '"LVC_OFFSET"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LVC_ASCII_OFFSET integer OPTIONS (NAMEINSOURCE '"LVC_ASCII_OFFSET"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LVC_UNICODE_OFFSET integer OPTIONS (NAMEINSOURCE '"LVC_UNICODE_OFFSET"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LVC_CODE string(16) OPTIONS (NAMEINSOURCE '"LVC_CODE"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_PROCPARAMS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_QUERIES_" (
    SCHEMA string(256) OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUERYSTRING clob(24) OPTIONS (NAMEINSOURCE '"QUERYSTRING"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    USESTREAM byte OPTIONS (NAMEINSOURCE '"USESTREAM"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SYSTEMQUERY byte OPTIONS (NAMEINSOURCE '"SYSTEMQUERY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_QUERIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_RESTRICTIONS_" (
    RESTRICTION_RESERVED integer OPTIONS (NAMEINSOURCE '"RESTRICTION_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RESTRICTION_TYPEID short OPTIONS (NAMEINSOURCE '"RESTRICTION_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    RESTRICTION_SUBTYPEID short OPTIONS (NAMEINSOURCE '"RESTRICTION_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    RESTRICTION_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"RESTRICTION_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ANALYTICAL_RESERVED integer OPTIONS (NAMEINSOURCE '"ANALYTICAL_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ANALYTICAL_TYPEID short OPTIONS (NAMEINSOURCE '"ANALYTICAL_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ANALYTICAL_SUBTYPEID short OPTIONS (NAMEINSOURCE '"ANALYTICAL_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ANALYTICAL_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"ANALYTICAL_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILTERVALUE_DATATYPE short OPTIONS (NAMEINSOURCE '"FILTERVALUE_DATATYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    RESTRICTED_OBJ_NAME string(256) OPTIONS (NAMEINSOURCE '"RESTRICTED_OBJ_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_RESTRICTIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_ROLES_" (
    ROLE_ID long OPTIONS (NAMEINSOURCE '"ROLE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTEXT string(2048) OPTIONS (NAMEINSOURCE '"CONTEXT"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE long OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_ROLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_SAML_PROVIDERS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_NAME string(512) OPTIONS (NAMEINSOURCE '"SUBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ISSUER_NAME string(512) OPTIONS (NAMEINSOURCE '"ISSUER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_CREATION_ENABLED byte OPTIONS (NAMEINSOURCE '"USER_CREATION_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_SAML_PROVIDERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_SCHEMAS_" (
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OWNER string(256) OPTIONS (NAMEINSOURCE '"OWNER"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_SCHEMAS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_SEQUENCES_" (
    SCHEMA string(256) OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STARTWITH long OPTIONS (NAMEINSOURCE '"STARTWITH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MINVALUE long OPTIONS (NAMEINSOURCE '"MINVALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAXVALUE long OPTIONS (NAMEINSOURCE '"MAXVALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCREMENT long OPTIONS (NAMEINSOURCE '"INCREMENT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "CYCLE" byte OPTIONS (NAMEINSOURCE '"CYCLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    RESETBY clob(24) OPTIONS (NAMEINSOURCE '"RESETBY"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHE_SIZE short OPTIONS (NAMEINSOURCE '"CACHE_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_SEQUENCES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_SESSION_COOKIES_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COOKIE string(64) OPTIONS (NAMEINSOURCE '"COOKIE"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT_HOST string(64) OPTIONS (NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT_PID long OPTIONS (NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_CONNECT_TIME timestamp OPTIONS (NAMEINSOURCE '"LAST_CONNECT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SESSION_END_TIME timestamp OPTIONS (NAMEINSOURCE '"SESSION_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_SESSION_COOKIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_SUBOBJTYPES_" (
    SUBTYPEID long OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    INTERNALTYPE byte OPTIONS (NAMEINSOURCE '"INTERNALTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_SUBOBJTYPES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_SYNONYMS_" (
    SCHEMA string(256) OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BASEOID long OPTIONS (NAMEINSOURCE '"BASEOID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BASETYPE byte OPTIONS (NAMEINSOURCE '"BASETYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_SYNONYMS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_TRIGGERS_" (
    SCHEMA string(256) OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBJECT_TABLE_SCHEMA string(256) OPTIONS (NAMEINSOURCE '"SUBJECT_TABLE_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"SUBJECT_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRIGGER_ACTION_TIME byte OPTIONS (NAMEINSOURCE '"TRIGGER_ACTION_TIME"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TRIGGER_EVENT byte OPTIONS (NAMEINSOURCE '"TRIGGER_EVENT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TRIGGERED_ACTION_LEVEL byte OPTIONS (NAMEINSOURCE '"TRIGGERED_ACTION_LEVEL"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    OLD_TRANSITION_VARIABLE string(256) OPTIONS (NAMEINSOURCE '"OLD_TRANSITION_VARIABLE"', NATIVE_TYPE 'NVARCHAR'),
    NEW_TRANSITION_VARIABLE string(256) OPTIONS (NAMEINSOURCE '"NEW_TRANSITION_VARIABLE"', NATIVE_TYPE 'NVARCHAR'),
    OLD_TRANSITION_TABLE string(256) OPTIONS (NAMEINSOURCE '"OLD_TRANSITION_TABLE"', NATIVE_TYPE 'NVARCHAR'),
    NEW_TRANSITION_TABLE string(256) OPTIONS (NAMEINSOURCE '"NEW_TRANSITION_TABLE"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_TABLE_OID long OPTIONS (NAMEINSOURCE '"SUBJECT_TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTION_STRING clob(24) OPTIONS (NAMEINSOURCE '"ACTION_STRING"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    PARAMS byte OPTIONS (NAMEINSOURCE '"PARAMS"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_TRIGGERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_USER_KERBEROS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "IDENTITY" string(256) OPTIONS (NAMEINSOURCE '"IDENTITY"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_USER_KERBEROS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_USER_PASSWORD_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PASSWORD string(256) OPTIONS (NAMEINSOURCE '"PASSWORD"', NATIVE_TYPE 'NVARCHAR'),
    PASSWORD_CHANGE_TIME timestamp OPTIONS (NAMEINSOURCE '"PASSWORD_CHANGE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PASSWORD_CHANGE_NEEDED byte OPTIONS (NAMEINSOURCE '"PASSWORD_CHANGE_NEEDED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    ADMIN_GIVEN_PASSWORD byte OPTIONS (NAMEINSOURCE '"ADMIN_GIVEN_PASSWORD"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_USER_PASSWORD_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_USER_SAML_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAML_PROVIDER_OID long OPTIONS (NAMEINSOURCE '"SAML_PROVIDER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAPPED_USER_NAME string(256) OPTIONS (NAMEINSOURCE '"MAPPED_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_USER_SAML_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_USER_X509_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBJECT_NAME string(512) OPTIONS (NAMEINSOURCE '"SUBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ISSUER_NAME string(512) OPTIONS (NAMEINSOURCE '"ISSUER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRUST_STORE_NAME string(256) OPTIONS (NAMEINSOURCE '"TRUST_STORE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_USER_X509_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_P_USERS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    LAST_SUCCESSFUL_CONNECT timestamp OPTIONS (NAMEINSOURCE '"LAST_SUCCESSFUL_CONNECT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_INVALID_CONNECT_ATTEMPT timestamp OPTIONS (NAMEINSOURCE '"LAST_INVALID_CONNECT_ATTEMPT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INVALID_CONNECT_ATTEMPTS integer OPTIONS (NAMEINSOURCE '"INVALID_CONNECT_ATTEMPTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_DEACTIVATED byte OPTIONS (NAMEINSOURCE '"USER_DEACTIVATED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DEACTIVATION_TIME timestamp OPTIONS (NAMEINSOURCE '"DEACTIVATION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IS_PASSWORD_ENABLED byte OPTIONS (NAMEINSOURCE '"IS_PASSWORD_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_KERBEROS_ENABLED byte OPTIONS (NAMEINSOURCE '"IS_KERBEROS_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_SAML_ENABLED byte OPTIONS (NAMEINSOURCE '"IS_SAML_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_X509_ENABLED byte OPTIONS (NAMEINSOURCE '"IS_X509_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_CREATED_BY_SAML_PROVIDER byte OPTIONS (NAMEINSOURCE '"IS_CREATED_BY_SAML_PROVIDER"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_TICKET_ENABLED byte OPTIONS (NAMEINSOURCE '"IS_TICKET_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_RESTRICTED byte OPTIONS (NAMEINSOURCE '"IS_RESTRICTED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_P_USERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_REMOTE_COLUMNS_" (
    COLUMN_OID long OPTIONS (NAMEINSOURCE '"COLUMN_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_OBJECT_OID long OPTIONS (NAMEINSOURCE '"REMOTE_OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_COLUMN_NAME string(256) OPTIONS (NAMEINSOURCE '"REMOTE_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_DATA_TYPE_NAME string(32) OPTIONS (NAMEINSOURCE '"REMOTE_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    REMOTE_LENGTH integer OPTIONS (NAMEINSOURCE '"REMOTE_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOTE_SCALE integer OPTIONS (NAMEINSOURCE '"REMOTE_SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_REMOTE_COLUMNS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_REMOTE_OBJECTS_" (
    REMOTE_OBJECT_OID long OPTIONS (NAMEINSOURCE '"REMOTE_OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_SOURCE_OID long OPTIONS (NAMEINSOURCE '"REMOTE_SOURCE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_DB_NAME string(256) OPTIONS (NAMEINSOURCE '"REMOTE_DB_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_OWNER_NAME string(256) OPTIONS (NAMEINSOURCE '"REMOTE_OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"REMOTE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_OBJECT_TYPE integer OPTIONS (NAMEINSOURCE '"REMOTE_OBJECT_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_REMOTE_OBJECTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_REMOTE_SOURCES_" (
    REMOTE_SOURCE_OID long OPTIONS (NAMEINSOURCE '"REMOTE_SOURCE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_SOURCE_NAME string(256) OPTIONS (NAMEINSOURCE '"REMOTE_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ADAPTER_NAME string(256) OPTIONS (NAMEINSOURCE '"ADAPTER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONNECTION_INFO string(256) OPTIONS (NAMEINSOURCE '"CONNECTION_INFO"', NATIVE_TYPE 'NVARCHAR'),
    INI_FILE string(256) OPTIONS (NAMEINSOURCE '"INI_FILE"', NATIVE_TYPE 'NVARCHAR'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_REMOTE_SOURCES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_RS_COLUMNS_" (
    CID long OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMNID long OPTIONS (NAMEINSOURCE '"COLUMNID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    FIELDTYPE byte OPTIONS (NAMEINSOURCE '"FIELDTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TYPEID byte OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CS_TYPE integer OPTIONS (NAMEINSOURCE '"CS_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ABAP_TYPE integer OPTIONS (NAMEINSOURCE '"ABAP_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MDRS_TYPE integer OPTIONS (NAMEINSOURCE '"MDRS_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLLATION string(256) OPTIONS (NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    "OFFSET" short OPTIONS (NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEFAULTVALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULTVALUE"', NATIVE_TYPE 'NVARCHAR'),
    "CONSTRAINT" byte OPTIONS (NAMEINSOURCE '"CONSTRAINT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DERIVED byte OPTIONS (NAMEINSOURCE '"DERIVED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IMPLEMENTATION_FLAGS integer OPTIONS (NAMEINSOURCE '"IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLAGS byte OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MINIMUM_CARDINALITY integer OPTIONS (NAMEINSOURCE '"MINIMUM_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAXIMUM_CARDINALITY integer OPTIONS (NAMEINSOURCE '"MAXIMUM_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_RS_COLUMNS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_RS_TABLES_" (
    SCHEMA string(256) OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CID integer OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VID short OPTIONS (NAMEINSOURCE '"VID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    FIXEDPARTSIZE short OPTIONS (NAMEINSOURCE '"FIXEDPARTSIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LOGGING byte OPTIONS (NAMEINSOURCE '"LOGGING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TABLETYPE integer OPTIONS (NAMEINSOURCE '"TABLETYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TABLE_LOCKKEY_ID integer OPTIONS (NAMEINSOURCE '"TABLE_LOCKKEY_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNLOAD_PRIORITY byte OPTIONS (NAMEINSOURCE '"UNLOAD_PRIORITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_RS_TABLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_RS_VIEWS_" (
    SCHEMA string(256) OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FIXEDPARTSIZE short OPTIONS (NAMEINSOURCE '"FIXEDPARTSIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    READONLY byte OPTIONS (NAMEINSOURCE '"READONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WITHCHECK byte OPTIONS (NAMEINSOURCE '"WITHCHECK"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WITHCOLUMN byte OPTIONS (NAMEINSOURCE '"WITHCOLUMN"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    QUERYSTRING clob(24) OPTIONS (NAMEINSOURCE '"QUERYSTRING"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    VIEWTYPE integer OPTIONS (NAMEINSOURCE '"VIEWTYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_RS_VIEWS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_ST_SPATIAL_REFERENCE_SYSTEMS_" (
    SRS_OID long OPTIONS (NAMEINSOURCE '"SRS_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SRS_NAME string(256) OPTIONS (NAMEINSOURCE '"SRS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRS_ID integer OPTIONS (NAMEINSOURCE '"SRS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ROUND_EARTH byte OPTIONS (NAMEINSOURCE '"ROUND_EARTH"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    AXIS_ORDER byte OPTIONS (NAMEINSOURCE '"AXIS_ORDER"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    POLYGON_FORMAT byte OPTIONS (NAMEINSOURCE '"POLYGON_FORMAT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    STORAGE_FORMAT byte OPTIONS (NAMEINSOURCE '"STORAGE_FORMAT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SNAP_TO_GRID double OPTIONS (NAMEINSOURCE '"SNAP_TO_GRID"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOLERANCE double OPTIONS (NAMEINSOURCE '"TOLERANCE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    SEMI_MAJOR_AXIS double OPTIONS (NAMEINSOURCE '"SEMI_MAJOR_AXIS"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    SEMI_MINOR_AXIS double OPTIONS (NAMEINSOURCE '"SEMI_MINOR_AXIS"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    INV_FLATTENING double OPTIONS (NAMEINSOURCE '"INV_FLATTENING"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_X double OPTIONS (NAMEINSOURCE '"MIN_X"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_X double OPTIONS (NAMEINSOURCE '"MAX_X"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_Y double OPTIONS (NAMEINSOURCE '"MIN_Y"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_Y double OPTIONS (NAMEINSOURCE '"MAX_Y"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_Z double OPTIONS (NAMEINSOURCE '"MIN_Z"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_Z double OPTIONS (NAMEINSOURCE '"MAX_Z"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_M double OPTIONS (NAMEINSOURCE '"MIN_M"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_M double OPTIONS (NAMEINSOURCE '"MAX_M"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    ORGANIZATION string(256) OPTIONS (NAMEINSOURCE '"ORGANIZATION"', NATIVE_TYPE 'NVARCHAR'),
    LINEAR_UNIT_OF_MEASURE long OPTIONS (NAMEINSOURCE '"LINEAR_UNIT_OF_MEASURE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ANGULAR_UNIT_OF_MEASURE long OPTIONS (NAMEINSOURCE '"ANGULAR_UNIT_OF_MEASURE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEFINITION string(256) OPTIONS (NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NVARCHAR'),
    TRANSFORM_DEFINITION string(256) OPTIONS (NAMEINSOURCE '"TRANSFORM_DEFINITION"', NATIVE_TYPE 'NVARCHAR'),
    ORGANIZATION_COORDSYS_ID integer OPTIONS (NAMEINSOURCE '"ORGANIZATION_COORDSYS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SRS_TYPE byte OPTIONS (NAMEINSOURCE '"SRS_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE long OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_ST_SPATIAL_REFERENCE_SYSTEMS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_ST_UNITS_OF_MEASURE_" (
    UNIT_OID long OPTIONS (NAMEINSOURCE '"UNIT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNIT_NAME string(256) OPTIONS (NAMEINSOURCE '"UNIT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONVERSION_FACTOR double OPTIONS (NAMEINSOURCE '"CONVERSION_FACTOR"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    UNIT_TYPE byte OPTIONS (NAMEINSOURCE '"UNIT_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE long OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_ST_UNITS_OF_MEASURE_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_VIRTUAL_COLUMNS_" (
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_OID long OPTIONS (NAMEINSOURCE '"COLUMN_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TYPE_ID byte OPTIONS (NAMEINSOURCE '"TYPE_ID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CS_TYPE integer OPTIONS (NAMEINSOURCE '"CS_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ABAP_TYPE integer OPTIONS (NAMEINSOURCE '"ABAP_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLLATION string(256) OPTIONS (NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    "OFFSET" short OPTIONS (NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEFAULT_VALUE string(256) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    "CONSTRAINT" byte OPTIONS (NAMEINSOURCE '"CONSTRAINT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DERIVED byte OPTIONS (NAMEINSOURCE '"DERIVED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_VIRTUAL_COLUMNS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CACHE_VIRTUAL_TABLES_" (
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    LOGGING byte OPTIONS (NAMEINSOURCE '"LOGGING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TABLE_TYPE integer OPTIONS (NAMEINSOURCE '"TABLE_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FIXED_PART_SIZE short OPTIONS (NAMEINSOURCE '"FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    COMMIT_ID long OPTIONS (NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_VER_COMMIT_ID long OPTIONS (NAMEINSOURCE '"NEXT_VER_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    META_TS long OPTIONS (NAMEINSOURCE '"META_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOWER_BOUNDARY long OPTIONS (NAMEINSOURCE '"LOWER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POSSIBLE_UPPER_BOUNDARY long OPTIONS (NAMEINSOURCE '"POSSIBLE_UPPER_BOUNDARY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_SAFE byte OPTIONS (NAMEINSOURCE '"IS_SAFE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CREATE_TS long OPTIONS (NAMEINSOURCE '"CREATE_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MODIFY_TS long OPTIONS (NAMEINSOURCE '"MODIFY_TS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACCESS_TIME long OPTIONS (NAMEINSOURCE '"ACCESS_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CACHE_VIRTUAL_TABLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CE_SCENARIOS_" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    LAST_CHANGED_AT timestamp OPTIONS (NAMEINSOURCE '"LAST_CHANGED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCENARIO clob(24) OPTIONS (NAMEINSOURCE '"SCENARIO"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    FORMAT_VERSION string(256) OPTIONS (NAMEINSOURCE '"FORMAT_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    SCENARIO_METADATA clob(24) OPTIONS (NAMEINSOURCE '"SCENARIO_METADATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB')
) OPTIONS (NAMEINSOURCE '"SYS"."CE_SCENARIOS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.COLUMNS" (
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE_ID short OPTIONS (NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "OFFSET" short OPTIONS (NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    COLLATION string(256) OPTIONS (NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(5000) OPTIONS (NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(1) OPTIONS (NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'VARCHAR'),
    MIN_VALUE string(1) OPTIONS (NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'VARCHAR'),
    CS_DATA_TYPE_ID integer OPTIONS (NAMEINSOURCE '"CS_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE_NAME string(16) OPTIONS (NAMEINSOURCE '"CS_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DDIC_DATA_TYPE_ID integer OPTIONS (NAMEINSOURCE '"DDIC_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DDIC_DATA_TYPE_NAME string(7) OPTIONS (NAMEINSOURCE '"DDIC_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMPRESSION_TYPE string(9) NOT NULL OPTIONS (NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(4) NOT NULL OPTIONS (NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_ID long OPTIONS (NAMEINSOURCE '"COLUMN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRELOAD string(5) NOT NULL OPTIONS (NAMEINSOURCE '"PRELOAD"', NATIVE_TYPE 'VARCHAR'),
    GENERATED_ALWAYS_AS string(1000) OPTIONS (NAMEINSOURCE '"GENERATED_ALWAYS_AS"', NATIVE_TYPE 'NVARCHAR'),
    HAS_SCHEMA_FLEXIBILITY string(5) NOT NULL OPTIONS (NAMEINSOURCE '"HAS_SCHEMA_FLEXIBILITY"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_INDEX string(5) NOT NULL OPTIONS (NAMEINSOURCE '"FUZZY_SEARCH_INDEX"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_MODE string(16) OPTIONS (NAMEINSOURCE '"FUZZY_SEARCH_MODE"', NATIVE_TYPE 'VARCHAR'),
    MEMORY_THRESHOLD integer OPTIONS (NAMEINSOURCE '"MEMORY_THRESHOLD"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOAD_UNIT string(6) OPTIONS (NAMEINSOURCE '"LOAD_UNIT"', NATIVE_TYPE 'VARCHAR'),
    GENERATION_TYPE string(22) OPTIONS (NAMEINSOURCE '"GENERATION_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CONSTRAINTS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short OPTIONS (ANNOTATION 'Column position in this constraint', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    CONSTRAINT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Constraint name', NAMEINSOURCE '"CONSTRAINT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_PRIMARY_KEY string(5) NOT NULL OPTIONS (ANNOTATION 'Constraint is primary key constraint: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_PRIMARY_KEY"', NATIVE_TYPE 'VARCHAR'),
    IS_UNIQUE_KEY string(5) NOT NULL OPTIONS (ANNOTATION 'Constraint is unique constraint: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNIQUE_KEY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Constraints defined for tables', NAMEINSOURCE '"SYS"."CONSTRAINTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CREDENTIALS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user the credential belongs to', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMPONENT string(256) OPTIONS (ANNOTATION 'Name of the component the credential is valid for', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'NVARCHAR'),
    PURPOSE string(256) OPTIONS (ANNOTATION 'Purpose, for example remote machine, the credential is valid for', NAMEINSOURCE '"PURPOSE"', NATIVE_TYPE 'NVARCHAR'),
    CREDENTIAL_TYPE string(64) OPTIONS (ANNOTATION 'Type of the credential, e.g. password or X509', NAMEINSOURCE '"CREDENTIAL_TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Credentials defined for users and components', NAMEINSOURCE '"SYS"."CREDENTIALS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_ATTRIBUTE_MAPPING_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALIAS_NAME string(256) OPTIONS (NAMEINSOURCE '"ALIAS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FIELD_REF long OPTIONS (NAMEINSOURCE '"FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_ATTRIBUTE_MAPPING_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_BO_VIEWS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BO_VIEW_NAME string(256) OPTIONS (ANNOTATION 'Business object view name', NAMEINSOURCE '"BO_VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ANCHOR_SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Anchor schema name', NAMEINSOURCE '"ANCHOR_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ANCHOR_TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Anchor table name', NAMEINSOURCE '"ANCHOR_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Business object views for column store join views', NAMEINSOURCE '"SYS"."CS_BO_VIEWS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_BO_VIEWS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_NAME string(256) OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ANCHOR_TABLE_REF long OPTIONS (NAMEINSOURCE '"ANCHOR_TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEFAULT_JOINPATH_REF long OPTIONS (NAMEINSOURCE '"DEFAULT_JOINPATH_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALIAS_NUMBER integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_BO_VIEWS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_BOE_DIDYOUMEAN_SEARCH" (
    TOKEN_INDEX integer OPTIONS (NAMEINSOURCE '"TOKEN_INDEX"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOKEN string(512) OPTIONS (NAMEINSOURCE '"TOKEN"', NATIVE_TYPE 'NVARCHAR'),
    SIMILAR_TOKEN string(512) OPTIONS (NAMEINSOURCE '"SIMILAR_TOKEN"', NATIVE_TYPE 'NVARCHAR'),
    SIMILARITY float OPTIONS (NAMEINSOURCE '"SIMILARITY"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    VIEW_NAME string(512) OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(512) OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_BOE_DIDYOUMEAN_SEARCH"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_BOE_PORTAL_SEARCH" (
    PART integer NOT NULL OPTIONS (NAMEINSOURCE '"PART"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_NAME string(255) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_BOE_PORTAL_SEARCH"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_CALC_INDEXES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_OID long OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_TYPE integer OPTIONS (NAMEINSOURCE '"VIEW_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    READ_ONLY byte OPTIONS (NAMEINSOURCE '"READ_ONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    CALC_NODE_NAME string(256) OPTIONS (NAMEINSOURCE '"CALC_NODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CALC_SCENARIO_NAME string(256) OPTIONS (NAMEINSOURCE '"CALC_SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PACKAGE_NAME string(256) OPTIONS (NAMEINSOURCE '"PACKAGE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_CALC_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_CHARACTERISTICS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    SID_ATTR_REF long OPTIONS (NAMEINSOURCE '"SID_ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_ATTR_REF long OPTIONS (NAMEINSOURCE '"KEY_ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEXT_ATTR_REF long OPTIONS (NAMEINSOURCE '"TEXT_ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXTERNAL_ATTR_REF long OPTIONS (NAMEINSOURCE '"EXTERNAL_ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_CHARACTERISTICS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_COLUMNS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_OID long NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_REF long OPTIONS (NAMEINSOURCE '"TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMNID long OPTIONS (NAMEINSOURCE '"COLUMNID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERNAL_COLUMN_ID integer OPTIONS (NAMEINSOURCE '"INTERNAL_COLUMN_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    COLLATION string(256) OPTIONS (NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    FIELDTYPE byte OPTIONS (NAMEINSOURCE '"FIELDTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SQL_TYPE_ID byte OPTIONS (NAMEINSOURCE '"SQL_TYPE_ID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TREX_TYPE_ID integer OPTIONS (NAMEINSOURCE '"TREX_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ABAP_TYPE_ID integer OPTIONS (NAMEINSOURCE '"ABAP_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MDRS_TYPE_ID integer OPTIONS (NAMEINSOURCE '"MDRS_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DERIVED byte OPTIONS (NAMEINSOURCE '"DERIVED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    XML_SCHEMA byte OPTIONS (NAMEINSOURCE '"XML_SCHEMA"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    "CONSTRAINT" byte OPTIONS (NAMEINSOURCE '"CONSTRAINT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    "OFFSET" short OPTIONS (NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    POSITION short OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    GROUP_NAME string(5000) OPTIONS (NAMEINSOURCE '"GROUP_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_WEIGHT float OPTIONS (NAMEINSOURCE '"DEFAULT_WEIGHT"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    IMPLEMENTATION_FLAGS integer OPTIONS (NAMEINSOURCE '"IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IMPLEMENTATION_PARAMETERS string(5000) OPTIONS (NAMEINSOURCE '"IMPLEMENTATION_PARAMETERS"', NATIVE_TYPE 'NVARCHAR'),
    MIN_VALUE string(5000) OPTIONS (NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(5000) OPTIONS (NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    USAGE_TYPE_FLAGS integer OPTIONS (NAMEINSOURCE '"USAGE_TYPE_FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FUZZY_SEARCH_MODE byte OPTIONS (NAMEINSOURCE '"FUZZY_SEARCH_MODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FLAGS byte OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SRS_ID integer OPTIONS (NAMEINSOURCE '"SRS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MINIMUM_CARDINALITY integer OPTIONS (NAMEINSOURCE '"MINIMUM_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAXIMUM_CARDINALITY integer OPTIONS (NAMEINSOURCE '"MAXIMUM_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_COLUMNS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_CONCAT_ATTRIBUTES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    EXPRESSION string(256) OPTIONS (NAMEINSOURCE '"EXPRESSION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_CONCAT_ATTRIBUTES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_EXPRESSIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXPRESSION string(256) OPTIONS (NAMEINSOURCE '"EXPRESSION"', NATIVE_TYPE 'NVARCHAR'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_EXPRESSIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_FREESTYLE_ATTRIBUTES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    WEIGHT float OPTIONS (NAMEINSOURCE '"WEIGHT"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    SEARCH_FLAG short OPTIONS (NAMEINSOURCE '"SEARCH_FLAG"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_FREESTYLE_ATTRIBUTES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_FREESTYLE_COLUMNS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Freestyle column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Freestyle search columns for column store join views', NAMEINSOURCE '"SYS"."CS_FREESTYLE_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_FREESTYLE_TRANSLATIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_ATTR_REF long OPTIONS (NAMEINSOURCE '"VIEW_ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_ATTR_FROM_REF long OPTIONS (NAMEINSOURCE '"VIEW_ATTR_FROM_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_ATTR_TO_REF long OPTIONS (NAMEINSOURCE '"VIEW_ATTR_TO_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_FREESTYLE_TRANSLATIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_HIERARCHY_DEFINITIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_OID long OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FIXED_PART_SIZE short OPTIONS (NAMEINSOURCE '"FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    READ_ONLY byte OPTIONS (NAMEINSOURCE '"READ_ONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DEFINITION clob(24) OPTIONS (NAMEINSOURCE '"DEFINITION"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    DEFINITION_TYPE integer OPTIONS (NAMEINSOURCE '"DEFINITION_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    VIEW_TYPE integer OPTIONS (NAMEINSOURCE '"VIEW_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOGICAL_INDEX_REF long OPTIONS (NAMEINSOURCE '"LOGICAL_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    S_INDEX_REF long OPTIONS (NAMEINSOURCE '"S_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRED_SUCC_INDEX_REF long OPTIONS (NAMEINSOURCE '"PRED_SUCC_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEXT_INDEX_REF long OPTIONS (NAMEINSOURCE '"TEXT_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LEVEL_INDEX_REF long OPTIONS (NAMEINSOURCE '"LEVEL_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NODE_TYPE_INDEX_REF long OPTIONS (NAMEINSOURCE '"NODE_TYPE_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LINK_INDEX_REF long OPTIONS (NAMEINSOURCE '"LINK_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERVAL_INDEX_REF long OPTIONS (NAMEINSOURCE '"INTERVAL_INDEX_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRED_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"PRED_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUCC_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"SUCC_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"TYPE_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ORDER_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"ORDER_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERVAL_PRED_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"INTERVAL_PRED_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERVAL_MIN_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"INTERVAL_MIN_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERVAL_MAX_ATTRIBUTE_REF long OPTIONS (NAMEINSOURCE '"INTERVAL_MAX_ATTRIBUTE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROOT integer OPTIONS (NAMEINSOURCE '"ROOT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OTHERS integer OPTIONS (NAMEINSOURCE '"OTHERS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEMBER_TYPE integer OPTIONS (NAMEINSOURCE '"MEMBER_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INTERVAL_ATTR_NAME string(256) OPTIONS (NAMEINSOURCE '"INTERVAL_ATTR_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROOT_NODE string(5000) OPTIONS (NAMEINSOURCE '"ROOT_NODE"', NATIVE_TYPE 'NVARCHAR'),
    REST_NODE string(5000) OPTIONS (NAMEINSOURCE '"REST_NODE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_HIERARCHY_DEFINITIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_INDEX_ALIASES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_REF long OPTIONS (NAMEINSOURCE '"TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALIAS_NAME string(256) OPTIONS (NAMEINSOURCE '"ALIAS_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_INDEX_ALIASES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_INDEX_CONFIGS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_REF long OPTIONS (NAMEINSOURCE '"TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DYM_FREQUENCY_THRESHOLD integer OPTIONS (NAMEINSOURCE '"DYM_FREQUENCY_THRESHOLD"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DYM_MIN_TERM_LEN integer OPTIONS (NAMEINSOURCE '"DYM_MIN_TERM_LEN"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DYM_MAX_ALLOWED_ERRORS integer OPTIONS (NAMEINSOURCE '"DYM_MAX_ALLOWED_ERRORS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEARCH_CACHE_MAX_SIZE integer OPTIONS (NAMEINSOURCE '"SEARCH_CACHE_MAX_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WILDCARD string(256) OPTIONS (NAMEINSOURCE '"WILDCARD"', NATIVE_TYPE 'NVARCHAR'),
    SINGLE_WILDCARD string(256) OPTIONS (NAMEINSOURCE '"SINGLE_WILDCARD"', NATIVE_TYPE 'NVARCHAR'),
    NUMBER_SEPARATOR string(256) OPTIONS (NAMEINSOURCE '"NUMBER_SEPARATOR"', NATIVE_TYPE 'NVARCHAR'),
    TOKEN_SEPARATOR string(256) OPTIONS (NAMEINSOURCE '"TOKEN_SEPARATOR"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_INDEX_CONFIGS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_INVALIDVIEW_REFS_" (
    REF_ID long NOT NULL OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VAR_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"VAR_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE_ID byte OPTIONS (NAMEINSOURCE '"TYPE_ID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_TABLE byte OPTIONS (NAMEINSOURCE '"IS_TABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_INVALIDVIEW_REFS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_JOIN_CONDITIONS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONDITION_NAME string(256) OPTIONS (ANNOTATION 'Join condition name', NAMEINSOURCE '"JOIN_CONDITION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_ORDER long OPTIONS (ANNOTATION 'Join order number', NAMEINSOURCE '"JOIN_ORDER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_SCHEMA_NAME1 string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of column 1', NAMEINSOURCE '"TABLE_SCHEMA_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME1 string(256) NOT NULL OPTIONS (ANNOTATION 'Table name of column 1', NAMEINSOURCE '"TABLE_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME1 string(256) NOT NULL OPTIONS (ANNOTATION 'Name of column 1', NAMEINSOURCE '"COLUMN_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER1 integer OPTIONS (ANNOTATION 'Alias Number of table name 1', NAMEINSOURCE '"ALIAS_NUMBER1"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_SCHEMA_NAME2 string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of column 2', NAMEINSOURCE '"TABLE_SCHEMA_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME2 string(256) NOT NULL OPTIONS (ANNOTATION 'Table name of column 2', NAMEINSOURCE '"TABLE_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME2 string(256) NOT NULL OPTIONS (ANNOTATION 'Name of column 2', NAMEINSOURCE '"COLUMN_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER2 integer OPTIONS (ANNOTATION 'Alias Number of table name 2', NAMEINSOURCE '"ALIAS_NUMBER2"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONSTRAINTS string(256) OPTIONS (ANNOTATION 'Join constraint name', NAMEINSOURCE '"CONSTRAINTS"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_TYPE string(5) OPTIONS (ANNOTATION 'Join type: ''inner''/''left''/''right''/''full''', NAMEINSOURCE '"JOIN_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CARDINALITY string(3) OPTIONS (ANNOTATION 'Join cardinality: ''1:1''/''1:n''/''n:1''/''n:n''', NAMEINSOURCE '"CARDINALITY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Join conditions defined for column store join views', NAMEINSOURCE '"SYS"."CS_JOIN_CONDITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_JOIN_CONDITIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_NAME string(256) OPTIONS (NAMEINSOURCE '"JOIN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ATTR_1_REF long OPTIONS (NAMEINSOURCE '"ATTR_1_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ATTR_2_REF long OPTIONS (NAMEINSOURCE '"ATTR_2_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_ORDER long OPTIONS (NAMEINSOURCE '"JOIN_ORDER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_TYPE_CARDINALITY integer OPTIONS (NAMEINSOURCE '"JOIN_TYPE_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALIAS_NUMBER_1 integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER_1"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALIAS_NUMBER_2 integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER_2"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_JOIN_CONDITIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_JOIN_CONSTRAINTS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONSTRAINT_NAME string(256) OPTIONS (ANNOTATION 'Join constraint name', NAMEINSOURCE '"JOIN_CONSTRAINT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONSTRAINT_TYPE string(32) OPTIONS (ANNOTATION 'Type of constraint owner', NAMEINSOURCE '"CONSTRAINT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCATION string(256) OPTIONS (ANNOTATION 'Name of constraint owner', NAMEINSOURCE '"LOCATION"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of table', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OPERATOR string(256) OPTIONS (ANNOTATION 'Operator', NAMEINSOURCE '"OPERATOR"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Join constraints defined for column store join views', NAMEINSOURCE '"SYS"."CS_JOIN_CONSTRAINTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_JOIN_CONSTRAINTS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    ATTR_REF long OPTIONS (NAMEINSOURCE '"ATTR_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OPERATOR string(256) OPTIONS (NAMEINSOURCE '"OPERATOR"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_JOIN_CONSTRAINTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_JOIN_INDEXES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_OID long OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_TYPE integer OPTIONS (NAMEINSOURCE '"VIEW_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    READ_ONLY byte OPTIONS (NAMEINSOURCE '"READ_ONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_BOVIEW_REF long OPTIONS (NAMEINSOURCE '"DEFAULT_BOVIEW_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_JOIN_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_JOIN_PATHS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_PATH_NAME string(256) OPTIONS (ANNOTATION 'Join path name', NAMEINSOURCE '"JOIN_PATH_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONDITIONS string(5000) OPTIONS (ANNOTATION 'Comma separated list of join conditions', NAMEINSOURCE '"JOIN_CONDITIONS"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONSTRAINTS string(5000) OPTIONS (ANNOTATION 'Comma separated list of join constraints', NAMEINSOURCE '"JOIN_CONSTRAINTS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Join paths defined for column store join views', NAMEINSOURCE '"SYS"."CS_JOIN_PATHS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_JOIN_PATHS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_JOIN_PATHS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_JOIN_PHYSICAL_INDEXES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_INDEX_TYPE integer OPTIONS (NAMEINSOURCE '"JOIN_INDEX_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXPECTED_SIZE integer OPTIONS (NAMEINSOURCE '"EXPECTED_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PHYSICAL_TABLE_REF long OPTIONS (NAMEINSOURCE '"PHYSICAL_TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_JOIN_PHYSICAL_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_JOIN_TABLES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of physical table name', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Physical table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE string(32) OPTIONS (ANNOTATION 'Type of table: ''FACT_TABLE''/''D_TABLE''/''X_TABLE''/''Y_TABLE''/''TEMP_TABLE''/''S_TABLE''/''EXTERNAL_OBJECT''/''CONVERSION_TABLE''/''OLAP_TEXT_TABLE''/''AUTHORIZATION_TABLE''/''HIERARCHY''', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Physical tables referred by column store join views', NAMEINSOURCE '"SYS"."CS_JOIN_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_KEY_FIGURES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    KEY_FIGURE_NAME string(256) OPTIONS (ANNOTATION 'Key figure name', NAMEINSOURCE '"KEY_FIGURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_AGGREGATION_TYPE string(32) OPTIONS (ANNOTATION 'Aggregation type like: ''sum''/''count''/''min''/...', NAMEINSOURCE '"DEFAULT_AGGREGATION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) OPTIONS (ANNOTATION 'Description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    UNIT_CONVERSION_NAME string(256) OPTIONS (ANNOTATION 'Name of unit conversion', NAMEINSOURCE '"UNIT_CONVERSION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of table', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    EXPRESSION_FLAGS string(32) OPTIONS (ANNOTATION 'Expression flags', NAMEINSOURCE '"EXPRESSION_FLAGS"', NATIVE_TYPE 'VARCHAR'),
    EXPRESSION string(256) OPTIONS (ANNOTATION 'Expression', NAMEINSOURCE '"EXPRESSION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Key figures defined for column store join views', NAMEINSOURCE '"SYS"."CS_KEY_FIGURES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_KEY_FIGURES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    FIELD_REF long OPTIONS (NAMEINSOURCE '"FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEFAULT_AGGREGATION_TYPE integer OPTIONS (NAMEINSOURCE '"DEFAULT_AGGREGATION_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNIT_CONVERSION_REF long OPTIONS (NAMEINSOURCE '"UNIT_CONVERSION_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXPRESSION_REF long OPTIONS (NAMEINSOURCE '"EXPRESSION_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESTRICTION_REF long OPTIONS (NAMEINSOURCE '"RESTRICTION_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VISIBLE byte OPTIONS (NAMEINSOURCE '"VISIBLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    ALIAS_NUMBER integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_KEY_FIGURES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_LANG_INDEXES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_OID long OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    READ_ONLY byte OPTIONS (NAMEINSOURCE '"READ_ONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    VIEW_TYPE integer OPTIONS (NAMEINSOURCE '"VIEW_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    ONE_PHYSICAL_INDEX byte OPTIONS (NAMEINSOURCE '"ONE_PHYSICAL_INDEX"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_LANG_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_PROPERTY_INDEXES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_OID long OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    READ_ONLY byte OPTIONS (NAMEINSOURCE '"READ_ONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    VIEW_TYPE integer OPTIONS (NAMEINSOURCE '"VIEW_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_PROPERTY_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_RANGE_ATTRIBUTES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    LOW_FIELD_REF long OPTIONS (NAMEINSOURCE '"LOW_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HIGH_FIELD_REF long OPTIONS (NAMEINSOURCE '"HIGH_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OP_FIELD_REF long OPTIONS (NAMEINSOURCE '"OP_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_RANGE_ATTRIBUTES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_RESTRICTIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESTRICTION string(5000) OPTIONS (NAMEINSOURCE '"RESTRICTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_RESTRICTIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_TABLES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CSTABLE_VERSION_ID long OPTIONS (NAMEINSOURCE '"CSTABLE_VERSION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    LOGGING byte OPTIONS (NAMEINSOURCE '"LOGGING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TABLE_TYPE integer OPTIONS (NAMEINSOURCE '"TABLE_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FIXED_PART_SIZE short OPTIONS (NAMEINSOURCE '"FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    MAX_COL_ID integer OPTIONS (NAMEINSOURCE '"MAX_COL_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COUNT_NON_INTERNAL_ATTRIBUTES short OPTIONS (NAMEINSOURCE '"COUNT_NON_INTERNAL_ATTRIBUTES"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    PARTITION_SPEC clob(24) OPTIONS (NAMEINSOURCE '"PARTITION_SPEC"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HIGHEST_PART_NUMBER integer OPTIONS (NAMEINSOURCE '"HIGHEST_PART_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_FLAGS long OPTIONS (NAMEINSOURCE '"TABLE_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SESSION_TYPE integer OPTIONS (NAMEINSOURCE '"SESSION_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_LOCKKEY_ID integer OPTIONS (NAMEINSOURCE '"TABLE_LOCKKEY_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNLOAD_PRIORITY byte OPTIONS (NAMEINSOURCE '"UNLOAD_PRIORITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_TABLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_UNIT_CONVERSIONS_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEST_UNIT string(256) OPTIONS (NAMEINSOURCE '"DEST_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_REF long OPTIONS (NAMEINSOURCE '"TABLE_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SOURCE_FIELD_REF long OPTIONS (NAMEINSOURCE '"SOURCE_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FACTOR_FIELD_REF long OPTIONS (NAMEINSOURCE '"FACTOR_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_PATH_REF long OPTIONS (NAMEINSOURCE '"JOIN_PATH_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_UNIT_CONVERSIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_VIEW_ATTRIBUTES_" (
    REF_ID long OPTIONS (NAMEINSOURCE '"REF_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_REF long OPTIONS (NAMEINSOURCE '"OWNER_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VIEW_OID long NOT NULL OPTIONS (NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMNID long OPTIONS (NAMEINSOURCE '"COLUMNID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLLATION string(256) OPTIONS (NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    FIELDTYPE byte OPTIONS (NAMEINSOURCE '"FIELDTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SQL_TYPE_ID byte OPTIONS (NAMEINSOURCE '"SQL_TYPE_ID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TREX_TYPE_ID integer OPTIONS (NAMEINSOURCE '"TREX_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ABAP_TYPE_ID integer OPTIONS (NAMEINSOURCE '"ABAP_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MDRS_TYPE_ID integer OPTIONS (NAMEINSOURCE '"MDRS_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DERIVED byte OPTIONS (NAMEINSOURCE '"DERIVED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    XML_SCHEMA byte OPTIONS (NAMEINSOURCE '"XML_SCHEMA"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    "CONSTRAINT" byte OPTIONS (NAMEINSOURCE '"CONSTRAINT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    "OFFSET" short OPTIONS (NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    POSITION short OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    GROUP_NAME string(5000) OPTIONS (NAMEINSOURCE '"GROUP_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_WEIGHT float OPTIONS (NAMEINSOURCE '"DEFAULT_WEIGHT"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    IMPLEMENTATION_FLAGS integer OPTIONS (NAMEINSOURCE '"IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IMPLEMENTATION_PARAMETERS string(5000) OPTIONS (NAMEINSOURCE '"IMPLEMENTATION_PARAMETERS"', NATIVE_TYPE 'NVARCHAR'),
    MIN_VALUE string(5000) OPTIONS (NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(5000) OPTIONS (NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    USAGE_TYPE_FLAGS integer OPTIONS (NAMEINSOURCE '"USAGE_TYPE_FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    FIELD_REF long OPTIONS (NAMEINSOURCE '"FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    JOIN_PATH_REF long OPTIONS (NAMEINSOURCE '"JOIN_PATH_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BO_VIEW_REF long OPTIONS (NAMEINSOURCE '"BO_VIEW_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VISIBLE byte OPTIONS (NAMEINSOURCE '"VISIBLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SORT_FIELD_REF long OPTIONS (NAMEINSOURCE '"SORT_FIELD_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXPRESSION_REF long OPTIONS (NAMEINSOURCE '"EXPRESSION_REF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALIAS_NUMBER integer OPTIONS (NAMEINSOURCE '"ALIAS_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FUZZINESS_THRESHOLD float OPTIONS (NAMEINSOURCE '"FUZZINESS_THRESHOLD"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL')
) OPTIONS (NAMEINSOURCE '"SYS"."CS_VIEW_ATTRIBUTES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.CS_VIEW_COLUMNS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'View column name', NAMEINSOURCE '"VIEW_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of table', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER integer OPTIONS (ANNOTATION 'Alias number', NAMEINSOURCE '"ALIAS_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_PATH string(256) OPTIONS (ANNOTATION 'Join path name', NAMEINSOURCE '"JOIN_PATH"', NATIVE_TYPE 'NVARCHAR'),
    CS_TYPE string(16) OPTIONS (ANNOTATION 'Column store data type', NAMEINSOURCE '"CS_TYPE"', NATIVE_TYPE 'VARCHAR'),
    EXPRESSION_FLAGS string(32) OPTIONS (ANNOTATION 'Expression flags', NAMEINSOURCE '"EXPRESSION_FLAGS"', NATIVE_TYPE 'VARCHAR'),
    EXPRESSION string(256) OPTIONS (ANNOTATION 'Expression', NAMEINSOURCE '"EXPRESSION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Columns defined for column store join views', NAMEINSOURCE '"SYS"."CS_VIEW_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.DATA_STATISTICS" (
    DATA_STATISTICS_OID long NOT NULL OPTIONS (ANNOTATION 'Data statistics object ID', NAMEINSOURCE '"DATA_STATISTICS_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_STATISTICS_TYPE string(9) NOT NULL OPTIONS (ANNOTATION 'Specifies the data statistics type: ''HISTOGRAM''/''SIMPLE''', NAMEINSOURCE '"DATA_STATISTICS_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DATA_STATISTICS_NAME string(256) OPTIONS (ANNOTATION 'Specifies the data statistics name', NAMEINSOURCE '"DATA_STATISTICS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_SOURCE_OBJECT_TYPE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies the data source object type: ''TABLE''/''VIEW''', NAMEINSOURCE '"DATA_SOURCE_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DATA_SOURCE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Specifies the schema name of the data source', NAMEINSOURCE '"DATA_SOURCE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_SOURCE_OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Specifies the object name of the data source', NAMEINSOURCE '"DATA_SOURCE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_SOURCE_COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Specifies the column name of the data source', NAMEINSOURCE '"DATA_SOURCE_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Specifies the time when the data statistics object was created', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_REFRESH_TIME timestamp OPTIONS (ANNOTATION 'Specifies the time when the data statistics object was last refreshed', NAMEINSOURCE '"LAST_REFRESH_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MINVALUE_NUMERIC double OPTIONS (ANNOTATION 'Specifies the minimum numeric value of the data source', NAMEINSOURCE '"MINVALUE_NUMERIC"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MINVALUE_STRING string(256) OPTIONS (ANNOTATION 'Specifies the minimum string value of the data source', NAMEINSOURCE '"MINVALUE_STRING"', NATIVE_TYPE 'NVARCHAR'),
    MAXVALUE_NUMERIC double OPTIONS (ANNOTATION 'Specifies the maximum numeric value of the data source', NAMEINSOURCE '"MAXVALUE_NUMERIC"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAXVALUE_STRING string(256) OPTIONS (ANNOTATION 'Specifies the maximum string value of the data source', NAMEINSOURCE '"MAXVALUE_STRING"', NATIVE_TYPE 'NVARCHAR'),
    COUNT long OPTIONS (ANNOTATION 'Specifies the number of values of the data source', NAMEINSOURCE '"COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DISTINCT_COUNT long OPTIONS (ANNOTATION 'Specifies the number of unique values of the data source', NAMEINSOURCE '"DISTINCT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NULL_COUNT long OPTIONS (ANNOTATION 'Specifies the number of NULL values of the data source', NAMEINSOURCE '"NULL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_BUCKETS long OPTIONS (ANNOTATION 'Specifies the number of buckets specified in the CREATE STATISTICS statement', NAMEINSOURCE '"CREATE_BUCKETS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_REFRESH_BUCKETS long OPTIONS (ANNOTATION 'Specifies the number of buckets used when the data statistics object was last refreshed', NAMEINSOURCE '"LAST_REFRESH_BUCKETS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_MEMORY long OPTIONS (ANNOTATION 'Specifies the memory size to be used by the data statistics object specified in the CREATE STATISTICS statement', NAMEINSOURCE '"CREATE_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_REFRESH_MEMORY long OPTIONS (ANNOTATION 'Specifies the memory size used by the data statistics object when the object was last refreshed', NAMEINSOURCE '"LAST_REFRESH_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_MEMORY_PERCENT integer OPTIONS (ANNOTATION 'Specifies the memory size, as a percentage of the data source size, to be used by the data statistics object specified in the CREATE STATISTICS statement', NAMEINSOURCE '"CREATE_MEMORY_PERCENT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_REFRESH_MEMORY_PERCENT integer OPTIONS (ANNOTATION 'Specifies the memory size, as a percentage of the data source size,  used by the data statistics object when the object was last refreshed', NAMEINSOURCE '"LAST_REFRESH_MEMORY_PERCENT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "CONSTRAINT" string(8) NOT NULL OPTIONS (ANNOTATION 'Specifies the constraint for the build algorithm for the data statistics object: ''MAXDIFF''/''QOPTIMAL''', NAMEINSOURCE '"CONSTRAINT"', NATIVE_TYPE 'VARCHAR'),
    IS_PERSISTENT string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if the content of the data statistics object is persistent or not: ''FALSE''/''TRUE''', NAMEINSOURCE '"IS_PERSISTENT"', NATIVE_TYPE 'VARCHAR'),
    CREATE_QERROR float OPTIONS (ANNOTATION 'Specifies the parameter qerror for the data statistics object of type ''HISTOGRAM'' as specified in the CREATE STATISTICS statement', NAMEINSOURCE '"CREATE_QERROR"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    LAST_REFRESH_QERROR float OPTIONS (ANNOTATION 'Specifies the parameter qerror for the data statistics object of type ''HISTOGRAM'' as computed at the last refresh', NAMEINSOURCE '"LAST_REFRESH_QERROR"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    CREATE_QTHETA integer OPTIONS (ANNOTATION 'Specifies the parameter qtheta for the data statistics object of type ''HISTOGRAM'' as specified at the CREATE STATISTICS statement', NAMEINSOURCE '"CREATE_QTHETA"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_REFRESH_QTHETA integer OPTIONS (ANNOTATION 'Specifies the parameter qtheta for the data statistics object of type ''HISTOGRAM'' as computed at the last refresh', NAMEINSOURCE '"LAST_REFRESH_QTHETA"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Overview of data statistics objects', NAMEINSOURCE '"SYS"."DATA_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.DATA_STATISTICS_" (
    DATA_STATISTICS_OID long NOT NULL OPTIONS (NAMEINSOURCE '"DATA_STATISTICS_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_STATISTICS_TYPE short OPTIONS (NAMEINSOURCE '"DATA_STATISTICS_TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_STATISTICS_NAME string(256) OPTIONS (NAMEINSOURCE '"DATA_STATISTICS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_SOURCE_OID long OPTIONS (NAMEINSOURCE '"DATA_SOURCE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SOURCE_COLUMN_NAME string(256) OPTIONS (NAMEINSOURCE '"DATA_SOURCE_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_REFRESH_TIME timestamp OPTIONS (NAMEINSOURCE '"LAST_REFRESH_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MINVALUE_NUMERIC double OPTIONS (NAMEINSOURCE '"MINVALUE_NUMERIC"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MINVALUE_STRING string(256) OPTIONS (NAMEINSOURCE '"MINVALUE_STRING"', NATIVE_TYPE 'NVARCHAR'),
    MAXVALUE_NUMERIC double OPTIONS (NAMEINSOURCE '"MAXVALUE_NUMERIC"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAXVALUE_STRING string(256) OPTIONS (NAMEINSOURCE '"MAXVALUE_STRING"', NATIVE_TYPE 'NVARCHAR'),
    COUNT long OPTIONS (NAMEINSOURCE '"COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DISTINCT_COUNT long OPTIONS (NAMEINSOURCE '"DISTINCT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NULL_COUNT long OPTIONS (NAMEINSOURCE '"NULL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_BUCKETS long OPTIONS (NAMEINSOURCE '"CREATE_BUCKETS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_REFRESH_BUCKETS long OPTIONS (NAMEINSOURCE '"LAST_REFRESH_BUCKETS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_MEMORY long OPTIONS (NAMEINSOURCE '"CREATE_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_REFRESH_MEMORY long OPTIONS (NAMEINSOURCE '"LAST_REFRESH_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_MEMORY_PERCENT integer OPTIONS (NAMEINSOURCE '"CREATE_MEMORY_PERCENT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_REFRESH_MEMORY_PERCENT integer OPTIONS (NAMEINSOURCE '"LAST_REFRESH_MEMORY_PERCENT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "CONSTRAINT" short OPTIONS (NAMEINSOURCE '"CONSTRAINT"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    PERSISTENT short OPTIONS (NAMEINSOURCE '"PERSISTENT"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    CREATE_QERROR float OPTIONS (NAMEINSOURCE '"CREATE_QERROR"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    LAST_REFRESH_QERROR float OPTIONS (NAMEINSOURCE '"LAST_REFRESH_QERROR"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    CREATE_QTHETA integer OPTIONS (NAMEINSOURCE '"CREATE_QTHETA"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_REFRESH_QTHETA integer OPTIONS (NAMEINSOURCE '"LAST_REFRESH_QTHETA"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_STATISTICS_CONTENT clob(24) OPTIONS (NAMEINSOURCE '"DATA_STATISTICS_CONTENT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB')
) OPTIONS (NAMEINSOURCE '"SYS"."DATA_STATISTICS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.DATA_STATISTICS_COLUMNS_" (
    DATA_STATISTICS_OID long NOT NULL OPTIONS (NAMEINSOURCE '"DATA_STATISTICS_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_STATISTICS_TYPE byte OPTIONS (NAMEINSOURCE '"DATA_STATISTICS_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DATA_SOURCE_OID long NOT NULL OPTIONS (NAMEINSOURCE '"DATA_SOURCE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_SOURCE_COLUMN_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DATA_SOURCE_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    "ORDER" byte OPTIONS (NAMEINSOURCE '"ORDER"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."DATA_STATISTICS_COLUMNS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.DATA_STATISTICS_PROPERTIES_" (
    DATA_STATISTICS_OID long NOT NULL OPTIONS (NAMEINSOURCE '"DATA_STATISTICS_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROPERTY_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"PROPERTY_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PROPERTY_VALUE string(16) OPTIONS (NAMEINSOURCE '"PROPERTY_VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."DATA_STATISTICS_PROPERTIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.DATA_TYPES" (
    TYPE_ID short OPTIONS (ANNOTATION 'Data type ID', NAMEINSOURCE '"TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TYPE_NAME string(16) OPTIONS (ANNOTATION 'Data type name', NAMEINSOURCE '"TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_SIZE integer OPTIONS (ANNOTATION 'Maximum size of the data type that this system can support', NAMEINSOURCE '"COLUMN_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LITERAL_PREFIX string(1) OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo Varchar. Character or characters used to prefix a literal, for example, a single quotation mark ('') for character data types or 0x for binary data types; NULL is returned for data types where a literal prefix is not applicable', NAMEINSOURCE '"LITERAL_PREFIX"', NATIVE_TYPE 'CHAR'),
    LITERAL_SUFFIX string(1) OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo Varchar. Character or characters used to terminate a literal, for example, a single quotation mark ('') for character data types; NULL is returned for data types where a literal suffix is not applicable', NAMEINSOURCE '"LITERAL_SUFFIX"', NATIVE_TYPE 'CHAR'),
    CREATE_PARAMS string(16) OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo Varchar. A list of keywords, separated by commas, corresponding to each parameter that the application may specify in parentheses when using the name that is returned in the TYPE_NAME field', NAMEINSOURCE '"CREATE_PARAMS"', NATIVE_TYPE 'VARCHAR'),
    NULLABLE byte OPTIONS (ANNOTATION 'Specifies whether the data type can accept null or not', NAMEINSOURCE '"NULLABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CASE_SENSITIVE byte OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo smallint. Whether a character data type is case-sensitive in collations and comparisons', NAMEINSOURCE '"CASE_SENSITIVE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SEARCHABLE byte OPTIONS (ANNOTATION 'How the data type can be used in the WHERE clause', NAMEINSOURCE '"SEARCHABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    UNSIGNED_ATTRIBUTE byte OPTIONS (ANNOTATION 'Signed or unsigned', NAMEINSOURCE '"UNSIGNED_ATTRIBUTE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FIXED_PREC_SCALE byte OPTIONS (ANNOTATION 'Whether the data type has predefined fixed precision and scale (ODBC)', NAMEINSOURCE '"FIXED_PREC_SCALE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    AUTO_UNIQUE_VALUE byte OPTIONS (ANNOTATION 'Whether the data type is autoincrementing (ODBC)', NAMEINSOURCE '"AUTO_UNIQUE_VALUE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    LOCAL_TYPE_NAME string(16) OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo varchar. Localized version of the data source-dependent name of the data type', NAMEINSOURCE '"LOCAL_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    MINIMUM_SCALE short OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo smallint. The minimum scale of the data type on the data source', NAMEINSOURCE '"MINIMUM_SCALE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    MAXIMUM_SCALE short OPTIONS (ANNOTATION 'ODBC 2.0 SQLGetTypeInfo smallint. The maximum scale of the data type on the data source', NAMEINSOURCE '"MAXIMUM_SCALE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SQL_DATA_TYPE short OPTIONS (ANNOTATION 'ODBC 3.0 SQLGetTypeInfo smallint. The value of the SQL data type as it appears in the SQL_DESC_TYPE field of the descriptor. This column is the same as the DATATYPE column, except for interval and datetime data types', NAMEINSOURCE '"SQL_DATA_TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SQL_DATETIME_SUB short OPTIONS (ANNOTATION 'ODBC 3.0 SQLGetTypeInfo smallint. When the value of SQL_DATATYPE is SQL_DATETIME or SQL_INTERVAL, this column contains the datetime/interval subcode', NAMEINSOURCE '"SQL_DATETIME_SUB"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    NUM_PREC_RADIX integer OPTIONS (ANNOTATION 'ODBC 3.0 SQLGetTypeInfo integer. In case of an approximate numeric data type, value is 2 to indicate that COLUMN_SIZE specifies the number of bits. For exact numeric data types value 10 indicates that COLUMN_SIZE specifies the number of decimal digits', NAMEINSOURCE '"NUM_PREC_RADIX"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INTERVAL_PRECISION short OPTIONS (ANNOTATION 'ODBC 3.0 SQLGetTypeInfo smallint. If the data type is an interval data type, then this column contains the value of the interval leading precision. Otherwise, this column is NULL', NAMEINSOURCE '"INTERVAL_PRECISION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (ANNOTATION 'Available SQL data types', NAMEINSOURCE '"SYS"."DATA_TYPES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.DUMMY" (
    DUMMY string(1) OPTIONS (NAMEINSOURCE '"DUMMY"', CHAR_OCTET_LENGTH 3, NATIVE_TYPE 'CHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."DUMMY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.EFFECTIVE_PRIVILEGES" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user for whom effective privileges are shown', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE string(256) OPTIONS (ANNOTATION 'User or role that has the privilege', NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE_TYPE string(4) NOT NULL OPTIONS (ANNOTATION '''USER'' or ''ROLE''', NAMEINSOURCE '"GRANTEE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    GRANTOR string(256) OPTIONS (ANNOTATION 'User or role that provided the privilege', NAMEINSOURCE '"GRANTOR"', NATIVE_TYPE 'NVARCHAR'),
    GRANTOR_TYPE string(4) NOT NULL OPTIONS (ANNOTATION '''USER'' or ''ROLE''', NAMEINSOURCE '"GRANTOR_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the granted object like: ''TABLE''/''SCHEMA''/...', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name the object belongs to', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of granted object', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRIVILEGE string(256) OPTIONS (ANNOTATION 'Privilege granted', NAMEINSOURCE '"PRIVILEGE"', NATIVE_TYPE 'NVARCHAR'),
    IS_GRANTABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Privilege was granted ''WITH GRANT OPTION''/''WITH ADMIN OPTION'': ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_GRANTABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Privilege is valid or it became invalid because of implicit revoking: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Privileges of the current user', NAMEINSOURCE '"SYS"."EFFECTIVE_PRIVILEGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.EFFECTIVE_ROLES" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user for whom effective roles are shown', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE string(256) OPTIONS (ANNOTATION 'User or role that has the role', NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE_TYPE string(4) NOT NULL OPTIONS (ANNOTATION '''USER'' or ''ROLE''', NAMEINSOURCE '"GRANTEE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    GRANTOR string(256) OPTIONS (ANNOTATION 'User that granted the role', NAMEINSOURCE '"GRANTOR"', NATIVE_TYPE 'NVARCHAR'),
    ROLE_NAME string(256) OPTIONS (ANNOTATION 'Role granted', NAMEINSOURCE '"ROLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_GRANTABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Role was granted ''WITH ADMIN OPTION'': ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_GRANTABLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Roles of the current user', NAMEINSOURCE '"SYS"."EFFECTIVE_ROLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.EFFECTIVE_STRUCTURED_PRIVILEGES" (
    ROOT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Name of the schema the requested object is in', NAMEINSOURCE '"ROOT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROOT_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the requested object', NAMEINSOURCE '"ROOT_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the requesting user', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_ID long OPTIONS (ANNOTATION 'ID of the requesting user', NAMEINSOURCE '"USER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema of a certain object in the object hierarchy', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of a certain object in the object hierarchy', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_OID long OPTIONS (ANNOTATION 'Object ID of a certain object in the hierarchy', NAMEINSOURCE '"OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EFFECTIVE_FILTER string(5000) OPTIONS (ANNOTATION 'Filter condition applying to a certain object (merged and optimized predicates provided by all structured privileges that apply)', NAMEINSOURCE '"EFFECTIVE_FILTER"', NATIVE_TYPE 'NVARCHAR'),
    STRUCTURED_PRIVILEGE_NAME string(256) OPTIONS (ANNOTATION 'Name of a certain structured privilege created for that particular object', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STRUCTURED_PRIVILEGE_ID long OPTIONS (ANNOTATION 'ID of the structured privilege', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STRUCTURED_PRIVILEGE_FILTER string(5000) OPTIONS (ANNOTATION 'Filter condition provided by that particular structured privilege', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_FILTER"', NATIVE_TYPE 'NVARCHAR'),
    STRUCTURED_PRIVILEGE_STATUS string(64) OPTIONS (ANNOTATION 'Status of a particular structured privilege (APPLIED, NOT GRANTED, NO MATCHING ATTRIBUTE, NO FILTER VALUES FOUND)', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_STATUS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Structured privileges applying on a given object for a given user', NAMEINSOURCE '"SYS"."EFFECTIVE_STRUCTURED_PRIVILEGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.ELEMENT_TYPES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'The name of the schema containing the object defining or using the collection type', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'The name of the table, view, or procedure that defines or uses the collection type', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_OID long NOT NULL OPTIONS (ANNOTATION 'The identifier of the table, view, or procedure that defines or uses the collection type', NAMEINSOURCE '"OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_TYPE string(5) NOT NULL OPTIONS (ANNOTATION 'One of ''TABLE'', ''VIEW'', or ''PROCEDURE''', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    ELEMENT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'The name of the table or view column or procedure parameter', NAMEINSOURCE '"ELEMENT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'The identifier of the element type', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'The name of the element type', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'The length for a character string type or the precision for a numeric type', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'The scale for a numeric type', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MIN_CARDINALITY integer OPTIONS (ANNOTATION 'The lower bound of the array', NAMEINSOURCE '"MIN_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_CARDINALITY integer OPTIONS (ANNOTATION 'The upper bound of the array', NAMEINSOURCE '"MAX_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOW_DUPLICATES string(5) NOT NULL OPTIONS (ANNOTATION 'Indicates if duplicates should be allowed within one column: ''TRUE''/''FALSE''', NAMEINSOURCE '"ALLOW_DUPLICATES"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Available multivalued types', NAMEINSOURCE '"SYS"."ELEMENT_TYPES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.EPM_MODELS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the EPM Model', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    MODEL_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the EPM Model', NAMEINSOURCE '"MODEL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(256) OPTIONS (ANNOTATION 'Description of the EPM Model', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    CDATA clob OPTIONS (ANNOTATION 'Definition of the EPM Model with JSON representation', NAMEINSOURCE '"CDATA"', NATIVE_TYPE 'NCLOB')
) OPTIONS (ANNOTATION 'Available EPM Model', NAMEINSOURCE '"SYS"."EPM_MODELS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.EPM_MODELS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    MODEL_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"MODEL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(256) OPTIONS (NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    CDATA clob(24) OPTIONS (NAMEINSOURCE '"CDATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    LAST_CHANGED_TIME timestamp OPTIONS (NAMEINSOURCE '"LAST_CHANGED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SYS"."EPM_MODELS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.EPM_QUERY_SOURCES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the EPM query source', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    QUERY_SOURCE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the EPM query source', NAMEINSOURCE '"QUERY_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(256) OPTIONS (ANNOTATION 'Description of the EPM query source', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    CDATA clob OPTIONS (ANNOTATION 'Definition of the EPM query source with JSON representation', NAMEINSOURCE '"CDATA"', NATIVE_TYPE 'NCLOB')
) OPTIONS (ANNOTATION 'Available EPM query source', NAMEINSOURCE '"SYS"."EPM_QUERY_SOURCES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.EPM_QUERY_SOURCES_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    QUERY_SOURCE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"QUERY_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(256) OPTIONS (NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    CDATA clob(24) OPTIONS (NAMEINSOURCE '"CDATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    LAST_CHANGED_TIME timestamp OPTIONS (NAMEINSOURCE '"LAST_CHANGED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SYS"."EPM_QUERY_SOURCES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.EXPLAIN_PLAN_TABLE" (
    STATEMENT_NAME string(256) OPTIONS (ANNOTATION 'The string specified as STATEMENT_NAME on executing EXPLAIN PLAN command. This is used to distinguish plans from each other when there are multiple plans in EXPLAIN_PLAN_TABLE view', NAMEINSOURCE '"STATEMENT_NAME"', NATIVE_TYPE 'VARCHAR'),
    OPERATOR_NAME string(5000) OPTIONS (ANNOTATION 'Name of an operator', NAMEINSOURCE '"OPERATOR_NAME"', NATIVE_TYPE 'VARCHAR'),
    OPERATOR_DETAILS clob OPTIONS (ANNOTATION 'Details of an operator. Predicates and expressions used by the operator are shown here', NAMEINSOURCE '"OPERATOR_DETAILS"', NATIVE_TYPE 'NCLOB'),
    EXECUTION_ENGINE string(256) OPTIONS (ANNOTATION 'Execution engine where the plan operator is executed: COLUMN or ROW', NAMEINSOURCE '"EXECUTION_ENGINE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name the dependent object belongs to', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Name of database tables and views accessed by an operator', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE string(5000) OPTIONS (ANNOTATION 'Table stored type: COLUMN or ROW', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TABLE_SIZE double OPTIONS (ANNOTATION 'Estimated input row count of an operator. This is available only for operators accessing tables and views directly', NAMEINSOURCE '"TABLE_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OUTPUT_SIZE double OPTIONS (ANNOTATION 'Estimated output row count of an operator', NAMEINSOURCE '"OUTPUT_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    SUBTREE_COST double OPTIONS (ANNOTATION 'Estimated cost of executing the subtree starting from an operator', NAMEINSOURCE '"SUBTREE_COST"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OPERATOR_ID integer OPTIONS (ANNOTATION 'Unique ID of an operator. IDs are integers starting from 1', NAMEINSOURCE '"OPERATOR_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARENT_OPERATOR_ID integer OPTIONS (ANNOTATION 'OPERATOR_ID of the parent of an operator. The shape of a query plan is a tree and the topology of the tree can be reconstructed using OPERATOR_ID and PARENT_OPERATOR_ID. PARENT_OPERATOR_ID of the root operator is shown as NULL ', NAMEINSOURCE '"PARENT_OPERATOR_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL integer OPTIONS (ANNOTATION 'Level from the root operator. Level of the root operator is 1, level of a child of the root operator is 2 and so on. This can be utilized for output indentation', NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POSITION integer OPTIONS (ANNOTATION 'Position in the parent operator. Position of the first child is 1, position of the second child is 2 and so on', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HOST string(256) OPTIONS (ANNOTATION 'Host where the plan operator is generated', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port where the plan operator is generated', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Date and time when the EXPLAIN PLAN command was executed', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'SQL query plan explanation result', NAMEINSOURCE '"SYS"."EXPLAIN_PLAN_TABLE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.FULLTEXT_INDEXES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the fulltext index', NAMEINSOURCE '"INDEX_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the fulltext index', NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LANGUAGE_COLUMN string(256) OPTIONS (ANNOTATION 'Column name of the indexed table containing language indicators for the indexed documents', NAMEINSOURCE '"LANGUAGE_COLUMN"', NATIVE_TYPE 'NVARCHAR'),
    MIME_TYPE_COLUMN string(256) OPTIONS (ANNOTATION 'Column name of the indexed table containing MIME type indicators for the indexed documents', NAMEINSOURCE '"MIME_TYPE_COLUMN"', NATIVE_TYPE 'NVARCHAR'),
    LANGUAGE_DETECTION string(256) OPTIONS (ANNOTATION 'Set of languages to be considered for automatic language detection', NAMEINSOURCE '"LANGUAGE_DETECTION"', NATIVE_TYPE 'NVARCHAR'),
    FAST_PREPROCESS string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, preprocessing will be done with reduced functionality (e.g. linguistic search is not available), which will speed up the indexing', NAMEINSOURCE '"FAST_PREPROCESS"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_INDEX string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, fuzzy search is performed with an additional index (faster search, but higher memory consumption)', NAMEINSOURCE '"FUZZY_SEARCH_INDEX"', NATIVE_TYPE 'VARCHAR'),
    SEARCH_ONLY string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, the text-attributes will not store any DAFs, i.e. it is not possible to retrieve the HTML-converted or original data from the text-attribute. If the text-attribute is a shadow attribute (i.e. created via CREATE FULLTEXT INDEX), the source-attribute (containing the original data) is not affected by this flag', NAMEINSOURCE '"SEARCH_ONLY"', NATIVE_TYPE 'VARCHAR'),
    IS_EXPLICIT string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, the index is an explicit fulltext index, i.e. created by CREATE FULLTEXT INDEX', NAMEINSOURCE '"IS_EXPLICIT"', NATIVE_TYPE 'VARCHAR'),
    FLUSH_AFTER_DOCUMENTS integer OPTIONS (ANNOTATION 'Used to store change-tracking behavior of the fulltext index', NAMEINSOURCE '"FLUSH_AFTER_DOCUMENTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLUSH_EVERY_MINUTES integer OPTIONS (ANNOTATION 'Used to store change-tracking behavior of the fulltext index', NAMEINSOURCE '"FLUSH_EVERY_MINUTES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONFIGURATION string(256) OPTIONS (ANNOTATION 'An explicit config-file can be specified, for example, to enable named entity extraction', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'NVARCHAR'),
    INTERNAL_COLUMN_NAME string(512) OPTIONS (ANNOTATION 'Name of the internal text-attribute, only set if the fulltext index was not created using TEXT-datatype', NAMEINSOURCE '"INTERNAL_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PHRASE_INDEX_RATIO float OPTIONS (ANNOTATION 'Float between 0.0 and 1.0 which specifies how much memory the phrase index may use (as a percentage of the memory size of the fulltext index)', NAMEINSOURCE '"PHRASE_INDEX_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    TEXT_MINING string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, text mining capabilities will be enabled on the indexed column', NAMEINSOURCE '"TEXT_MINING"', NATIVE_TYPE 'VARCHAR'),
    TEXT_ANALYSIS string(5) NOT NULL OPTIONS (ANNOTATION 'If set to true, an additional table is created that stores text analysis results, normally this parameter should be set to false', NAMEINSOURCE '"TEXT_ANALYSIS"', NATIVE_TYPE 'VARCHAR'),
    MIME_TYPE string(256) OPTIONS (ANNOTATION 'MIME type indicator for the indexed documents', NAMEINSOURCE '"MIME_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    TOKEN_SEPARATORS string(256) OPTIONS (ANNOTATION 'Characters used as token separators.', NAMEINSOURCE '"TOKEN_SEPARATORS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Fulltext indexes on table columns', NAMEINSOURCE '"SYS"."FULLTEXT_INDEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.FUNCTION_PARAMETERS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the function', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the function', NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the function', NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMETER_NAME string(256) OPTIONS (ANNOTATION 'Parameter name', NAMEINSOURCE '"PARAMETER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_ID integer OPTIONS (ANNOTATION 'Data type ID', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Data type name', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'Parameter length', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Scale of the parameter', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the parameter', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_TYPE_SCHEMA string(256) OPTIONS (ANNOTATION 'Schema name of table type if DATA_TYPE_NAME is TABLE_TYPE', NAMEINSOURCE '"TABLE_TYPE_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE_NAME string(256) OPTIONS (ANNOTATION 'Name of table type if DATA_TYPE_NAME is TABLE_TYPE', NAMEINSOURCE '"TABLE_TYPE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PARAMETER_TYPE string(7) OPTIONS (ANNOTATION 'Parameter mode: IN, OUT, INOUT', NAMEINSOURCE '"PARAMETER_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HAS_DEFAULT_VALUE string(5) OPTIONS (ANNOTATION 'Specifies whether the parameter has a default value or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_DEFAULT_VALUE"', NATIVE_TYPE 'VARCHAR'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the parameter accepts a null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Parameters of functions', NAMEINSOURCE '"SYS"."FUNCTION_PARAMETERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.FUNCTIONS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the function', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the function', NAMEINSOURCE '"FUNCTION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    FUNCTION_OID long OPTIONS (ANNOTATION 'Object ID of the function', NAMEINSOURCE '"FUNCTION_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INPUT_PARAMETER_COUNT integer OPTIONS (ANNOTATION 'Input type parameter count', NAMEINSOURCE '"INPUT_PARAMETER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RETURN_VALUE_COUNT integer OPTIONS (ANNOTATION 'Return value type parameter count', NAMEINSOURCE '"RETURN_VALUE_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_UNICODE string(5) OPTIONS (ANNOTATION 'Specifies whether the function contains Unicode or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNICODE"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION clob OPTIONS (ANNOTATION 'Query string of the function', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NCLOB'),
    FUNCTION_TYPE string(10) NOT NULL OPTIONS (ANNOTATION 'Type of the function', NAMEINSOURCE '"FUNCTION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the function is valid or not. This becomes ''FALSE'' when its base objects are changed or dropped: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Available functions', NAMEINSOURCE '"SYS"."FUNCTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.GARBAGE_DATA_CONTAINERS_" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long NOT NULL OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE byte NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    PART_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STORAGE_ID long NOT NULL OPTIONS (NAMEINSOURCE '"STORAGE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ADDITIONAL_INFO clob(24) OPTIONS (NAMEINSOURCE '"ADDITIONAL_INFO"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    VOLUMN_ID integer OPTIONS (NAMEINSOURCE '"VOLUMN_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLLECTABLE byte OPTIONS (NAMEINSOURCE '"COLLECTABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FLAG byte OPTIONS (NAMEINSOURCE '"FLAG"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."GARBAGE_DATA_CONTAINERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.GEOCODE_INDEXES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Index name', NAMEINSOURCE '"INDEX_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the index', NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSH_AFTER_DOCUMENTS integer OPTIONS (ANNOTATION 'Used to store change-tracking behaviour of the index', NAMEINSOURCE '"FLUSH_AFTER_DOCUMENTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLUSH_EVERY_MINUTES integer OPTIONS (ANNOTATION 'Used to store change-tracking behaviour of the index', NAMEINSOURCE '"FLUSH_EVERY_MINUTES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Geocode indexes on tables', NAMEINSOURCE '"SYS"."GEOCODE_INDEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.GRANTED_PRIVILEGES" (
    GRANTEE string(256) OPTIONS (ANNOTATION 'User or role the privilege is granted to', NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE_TYPE string(4) NOT NULL OPTIONS (ANNOTATION '''USER'' or ''ROLE''', NAMEINSOURCE '"GRANTEE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    GRANTOR string(256) OPTIONS (ANNOTATION 'User who granted the privilege', NAMEINSOURCE '"GRANTOR"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the granted object like: ''TABLE''/''SCHEMA''/...', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name the object belongs to', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of granted object', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PRIVILEGE string(256) OPTIONS (ANNOTATION 'Privilege granted', NAMEINSOURCE '"PRIVILEGE"', NATIVE_TYPE 'NVARCHAR'),
    IS_GRANTABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Privilege was granted ''WITH GRANT OPTION''/''WITH ADMIN OPTION'': ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_GRANTABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Privilege is valid or it became invalid because of implicit revoking: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Privileges granted to users and roles', NAMEINSOURCE '"SYS"."GRANTED_PRIVILEGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.GRANTED_ROLES" (
    GRANTEE string(256) OPTIONS (ANNOTATION 'User or role the role is granted to', NAMEINSOURCE '"GRANTEE"', NATIVE_TYPE 'NVARCHAR'),
    GRANTEE_TYPE string(4) NOT NULL OPTIONS (ANNOTATION '''USER'' or ''ROLE''', NAMEINSOURCE '"GRANTEE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    ROLE_NAME string(256) OPTIONS (ANNOTATION 'Name of the granted role', NAMEINSOURCE '"ROLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GRANTOR string(256) OPTIONS (ANNOTATION 'User who granted the role', NAMEINSOURCE '"GRANTOR"', NATIVE_TYPE 'NVARCHAR'),
    IS_GRANTABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Role was granted ''WITH ADMIN OPTION'': ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_GRANTABLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Roles granted to users or other roles', NAMEINSOURCE '"SYS"."GRANTED_ROLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.HAS_NEEDED_SYSTEM_PRIV" (
    HAS_PRIV integer NOT NULL OPTIONS (NAMEINSOURCE '"HAS_PRIV"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."HAS_NEEDED_SYSTEM_PRIV"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.HAS_NEEDED_SYSTEM_PRIV_INCL_SYS_STAT" (
    HAS_PRIV integer NOT NULL OPTIONS (NAMEINSOURCE '"HAS_PRIV"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."HAS_NEEDED_SYSTEM_PRIV_INCL_SYS_STAT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.INDEX_COLUMNS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Index name', NAMEINSOURCE '"INDEX_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the index', NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "CONSTRAINT" string(32) OPTIONS (ANNOTATION 'Constraint type of the index: UNIQUE, NOT_NULL_UNIQUE, PRIMARY_KEY; Geocode type of the column: GEOCODE COUNTRY, GEOCODE STATE, GEOCODE COUNTY, GEOCODE CITY, GEOCODE POSTAL_CODE, GEOCODE DISTRICT, GEOCODE STREET, GEOCODE HOUSE_NUMBER, GEOCODE ADDRESS_LINE, GEOCODE', NAMEINSOURCE '"CONSTRAINT"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the indexed column', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short OPTIONS (ANNOTATION 'Ordinal position of the indexed column', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ASCENDING_ORDER string(5) OPTIONS (ANNOTATION 'Specifies whether the indexed column is ascending order or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"ASCENDING_ORDER"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Columns of indexes', NAMEINSOURCE '"SYS"."INDEX_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.INDEXES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Index name', NAMEINSOURCE '"INDEX_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_OID long OPTIONS (ANNOTATION 'Object ID of the index', NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_TYPE string(32) OPTIONS (ANNOTATION 'Type of RS-index: ''BTREE''/''BTREE_UNIQUE''/''CPBTREE''/''CPBTREE_UNIQUE''; Type of CS-index: ''INVERTED VALUE''/''INVERTED VALUE UNIQUE''', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    "CONSTRAINT" string(32) OPTIONS (ANNOTATION 'Constraint type of the index: ''UNIQUE''/''NOT_NULL_UNIQUE''/''PRIMARY_KEY''', NAMEINSOURCE '"CONSTRAINT"', NATIVE_TYPE 'VARCHAR'),
    KEY_LENGTH short OPTIONS (ANNOTATION 'Length of the key', NAMEINSOURCE '"KEY_LENGTH"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    BTREE_FILL_FACTOR short OPTIONS (ANNOTATION 'B-tree fill factor (50~100)', NAMEINSOURCE '"BTREE_FILL_FACTOR"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    BTREE_SPLIT_TYPE byte OPTIONS (ANNOTATION 'B-tree split type: ''SPLIT_PERCENT''/''SPLIT_INVOKER''', NAMEINSOURCE '"BTREE_SPLIT_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    BTREE_SPLIT_POSITION byte OPTIONS (ANNOTATION 'B-tree split position (0~100)', NAMEINSOURCE '"BTREE_SPLIT_POSITION"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (ANNOTATION 'Indexes on tables', NAMEINSOURCE '"SYS"."INDEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.INVALID_CONNECT_ATTEMPTS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUCCESSFUL_CONNECT_TIME timestamp NOT NULL OPTIONS (ANNOTATION 'Time of the valid connect attempt', NAMEINSOURCE '"SUCCESSFUL_CONNECT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INVALID_CONNECT_ATTEMPTS long OPTIONS (ANNOTATION 'Number of invalid connect attempts for this user between last successful connect and given time', NAMEINSOURCE '"INVALID_CONNECT_ATTEMPTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Number of invalid connect attempts for a user between two successful connects', NAMEINSOURCE '"SYS"."INVALID_CONNECT_ATTEMPTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_ACTIVE_STATEMENTS" (
    HOST string(64) NOT NULL OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer NOT NULL OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer NOT NULL OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Prepared statement ID', NAMEINSOURCE '"STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    START_MVCC_TIMESTAMP long OPTIONS (ANNOTATION 'Internal MVCC timestamp of the transaction start time', NAMEINSOURCE '"START_MVCC_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPILED_TIME timestamp OPTIONS (ANNOTATION 'Compilation timestamp of the statement', NAMEINSOURCE '"COMPILED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATEMENT_STATUS string(128) OPTIONS (ANNOTATION 'Status of SQL statement', NAMEINSOURCE '"STATEMENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'SQL statement', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    ALLOCATED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Current snapshot of allocated memory size for executing this statement', NAMEINSOURCE '"ALLOCATED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Current snapshot of used memory size for executing this statement', NAMEINSOURCE '"USED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_ID long OPTIONS (ANNOTATION 'Logical plan ID', NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_EXECUTED_TIME timestamp OPTIONS (ANNOTATION 'Recently executed time of statement. This timestamp is updated when opening cursors and executing DML/DDL but not when fetching cursor results or closing cursors.', NAMEINSOURCE '"LAST_EXECUTED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_ACTION_TIME timestamp OPTIONS (ANNOTATION 'Recently performed time of action against the statement. This timestamp is updated when opening cursors, executing DML/DDL, fetching results, and closing cursors.', NAMEINSOURCE '"LAST_ACTION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RECOMPILE_COUNT long OPTIONS (ANNOTATION 'Recompile count', NAMEINSOURCE '"RECOMPILE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT long OPTIONS (ANNOTATION 'Count of executions', NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_TIME long OPTIONS (ANNOTATION 'Average time of statement execution', NAMEINSOURCE '"AVG_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum time of statement execution', NAMEINSOURCE '"MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_TIME long OPTIONS (ANNOTATION 'Minimum time of statement execution', NAMEINSOURCE '"MIN_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Sum of statement execution time', NAMEINSOURCE '"TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CURSOR_DURATION long OPTIONS (ANNOTATION 'Average time of statement execution including communication time with clients', NAMEINSOURCE '"AVG_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CURSOR_DURATION long OPTIONS (ANNOTATION 'Maximum time of statement execution including communication time with clients', NAMEINSOURCE '"MAX_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Minimum time of statement execution including communication time with clients', NAMEINSOURCE '"MIN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CURSOR_DURATION long OPTIONS (ANNOTATION 'Sum of statement execution time including communication time with clients', NAMEINSOURCE '"TOTAL_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Average memory size used during each execution', NAMEINSOURCE '"AVG_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Maximum memory size used during each execution', NAMEINSOURCE '"MAX_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Minimum memory size used during each execution', NAMEINSOURCE '"MIN_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Sum of memory size used during each execution', NAMEINSOURCE '"TOTAL_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Average lock wait time for the statement', NAMEINSOURCE '"AVG_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Maximum lock wait time for the statement', NAMEINSOURCE '"MAX_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Minimum lock wait time for the statement', NAMEINSOURCE '"MIN_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCKWAIT_COUNT long OPTIONS (ANNOTATION 'Total lock wait count for the statement', NAMEINSOURCE '"TOTAL_LOCKWAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Accumulated lock wait time for the statement', NAMEINSOURCE '"TOTAL_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (ANNOTATION 'Average time of statement preparation', NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (ANNOTATION 'Maximum time of statement preparation', NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Minimum time of statement preparation', NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (ANNOTATION 'Total time of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_COUNT long OPTIONS (ANNOTATION 'Total count of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HAS_HOLDABLE_CURSOR string(5) OPTIONS (ANNOTATION 'Holdable cursor existence', NAMEINSOURCE '"HAS_HOLDABLE_CURSOR"', NATIVE_TYPE 'VARCHAR'),
    CURSOR_TYPE string(18) OPTIONS (ANNOTATION 'Type of cursor', NAMEINSOURCE '"CURSOR_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PARENT_STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Parent prepared statement ID', NAMEINSOURCE '"PARENT_STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    APPLICATION_SOURCE string(256) OPTIONS (ANNOTATION 'Application source information', NAMEINSOURCE '"APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Prepared statements list', NAMEINSOURCE '"SYS"."M_ACTIVE_STATEMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_ATTACHED_STORAGES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    STORAGE_ID integer OPTIONS (ANNOTATION 'Storage ID', NAMEINSOURCE '"STORAGE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    KEY string(256) OPTIONS (ANNOTATION 'Key (from storage provider)', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(2000) OPTIONS (ANNOTATION 'Value (from storage provider)', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Information about currently attached devices', NAMEINSOURCE '"SYS"."M_ATTACHED_STORAGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_BACKUP_CATALOG" (
    ENTRY_ID long OPTIONS (ANNOTATION 'Unique ID of a backup catalog entry', NAMEINSOURCE '"ENTRY_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTRY_TYPE_NAME string(64) OPTIONS (ANNOTATION 'Classification of backup catalog entries. The following types are supported: ''complete data backup''/''data snapshot''/''log backup''/''log missing''', NAMEINSOURCE '"ENTRY_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    BACKUP_ID long OPTIONS (ANNOTATION 'Unique ID of a data backup or a log backup respectively. All backup files of a single data backup share the same BACKUP_ID', NAMEINSOURCE '"BACKUP_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SYS_START_TIME timestamp OPTIONS (ANNOTATION 'Start time given in server local time', NAMEINSOURCE '"SYS_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    UTC_START_TIME timestamp OPTIONS (ANNOTATION 'Start time given in UTC', NAMEINSOURCE '"UTC_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SYS_END_TIME timestamp OPTIONS (ANNOTATION 'Stop time given in server local time', NAMEINSOURCE '"SYS_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    UTC_END_TIME timestamp OPTIONS (ANNOTATION 'Stop time given in UTC', NAMEINSOURCE '"UTC_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE_NAME string(64) OPTIONS (ANNOTATION 'Result of corresponding action: ''successful''/''failed''/''running''/''cancel pending''/''canceled''', NAMEINSOURCE '"STATE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMMENT string(256) OPTIONS (ANNOTATION 'Additional information', NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'VARCHAR'),
    MESSAGE string(512) OPTIONS (ANNOTATION 'Additional information', NAMEINSOURCE '"MESSAGE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Common data for all backup catalog entries', NAMEINSOURCE '"SYS"."M_BACKUP_CATALOG"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_BACKUP_CATALOG_FILES" (
    ENTRY_ID long OPTIONS (ANNOTATION 'Unique ID of a backup catalog entry', NAMEINSOURCE '"ENTRY_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKUP_ID long OPTIONS (ANNOTATION 'Unique ID of a data backup and log backup respectively. All backup files of a single data backup share the same BACKUP_ID', NAMEINSOURCE '"BACKUP_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SOURCE_ID long OPTIONS (ANNOTATION 'Persistence volume ID', NAMEINSOURCE '"SOURCE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SOURCE_TYPE_NAME string(64) OPTIONS (ANNOTATION 'Type of persistence to be backed up: ''volume''/''topology''', NAMEINSOURCE '"SOURCE_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    SERVICE_TYPE_NAME string(64) OPTIONS (ANNOTATION 'Type of database service: ''indexserver''/''nameserver''/''statisticsserver''', NAMEINSOURCE '"SERVICE_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    REDO_LOG_POSITION long OPTIONS (ANNOTATION 'In case of a data backup this value specifies the log position that must be processed next when a log recovery is requested after restoring the data backup', NAMEINSOURCE '"REDO_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIRST_REDO_LOG_POSITION long OPTIONS (ANNOTATION 'In case of a log backup this value specifies the log position of the oldest log entry contained in the backup', NAMEINSOURCE '"FIRST_REDO_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_REDO_LOG_POSITION long OPTIONS (ANNOTATION 'In case of a log backup this value specifies the log position of the newest log entry contained in the backup', NAMEINSOURCE '"LAST_REDO_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKUP_SIZE long OPTIONS (ANNOTATION 'Specifies the size of the backup', NAMEINSOURCE '"BACKUP_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTINATION_PATH string(512) OPTIONS (ANNOTATION 'Data or log backup was written to this location', NAMEINSOURCE '"DESTINATION_PATH"', NATIVE_TYPE 'VARCHAR'),
    DESTINATION_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Type of location: ''file''/''backint''', NAMEINSOURCE '"DESTINATION_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    EXTERNAL_BACKUP_ID string(64) OPTIONS (ANNOTATION 'Identifier of backup received from a backup tool', NAMEINSOURCE '"EXTERNAL_BACKUP_ID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Location information of all backup catalog entries', NAMEINSOURCE '"SYS"."M_BACKUP_CATALOG_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_BACKUP_CONFIGURATION" (
    MAX_RECOVERY_FILE_AGE long OPTIONS (ANNOTATION 'Max recovery file age', NAMEINSOURCE '"MAX_RECOVERY_FILE_AGE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOG_REPLAY_STEP_SIZE long OPTIONS (ANNOTATION 'Log replay step size in bytes', NAMEINSOURCE '"LOG_REPLAY_STEP_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_RECOVERY_BACKINT_CHANNELS long OPTIONS (ANNOTATION 'Max number of parallel backint channels per request during recovery', NAMEINSOURCE '"MAX_RECOVERY_BACKINT_CHANNELS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKINT_EXECUTABLE_LINK string(256) OPTIONS (ANNOTATION 'Linkname of the backint executable', NAMEINSOURCE '"BACKINT_EXECUTABLE_LINK"', NATIVE_TYPE 'VARCHAR'),
    BACKINT_EXECUTABLE string(256) OPTIONS (ANNOTATION 'Real filename of the backint executable', NAMEINSOURCE '"BACKINT_EXECUTABLE"', NATIVE_TYPE 'VARCHAR'),
    BACKINT_DATA_BACKUP_PATH string(256) OPTIONS (ANNOTATION 'Data backup directory for backint', NAMEINSOURCE '"BACKINT_DATA_BACKUP_PATH"', NATIVE_TYPE 'VARCHAR'),
    BACKINT_LOG_BACKUP_PATH string(256) OPTIONS (ANNOTATION 'Log backup directory for backint', NAMEINSOURCE '"BACKINT_LOG_BACKUP_PATH"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Backup configuration statistics', NAMEINSOURCE '"SYS"."M_BACKUP_CONFIGURATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_BLOCKED_TRANSACTIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    BLOCKED_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID of the transaction waiting for a lock', NAMEINSOURCE '"BLOCKED_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    BLOCKED_UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID of the write transaction waiting for the lock', NAMEINSOURCE '"BLOCKED_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKED_CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID associated with the blocked write transaction', NAMEINSOURCE '"BLOCKED_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID of the transaction holding the lock', NAMEINSOURCE '"LOCK_OWNER_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID of the write transaction holding the lock', NAMEINSOURCE '"LOCK_OWNER_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_OWNER_CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID associated with the write transaction holding the lock', NAMEINSOURCE '"LOCK_OWNER_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    BLOCKED_TIME timestamp OPTIONS (ANNOTATION 'Blocked timestamp', NAMEINSOURCE '"BLOCKED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    WAITING_RECORD_ID string(256) OPTIONS (ANNOTATION 'ID of the record on which the lock is currently placed', NAMEINSOURCE '"WAITING_RECORD_ID"', NATIVE_TYPE 'VARCHAR'),
    WAITING_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Name of the schema on which the lock is currently placed', NAMEINSOURCE '"WAITING_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WAITING_TABLE_NAME string(256) OPTIONS (ANNOTATION 'Deprecated: use WAITING_OBJECT_NAME instead', NAMEINSOURCE '"WAITING_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WAITING_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the object on which the lock is currently placed', NAMEINSOURCE '"WAITING_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WAITING_OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Object type', NAMEINSOURCE '"WAITING_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_TYPE string(32) OPTIONS (ANNOTATION 'Lock type: ''RECORD''/''TABLE''/''METADATA''', NAMEINSOURCE '"LOCK_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_MODE string(32) OPTIONS (ANNOTATION 'Lock mode: ''SHARED''/''EXCLUSIVE''/''INTENTIONAL EXCLUSIVE''', NAMEINSOURCE '"LOCK_MODE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Transaction list waiting for locks', NAMEINSOURCE '"SYS"."M_BLOCKED_TRANSACTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CACHE_ENTRIES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CACHE_ID string(128) OPTIONS (ANNOTATION 'ID of the cache that created the entry', NAMEINSOURCE '"CACHE_ID"', NATIVE_TYPE 'VARCHAR'),
    ENTRY_ID string(128) OPTIONS (ANNOTATION 'ID of the cached entry', NAMEINSOURCE '"ENTRY_ID"', NATIVE_TYPE 'VARCHAR'),
    ENTRY_DESCRIPTION string(5000) OPTIONS (ANNOTATION 'Description of the cached entry', NAMEINSOURCE '"ENTRY_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    COMPONENT string(128) OPTIONS (ANNOTATION 'Information about the component that created the cached entry', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'Information about the user that created the cached entry', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    MEMORY_SIZE long OPTIONS (ANNOTATION 'Used memory to store the cached entry in the cache', NAMEINSOURCE '"MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Point in time when the cache entry was inserted into the cache', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    READ_COUNT long OPTIONS (ANNOTATION 'Determines how often the cache entry was read successfully from the cache', NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Cache entry information', NAMEINSOURCE '"SYS"."M_CACHE_ENTRIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CACHES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CACHE_ID string(128) OPTIONS (ANNOTATION 'The unique identifier for the cache', NAMEINSOURCE '"CACHE_ID"', NATIVE_TYPE 'VARCHAR'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'The maximum available memory budget in bytes available for the cache instance', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'The memory in bytes used by the cache instance', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTRY_COUNT long OPTIONS (ANNOTATION 'The number of entries in the cache instance', NAMEINSOURCE '"ENTRY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSERT_COUNT long OPTIONS (ANNOTATION 'The number of insertions into the cache instance', NAMEINSOURCE '"INSERT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INVALIDATE_COUNT long OPTIONS (ANNOTATION 'The number of invalidations in the cache instance', NAMEINSOURCE '"INVALIDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HIT_COUNT long OPTIONS (ANNOTATION 'The number of cache hits for the cache instance', NAMEINSOURCE '"HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MISS_COUNT long OPTIONS (ANNOTATION 'The number of cache misses for the cache instance', NAMEINSOURCE '"MISS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Shows aggregated information on caches', NAMEINSOURCE '"SYS"."M_CACHES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CACHES_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CACHE_ID string(128) OPTIONS (ANNOTATION 'The unique identifier for the cache', NAMEINSOURCE '"CACHE_ID"', NATIVE_TYPE 'VARCHAR'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'The maximum available memory budget in bytes available for the cache instance', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'The memory in bytes used by the cache instance', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTRY_COUNT long OPTIONS (ANNOTATION 'The number of entries in the cache instance', NAMEINSOURCE '"ENTRY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSERT_COUNT long OPTIONS (ANNOTATION 'The number of insertions into the cache instance', NAMEINSOURCE '"INSERT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INVALIDATE_COUNT long OPTIONS (ANNOTATION 'The number of invalidations in the cache instance', NAMEINSOURCE '"INVALIDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HIT_COUNT long OPTIONS (ANNOTATION 'The number of cache hits for the cache instance', NAMEINSOURCE '"HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MISS_COUNT long OPTIONS (ANNOTATION 'The number of cache misses for the cache instance', NAMEINSOURCE '"MISS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Shows aggregated information on caches', NAMEINSOURCE '"SYS"."M_CACHES_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CATALOG_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Category of catalog data', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    ALLOCATION_COUNT long OPTIONS (ANNOTATION 'The number of allocated entries', NAMEINSOURCE '"ALLOCATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_FIXED_PART_SIZE long OPTIONS (ANNOTATION 'Allocated memory size for fixed-size part', NAMEINSOURCE '"ALLOCATED_FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_FIXED_PART_SIZE long OPTIONS (ANNOTATION 'Used memory size for fixed-size part', NAMEINSOURCE '"USED_FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_VARIABLE_PART_SIZE long OPTIONS (ANNOTATION 'Allocated memory size for variable-size part', NAMEINSOURCE '"ALLOCATED_VARIABLE_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_VARIABLE_PART_SIZE long OPTIONS (ANNOTATION 'Used memory size for variable-size part', NAMEINSOURCE '"USED_VARIABLE_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Memory usage information by catalog manager', NAMEINSOURCE '"SYS"."M_CATALOG_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CE_CALCSCENARIOS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_PERSISTENT string(5) OPTIONS (ANNOTATION 'Indicates if calculation scenario is persistent or transient: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_PERSISTENT"', NATIVE_TYPE 'VARCHAR'),
    FLAGS long OPTIONS (ANNOTATION 'Calculation scenario flags', NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Creation time', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory size of loaded calculation scenario model', NAMEINSOURCE '"MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(256) OPTIONS (ANNOTATION 'Component that create the calculation scenario', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'NVARCHAR'),
    SCENARIO_VERSION string(256) OPTIONS (ANNOTATION 'Scenario version of the calculation scenario', NAMEINSOURCE '"SCENARIO_VERSION"', NATIVE_TYPE 'NVARCHAR'),
    JSON clob OPTIONS (ANNOTATION 'JSON string representing the calculation scenario', NAMEINSOURCE '"JSON"', NATIVE_TYPE 'NCLOB')
) OPTIONS (ANNOTATION 'All available CalculationScenarios', NAMEINSOURCE '"SYS"."M_CE_CALCSCENARIOS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CE_CALCSCENARIOS_OVERVIEW" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_PERSISTENT string(5) OPTIONS (ANNOTATION 'Indicates if calculation scenario is persistent or transient: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_PERSISTENT"', NATIVE_TYPE 'VARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Creation time', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory size of loaded calculation scenario model', NAMEINSOURCE '"MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(256) OPTIONS (ANNOTATION 'Component that create the calculation scenario', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Overview of Calcscenarios without JSON representation', NAMEINSOURCE '"SYS"."M_CE_CALCSCENARIOS_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CE_CALCVIEW_DEPENDENCIES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of column view', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'Column view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CALCNODE_NAME string(256) OPTIONS (ANNOTATION 'Referenced calculation node name', NAMEINSOURCE '"CALCNODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'All views that are referencing a CalculationScenario', NAMEINSOURCE '"SYS"."M_CE_CALCVIEW_DEPENDENCIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CE_DEBUG_INFOS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NODE_NAME string(256) OPTIONS (ANNOTATION 'Calculation node name', NAMEINSOURCE '"NODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT_ID long OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEBUG_TYPE_MASK long OPTIONS (ANNOTATION 'Bit mask indicating type of debug information', NAMEINSOURCE '"DEBUG_TYPE_MASK"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name (temporay intermediate result table)', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAMES clob OPTIONS (ANNOTATION 'Column names', NAMEINSOURCE '"COLUMN_NAMES"', NATIVE_TYPE 'CLOB'),
    TABLE_SIZE long OPTIONS (ANNOTATION 'Table size (temporay intermediate result table)', NAMEINSOURCE '"TABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Execution timestamp', NAMEINSOURCE '"EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    APPLICATION_QUERY_ID string(256) OPTIONS (ANNOTATION 'Application Query ID', NAMEINSOURCE '"APPLICATION_QUERY_ID"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Debug information after execution of a CalculationScenario', NAMEINSOURCE '"SYS"."M_CE_DEBUG_INFOS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CE_DEBUG_JSONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT_ID long OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE string(16) OPTIONS (ANNOTATION 'JSON type (original, instantiated, optimized, extrace)', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    MODEL_JSON clob OPTIONS (ANNOTATION 'JSON string representing the calculation scenario', NAMEINSOURCE '"MODEL_JSON"', NATIVE_TYPE 'NCLOB'),
    EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Execution timestamp', NAMEINSOURCE '"EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'All available JSONS (original, instantiated, optimized) of a scenario for a concrete query', NAMEINSOURCE '"SYS"."M_CE_DEBUG_JSONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CE_DEBUG_NODE_MAPPING" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_ID long OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NODE_NAME string(256) OPTIONS (ANNOTATION 'Calculation node name', NAMEINSOURCE '"NODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NODE_TYPE string(16) OPTIONS (ANNOTATION 'Calculation node type (ROOT, TEMPLATE, CALC_DS)', NAMEINSOURCE '"NODE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SUCC_SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Successor scenario name', NAMEINSOURCE '"SUCC_SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUCC_NODE_NAME string(256) OPTIONS (ANNOTATION 'Successor calculation node name', NAMEINSOURCE '"SUCC_NODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RUNTIME_NODE_NAME string(256) OPTIONS (ANNOTATION 'Runtime calculation node name', NAMEINSOURCE '"RUNTIME_NODE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RUNTIME_NODE_JSON clob OPTIONS (ANNOTATION 'JSON string representing the calculation node', NAMEINSOURCE '"RUNTIME_NODE_JSON"', NATIVE_TYPE 'NCLOB'),
    EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Execution timestamp', NAMEINSOURCE '"EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Node mapping between CalculationNodes and RuntimeNodes after execution', NAMEINSOURCE '"SYS"."M_CE_DEBUG_NODE_MAPPING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CE_PLE_CALCSCENARIOS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of calculation scenario', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCENARIO_NAME string(256) OPTIONS (ANNOTATION 'Calculation scenario name', NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'All available CalculationScenarios created by the PlanningEngine', NAMEINSOURCE '"SYS"."M_CE_PLE_CALCSCENARIOS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CLIENT_VERSIONS" (
    CLIENT_TYPE string(256) OPTIONS (ANNOTATION 'Client, e.g. ''ABAP_FDA'', ''BI Modeler''', NAMEINSOURCE '"CLIENT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_RELEASE_ID short OPTIONS (ANNOTATION 'Technical release ID', NAMEINSOURCE '"CLIENT_RELEASE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    CLIENT_RELEASE_DESC string(256) OPTIONS (ANNOTATION 'Human readable release description', NAMEINSOURCE '"CLIENT_RELEASE_DESC"', NATIVE_TYPE 'VARCHAR'),
    MIN_VERSION short OPTIONS (ANNOTATION 'Lowest supported protocol version', NAMEINSOURCE '"MIN_VERSION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    MAX_VERSION short OPTIONS (ANNOTATION 'Highest supported protocol version', NAMEINSOURCE '"MAX_VERSION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (ANNOTATION 'Versions of all supported client applications', NAMEINSOURCE '"SYS"."M_CLIENT_VERSIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_COMPACTION_THREAD" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUM_COMPACTION_COLLISIONS long OPTIONS (ANNOTATION 'Count of memory compaction collisions (other thread currently in compaction and compaction was not forced)', NAMEINSOURCE '"NUM_COMPACTION_COLLISIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NUM_COMPACTIONS long OPTIONS (ANNOTATION 'Count number of compaction requests', NAMEINSOURCE '"NUM_COMPACTIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_SIZE_COMPACTION_REQUESTS long OPTIONS (ANNOTATION 'Compaction request in bytes (last)', NAMEINSOURCE '"LAST_SIZE_COMPACTION_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SIZE_COMPACTION_REQUESTS long OPTIONS (ANNOTATION 'Compaction request in bytes (max)', NAMEINSOURCE '"MAX_SIZE_COMPACTION_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_SIZE_COMPACTION_REQUESTS long OPTIONS (ANNOTATION 'Compaction request in bytes (min)', NAMEINSOURCE '"MIN_SIZE_COMPACTION_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_SIZE_COMPACTION_REQUESTS long OPTIONS (ANNOTATION 'Compaction request in bytes (total)', NAMEINSOURCE '"SUM_SIZE_COMPACTION_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SIZE_COMPACTION_REQUESTS long OPTIONS (ANNOTATION 'Compaction request in bytes (avg)', NAMEINSOURCE '"AVG_SIZE_COMPACTION_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_SIZE_FREEABLE long OPTIONS (ANNOTATION 'Bytes compactible at compaction call (last)', NAMEINSOURCE '"LAST_SIZE_FREEABLE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SIZE_FREEABLE long OPTIONS (ANNOTATION 'Bytes compactible at compaction call (max)', NAMEINSOURCE '"MAX_SIZE_FREEABLE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_SIZE_FREEABLE long OPTIONS (ANNOTATION 'Bytes compactible at compaction call (min)', NAMEINSOURCE '"MIN_SIZE_FREEABLE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_SIZE_FREEABLE long OPTIONS (ANNOTATION 'Bytes compactible at compaction call (total)', NAMEINSOURCE '"SUM_SIZE_FREEABLE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SIZE_FREEABLE long OPTIONS (ANNOTATION 'Bytes compactible at compaction call (avg)', NAMEINSOURCE '"AVG_SIZE_FREEABLE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_SIZE_FREED_BY_GARBAGE_COLLECTION long OPTIONS (ANNOTATION 'Bytes compacted by memory garbage collection (defragmentation) (last)', NAMEINSOURCE '"LAST_SIZE_FREED_BY_GARBAGE_COLLECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SIZE_FREED_BY_GARBAGE_COLLECTION long OPTIONS (ANNOTATION 'Bytes compacted by memory garbage collection (defragmentation) (max)', NAMEINSOURCE '"MAX_SIZE_FREED_BY_GARBAGE_COLLECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_SIZE_FREED_BY_GARBAGE_COLLECTION long OPTIONS (ANNOTATION 'Bytes compacted by memory garbage collection (defragmentation) (min)', NAMEINSOURCE '"MIN_SIZE_FREED_BY_GARBAGE_COLLECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_SIZE_FREED_BY_GARBAGE_COLLECTION long OPTIONS (ANNOTATION 'Bytes compacted by memory garbage collection (defragmentation) (total)', NAMEINSOURCE '"SUM_SIZE_FREED_BY_GARBAGE_COLLECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SIZE_FREED_BY_GARBAGE_COLLECTION long OPTIONS (ANNOTATION 'Bytes compacted by memory garbage collection (defragmentation) (avg)', NAMEINSOURCE '"AVG_SIZE_FREED_BY_GARBAGE_COLLECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMPACTION_RESULT long OPTIONS (ANNOTATION 'Compaction result in bytes (difference of allocated bytes before and after compaction, difference may be influenced by other factors than compaction) (last)', NAMEINSOURCE '"LAST_COMPACTION_RESULT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_COMPACTION_RESULT long OPTIONS (ANNOTATION 'Compaction result in bytes (difference of allocated bytes before and after compaction, difference may be influenced by other factors than compaction) (max)', NAMEINSOURCE '"MAX_COMPACTION_RESULT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_COMPACTION_RESULT long OPTIONS (ANNOTATION 'Compaction result in bytes (difference of allocated bytes before and after compaction, difference may be influenced by other factors than compaction) (min)', NAMEINSOURCE '"MIN_COMPACTION_RESULT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_COMPACTION_RESULT long OPTIONS (ANNOTATION 'Compaction result in bytes (difference of allocated bytes before and after compaction, difference may be influenced by other factors than compaction) (total)', NAMEINSOURCE '"SUM_COMPACTION_RESULT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_COMPACTION_RESULT long OPTIONS (ANNOTATION 'Compaction result in bytes (difference of allocated bytes before and after compaction, difference may be influenced by other factors than compaction) (avg)', NAMEINSOURCE '"AVG_COMPACTION_RESULT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Compaction thread statistics', NAMEINSOURCE '"SYS"."M_COMPACTION_THREAD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CONDITIONAL_VARIABLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of wait calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKING_COUNT long OPTIONS (ANNOTATION 'Count of blocking wait calls', NAMEINSOURCE '"BLOCKING_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timeouts', NAMEINSOURCE '"TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_RATE double OPTIONS (ANNOTATION 'Wait rate', NAMEINSOURCE '"WAIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (last)', NAMEINSOURCE '"LAST_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (max)', NAMEINSOURCE '"MAX_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (min)', NAMEINSOURCE '"MIN_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (total)', NAMEINSOURCE '"SUM_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (avg)', NAMEINSOURCE '"AVG_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of semaphore creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of semaphore destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Semaphore statistics', NAMEINSOURCE '"SYS"."M_CONDITIONAL_VARIABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CONDITIONAL_VARIABLES_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of wait calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKING_COUNT long OPTIONS (ANNOTATION 'Count of blocking wait calls', NAMEINSOURCE '"BLOCKING_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timeouts', NAMEINSOURCE '"TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_RATE double OPTIONS (ANNOTATION 'Wait rate', NAMEINSOURCE '"WAIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (last)', NAMEINSOURCE '"LAST_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (max)', NAMEINSOURCE '"MAX_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (min)', NAMEINSOURCE '"MIN_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (total)', NAMEINSOURCE '"SUM_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (avg)', NAMEINSOURCE '"AVG_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of semaphore creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of semaphore destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Semaphore statistics', NAMEINSOURCE '"SYS"."M_CONDITIONAL_VARIABLES_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CONNECTION_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SELECT_EXECUTION_COUNT long OPTIONS (ANNOTATION 'Total number of select statement executions', NAMEINSOURCE '"SELECT_EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of select statement execution', NAMEINSOURCE '"SELECT_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of select statement execution', NAMEINSOURCE '"SELECT_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    SELECT_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of select statement execution', NAMEINSOURCE '"SELECT_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_COUNT long OPTIONS (ANNOTATION 'Total number of select for update exeution', NAMEINSOURCE '"SELECT_FOR_UPDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of select for update execution', NAMEINSOURCE '"SELECT_FOR_UPDATE_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of select for update execution', NAMEINSOURCE '"SELECT_FOR_UPDATE_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    SELECT_FOR_UPDATE_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of select for update execution', NAMEINSOURCE '"SELECT_FOR_UPDATE_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Number of lock waits during select for update', NAMEINSOURCE '"SELECT_FOR_UPDATE_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_TOTAL_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Total lock wait time during select for update', NAMEINSOURCE '"SELECT_FOR_UPDATE_TOTAL_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SELECT_FOR_UPDATE_AVG_LOCK_WAIT_TIME float OPTIONS (ANNOTATION 'Average lock wait time during select for update', NAMEINSOURCE '"SELECT_FOR_UPDATE_AVG_LOCK_WAIT_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    SELECT_FOR_UPDATE_MAX_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Maximum lock wait time uring select for update', NAMEINSOURCE '"SELECT_FOR_UPDATE_MAX_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_COUNT long OPTIONS (ANNOTATION 'Total number of update statement and insert statement executions', NAMEINSOURCE '"UPDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of update statement executions', NAMEINSOURCE '"UPDATE_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of update statement executions', NAMEINSOURCE '"UPDATE_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    UPDATE_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of update statement executions', NAMEINSOURCE '"UPDATE_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Number of lock waits during update statement executions', NAMEINSOURCE '"UPDATE_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TOTAL_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Total lock wait execution time during update statement executions', NAMEINSOURCE '"UPDATE_TOTAL_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_AVG_LOCK_WAIT_TIME float OPTIONS (ANNOTATION 'Average lock wait time during update statement exectuions', NAMEINSOURCE '"UPDATE_AVG_LOCK_WAIT_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    UPDATE_MAX_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Maximum lock wait time during update statement executions', NAMEINSOURCE '"UPDATE_MAX_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_ONLY_TRANSACTION_COUNT long OPTIONS (ANNOTATION 'Number of read only transactions', NAMEINSOURCE '"READ_ONLY_TRANSACTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_ONLY_TRANSACTION_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of read only transactions', NAMEINSOURCE '"READ_ONLY_TRANSACTION_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_ONLY_TRANSACTION_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of read only transactions', NAMEINSOURCE '"READ_ONLY_TRANSACTION_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    READ_ONLY_TRANSACTION_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of read only transactions', NAMEINSOURCE '"READ_ONLY_TRANSACTION_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_COUNT long OPTIONS (ANNOTATION 'Number of update transactions', NAMEINSOURCE '"UPDATE_TRANSACTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of update transactions', NAMEINSOURCE '"UPDATE_TRANSACTION_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of update transactions', NAMEINSOURCE '"UPDATE_TRANSACTION_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    UPDATE_TRANSACTION_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of update transactions', NAMEINSOURCE '"UPDATE_TRANSACTION_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLLBACK_COUNT long OPTIONS (ANNOTATION 'Number of rollbacked transactions', NAMEINSOURCE '"ROLLBACK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLLBACK_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of rollbacks', NAMEINSOURCE '"ROLLBACK_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLLBACK_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of rollbacks', NAMEINSOURCE '"ROLLBACK_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    ROLLBACK_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of rollbacks', NAMEINSOURCE '"ROLLBACK_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_COUNT long OPTIONS (ANNOTATION 'Number of other statement executions including data definition statements and data control statements', NAMEINSOURCE '"OTHERS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time of other statements', NAMEINSOURCE '"OTHERS_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_AVG_EXECUTION_TIME float OPTIONS (ANNOTATION 'Average execution time of other statements', NAMEINSOURCE '"OTHERS_AVG_EXECUTION_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    OTHERS_MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum execution time of other statements', NAMEINSOURCE '"OTHERS_MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Total lock wait count of other statements', NAMEINSOURCE '"OTHERS_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_TOTAL_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Total lock wait time of other statements', NAMEINSOURCE '"OTHERS_TOTAL_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OTHERS_AVG_LOCK_WAIT_TIME float OPTIONS (ANNOTATION 'Average lock wait time of other statements', NAMEINSOURCE '"OTHERS_AVG_LOCK_WAIT_TIME"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    OTHERS_MAX_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Maximum lock wait time of other statements', NAMEINSOURCE '"OTHERS_MAX_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_EXECUTED_TIME timestamp OPTIONS (ANNOTATION 'Last execution timestamp with this connection', NAMEINSOURCE '"LAST_EXECUTED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    AVG_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Average memory size used during each execution', NAMEINSOURCE '"AVG_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Maximum memory size used during each execution', NAMEINSOURCE '"MAX_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Minimum memory size used during each execution', NAMEINSOURCE '"MIN_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Sum of memory size used during each execution', NAMEINSOURCE '"TOTAL_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (ANNOTATION 'Average time of statement preparation', NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (ANNOTATION 'Maximum time of statement preparation', NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Minimim time of statement preparation', NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (ANNOTATION 'Total time of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_COUNT long OPTIONS (ANNOTATION 'Total count of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT_BY_ROUTING long OPTIONS (ANNOTATION 'Execution count by the client routed connection in statement routing', NAMEINSOURCE '"EXECUTION_COUNT_BY_ROUTING"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    END_TIME timestamp OPTIONS (ANNOTATION 'The time when the connection is closed for history connections', NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Detailed statistics on each connection between an application and database', NAMEINSOURCE '"SYS"."M_CONNECTION_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CONNECTIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Connected Time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IDLE_TIME long OPTIONS (ANNOTATION 'Time that the connection is unused and idle', NAMEINSOURCE '"IDLE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONNECTION_STATUS string(128) OPTIONS (ANNOTATION 'Connection Status: ''RUNNING''/''IDLE''', NAMEINSOURCE '"CONNECTION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_HOST string(64) OPTIONS (ANNOTATION 'Host name of client machine', NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_IP string(16) OPTIONS (ANNOTATION 'IP of client machine', NAMEINSOURCE '"CLIENT_IP"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (ANNOTATION 'Client Process ID', NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONNECTION_TYPE string(128) OPTIONS (ANNOTATION 'Connection type: Remote, Local, History (remote), History (local)', NAMEINSOURCE '"CONNECTION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OWN string(5) OPTIONS (ANNOTATION 'Own connection: TRUE if own connection, FALSE if not', NAMEINSOURCE '"OWN"', NATIVE_TYPE 'VARCHAR'),
    IS_HISTORY_SAVED string(5) OPTIONS (ANNOTATION 'Field is no longer valid  - will be deprecated soon', NAMEINSOURCE '"IS_HISTORY_SAVED"', NATIVE_TYPE 'VARCHAR'),
    MEMORY_SIZE_PER_CONNECTION long OPTIONS (ANNOTATION 'Allocated memory size per connection', NAMEINSOURCE '"MEMORY_SIZE_PER_CONNECTION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AUTO_COMMIT string(5) OPTIONS (ANNOTATION 'Commit mode of the current transaction: TRUE if the current connection is in auto-commit mode, FALSE otherwise', NAMEINSOURCE '"AUTO_COMMIT"', NATIVE_TYPE 'VARCHAR'),
    LAST_ACTION string(128) OPTIONS (ANNOTATION 'The last action done by the current connection: ExecuteGroup, CommitTrans, AbortTrans, PrepareStatement, CloseStatement, ExecutePrepared, ExecuteStatement, FetchCursor, CloseCursor, LobGetPiece, LogPutPiece, LobFind, Authenticate, Connect, Disconnect, ExecQidItab, CursorFetchItab, InsertIncompleteItab, AbapStream, TxStartXA, TxJoinXA ', NAMEINSOURCE '"LAST_ACTION"', NATIVE_TYPE 'VARCHAR'),
    CURRENT_STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Current statement ID', NAMEINSOURCE '"CURRENT_STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    CURRENT_OPERATOR_NAME string(64) OPTIONS (ANNOTATION 'Current operator name', NAMEINSOURCE '"CURRENT_OPERATOR_NAME"', NATIVE_TYPE 'VARCHAR'),
    FETCHED_RECORD_COUNT long OPTIONS (ANNOTATION 'Sum of the record count fetched by select statements', NAMEINSOURCE '"FETCHED_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AFFECTED_RECORD_COUNT long OPTIONS (ANNOTATION 'Sum of the record count affected by DML/DDL statements (e.g. INSERT/UPDATE/DELETE/REPLACE/CREATE TABLE .. LIKE .. WITH DATA/CREATE TABLE .. AS (SELECT ..)/IMPORT/EXPORT)', NAMEINSOURCE '"AFFECTED_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SENT_MESSAGE_SIZE long OPTIONS (ANNOTATION 'Total size of messages sent by the current connection', NAMEINSOURCE '"SENT_MESSAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SENT_MESSAGE_COUNT long OPTIONS (ANNOTATION 'Total message count sent by the current connection', NAMEINSOURCE '"SENT_MESSAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVED_MESSAGE_SIZE long OPTIONS (ANNOTATION 'Total size of messages received by the current connection', NAMEINSOURCE '"RECEIVED_MESSAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVED_MESSAGE_COUNT long OPTIONS (ANNOTATION 'Total message count received by the current connection', NAMEINSOURCE '"RECEIVED_MESSAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATOR_THREAD_ID long OPTIONS (ANNOTATION 'Thread ID who created the current connection', NAMEINSOURCE '"CREATOR_THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATED_BY string(256) OPTIONS (ANNOTATION 'Engine component that created the connections: Session, Planning, Repository, CalcEngine, Authentication, Table Exporter, Loader, LLVM, JSVM, IMS Search API, OLAP Engine, Mergedog, Ping Status, Name Server, Queue Server, SQL Stored Procedure, Authorization, TrexViaDbsl from ABAP, HybridTable Reorganizer, Session external', NAMEINSOURCE '"CREATED_BY"', NATIVE_TYPE 'VARCHAR'),
    IS_ENCRYPTED string(5) OPTIONS (ANNOTATION 'Encrypted: TRUE if the secure communication is enabled (SSL enabled), FALSE, otherwise', NAMEINSOURCE '"IS_ENCRYPTED"', NATIVE_TYPE 'VARCHAR'),
    END_TIME timestamp OPTIONS (ANNOTATION 'The time when the connection is closed for history connections', NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PARENT_CONNECTION_ID integer OPTIONS (ANNOTATION 'Parent connection ID', NAMEINSOURCE '"PARENT_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CLIENT_DISTRIBUTION_MODE string(128) OPTIONS (ANNOTATION 'Client distribution mode of the current connection (i.e. [distribution] client_distribution_mode)', NAMEINSOURCE '"CLIENT_DISTRIBUTION_MODE"', NATIVE_TYPE 'VARCHAR'),
    LOGICAL_CONNECTION_ID integer OPTIONS (ANNOTATION 'Logical connection ID in statement routing', NAMEINSOURCE '"LOGICAL_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CURRENT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Current schema name', NAMEINSOURCE '"CURRENT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CURRENT_THREAD_ID long OPTIONS (ANNOTATION 'Current executing thread ID', NAMEINSOURCE '"CURRENT_THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Detailed information on connections between a client and database. Information includes connection status, client information, connection type, resource utilization', NAMEINSOURCE '"SYS"."M_CONNECTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CONTAINER_DIRECTORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CNT_CREATE long OPTIONS (ANNOTATION 'Count of creates', NAMEINSOURCE '"CNT_CREATE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CREATE_ROLLBACK long OPTIONS (ANNOTATION 'Count of rolled back creates', NAMEINSOURCE '"CNT_CREATE_ROLLBACK"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE long OPTIONS (ANNOTATION 'Count of removes', NAMEINSOURCE '"CNT_REMOVE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE_FAIL long OPTIONS (ANNOTATION 'Count of failed removes', NAMEINSOURCE '"CNT_REMOVE_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE_ROLLBACK long OPTIONS (ANNOTATION 'Count of rolled back removes', NAMEINSOURCE '"CNT_REMOVE_ROLLBACK"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_MOVE long OPTIONS (ANNOTATION 'Count of moves', NAMEINSOURCE '"CNT_MOVE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_GET_PHYSICALSIZE long OPTIONS (ANNOTATION 'Count of getPhysicalSize', NAMEINSOURCE '"CNT_GET_PHYSICALSIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_GET long OPTIONS (ANNOTATION 'Count of retrieved containers', NAMEINSOURCE '"CNT_GET"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_GET_FAIL long OPTIONS (ANNOTATION 'Count of failed gets', NAMEINSOURCE '"CNT_GET_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_BEGIN long OPTIONS (ANNOTATION 'Count of used iterators', NAMEINSOURCE '"CNT_BEGIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_ITERATED long OPTIONS (ANNOTATION 'Count of iterated containers', NAMEINSOURCE '"CNT_ITERATED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CACHEHIT long OPTIONS (ANNOTATION 'Count of cache hits', NAMEINSOURCE '"CNT_CACHEHIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CACHEMISS long OPTIONS (ANNOTATION 'Count of cache misses', NAMEINSOURCE '"CNT_CACHEMISS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CONTAINERS long OPTIONS (ANNOTATION 'Count of existing containers', NAMEINSOURCE '"CNT_CONTAINERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'ContainerDirectory statistics', NAMEINSOURCE '"SYS"."M_CONTAINER_DIRECTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CONTAINER_NAME_DIRECTORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CNT_CREATE long OPTIONS (ANNOTATION 'Count of creates', NAMEINSOURCE '"CNT_CREATE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CREATE_FAIL long OPTIONS (ANNOTATION 'Count of failed creates', NAMEINSOURCE '"CNT_CREATE_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_INITIAL_CREATE long OPTIONS (ANNOTATION 'Count of creates on load', NAMEINSOURCE '"CNT_INITIAL_CREATE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_INITIAL_SKIP long OPTIONS (ANNOTATION 'Count of skips on load', NAMEINSOURCE '"CNT_INITIAL_SKIP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE long OPTIONS (ANNOTATION 'Count of removes', NAMEINSOURCE '"CNT_REMOVE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE_FAIL long OPTIONS (ANNOTATION 'Count of failed removes', NAMEINSOURCE '"CNT_REMOVE_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_REMOVE_ALL long OPTIONS (ANNOTATION 'Count of removeAll', NAMEINSOURCE '"CNT_REMOVE_ALL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_RENAME long OPTIONS (ANNOTATION 'Count of renames', NAMEINSOURCE '"CNT_RENAME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_RENAME_FAIL long OPTIONS (ANNOTATION 'Count of failed renames', NAMEINSOURCE '"CNT_RENAME_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_EXISTS long OPTIONS (ANNOTATION 'Count of checked containers', NAMEINSOURCE '"CNT_EXISTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_GET long OPTIONS (ANNOTATION 'Count of retrieved containers', NAMEINSOURCE '"CNT_GET"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_GET_FAIL long OPTIONS (ANNOTATION 'Count of failed gets', NAMEINSOURCE '"CNT_GET_FAIL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_BEGIN long OPTIONS (ANNOTATION 'Count of used iterators', NAMEINSOURCE '"CNT_BEGIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_ITERATE long OPTIONS (ANNOTATION 'Count of iterated containers', NAMEINSOURCE '"CNT_ITERATE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CNT_CONTAINERS long OPTIONS (ANNOTATION 'Count of existing containers', NAMEINSOURCE '"CNT_CONTAINERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'ContainerNameDirectory statistics', NAMEINSOURCE '"SYS"."M_CONTAINER_NAME_DIRECTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CONTEXT_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Allocator name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    DEPTH long OPTIONS (ANNOTATION 'Depth', NAMEINSOURCE '"DEPTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator, including suballocators', NAMEINSOURCE '"INCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use, including suballocators', NAMEINSOURCE '"INCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator and suballocators (estimate)', NAMEINSOURCE '"INCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator and its suballocators, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"INCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator', NAMEINSOURCE '"EXCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use', NAMEINSOURCE '"EXCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator', NAMEINSOURCE '"EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator (estimate)', NAMEINSOURCE '"EXCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOC_ERRORS long OPTIONS (ANNOTATION 'Count of allocation errors', NAMEINSOURCE '"EXCLUSIVE_ALLOC_ERRORS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"EXCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MALLOC_PROXY_CACHE_MISSES long OPTIONS (ANNOTATION 'Deprecated', NAMEINSOURCE '"MALLOC_PROXY_CACHE_MISSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLAGS string(64) OPTIONS (ANNOTATION 'Allocator flags', NAMEINSOURCE '"FLAGS"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT string(64) OPTIONS (ANNOTATION 'Name of SAP HANA component of this allocator', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Memory allocator statistics', NAMEINSOURCE '"SYS"."M_CONTEXT_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CONTEXT_MEMORY_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Allocator name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    DEPTH long OPTIONS (ANNOTATION 'Depth', NAMEINSOURCE '"DEPTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator, including suballocators', NAMEINSOURCE '"INCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use, including suballocators', NAMEINSOURCE '"INCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator and suballocators (estimate)', NAMEINSOURCE '"INCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator and its suballocators, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"INCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator', NAMEINSOURCE '"EXCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use', NAMEINSOURCE '"EXCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator', NAMEINSOURCE '"EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator (estimate)', NAMEINSOURCE '"EXCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOC_ERRORS long OPTIONS (ANNOTATION 'Count of allocation errors', NAMEINSOURCE '"EXCLUSIVE_ALLOC_ERRORS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"EXCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MALLOC_PROXY_CACHE_MISSES long OPTIONS (ANNOTATION 'Deprecated', NAMEINSOURCE '"MALLOC_PROXY_CACHE_MISSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLAGS string(64) OPTIONS (ANNOTATION 'Allocator flags', NAMEINSOURCE '"FLAGS"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT string(64) OPTIONS (ANNOTATION 'Name of SAP HANA component of this allocator', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Memory allocator statistics', NAMEINSOURCE '"SYS"."M_CONTEXT_MEMORY_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CONVERTER_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(32) OPTIONS (ANNOTATION 'Type of converter', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    MAX_LEVEL long OPTIONS (ANNOTATION 'Maximum level, e.g. level of root page', NAMEINSOURCE '"MAX_LEVEL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PAGENUMBER long OPTIONS (ANNOTATION 'Maximum page number', NAMEINSOURCE '"MAX_PAGENUMBER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of currently allocated pages', NAMEINSOURCE '"ALLOCATED_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_PAGE_SIZE long OPTIONS (ANNOTATION 'Total size [bytes] of currently allocated pages', NAMEINSOURCE '"ALLOCATED_PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ALLOCATED_PAGE_COUNT long OPTIONS (ANNOTATION 'Maximum number of allocated pages', NAMEINSOURCE '"MAX_ALLOCATED_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ALLOCATED_PAGE_SIZE long OPTIONS (ANNOTATION 'Maximum size [bytes] of allocated pages', NAMEINSOURCE '"MAX_ALLOCATED_PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATE_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page allocations', NAMEINSOURCE '"ALLOCATE_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATE_OR_GET_STATIC_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page allocations or retrievals during static phase', NAMEINSOURCE '"ALLOCATE_OR_GET_STATIC_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEALLOCATE_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page deallocations', NAMEINSOURCE '"DEALLOCATE_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ASSIGN_PHYSICAL_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of physical page assignments', NAMEINSOURCE '"ASSIGN_PHYSICAL_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNASSIGN_PHYSICAL_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of physical page unassignments', NAMEINSOURCE '"UNASSIGN_PHYSICAL_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNASSIGN_PHYSICAL_PAGE_COUNT_DURING_DROP_SNAPSHOT long OPTIONS (ANNOTATION 'Number of physical page unassignments during drop snapshot', NAMEINSOURCE '"UNASSIGN_PHYSICAL_PAGE_COUNT_DURING_DROP_SNAPSHOT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_SNAPSHOT_COUNT long OPTIONS (ANNOTATION 'Number of snapshots created', NAMEINSOURCE '"CREATE_SNAPSHOT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DROP_SNAPSHOT_COUNT long OPTIONS (ANNOTATION 'Number of snapshots dropped', NAMEINSOURCE '"DROP_SNAPSHOT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL0_COUNT long OPTIONS (ANNOTATION 'Number of level 0 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL0_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL1_COUNT long OPTIONS (ANNOTATION 'Number of level 1 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL1_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL2_COUNT long OPTIONS (ANNOTATION 'Number of level 2 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL2_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL3_COUNT long OPTIONS (ANNOTATION 'Number of level 3 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL3_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL4_COUNT long OPTIONS (ANNOTATION 'Number of level 4 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL4_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Converter statistics', NAMEINSOURCE '"SYS"."M_CONVERTER_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CONVERTER_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(32) OPTIONS (ANNOTATION 'Type of converter', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    MAX_LEVEL long OPTIONS (ANNOTATION 'Maximum level, e.g. level of root page', NAMEINSOURCE '"MAX_LEVEL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PAGENUMBER long OPTIONS (ANNOTATION 'Maximum page number', NAMEINSOURCE '"MAX_PAGENUMBER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of currently allocated pages', NAMEINSOURCE '"ALLOCATED_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_PAGE_SIZE long OPTIONS (ANNOTATION 'Total size [bytes] of currently allocated pages', NAMEINSOURCE '"ALLOCATED_PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ALLOCATED_PAGE_COUNT long OPTIONS (ANNOTATION 'Maximum number of allocated pages', NAMEINSOURCE '"MAX_ALLOCATED_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ALLOCATED_PAGE_SIZE long OPTIONS (ANNOTATION 'Maximum size [bytes] of allocated pages', NAMEINSOURCE '"MAX_ALLOCATED_PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATE_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page allocations', NAMEINSOURCE '"ALLOCATE_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATE_OR_GET_STATIC_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page allocations or retrievals during static phase', NAMEINSOURCE '"ALLOCATE_OR_GET_STATIC_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEALLOCATE_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of page deallocations', NAMEINSOURCE '"DEALLOCATE_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ASSIGN_PHYSICAL_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of physical page assignments', NAMEINSOURCE '"ASSIGN_PHYSICAL_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNASSIGN_PHYSICAL_PAGE_COUNT long OPTIONS (ANNOTATION 'Number of physical page unassignments', NAMEINSOURCE '"UNASSIGN_PHYSICAL_PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNASSIGN_PHYSICAL_PAGE_COUNT_DURING_DROP_SNAPSHOT long OPTIONS (ANNOTATION 'Number of physical page unassignments during drop snapshot', NAMEINSOURCE '"UNASSIGN_PHYSICAL_PAGE_COUNT_DURING_DROP_SNAPSHOT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_SNAPSHOT_COUNT long OPTIONS (ANNOTATION 'Number of snapshots created', NAMEINSOURCE '"CREATE_SNAPSHOT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DROP_SNAPSHOT_COUNT long OPTIONS (ANNOTATION 'Number of snapshots dropped', NAMEINSOURCE '"DROP_SNAPSHOT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL0_COUNT long OPTIONS (ANNOTATION 'Number of level 0 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL0_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL1_COUNT long OPTIONS (ANNOTATION 'Number of level 1 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL1_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL2_COUNT long OPTIONS (ANNOTATION 'Number of level 2 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL2_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL3_COUNT long OPTIONS (ANNOTATION 'Number of level 3 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL3_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_CONVERTERPAGE_LEVEL4_COUNT long OPTIONS (ANNOTATION 'Number of level 4 converter pages written to disk', NAMEINSOURCE '"WRITE_CONVERTERPAGE_LEVEL4_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Converter statistics', NAMEINSOURCE '"SYS"."M_CONVERTER_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CS_ALL_COLUMNS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables, and -1 during table schema change temporarily', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEMORY_SIZE_IN_TOTAL long OPTIONS (ANNOTATION 'Sum of MEMORY_SIZE_IN_MAIN and MEMORY_SIZE_IN_DELTA columns', NAMEINSOURCE '"MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_MAIN long OPTIONS (ANNOTATION 'Current memory consumption in main; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_DELTA long OPTIONS (ANNOTATION 'Current memory consumption in delta; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMPRESSED_SIZE long OPTIONS (ANNOTATION 'Estimated size assuming that column is not compressed', NAMEINSOURCE '"UNCOMPRESSED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPRESSION_RATIO_IN_PERCENTAGE double OPTIONS (ANNOTATION 'MEMORY_SIZE_IN_TOTAL / UNCOMPRESSED_SIZE * 100', NAMEINSOURCE '"COMPRESSION_RATIO_IN_PERCENTAGE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    COUNT long OPTIONS (ANNOTATION 'Record count; 0 if not loaded', NAMEINSOURCE '"COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DISTINCT_COUNT long OPTIONS (ANNOTATION 'Distinct count of values; 0 if not loaded', NAMEINSOURCE '"DISTINCT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPRESSION_TYPE string(16) OPTIONS (ANNOTATION 'Type of column compression: can be SPARSE, PREFIXED, CLUSTERED, INDIRECT, RLE or DEFAULT if column is only dictionary coded. Columns in M_CS_COLUMNS show the runtime value, which can be changed during the runtime', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(16) OPTIONS (ANNOTATION 'Type of inverted index; can be FULL, BLOCK or NONE for no index', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_LOADED string(16) OPTIONS (ANNOTATION 'Load status of inverted index; can be NOT APPLICABLE, UNLOADED or LOADED', NAMEINSOURCE '"INDEX_LOADED"', NATIVE_TYPE 'VARCHAR'),
    IMPLEMENTATION_FLAGS long OPTIONS (ANNOTATION 'Column internal implementation spec summary', NAMEINSOURCE '"IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_ACCESS_TIME timestamp OPTIONS (ANNOTATION 'Last time the column was read or there was an insert to, update of or delete from the column; Undefined for unloaded columns', NAMEINSOURCE '"LAST_ACCESS_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LOADED string(5) OPTIONS (ANNOTATION 'Flag to indicate that column is loaded into memory: ''TRUE''/''FALSE''', NAMEINSOURCE '"LOADED"', NATIVE_TYPE 'VARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAIN_MEMORY_SIZE_IN_DATA long OPTIONS (ANNOTATION 'Current memory consumption in data', NAMEINSOURCE '"MAIN_MEMORY_SIZE_IN_DATA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAIN_MEMORY_SIZE_IN_DICT long OPTIONS (ANNOTATION 'Current memory consumption in dict', NAMEINSOURCE '"MAIN_MEMORY_SIZE_IN_DICT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAIN_MEMORY_SIZE_IN_INDEX long OPTIONS (ANNOTATION 'Current memory consumption in index', NAMEINSOURCE '"MAIN_MEMORY_SIZE_IN_INDEX"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAIN_MEMORY_SIZE_IN_MISC long OPTIONS (ANNOTATION 'Current memory consumption in misc', NAMEINSOURCE '"MAIN_MEMORY_SIZE_IN_MISC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELTA_MEMORY_SIZE_IN_DATA long OPTIONS (ANNOTATION 'Current memory consumption in data', NAMEINSOURCE '"DELTA_MEMORY_SIZE_IN_DATA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELTA_MEMORY_SIZE_IN_DICT long OPTIONS (ANNOTATION 'Current memory consumption in dict', NAMEINSOURCE '"DELTA_MEMORY_SIZE_IN_DICT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELTA_MEMORY_SIZE_IN_INDEX long OPTIONS (ANNOTATION 'Current memory consumption in index', NAMEINSOURCE '"DELTA_MEMORY_SIZE_IN_INDEX"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELTA_MEMORY_SIZE_IN_MISC long OPTIONS (ANNOTATION 'Current memory consumption in misc', NAMEINSOURCE '"DELTA_MEMORY_SIZE_IN_MISC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_CREATE_DURATION long OPTIONS (ANNOTATION 'Time needed for creating inverted index', NAMEINSOURCE '"INDEX_CREATE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELTA_IMPLEMENTATION_FLAGS long OPTIONS (ANNOTATION 'Column internal implementation spec summary', NAMEINSOURCE '"DELTA_IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERNAL_ATTRIBUTE_TYPE string(32) OPTIONS (ANNOTATION 'Attribute type for internal columns; NULL for noninternal columns ', NAMEINSOURCE '"INTERNAL_ATTRIBUTE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LAST_LOAD_TIME timestamp OPTIONS (ANNOTATION 'Last time the column was loaded; Undefined for unloaded columns', NAMEINSOURCE '"LAST_LOAD_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Runtime information from all columns of column tables, including internal ones', NAMEINSOURCE '"SYS"."M_CS_ALL_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CS_COLUMNS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables, and -1 during table schema change temporarily', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEMORY_SIZE_IN_TOTAL long OPTIONS (ANNOTATION 'Sum of MEMORY_SIZE_IN_MAIN and MEMORY_SIZE_IN_DELTA columns', NAMEINSOURCE '"MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_MAIN long OPTIONS (ANNOTATION 'Current memory consumption in main; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_DELTA long OPTIONS (ANNOTATION 'Current memory consumption in delta; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMPRESSED_SIZE long OPTIONS (ANNOTATION 'Estimated size assuming that column is not compressed', NAMEINSOURCE '"UNCOMPRESSED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPRESSION_RATIO_IN_PERCENTAGE double OPTIONS (ANNOTATION 'MEMORY_SIZE_IN_TOTAL / UNCOMPRESSED_SIZE * 100', NAMEINSOURCE '"COMPRESSION_RATIO_IN_PERCENTAGE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    COUNT long OPTIONS (ANNOTATION 'Record count; 0 if not loaded', NAMEINSOURCE '"COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DISTINCT_COUNT long OPTIONS (ANNOTATION 'Distinct count of values; 0 if not loaded', NAMEINSOURCE '"DISTINCT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPRESSION_TYPE string(16) OPTIONS (ANNOTATION 'Type of column compression: can be SPARSE, PREFIXED, CLUSTERED, INDIRECT, RLE or DEFAULT if column is only dictionary coded. Columns in M_CS_COLUMNS show the runtime value, which can be changed during the runtime', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(16) OPTIONS (ANNOTATION 'Type of inverted index; can be FULL, BLOCK or NONE for no index', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_LOADED string(16) OPTIONS (ANNOTATION 'Load status of inverted index; can be NOT APPLICABLE, UNLOADED or LOADED', NAMEINSOURCE '"INDEX_LOADED"', NATIVE_TYPE 'VARCHAR'),
    IMPLEMENTATION_FLAGS long OPTIONS (ANNOTATION 'Column internal implementation spec summary', NAMEINSOURCE '"IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_ACCESS_TIME timestamp OPTIONS (ANNOTATION 'Last time the column was read or there was an insert to, update of or delete from the column; Undefined for unloaded columns', NAMEINSOURCE '"LAST_ACCESS_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LOADED string(5) OPTIONS (ANNOTATION 'Flag to indicate that column is loaded into memory: ''TRUE''/''FALSE''', NAMEINSOURCE '"LOADED"', NATIVE_TYPE 'VARCHAR'),
    LAST_LOAD_TIME timestamp OPTIONS (ANNOTATION 'Last time the column was loaded; Undefined for unloaded columns', NAMEINSOURCE '"LAST_LOAD_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Runtime information of columns of column tables', NAMEINSOURCE '"SYS"."M_CS_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CS_LOADS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOAD_TIME timestamp OPTIONS (ANNOTATION 'Timestamp of load event', NAMEINSOURCE '"LOAD_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name. Empty if the whole table is loaded.', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is loaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object Id of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_HISTORY string(5) OPTIONS (ANNOTATION 'Flag to indicate whether the history part is loaded (only relevant for history tables). Empty if the whole table is loaded.', NAMEINSOURCE '"IS_HISTORY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'This view shows a history of column loads', NAMEINSOURCE '"SYS"."M_CS_LOADS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CS_PARTITIONS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema Name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table Name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "PARTITION" integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables and 1 through number of partitions for partitioned tables', NAMEINSOURCE '"PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUBPARTITION integer OPTIONS (ANNOTATION 'Subpartition ID. 0 for non-partitioned tables or tables without multi-level partitioning and 1 through number of subpartitions for partitioned table with multi-level partitioniong', NAMEINSOURCE '"SUBPARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "RANGE" string(64) OPTIONS (ANNOTATION 'Range definition of partition/subpartition for range-partitioned tables, empty otherwise', NAMEINSOURCE '"RANGE"', NATIVE_TYPE 'VARCHAR'),
    SUBRANGE string(64) OPTIONS (ANNOTATION 'Subrange definition of partition for range-partitioned tables, empty otherwise', NAMEINSOURCE '"SUBRANGE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Partition information of column tables', NAMEINSOURCE '"SYS"."M_CS_PARTITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CS_TABLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned and non-replicated tables, 1 through number of partitions for partitioned tables, 1 through number of the original table and all its replica for replicated tables, and -1 temporarily during table schema change', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MEMORY_SIZE_IN_TOTAL long OPTIONS (ANNOTATION 'Total memory size is the sum of memory size in main, delta, and history parts', NAMEINSOURCE '"MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_MAIN long OPTIONS (ANNOTATION 'Current memory consumption in main; this value varies depending on the number of attributes actually loaded and includes data for open transactions', NAMEINSOURCE '"MEMORY_SIZE_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_DELTA long OPTIONS (ANNOTATION 'Current memory consumption in delta', NAMEINSOURCE '"MEMORY_SIZE_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_HISTORY_MAIN long OPTIONS (ANNOTATION 'Current memory consumption in history-main; 0 for normal non-history tables', NAMEINSOURCE '"MEMORY_SIZE_IN_HISTORY_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_HISTORY_DELTA long OPTIONS (ANNOTATION 'Current memory consumption in history-delta; 0 for normal non-history tables', NAMEINSOURCE '"MEMORY_SIZE_IN_HISTORY_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ESTIMATED_MAX_MEMORY_SIZE_IN_TOTAL long OPTIONS (ANNOTATION 'Estimated maximum memory consumption in total for table fully loaded (not including data for open transactions)', NAMEINSOURCE '"ESTIMATED_MAX_MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECORD_COUNT long OPTIONS (ANNOTATION 'Record count', NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_MAIN long OPTIONS (ANNOTATION 'Current number of entries in table main part, this value differs from number of visible table main rows because there are entries of modified rows marked as invalidated', NAMEINSOURCE '"RAW_RECORD_COUNT_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_DELTA long OPTIONS (ANNOTATION 'Current number of entries in table delta part, this value differs from number of visible table delta rows because there are additional entries such as deleted rows or updated rows; can contain deleted records', NAMEINSOURCE '"RAW_RECORD_COUNT_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_HISTORY_MAIN long OPTIONS (ANNOTATION 'Raw record count in history-main', NAMEINSOURCE '"RAW_RECORD_COUNT_IN_HISTORY_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_RECORD_COUNT_IN_HISTORY_DELTA long OPTIONS (ANNOTATION 'Raw record count in history-delta', NAMEINSOURCE '"RAW_RECORD_COUNT_IN_HISTORY_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMPRESSED_RECORD_COUNT long OPTIONS (ANNOTATION 'The number of entries in main during last optimize compression run', NAMEINSOURCE '"LAST_COMPRESSED_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_UDIV long OPTIONS (ANNOTATION 'Maximum table row number, this number is pure technical and only internally used', NAMEINSOURCE '"MAX_UDIV"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_MERGE_CID long OPTIONS (ANNOTATION 'Maximum commit-ID of transactions for which changes were already merged to table main part', NAMEINSOURCE '"MAX_MERGE_CID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ROWID long OPTIONS (ANNOTATION 'Maximum rowid, this number is pure technical and only internally used', NAMEINSOURCE '"MAX_ROWID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_DELTA2_ACTIVE string(5) OPTIONS (ANNOTATION 'Flag to indicate that a second delta is used: ''TRUE''/''FALSE''. During a table delta merge updates and inserts are stored to a second delta because the delta one is locked', NAMEINSOURCE '"IS_DELTA2_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    IS_DELTA_LOADED string(5) OPTIONS (ANNOTATION 'Flag to indicate that delta part of table is loaded: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_DELTA_LOADED"', NATIVE_TYPE 'VARCHAR'),
    IS_LOG_DELTA string(5) OPTIONS (ANNOTATION 'Flag to indicate that currently delta log is written: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_LOG_DELTA"', NATIVE_TYPE 'VARCHAR'),
    PERSISTENT_MERGE string(5) OPTIONS (ANNOTATION 'Flag to indicate that new main part will be written to disk during table delta merge unless requested differently: ''TRUE''/''FALSE''', NAMEINSOURCE '"PERSISTENT_MERGE"', NATIVE_TYPE 'VARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Created time', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    MODIFY_TIME timestamp OPTIONS (ANNOTATION 'Modified time', NAMEINSOURCE '"MODIFY_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_MERGE_TIME timestamp OPTIONS (ANNOTATION 'Point in time, Unix time format, last time the table delta part was merged into main part', NAMEINSOURCE '"LAST_MERGE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_REPLAY_LOG_TIME timestamp OPTIONS (ANNOTATION 'Point in time, Unix time format, last time the table log was replayed', NAMEINSOURCE '"LAST_REPLAY_LOG_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LOADED string(10) OPTIONS (ANNOTATION 'Flag to show how many columns of table are loaded in memory (NO, PARTIALLY, and FULL); see M_CS_COLUMNS for each column', NAMEINSOURCE '"LOADED"', NATIVE_TYPE 'VARCHAR'),
    READ_COUNT long OPTIONS (ANNOTATION 'Number of read accesses on the table or partition. Note: This is not the number of SELECT statements against this table. A SELECT may involve several read accesses.', NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COUNT long OPTIONS (ANNOTATION 'Number of write accesses on the table or partition. Note: This is not the number of DML & DDL statements against this table.  A DML or DDL statement may involve several write accesses.', NAMEINSOURCE '"WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MERGE_COUNT long OPTIONS (ANNOTATION 'Number of delta merges done on the table or partition', NAMEINSOURCE '"MERGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_REPLICA string(5) OPTIONS (ANNOTATION 'Flag to indicate that the part is a replica', NAMEINSOURCE '"IS_REPLICA"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Runtime data of column tables', NAMEINSOURCE '"SYS"."M_CS_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_CS_UNLOADS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNLOAD_TIME timestamp OPTIONS (ANNOTATION 'Timestamp of unload event', NAMEINSOURCE '"UNLOAD_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name. Empty if the whole table is unloaded.', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object Id of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_HISTORY string(5) OPTIONS (ANNOTATION 'Flag to indicate whether the history part is unloaded (only relevant for history tables). Empty if the whole table is unloaded.', NAMEINSOURCE '"IS_HISTORY"', NATIVE_TYPE 'VARCHAR'),
    REASON string(16) OPTIONS (ANNOTATION 'Unload reason (LOW MEMORY, EXPLICIT or UNUSED RESOURCE)', NAMEINSOURCE '"REASON"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'This view shows a history of column unloads', NAMEINSOURCE '"SYS"."M_CS_UNLOADS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_DATA_VOLUME_PAGE_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_VOLUME_NAME string(512) OPTIONS (ANNOTATION 'DataVolume name', NAMEINSOURCE '"DATA_VOLUME_NAME"', NATIVE_TYPE 'VARCHAR'),
    PAGE_SIZECLASS string(16) OPTIONS (ANNOTATION 'Page size class', NAMEINSOURCE '"PAGE_SIZECLASS"', NATIVE_TYPE 'VARCHAR'),
    PAGE_SIZE long OPTIONS (ANNOTATION 'Page size', NAMEINSOURCE '"PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_SIZE long OPTIONS (ANNOTATION 'Superblock size', NAMEINSOURCE '"SUPERBLOCK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INITIAL_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of init pages', NAMEINSOURCE '"INITIAL_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ALLOCATE_BLOCK_COUNT long OPTIONS (ANNOTATION 'Number of single and group allocated blocks', NAMEINSOURCE '"TOTAL_ALLOCATE_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SET_BLOCK_FREE_COUNT long OPTIONS (ANNOTATION 'Number of single and group freed blocks', NAMEINSOURCE '"TOTAL_SET_BLOCK_FREE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SET_BLOCK_FREE_AFTER_SAVEPOINT_COUNT long OPTIONS (ANNOTATION 'Number of single and group freed-after-savepoint blocks', NAMEINSOURCE '"TOTAL_SET_BLOCK_FREE_AFTER_SAVEPOINT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_COUNT long OPTIONS (ANNOTATION 'Number of used Superblocks', NAMEINSOURCE '"SUPERBLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of used blocks', NAMEINSOURCE '"USED_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHADOW_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of shadow blocks', NAMEINSOURCE '"SHADOW_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILL_RATIO double OPTIONS (ANNOTATION 'Fill ratio', NAMEINSOURCE '"FILL_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION 'FreeBlockManager SizeClass statistics', NAMEINSOURCE '"SYS"."M_DATA_VOLUME_PAGE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_DATA_VOLUME_PAGE_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_VOLUME_NAME string(512) OPTIONS (ANNOTATION 'DataVolume name', NAMEINSOURCE '"DATA_VOLUME_NAME"', NATIVE_TYPE 'VARCHAR'),
    PAGE_SIZECLASS string(16) OPTIONS (ANNOTATION 'Page size class', NAMEINSOURCE '"PAGE_SIZECLASS"', NATIVE_TYPE 'VARCHAR'),
    PAGE_SIZE long OPTIONS (ANNOTATION 'Page size', NAMEINSOURCE '"PAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_SIZE long OPTIONS (ANNOTATION 'Superblock size', NAMEINSOURCE '"SUPERBLOCK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INITIAL_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of init pages', NAMEINSOURCE '"INITIAL_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ALLOCATE_BLOCK_COUNT long OPTIONS (ANNOTATION 'Number of single and group allocated blocks', NAMEINSOURCE '"TOTAL_ALLOCATE_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SET_BLOCK_FREE_COUNT long OPTIONS (ANNOTATION 'Number of single and group freed blocks', NAMEINSOURCE '"TOTAL_SET_BLOCK_FREE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SET_BLOCK_FREE_AFTER_SAVEPOINT_COUNT long OPTIONS (ANNOTATION 'Number of single and group freed-after-savepoint blocks', NAMEINSOURCE '"TOTAL_SET_BLOCK_FREE_AFTER_SAVEPOINT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_COUNT long OPTIONS (ANNOTATION 'Number of used Superblocks', NAMEINSOURCE '"SUPERBLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of used blocks', NAMEINSOURCE '"USED_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHADOW_BLOCK_COUNT long OPTIONS (ANNOTATION 'Count of shadow blocks', NAMEINSOURCE '"SHADOW_BLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILL_RATIO double OPTIONS (ANNOTATION 'Fill ratio', NAMEINSOURCE '"FILL_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION 'FreeBlockManager SizeClass statistics', NAMEINSOURCE '"SYS"."M_DATA_VOLUME_PAGE_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_DATA_VOLUME_SUPERBLOCK_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_VOLUME_NAME string(512) OPTIONS (ANNOTATION 'DataVolume name', NAMEINSOURCE '"DATA_VOLUME_NAME"', NATIVE_TYPE 'VARCHAR'),
    SUPERBLOCK_SIZE long OPTIONS (ANNOTATION 'Superblock size', NAMEINSOURCE '"SUPERBLOCK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SUPERBLOCK_COUNT long OPTIONS (ANNOTATION 'Count of used Superblocks', NAMEINSOURCE '"USED_SUPERBLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUPERBLOCK_COUNT long OPTIONS (ANNOTATION 'Count of Superblocks', NAMEINSOURCE '"SUPERBLOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILL_RATIO double OPTIONS (ANNOTATION 'Fill ratio', NAMEINSOURCE '"FILL_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION 'FreeBlockManager Superblock statistics', NAMEINSOURCE '"SYS"."M_DATA_VOLUME_SUPERBLOCK_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_DATA_VOLUMES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FILE_NAME string(512) OPTIONS (ANNOTATION 'Filename of DataVolume', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILE_ID long OPTIONS (ANNOTATION 'FileID of DataVolume', NAMEINSOURCE '"FILE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SIZE long OPTIONS (ANNOTATION 'Size of DataVolume', NAMEINSOURCE '"SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SIZE long OPTIONS (ANNOTATION 'Max. size of DataVolume', NAMEINSOURCE '"MAX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'DataVolume statistics', NAMEINSOURCE '"SYS"."M_DATA_VOLUMES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_DATABASE" (
    DATABASE_NAME string(256) OPTIONS (ANNOTATION 'System SID', NAMEINSOURCE '"DATABASE_NAME"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (ANNOTATION 'Default master host', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    VERSION string(32) OPTIONS (ANNOTATION 'Version: major.minor.patch.build', NAMEINSOURCE '"VERSION"', NATIVE_TYPE 'VARCHAR'),
    USAGE string(32) OPTIONS (ANNOTATION 'Database usage type. Recommended values: production,test,development,custom. Any value is allowed, but recommended values may be used by clients to alter behavior.', NAMEINSOURCE '"USAGE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Database information', NAMEINSOURCE '"SYS"."M_DATABASE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_DATABASE_HISTORY" (
    INSTALL_TIME timestamp OPTIONS (ANNOTATION 'Install/first start time', NAMEINSOURCE '"INSTALL_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    VERSION string(32) OPTIONS (ANNOTATION 'Version: major.minor.patch.build', NAMEINSOURCE '"VERSION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Installation version history', NAMEINSOURCE '"SYS"."M_DATABASE_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_DEBUG_CONNECTIONS" (
    DEBUG_SESSION_ID string(32) OPTIONS (ANNOTATION 'Landscape-wide unique identifier for debug session', NAMEINSOURCE '"DEBUG_SESSION_ID"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection that is used for communication', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_USAGE string(16) OPTIONS (ANNOTATION 'Specifies whether this connection is used for debugger communication or debugging', NAMEINSOURCE '"CONNECTION_USAGE"', NATIVE_TYPE 'VARCHAR'),
    OPERATION string(512) OPTIONS (ANNOTATION 'Operation that is currently running within this connection', NAMEINSOURCE '"OPERATION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Overview of connections used per debug session', NAMEINSOURCE '"SYS"."M_DEBUG_CONNECTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_DEBUG_SESSIONS" (
    DEBUG_SESSION_ID string(32) OPTIONS (ANNOTATION 'Landscape-wide unique identifier for debug session', NAMEINSOURCE '"DEBUG_SESSION_ID"', NATIVE_TYPE 'VARCHAR'),
    COMPILE_MODE string(20) OPTIONS (ANNOTATION 'Compilation handling of nested procedures', NAMEINSOURCE '"COMPILE_MODE"', NATIVE_TYPE 'VARCHAR'),
    TIMEOUT integer OPTIONS (ANNOTATION 'Seconds after which debug session will time out and destroy itself', NAMEINSOURCE '"TIMEOUT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ATTACH_COUNT integer OPTIONS (ANNOTATION 'Number of debuggees the debugger is currently attached to', NAMEINSOURCE '"ATTACH_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ATTACH_FILTER_CONNECTION_ID integer OPTIONS (ANNOTATION 'The debugger is attached to connection with this ID', NAMEINSOURCE '"ATTACH_FILTER_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ATTACH_FILTER_USER_NAME string(256) OPTIONS (ANNOTATION 'The debugger is attached to connections where this user name is set', NAMEINSOURCE '"ATTACH_FILTER_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ATTACH_FILTER_APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'The debugger is attached to connections where this application user name is set', NAMEINSOURCE '"ATTACH_FILTER_APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Overview of debug sessions and their properties', NAMEINSOURCE '"SYS"."M_DEBUG_SESSIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_DELTA_MERGE_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(8) OPTIONS (ANNOTATION 'MERGE (table delta merge), HINT (application merge hint), SPARSE (optimize compression), FACT (fact table compression)', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    HISTORY string(5) OPTIONS (ANNOTATION 'Flag to indicate history part was merged: ''TRUE''/''FALSE''', NAMEINSOURCE '"HISTORY"', NATIVE_TYPE 'VARCHAR'),
    MEMORY_MERGE string(5) OPTIONS (ANNOTATION 'Flag to indicate table was merged in memory only: ''TRUE''/''FALSE''', NAMEINSOURCE '"MEMORY_MERGE"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT string(256) OPTIONS (ANNOTATION 'External identifier for table merge called by an application', NAMEINSOURCE '"PASSPORT"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Execution start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    EXECUTION_TIME long OPTIONS (ANNOTATION 'Execution duration', NAMEINSOURCE '"EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MOTIVATION string(8) OPTIONS (ANNOTATION 'HARD, SMART, AUTO, FORCE', NAMEINSOURCE '"MOTIVATION"', NATIVE_TYPE 'VARCHAR'),
    SUCCESS string(5) OPTIONS (ANNOTATION 'Call success flag; depends on field TYPE; HINT: application merge hint was accepted/rejected; MERGE/SPARSE: delta merge/optimize compression was completed with or without success: ''TRUE''/''FALSE''', NAMEINSOURCE '"SUCCESS"', NATIVE_TYPE 'VARCHAR'),
    MERGED_DELTA_RECORDS integer OPTIONS (ANNOTATION 'Number of documents in delta', NAMEINSOURCE '"MERGED_DELTA_RECORDS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_ERROR integer OPTIONS (ANNOTATION 'Error code of the last error that occurred. Explains why a merge did not succeed. See ERROR_DESCRIPTION for details', NAMEINSOURCE '"LAST_ERROR"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ERROR_DESCRIPTION string(2000) OPTIONS (ANNOTATION 'Description of the last error that occurred during merge. Please note that a failing merge does not necessarily indicate a problem', NAMEINSOURCE '"ERROR_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Table delta merge statistics', NAMEINSOURCE '"SYS"."M_DELTA_MERGE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_DISKS" (
    DISK_ID integer OPTIONS (ANNOTATION 'Disk ID', NAMEINSOURCE '"DISK_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEVICE_ID long OPTIONS (ANNOTATION 'Database Internal Device ID', NAMEINSOURCE '"DEVICE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name. Will only be set if disk is used by exactly one host.', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PATH string(512) OPTIONS (ANNOTATION 'Path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    SUBPATH string(512) OPTIONS (ANNOTATION 'Subpath', NAMEINSOURCE '"SUBPATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    USAGE_TYPE string(32) OPTIONS (ANNOTATION 'Usage Type: LOG, DATA, TRACE, DATA_BACKUP and LOG_BACKUP', NAMEINSOURCE '"USAGE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'Volume Used Space', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'Volume Size', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Disk configuration and utilization of the host machine', NAMEINSOURCE '"SYS"."M_DISKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_EFFECTIVE_TABLE_PLACEMENT" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RECORD_COUNT long OPTIONS (ANNOTATION 'Record Count', NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_TYPE string(256) OPTIONS (ANNOTATION 'Type', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_NAME string(256) OPTIONS (ANNOTATION 'Group Name', NAMEINSOURCE '"GROUP_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_TYPE string(256) OPTIONS (ANNOTATION 'Group Type', NAMEINSOURCE '"GROUP_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    SUBTYPE string(256) OPTIONS (ANNOTATION 'Sub Type', NAMEINSOURCE '"SUBTYPE"', NATIVE_TYPE 'NVARCHAR'),
    LOCATION string(256) OPTIONS (ANNOTATION 'Location', NAMEINSOURCE '"LOCATION"', NATIVE_TYPE 'NVARCHAR'),
    POSSIBLE_LOCATION string(5000) OPTIONS (ANNOTATION 'Possible Location', NAMEINSOURCE '"POSSIBLE_LOCATION"', NATIVE_TYPE 'NVARCHAR'),
    LOCATION_MATCH string(32) OPTIONS (ANNOTATION 'Location Match', NAMEINSOURCE '"LOCATION_MATCH"', NATIVE_TYPE 'NVARCHAR'),
    MIN_ROWS_FOR_PARTITIONING long OPTIONS (ANNOTATION 'Minimum Row Count for Partitioning', NAMEINSOURCE '"MIN_ROWS_FOR_PARTITIONING"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_ROWS_FOR_PARTITIONING_MATCH string(32) OPTIONS (ANNOTATION 'Minimum Row Count for Match', NAMEINSOURCE '"MIN_ROWS_FOR_PARTITIONING_MATCH"', NATIVE_TYPE 'NVARCHAR'),
    PARTITIONING_THRESHOLD long OPTIONS (ANNOTATION 'Partitioning Threshold', NAMEINSOURCE '"PARTITIONING_THRESHOLD"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARTITIONING_THRESHOLD_MATCH string(32) OPTIONS (ANNOTATION 'Partitioning Threshold Match', NAMEINSOURCE '"PARTITIONING_THRESHOLD_MATCH"', NATIVE_TYPE 'NVARCHAR'),
    INITIAL_PARTITION integer OPTIONS (ANNOTATION 'Initial Partitions', NAMEINSOURCE '"INITIAL_PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INITIAL_PARTITION_MATCH string(32) OPTIONS (ANNOTATION 'Initial Partition Match', NAMEINSOURCE '"INITIAL_PARTITION_MATCH"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Information about effective placement info for tables', NAMEINSOURCE '"SYS"."M_EFFECTIVE_TABLE_PLACEMENT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_EPM_SESSIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    MODEL_NAME string(256) OPTIONS (ANNOTATION 'Model name', NAMEINSOURCE '"MODEL_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VERSION integer OPTIONS (ANNOTATION 'Version', NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS string(18) OPTIONS (ANNOTATION 'Status', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'This view shows all EPM sessions with detailed information.', NAMEINSOURCE '"SYS"."M_EPM_SESSIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_ERROR_CODES" (
    CODE integer NOT NULL OPTIONS (ANNOTATION 'Error Code ', NAMEINSOURCE '"CODE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CODE_STRING string(256) OPTIONS (ANNOTATION 'Error Code String', NAMEINSOURCE '"CODE_STRING"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(2000) OPTIONS (ANNOTATION 'Error Description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Error codes with descriptions', NAMEINSOURCE '"SYS"."M_ERROR_CODES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_ES_TABLES" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name for extended table', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name for extended table', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_DELTA_ENABLED string(5) OPTIONS (ANNOTATION 'True if it is RLV table, otherwise FALSE', NAMEINSOURCE '"IS_DELTA_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    TABLE_SIZE long OPTIONS (ANNOTATION 'Size of compressed data in bytes', NAMEINSOURCE '"TABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECORD_COUNT long OPTIONS (ANNOTATION 'Row count in extended table', NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_MODIFIED_TIME timestamp OPTIONS (ANNOTATION 'Timestamp when table was last modified', NAMEINSOURCE '"LAST_MODIFIED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Runtime data of extended tables', NAMEINSOURCE '"SYS"."M_ES_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_EVENTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(256) OPTIONS (ANNOTATION 'Type of event', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    ID long OPTIONS (ANNOTATION 'ID of event', NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INFOTEXT string(2000) OPTIONS (ANNOTATION 'Additional info freetext', NAMEINSOURCE '"INFOTEXT"', NATIVE_TYPE 'VARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Time event was created', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    UPDATE_TIME timestamp OPTIONS (ANNOTATION 'Time event was updated', NAMEINSOURCE '"UPDATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HANDLE_TIME timestamp OPTIONS (ANNOTATION 'Time event was handled', NAMEINSOURCE '"HANDLE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE string(256) OPTIONS (ANNOTATION 'State of event', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    ACKNOWLEDGED string(5) OPTIONS (ANNOTATION 'Event acknowledged: ''TRUE''/''FALSE''', NAMEINSOURCE '"ACKNOWLEDGED"', NATIVE_TYPE 'VARCHAR'),
    FAILED_HANDLES long OPTIONS (ANNOTATION 'Number of failed handle attempts', NAMEINSOURCE '"FAILED_HANDLES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Internal events', NAMEINSOURCE '"SYS"."M_EVENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_EXPENSIVE_STATEMENTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID (This number is ever increasing)', NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT_HASH string(32) OPTIONS (ANNOTATION 'Unique identifier for an SQL string', NAMEINSOURCE '"STATEMENT_HASH"', NATIVE_TYPE 'VARCHAR'),
    DB_USER string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"DB_USER"', NATIVE_TYPE 'NVARCHAR'),
    APP_USER string(256) OPTIONS (ANNOTATION 'Application user name', NAMEINSOURCE '"APP_USER"', NATIVE_TYPE 'NVARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Statement start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DURATION_MICROSEC long OPTIONS (ANNOTATION 'Statement duration', NAMEINSOURCE '"DURATION_MICROSEC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_NAME string(5000) OPTIONS (ANNOTATION 'Related objects', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OPERATION string(5000) OPTIONS (ANNOTATION 'Type of operation: e.g. prepare, execute, fetch, close', NAMEINSOURCE '"OPERATION"', NATIVE_TYPE 'NVARCHAR'),
    RECORDS long OPTIONS (ANNOTATION 'Number of records', NAMEINSOURCE '"RECORDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'Statement string', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    PARAMETERS string(5000) OPTIONS (ANNOTATION 'Parameters', NAMEINSOURCE '"PARAMETERS"', NATIVE_TYPE 'NVARCHAR'),
    ERROR_CODE integer OPTIONS (ANNOTATION 'Error code', NAMEINSOURCE '"ERROR_CODE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ERROR_TEXT string(5000) OPTIONS (ANNOTATION 'Error message', NAMEINSOURCE '"ERROR_TEXT"', NATIVE_TYPE 'NVARCHAR'),
    LOCK_WAIT_COUNT integer OPTIONS (ANNOTATION 'Accumulated lock wait count', NAMEINSOURCE '"LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_WAIT_DURATION long OPTIONS (ANNOTATION 'Accumulated lock wait duration', NAMEINSOURCE '"LOCK_WAIT_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOC_MEM_SIZE_ROWSTORE long OPTIONS (ANNOTATION 'Allocated memory size for row store', NAMEINSOURCE '"ALLOC_MEM_SIZE_ROWSTORE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOC_MEM_SIZE_COLSTORE long OPTIONS (ANNOTATION 'Allocated memory size for column store', NAMEINSOURCE '"ALLOC_MEM_SIZE_COLSTORE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory required for computing the statement, incl. memory for intermediate results. Kept for cache reasons or released after the statement execution.', NAMEINSOURCE '"MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REUSED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory reused from cached data structures, 0 if caches empty', NAMEINSOURCE '"REUSED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CPU_TIME long OPTIONS (ANNOTATION 'CPU time (us) consumed to compute the statement', NAMEINSOURCE '"CPU_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PASSPORT_ROOT_CONTEXT_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying source of request', NAMEINSOURCE '"PASSPORT_ROOT_CONTEXT_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_TRANSACTION_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying business transaction', NAMEINSOURCE '"PASSPORT_TRANSACTION_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_CONNECTION_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying connection', NAMEINSOURCE '"PASSPORT_CONNECTION_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_CONNECTION_COUNTER long OPTIONS (ANNOTATION 'SAP EPP Passport connection counter', NAMEINSOURCE '"PASSPORT_CONNECTION_COUNTER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATEMENT_START_TIME timestamp OPTIONS (ANNOTATION 'Time when the first OPERATION of a statement execution started. All OPERATIONs of a statement execution share the same STATEMENT_START_TIME.', NAMEINSOURCE '"STATEMENT_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    APPLICATION_SOURCE string(256) OPTIONS (ANNOTATION 'Application can define from which source file SAP HANA is called. Usage is up to the application. Value also displayed in M_PREPARED_STATEMENTS.APPLICATION_SOURCE', NAMEINSOURCE '"APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Name of the application', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NETWORK_MESSAGE_ID long OPTIONS (ANNOTATION 'The client message id on the physical server connection, also found in M_SQL_CLIENT_NETWORK_IO. MESSAGE_ID', NAMEINSOURCE '"NETWORK_MESSAGE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'This view shows all statements with duration longer than a threshold', NAMEINSOURCE '"SYS"."M_EXPENSIVE_STATEMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_EXPORT_BINARY_STATUS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID to distinguish data of each import session (-1 for Python)', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema of table or view being imported', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Name of table or view being imported', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_TYPE string(16) OPTIONS (ANNOTATION 'Index type: ''UNKNOWN''/''PHYSICAL''/''OLAP''/''JOIN''/''HIERARCHY''/''CALCULATION''/...', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    STATUS string(16) OPTIONS (ANNOTATION 'Import status. ''queued''/''working''/''skipped''/''done''/''failed''', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    "ERROR" string(512) OPTIONS (ANNOTATION 'Empty if import was successful, error text otherwise', NAMEINSOURCE '"ERROR"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Export status information for current session', NAMEINSOURCE '"SYS"."M_EXPORT_BINARY_STATUS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_EXTRACTORS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Name of the schema where the DSO tables are generated', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Name of the DSO specific status table', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT string(3) OPTIONS (ANNOTATION 'The ID of the client', NAMEINSOURCE '"CLIENT"', NATIVE_TYPE 'NVARCHAR'),
    STATUS string(5) OPTIONS (ANNOTATION 'General status overview saying ''OK'' or ''ERROR''', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    REQUEST_ID integer OPTIONS (ANNOTATION 'SID of the request used for activation', NAMEINSOURCE '"REQUEST_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ERROR_MESSAGE string(5000) OPTIONS (ANNOTATION 'The message in case of an error', NAMEINSOURCE '"ERROR_MESSAGE"', NATIVE_TYPE 'NVARCHAR'),
    PHASE string(32) OPTIONS (ANNOTATION 'The phase of the last running operation', NAMEINSOURCE '"PHASE"', NATIVE_TYPE 'VARCHAR'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Timestamp of the operation phase', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Direct extractor connection (DXC) status information', NAMEINSOURCE '"SYS"."M_EXTRACTORS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_FEATURES" (
    COMPONENT_NAME string(32) OPTIONS (ANNOTATION 'Name of the component owning the feature', NAMEINSOURCE '"COMPONENT_NAME"', NATIVE_TYPE 'VARCHAR'),
    FEATURE_NAME string(32) OPTIONS (ANNOTATION 'Name of the feature', NAMEINSOURCE '"FEATURE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FEATURE_VERSION long OPTIONS (ANNOTATION 'Version of the feature', NAMEINSOURCE '"FEATURE_VERSION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'All supported features', NAMEINSOURCE '"SYS"."M_FEATURES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_FULLTEXT_QUEUES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INDEX_OID long OPTIONS (ANNOTATION 'OID of the corresponding fulltext index', NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema of the data table', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Name of the data table', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Name of the document column', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STATUS string(16) OPTIONS (ANNOTATION 'Queue status (ACTIVE, SUSPENDED)', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'NVARCHAR'),
    TOTAL_DOCUMENT_COUNT long OPTIONS (ANNOTATION 'Total number of documents in the original table', NAMEINSOURCE '"TOTAL_DOCUMENT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEXED_DOCUMENT_COUNT long OPTIONS (ANNOTATION 'Number of successfully indexed documents', NAMEINSOURCE '"INDEXED_DOCUMENT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_DOCUMENT_COUNT long OPTIONS (ANNOTATION 'Number of documents currently in the queue', NAMEINSOURCE '"QUEUE_DOCUMENT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ERROR_DOCUMENT_COUNT long OPTIONS (ANNOTATION 'Number of failed documents', NAMEINSOURCE '"ERROR_DOCUMENT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Fulltext index queue status', NAMEINSOURCE '"SYS"."M_FULLTEXT_QUEUES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_FUZZY_SEARCH_INDEXES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables, -1 during table schema change', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FUZZY_SEARCH_MODE string(256) OPTIONS (ANNOTATION 'Fuzzy index search mode', NAMEINSOURCE '"FUZZY_SEARCH_MODE"', NATIVE_TYPE 'NVARCHAR'),
    MEMORY_SIZE_IN_TOTAL long OPTIONS (ANNOTATION 'Sum of MEMORY_SIZE_IN_MAIN and MEMORY_SIZE_IN_DELTA', NAMEINSOURCE '"MEMORY_SIZE_IN_TOTAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_MAIN long OPTIONS (ANNOTATION 'Current size of the fuzzy search indexes in main; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_MAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_SIZE_IN_DELTA long OPTIONS (ANNOTATION 'Current size of the fuzzy search indexes in delta; 0 if not loaded', NAMEINSOURCE '"MEMORY_SIZE_IN_DELTA"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOADED string(5) OPTIONS (ANNOTATION 'Flag to indicate that column is loaded into memory: ''TRUE''/''FALSE''', NAMEINSOURCE '"LOADED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Runtime information of fuzzy search indexes of column tables', NAMEINSOURCE '"SYS"."M_FUZZY_SEARCH_INDEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_GARBAGE_COLLECTION_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STORE_TYPE string(16) OPTIONS (ANNOTATION 'type of storage handled (COLUMN STORE, LIVECACHE)', NAMEINSOURCE '"STORE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HISTORY_COUNT integer OPTIONS (ANNOTATION 'Current count of history files in GC', NAMEINSOURCE '"HISTORY_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WAITER_COUNT integer OPTIONS (ANNOTATION 'Current count of GC waiters', NAMEINSOURCE '"WAITER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MIN_READ_TID long OPTIONS (ANNOTATION 'Last known minimum TID of a reading transaction at EOT', NAMEINSOURCE '"MIN_READ_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_STARTED_TID long OPTIONS (ANNOTATION 'TID of the last started cleanup job', NAMEINSOURCE '"LAST_STARTED_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_STARTED_TID_POSTCOMMIT long OPTIONS (ANNOTATION 'TID of the last started postcommit job', NAMEINSOURCE '"LAST_STARTED_TID_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIRST_WAITING_TID long OPTIONS (ANNOTATION 'TID of the first waiting cleanup job', NAMEINSOURCE '"FIRST_WAITING_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIRST_WAITING_TID_POSTCOMMIT long OPTIONS (ANNOTATION 'TID of the first waiting postcommit job', NAMEINSOURCE '"FIRST_WAITING_TID_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTERS long OPTIONS (ANNOTATION 'Count of history files which entered the queue for cleanup', NAMEINSOURCE '"ENTERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTERS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of history files which entered the queue for postcommit', NAMEINSOURCE '"ENTERS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STARTED_JOBS long OPTIONS (ANNOTATION 'Count of garbage collection (cleanup) jobs started', NAMEINSOURCE '"STARTED_JOBS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STARTED_JOBS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of postcommit jobs started', NAMEINSOURCE '"STARTED_JOBS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESSED_JOBS long OPTIONS (ANNOTATION 'Count of undo files processed for cleanup ', NAMEINSOURCE '"PROCESSED_JOBS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESSED_JOBS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of undo files processed for postcommit', NAMEINSOURCE '"PROCESSED_JOBS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_LOADS long OPTIONS (ANNOTATION 'Count of all GC queue loads', NAMEINSOURCE '"QUEUE_LOADS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_LOADS_NONEMPTY long OPTIONS (ANNOTATION 'Count of GC queue loads which found some elements', NAMEINSOURCE '"QUEUE_LOADS_NONEMPTY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_EMPTY_COUNT long OPTIONS (ANNOTATION 'Count of queue empty states after GC finished', NAMEINSOURCE '"QUEUE_EMPTY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINTS long OPTIONS (ANNOTATION 'Count of savepoints', NAMEINSOURCE '"SAVEPOINTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (last)', NAMEINSOURCE '"LAST_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (max)', NAMEINSOURCE '"MAX_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (min)', NAMEINSOURCE '"MIN_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (total)', NAMEINSOURCE '"SUM_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_HISTORY_SIZE_AT_SVP double OPTIONS (ANNOTATION 'Count of history files present at savepoint (avg)', NAMEINSOURCE '"AVG_HISTORY_SIZE_AT_SVP"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    EMPTY_HISTORY_AT_SVP_COUNT long OPTIONS (ANNOTATION 'Count of savepoints finding empty queue', NAMEINSOURCE '"EMPTY_HISTORY_AT_SVP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Garbage collection/history manager statistics', NAMEINSOURCE '"SYS"."M_GARBAGE_COLLECTION_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_GARBAGE_COLLECTION_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STORE_TYPE string(16) OPTIONS (ANNOTATION 'type of storage handled (COLUMN STORE, LIVECACHE)', NAMEINSOURCE '"STORE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HISTORY_COUNT integer OPTIONS (ANNOTATION 'Current count of history files in GC', NAMEINSOURCE '"HISTORY_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WAITER_COUNT integer OPTIONS (ANNOTATION 'Current count of GC waiters', NAMEINSOURCE '"WAITER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MIN_READ_TID long OPTIONS (ANNOTATION 'Last known minimum TID of a reading transaction at EOT', NAMEINSOURCE '"MIN_READ_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_STARTED_TID long OPTIONS (ANNOTATION 'TID of the last started cleanup job', NAMEINSOURCE '"LAST_STARTED_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_STARTED_TID_POSTCOMMIT long OPTIONS (ANNOTATION 'TID of the last started postcommit job', NAMEINSOURCE '"LAST_STARTED_TID_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIRST_WAITING_TID long OPTIONS (ANNOTATION 'TID of the first waiting cleanup job', NAMEINSOURCE '"FIRST_WAITING_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIRST_WAITING_TID_POSTCOMMIT long OPTIONS (ANNOTATION 'TID of the first waiting postcommit job', NAMEINSOURCE '"FIRST_WAITING_TID_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTERS long OPTIONS (ANNOTATION 'Count of history files which entered the queue for cleanup', NAMEINSOURCE '"ENTERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTERS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of history files which entered the queue for postcommit', NAMEINSOURCE '"ENTERS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STARTED_JOBS long OPTIONS (ANNOTATION 'Count of garbage collection (cleanup) jobs started', NAMEINSOURCE '"STARTED_JOBS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STARTED_JOBS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of postcommit jobs started', NAMEINSOURCE '"STARTED_JOBS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESSED_JOBS long OPTIONS (ANNOTATION 'Count of undo files processed for cleanup ', NAMEINSOURCE '"PROCESSED_JOBS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESSED_JOBS_POSTCOMMIT long OPTIONS (ANNOTATION 'Count of undo files processed for postcommit', NAMEINSOURCE '"PROCESSED_JOBS_POSTCOMMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_LOADS long OPTIONS (ANNOTATION 'Count of all GC queue loads', NAMEINSOURCE '"QUEUE_LOADS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_LOADS_NONEMPTY long OPTIONS (ANNOTATION 'Count of GC queue loads which found some elements', NAMEINSOURCE '"QUEUE_LOADS_NONEMPTY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUEUE_EMPTY_COUNT long OPTIONS (ANNOTATION 'Count of queue empty states after GC finished', NAMEINSOURCE '"QUEUE_EMPTY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINTS long OPTIONS (ANNOTATION 'Count of savepoints', NAMEINSOURCE '"SAVEPOINTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (last)', NAMEINSOURCE '"LAST_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (max)', NAMEINSOURCE '"MAX_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (min)', NAMEINSOURCE '"MIN_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_HISTORY_SIZE_AT_SVP long OPTIONS (ANNOTATION 'Count of history files present at savepoint (total)', NAMEINSOURCE '"SUM_HISTORY_SIZE_AT_SVP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_HISTORY_SIZE_AT_SVP double OPTIONS (ANNOTATION 'Count of history files present at savepoint (avg)', NAMEINSOURCE '"AVG_HISTORY_SIZE_AT_SVP"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    EMPTY_HISTORY_AT_SVP_COUNT long OPTIONS (ANNOTATION 'Count of savepoints finding empty queue', NAMEINSOURCE '"EMPTY_HISTORY_AT_SVP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Garbage collection/history manager statistics', NAMEINSOURCE '"SYS"."M_GARBAGE_COLLECTION_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_HEAP_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Allocator name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    DEPTH long OPTIONS (ANNOTATION 'Depth', NAMEINSOURCE '"DEPTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator, including suballocators', NAMEINSOURCE '"INCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use, including suballocators', NAMEINSOURCE '"INCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator and suballocators (estimate)', NAMEINSOURCE '"INCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator and its suballocators, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"INCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator', NAMEINSOURCE '"EXCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use', NAMEINSOURCE '"EXCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator', NAMEINSOURCE '"EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator (estimate)', NAMEINSOURCE '"EXCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOC_ERRORS long OPTIONS (ANNOTATION 'Count of allocation errors', NAMEINSOURCE '"EXCLUSIVE_ALLOC_ERRORS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"EXCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MALLOC_PROXY_CACHE_MISSES long OPTIONS (ANNOTATION 'Deprecated', NAMEINSOURCE '"MALLOC_PROXY_CACHE_MISSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLAGS string(64) OPTIONS (ANNOTATION 'Allocator flags', NAMEINSOURCE '"FLAGS"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT string(64) OPTIONS (ANNOTATION 'Name of SAP HANA component of this allocator', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Memory allocator statistics', NAMEINSOURCE '"SYS"."M_HEAP_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_HEAP_MEMORY_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Allocator name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    DEPTH long OPTIONS (ANNOTATION 'Depth', NAMEINSOURCE '"DEPTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator, including suballocators', NAMEINSOURCE '"INCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use, including suballocators', NAMEINSOURCE '"INCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations, including suballocators', NAMEINSOURCE '"INCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator and suballocators', NAMEINSOURCE '"INCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator and suballocators (estimate)', NAMEINSOURCE '"INCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator and its suballocators, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"INCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_SIZE_IN_USE long OPTIONS (ANNOTATION 'Current size of this allocator', NAMEINSOURCE '"EXCLUSIVE_SIZE_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COUNT_IN_USE long OPTIONS (ANNOTATION 'Number of blocks currently in use', NAMEINSOURCE '"EXCLUSIVE_COUNT_IN_USE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total allocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_SIZE long OPTIONS (ANNOTATION 'Total deallocated size in this allocator', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of allocations', NAMEINSOURCE '"EXCLUSIVE_ALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_DEALLOCATED_COUNT long OPTIONS (ANNOTATION 'Count of deallocations', NAMEINSOURCE '"EXCLUSIVE_DEALLOCATED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum ever allocated block size in this allocator', NAMEINSOURCE '"EXCLUSIVE_MAX_SINGLE_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_PEAK_ALLOCATION_SIZE long OPTIONS (ANNOTATION 'Maximum size of this allocator (estimate)', NAMEINSOURCE '"EXCLUSIVE_PEAK_ALLOCATION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_ALLOC_ERRORS long OPTIONS (ANNOTATION 'Count of allocation errors', NAMEINSOURCE '"EXCLUSIVE_ALLOC_ERRORS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_IN_USE_INTEGRAL long OPTIONS (ANNOTATION 'Average allocated memory by this allocator, multiplied by time since start of measurement (sample based rough estimate), this is usually deactivated, only activate in case this is requested by SAP support. Unit is 1 byte times 1 second (may change in future).', NAMEINSOURCE '"EXCLUSIVE_IN_USE_INTEGRAL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MALLOC_PROXY_CACHE_MISSES long OPTIONS (ANNOTATION 'Deprecated', NAMEINSOURCE '"MALLOC_PROXY_CACHE_MISSES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLAGS string(64) OPTIONS (ANNOTATION 'Allocator flags', NAMEINSOURCE '"FLAGS"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT string(64) OPTIONS (ANNOTATION 'Name of SAP HANA component of this allocator', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Memory allocator statistics', NAMEINSOURCE '"SYS"."M_HEAP_MEMORY_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_HISTORY_INDEX_LAST_COMMIT_ID" (
    SESSION_ID long OPTIONS (ANNOTATION 'Session ID', NAMEINSOURCE '"SESSION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SESSION_OWNER_VOLUME_ID long OPTIONS (ANNOTATION 'Volume ID of this session', NAMEINSOURCE '"SESSION_OWNER_VOLUME_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMMIT_ID long OPTIONS (ANNOTATION 'Last commit ID of history index in this session', NAMEINSOURCE '"LAST_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Last commit ID of history index for each session', NAMEINSOURCE '"SYS"."M_HISTORY_INDEX_LAST_COMMIT_ID"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_HOST_INFORMATION" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    KEY string(32) OPTIONS (ANNOTATION 'Key', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Host information such as machine, OS configuration', NAMEINSOURCE '"SYS"."M_HOST_INFORMATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_HOST_RESOURCE_UTILIZATION" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    FREE_PHYSICAL_MEMORY long OPTIONS (ANNOTATION 'Free physical memory on the host', NAMEINSOURCE '"FREE_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_PHYSICAL_MEMORY long OPTIONS (ANNOTATION 'Used physical memory on the host', NAMEINSOURCE '"USED_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_SWAP_SPACE long OPTIONS (ANNOTATION 'Free swap memory on the host', NAMEINSOURCE '"FREE_SWAP_SPACE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SWAP_SPACE long OPTIONS (ANNOTATION 'Used swap memory on the host', NAMEINSOURCE '"USED_SWAP_SPACE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATION_LIMIT long OPTIONS (ANNOTATION 'Allocation limit for all processes', NAMEINSOURCE '"ALLOCATION_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSTANCE_TOTAL_MEMORY_USED_SIZE long OPTIONS (ANNOTATION 'Amount of memory from the memory pool that is currently in actual use by SAP HANA processes', NAMEINSOURCE '"INSTANCE_TOTAL_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSTANCE_TOTAL_MEMORY_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Size of the memory pool for all SAP HANA processes', NAMEINSOURCE '"INSTANCE_TOTAL_MEMORY_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSTANCE_CODE_SIZE long OPTIONS (ANNOTATION 'Code size, including shared libraries of SAP HANA processes', NAMEINSOURCE '"INSTANCE_CODE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSTANCE_SHARED_MEMORY_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Shared memory size of SAP HANA processes', NAMEINSOURCE '"INSTANCE_SHARED_MEMORY_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_USER_TIME long OPTIONS (ANNOTATION 'CPU time spent in user mode', NAMEINSOURCE '"TOTAL_CPU_USER_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_SYSTEM_TIME long OPTIONS (ANNOTATION 'CPU time spent in kernel mode', NAMEINSOURCE '"TOTAL_CPU_SYSTEM_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_WIO_TIME long OPTIONS (ANNOTATION 'CPU time spent in wait IO (Linux only, Windows always 0)', NAMEINSOURCE '"TOTAL_CPU_WIO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU_IDLE_TIME long OPTIONS (ANNOTATION 'CPU idle time', NAMEINSOURCE '"TOTAL_CPU_IDLE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SYS_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Host timestamp in local time zone', NAMEINSOURCE '"SYS_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    UTC_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Host timestamp in UTC', NAMEINSOURCE '"UTC_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Host resource utilization, CPU time is in milliseconds and added across all cores since system start', NAMEINSOURCE '"SYS"."M_HOST_RESOURCE_UTILIZATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_IMPORT_BINARY_STATUS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID to distinguish data of each import session (-1 for Python)', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema of table or view being imported', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Name of table or view being imported', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_TYPE string(16) OPTIONS (ANNOTATION 'Index type: ''UNKNOWN''/''PHYSICAL''/''OLAP''/''JOIN''/''HIERARCHY''/''CALCULATION''/...', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    STATUS string(16) OPTIONS (ANNOTATION 'Import status. ''queued''/''working''/''skipped''/''done''/''failed''', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    "ERROR" string(512) OPTIONS (ANNOTATION 'Empty if import was successful, error text otherwise', NAMEINSOURCE '"ERROR"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Import status information for current session', NAMEINSOURCE '"SYS"."M_IMPORT_BINARY_STATUS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_INIFILE_CONTENTS" (
    FILE_NAME string(256) OPTIONS (ANNOTATION 'Configuration file name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LAYER_NAME string(16) OPTIONS (ANNOTATION 'Configuration layer: DEFAULT, SYSTEM, TENANT, HOST', NAMEINSOURCE '"LAYER_NAME"', NATIVE_TYPE 'VARCHAR'),
    TENANT_NAME string(256) OPTIONS (ANNOTATION 'Tenant name, if layer is TENANT', NAMEINSOURCE '"TENANT_NAME"', NATIVE_TYPE 'VARCHAR'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name, if layer is HOST', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    SECTION string(128) OPTIONS (ANNOTATION 'Configuration section name', NAMEINSOURCE '"SECTION"', NATIVE_TYPE 'VARCHAR'),
    KEY string(128) OPTIONS (ANNOTATION 'Configuration key name', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Configuration value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Configuration information from inifiles', NAMEINSOURCE '"SYS"."M_INIFILE_CONTENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_INIFILES" (
    FILE_NAME string(256) OPTIONS (ANNOTATION 'Configuration file name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_LAYER string(5) OPTIONS (ANNOTATION 'TRUE if file has configuration on this layer (Always TRUE)', NAMEINSOURCE '"DEFAULT_LAYER"', NATIVE_TYPE 'VARCHAR'),
    SYSTEM_LAYER string(5) OPTIONS (ANNOTATION 'TRUE if file has configuration on this layer', NAMEINSOURCE '"SYSTEM_LAYER"', NATIVE_TYPE 'VARCHAR'),
    TENANT_LAYER string(5) OPTIONS (ANNOTATION 'TRUE if file has configuration on this layer', NAMEINSOURCE '"TENANT_LAYER"', NATIVE_TYPE 'VARCHAR'),
    HOST_LAYER string(5) OPTIONS (ANNOTATION 'TRUE if file has configuration on this layer', NAMEINSOURCE '"HOST_LAYER"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'All configuration files', NAMEINSOURCE '"SYS"."M_INIFILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_JOB_PROGRESS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema of the object', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the object', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOB_NAME string(128) OPTIONS (ANNOTATION 'Type of the operation', NAMEINSOURCE '"JOB_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection that triggered the operation', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Start time of the operation', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CURRENT_PROGRESS integer OPTIONS (ANNOTATION 'Steps of the operation that are already finished', NAMEINSOURCE '"CURRENT_PROGRESS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_PROGRESS integer OPTIONS (ANNOTATION 'Maximum steps of the operation', NAMEINSOURCE '"MAX_PROGRESS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PROGRESS_DETAIL string(256) OPTIONS (ANNOTATION 'Detail information of the operation', NAMEINSOURCE '"PROGRESS_DETAIL"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Current long running system operations', NAMEINSOURCE '"SYS"."M_JOB_PROGRESS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_JOBEXECUTORS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_CONCURRENCY integer OPTIONS (ANNOTATION 'Maximum number of concurrently running threads (config)', NAMEINSOURCE '"MAX_CONCURRENCY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_WORKER_COUNT integer OPTIONS (ANNOTATION 'Total number of worker threads', NAMEINSOURCE '"TOTAL_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARKED_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of parked worker threads', NAMEINSOURCE '"PARKED_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FREE_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of free worker threads', NAMEINSOURCE '"FREE_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SYS_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting in system', NAMEINSOURCE '"SYS_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    JOB_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting for a job on another worker thread', NAMEINSOURCE '"JOB_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    YIELD_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting on yield', NAMEINSOURCE '"YIELD_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WORKER_CREATE_COUNT long OPTIONS (ANNOTATION '#threads created', NAMEINSOURCE '"WORKER_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Job Executors statistics', NAMEINSOURCE '"SYS"."M_JOBEXECUTORS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_JOBEXECUTORS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_CONCURRENCY integer OPTIONS (ANNOTATION 'Maximum number of concurrently running threads (config)', NAMEINSOURCE '"MAX_CONCURRENCY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TOTAL_WORKER_COUNT integer OPTIONS (ANNOTATION 'Total number of worker threads', NAMEINSOURCE '"TOTAL_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARKED_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of parked worker threads', NAMEINSOURCE '"PARKED_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FREE_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of free worker threads', NAMEINSOURCE '"FREE_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SYS_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting in system', NAMEINSOURCE '"SYS_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    JOB_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting for a job on another worker thread', NAMEINSOURCE '"JOB_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    YIELD_WAITING_WORKER_COUNT integer OPTIONS (ANNOTATION 'Number of worker threads waiting on yield', NAMEINSOURCE '"YIELD_WAITING_WORKER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    WORKER_CREATE_COUNT long OPTIONS (ANNOTATION '#threads created', NAMEINSOURCE '"WORKER_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Job Executors statistics', NAMEINSOURCE '"SYS"."M_JOBEXECUTORS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_KERNEL_PROFILER" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Application user name (if profiling is restricted to an application user)', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'SQL user name (if profiling is restricted to an SQL user)', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WAIT_TIME long OPTIONS (ANNOTATION 'Wait time between two sampling runs in milliseconds', NAMEINSOURCE '"WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MEMORY_LIMIT long OPTIONS (ANNOTATION 'Allocation limit for profiling data (not an exact limit, a heuristic approach is used to limit memory)', NAMEINSOURCE '"MEMORY_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Information about active kernel profilers', NAMEINSOURCE '"SYS"."M_KERNEL_PROFILER"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LANDSCAPE_HOST_CONFIGURATION" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    HOST_ACTIVE string(128) OPTIONS (ANNOTATION 'Host active Status (Summary of Active values of all services on that host)', NAMEINSOURCE '"HOST_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    HOST_STATUS string(128) OPTIONS (ANNOTATION 'Host status', NAMEINSOURCE '"HOST_STATUS"', NATIVE_TYPE 'VARCHAR'),
    FAILOVER_STATUS string(128) OPTIONS (ANNOTATION 'Failover status', NAMEINSOURCE '"FAILOVER_STATUS"', NATIVE_TYPE 'VARCHAR'),
    FAILOVER_GROUP string(256) OPTIONS (ANNOTATION 'DEPRECATED: replaced by FAILOVER_..._GROUP columns', NAMEINSOURCE '"FAILOVER_GROUP"', NATIVE_TYPE 'VARCHAR'),
    FAILOVER_CONFIG_GROUP string(256) OPTIONS (ANNOTATION 'Configured failover group', NAMEINSOURCE '"FAILOVER_CONFIG_GROUP"', NATIVE_TYPE 'VARCHAR'),
    FAILOVER_ACTUAL_GROUP string(256) OPTIONS (ANNOTATION 'Actual failover group', NAMEINSOURCE '"FAILOVER_ACTUAL_GROUP"', NATIVE_TYPE 'VARCHAR'),
    NAMESERVER_CONFIG_ROLE string(16) OPTIONS (ANNOTATION 'Nameserver configured role: MASTER, SLAVE', NAMEINSOURCE '"NAMESERVER_CONFIG_ROLE"', NATIVE_TYPE 'VARCHAR'),
    NAMESERVER_ACTUAL_ROLE string(16) OPTIONS (ANNOTATION 'Nameserver actual role: MASTER, SLAVE', NAMEINSOURCE '"NAMESERVER_ACTUAL_ROLE"', NATIVE_TYPE 'VARCHAR'),
    INDEXSERVER_CONFIG_ROLE string(16) OPTIONS (ANNOTATION 'Indexserver configured role: WORKER, STANDBY', NAMEINSOURCE '"INDEXSERVER_CONFIG_ROLE"', NATIVE_TYPE 'VARCHAR'),
    INDEXSERVER_ACTUAL_ROLE string(16) OPTIONS (ANNOTATION 'Indexserver actual role: MASTER, SLAVE, STANDBY', NAMEINSOURCE '"INDEXSERVER_ACTUAL_ROLE"', NATIVE_TYPE 'VARCHAR'),
    STORAGE_PARTITION integer OPTIONS (ANNOTATION 'Storage Partition ~= subpath used by that host', NAMEINSOURCE '"STORAGE_PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOVE_STATUS string(16) OPTIONS (ANNOTATION 'Remove progress', NAMEINSOURCE '"REMOVE_STATUS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Host roles in a distributed landscape', NAMEINSOURCE '"SYS"."M_LANDSCAPE_HOST_CONFIGURATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LICENSE" (
    HARDWARE_KEY string(11) OPTIONS (ANNOTATION 'Hardware key of this SAP HANA installation', NAMEINSOURCE '"HARDWARE_KEY"', NATIVE_TYPE 'VARCHAR'),
    SYSTEM_ID string(3) OPTIONS (ANNOTATION 'System identifier (SID) of this SAP HANA database', NAMEINSOURCE '"SYSTEM_ID"', NATIVE_TYPE 'VARCHAR'),
    INSTALL_NO string(10) OPTIONS (ANNOTATION 'Installation number of this SAP HANA database', NAMEINSOURCE '"INSTALL_NO"', NATIVE_TYPE 'VARCHAR'),
    SYSTEM_NO string(18) OPTIONS (ANNOTATION 'System number of this SAP HANA database', NAMEINSOURCE '"SYSTEM_NO"', NATIVE_TYPE 'VARCHAR'),
    PRODUCT_NAME string(256) OPTIONS (ANNOTATION 'Name of the licensed software product, e.g. SAP HANA', NAMEINSOURCE '"PRODUCT_NAME"', NATIVE_TYPE 'VARCHAR'),
    PRODUCT_LIMIT long OPTIONS (ANNOTATION 'Licensed amount of main memory as specified by the license', NAMEINSOURCE '"PRODUCT_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRODUCT_USAGE long OPTIONS (ANNOTATION 'Peak memory allocation since installation, measured hourly', NAMEINSOURCE '"PRODUCT_USAGE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    START_DATE timestamp OPTIONS (ANNOTATION 'Start date of the validity period of the license', NAMEINSOURCE '"START_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    EXPIRATION_DATE timestamp OPTIONS (ANNOTATION 'Expiration date of the validity period of the license', NAMEINSOURCE '"EXPIRATION_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_SUCCESSFUL_CHECK timestamp OPTIONS (ANNOTATION 'Latest date on which the license was successfully checked and found valid', NAMEINSOURCE '"LAST_SUCCESSFUL_CHECK"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PERMANENT string(5) OPTIONS (ANNOTATION 'TRUE if the license is a permanent one, FALSE if the license is a temporary one', NAMEINSOURCE '"PERMANENT"', NATIVE_TYPE 'VARCHAR'),
    VALID string(5) OPTIONS (ANNOTATION 'TRUE if the license is currently valid, otherwise FALSE', NAMEINSOURCE '"VALID"', NATIVE_TYPE 'VARCHAR'),
    ENFORCED string(5) OPTIONS (ANNOTATION 'TRUE if the license is a memory-enforced license, otherwise FALSE', NAMEINSOURCE '"ENFORCED"', NATIVE_TYPE 'VARCHAR'),
    LOCKED_DOWN string(5) OPTIONS (ANNOTATION 'TRUE if the system is locked down due to license status, otherwise FALSE', NAMEINSOURCE '"LOCKED_DOWN"', NATIVE_TYPE 'VARCHAR'),
    MEASUREMENT_XML clob OPTIONS (ANNOTATION 'Measurement log produced for this licensed system with current memory consumption', NAMEINSOURCE '"MEASUREMENT_XML"', NATIVE_TYPE 'CLOB')
) OPTIONS (ANNOTATION 'Information on the currently valid license (if any) installed on this system', NAMEINSOURCE '"SYS"."M_LICENSE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LICENSE_USAGE_HISTORY" (
    PRODUCT_USAGE long OPTIONS (ANNOTATION 'Maximum utilized amount of main memory used in this period', NAMEINSOURCE '"PRODUCT_USAGE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PERIOD_START_TIME timestamp OPTIONS (ANNOTATION 'Start time of the period the maximum was used in', NAMEINSOURCE '"PERIOD_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PERIOD_END_TIME timestamp OPTIONS (ANNOTATION 'End time of the period the maximum was used in', NAMEINSOURCE '"PERIOD_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Information on the maximum resource consumption per time period, used for validity check of license installed on this system (if any)', NAMEINSOURCE '"SYS"."M_LICENSE_USAGE_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LIVECACHE_CONTAINER_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTAINER_ID long OPTIONS (ANNOTATION 'Container ID', NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_CLASS_ID integer OPTIONS (ANNOTATION 'OMS class ID', NAMEINSOURCE '"OMS_CLASS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_CLASS_NAME string(64) OPTIONS (ANNOTATION 'OMS class name', NAMEINSOURCE '"OMS_CLASS_NAME"', NATIVE_TYPE 'VARCHAR'),
    OMS_SCHEMA_HANDLE integer OPTIONS (ANNOTATION 'OMS schema handle', NAMEINSOURCE '"OMS_SCHEMA_HANDLE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_CONTAINER_NO integer OPTIONS (ANNOTATION 'OMS container number', NAMEINSOURCE '"OMS_CONTAINER_NO"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CLASS_SIZE long OPTIONS (ANNOTATION 'Object class size', NAMEINSOURCE '"CLASS_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_SIZE integer OPTIONS (ANNOTATION 'Object key size', NAMEINSOURCE '"KEY_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY_PARTITION_COUNT integer OPTIONS (ANNOTATION 'Key partition count', NAMEINSOURCE '"KEY_PARTITION_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY_PARTITION_PREFIX_SIZE integer OPTIONS (ANNOTATION 'Key partition prefix length', NAMEINSOURCE '"KEY_PARTITION_PREFIX_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CACHED_KEYS string(5) OPTIONS (ANNOTATION 'Cached keys active: ''TRUE''/''FALSE''', NAMEINSOURCE '"CACHED_KEYS"', NATIVE_TYPE 'VARCHAR'),
    COPY_ON_UPDATE string(5) OPTIONS (ANNOTATION 'Copy on update active: ''TRUE''/''FALSE''', NAMEINSOURCE '"COPY_ON_UPDATE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_COUNT long OPTIONS (ANNOTATION 'Object count', NAMEINSOURCE '"OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SIZE_SUM long OPTIONS (ANNOTATION 'Object size sum', NAMEINSOURCE '"OBJECT_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_OBJECT_COUNT long OPTIONS (ANNOTATION 'History (mark deleted) object count', NAMEINSOURCE '"HISTORY_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_SIZE_SUM long OPTIONS (ANNOTATION 'History data size sum', NAMEINSOURCE '"HISTORY_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_COUNT long OPTIONS (ANNOTATION 'Page count', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_SIZE_SUM long OPTIONS (ANNOTATION 'Page size sum', NAMEINSOURCE '"PAGE_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_CREATE_COUNT long OPTIONS (ANNOTATION 'Object create count since restart', NAMEINSOURCE '"OBJECT_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_UPDATE_COUNT long OPTIONS (ANNOTATION 'Object update count since restart', NAMEINSOURCE '"OBJECT_UPDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_DELETE_COUNT long OPTIONS (ANNOTATION 'Object delete count since restart', NAMEINSOURCE '"OBJECT_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Create timestamp', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'LiveCache container statistics', NAMEINSOURCE '"SYS"."M_LIVECACHE_CONTAINER_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LIVECACHE_CONTAINER_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTAINER_ID long OPTIONS (ANNOTATION 'Container ID', NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_CLASS_ID integer OPTIONS (ANNOTATION 'OMS class ID', NAMEINSOURCE '"OMS_CLASS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_CLASS_NAME string(64) OPTIONS (ANNOTATION 'OMS class name', NAMEINSOURCE '"OMS_CLASS_NAME"', NATIVE_TYPE 'VARCHAR'),
    OMS_SCHEMA_HANDLE integer OPTIONS (ANNOTATION 'OMS schema handle', NAMEINSOURCE '"OMS_SCHEMA_HANDLE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_CONTAINER_NO integer OPTIONS (ANNOTATION 'OMS container number', NAMEINSOURCE '"OMS_CONTAINER_NO"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CLASS_SIZE long OPTIONS (ANNOTATION 'Object class size', NAMEINSOURCE '"CLASS_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_SIZE integer OPTIONS (ANNOTATION 'Object key size', NAMEINSOURCE '"KEY_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY_PARTITION_COUNT integer OPTIONS (ANNOTATION 'Key partition count', NAMEINSOURCE '"KEY_PARTITION_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY_PARTITION_PREFIX_SIZE integer OPTIONS (ANNOTATION 'Key partition prefix length', NAMEINSOURCE '"KEY_PARTITION_PREFIX_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CACHED_KEYS string(5) OPTIONS (ANNOTATION 'Cached keys active: ''TRUE''/''FALSE''', NAMEINSOURCE '"CACHED_KEYS"', NATIVE_TYPE 'VARCHAR'),
    COPY_ON_UPDATE string(5) OPTIONS (ANNOTATION 'Copy on update active: ''TRUE''/''FALSE''', NAMEINSOURCE '"COPY_ON_UPDATE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_COUNT long OPTIONS (ANNOTATION 'Object count', NAMEINSOURCE '"OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SIZE_SUM long OPTIONS (ANNOTATION 'Object size sum', NAMEINSOURCE '"OBJECT_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_OBJECT_COUNT long OPTIONS (ANNOTATION 'History (mark deleted) object count', NAMEINSOURCE '"HISTORY_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_SIZE_SUM long OPTIONS (ANNOTATION 'History data size sum', NAMEINSOURCE '"HISTORY_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_COUNT long OPTIONS (ANNOTATION 'Page count', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_SIZE_SUM long OPTIONS (ANNOTATION 'Page size sum', NAMEINSOURCE '"PAGE_SIZE_SUM"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_CREATE_COUNT long OPTIONS (ANNOTATION 'Object create count since restart', NAMEINSOURCE '"OBJECT_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_UPDATE_COUNT long OPTIONS (ANNOTATION 'Object update count since restart', NAMEINSOURCE '"OBJECT_UPDATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_DELETE_COUNT long OPTIONS (ANNOTATION 'Object delete count since restart', NAMEINSOURCE '"OBJECT_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Create timestamp', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'LiveCache container statistics', NAMEINSOURCE '"SYS"."M_LIVECACHE_CONTAINER_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LIVECACHE_LOCK_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTAINER_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on containers', NAMEINSOURCE '"CONTAINER_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on containers', NAMEINSOURCE '"CONTAINER_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on containers', NAMEINSOURCE '"CONTAINER_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of lock timeouts on containers', NAMEINSOURCE '"CONTAINER_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on schemas', NAMEINSOURCE '"SCHEMA_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on schemas', NAMEINSOURCE '"SCHEMA_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on schemas', NAMEINSOURCE '"SCHEMA_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of lock timeouts on schemas', NAMEINSOURCE '"SCHEMA_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on objects', NAMEINSOURCE '"OBJECT_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on objects', NAMEINSOURCE '"OBJECT_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on objects', NAMEINSOURCE '"OBJECT_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of timeouts on objects', NAMEINSOURCE '"OBJECT_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_REQUESTS_COUNT long OPTIONS (ANNOTATION 'Number of committed requests', NAMEINSOURCE '"COMMITTED_REQUESTS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'LiveCache lock statistics', NAMEINSOURCE '"SYS"."M_LIVECACHE_LOCK_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LIVECACHE_LOCK_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTAINER_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on containers', NAMEINSOURCE '"CONTAINER_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on containers', NAMEINSOURCE '"CONTAINER_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on containers', NAMEINSOURCE '"CONTAINER_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of lock timeouts on containers', NAMEINSOURCE '"CONTAINER_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on schemas', NAMEINSOURCE '"SCHEMA_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on schemas', NAMEINSOURCE '"SCHEMA_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on schemas', NAMEINSOURCE '"SCHEMA_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of lock timeouts on schemas', NAMEINSOURCE '"SCHEMA_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_EXCLUSIVE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on objects', NAMEINSOURCE '"OBJECT_EXCLUSIVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SHARED_COUNT long OPTIONS (ANNOTATION 'Number of shared lock requests on objects', NAMEINSOURCE '"OBJECT_SHARED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_COLLISION_COUNT long OPTIONS (ANNOTATION 'Number of lock collisions on objects', NAMEINSOURCE '"OBJECT_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Number of timeouts on objects', NAMEINSOURCE '"OBJECT_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_REQUESTS_COUNT long OPTIONS (ANNOTATION 'Number of committed requests', NAMEINSOURCE '"COMMITTED_REQUESTS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'LiveCache lock statistics', NAMEINSOURCE '"SYS"."M_LIVECACHE_LOCK_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LIVECACHE_LOCKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ID string(20) OPTIONS (ANNOTATION 'ID of the lock (OID, container ID, or schema ID dependent on the lock class)', NAMEINSOURCE '"ID"', NATIVE_TYPE 'VARCHAR'),
    CLASS string(20) OPTIONS (ANNOTATION 'The class that the lock belongs to', NAMEINSOURCE '"CLASS"', NATIVE_TYPE 'VARCHAR'),
    GRANTED_MODE string(20) OPTIONS (ANNOTATION 'The mode that the lock has currently granted to some request(s)', NAMEINSOURCE '"GRANTED_MODE"', NATIVE_TYPE 'VARCHAR'),
    MODE string(20) OPTIONS (ANNOTATION 'The mode that the request is requesting on the lock: ''Free''/''IntendShare''/''IntendExclusive''/''Share''/''ShareIntendExclusive''/''Exclusive''', NAMEINSOURCE '"MODE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(10) OPTIONS (ANNOTATION 'The type specifies when the lock can be removed (either at transaction-end (EOT) or if not visible anymore (Consistent))', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    STATE string(10) OPTIONS (ANNOTATION 'State of this lock request', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    TID long OPTIONS (ANNOTATION 'Transaction ID belonging to this lock request', NAMEINSOURCE '"TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT long OPTIONS (ANNOTATION 'Remaining timeout, if timeout is specified', NAMEINSOURCE '"TIMEOUT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Detailed information on the Object Management System (OMS) locks', NAMEINSOURCE '"SYS"."M_LIVECACHE_LOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LIVECACHE_OMS_VERSIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VERSION_ID string(22) OPTIONS (ANNOTATION 'ID of the OMS version', NAMEINSOURCE '"VERSION_ID"', NATIVE_TYPE 'VARCHAR'),
    CREATE_DATE timestamp OPTIONS (ANNOTATION 'Timestamp of the creation of the OMS version', NAMEINSOURCE '"CREATE_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_OPEN_DATE timestamp OPTIONS (ANNOTATION 'Timestamp, when the OMS version was opened last', NAMEINSOURCE '"LAST_OPEN_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IS_OPEN string(5) NOT NULL OPTIONS (ANNOTATION 'Flag indicating whether the version is currently open: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_OPEN"', NATIVE_TYPE 'VARCHAR'),
    HEAP_USAGE long OPTIONS (ANNOTATION 'Memory that is currently used by the version', NAMEINSOURCE '"HEAP_USAGE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_DESCRIPTION string(512) OPTIONS (ANNOTATION 'Description', NAMEINSOURCE '"VERSION_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Detailed information on the OMS versions that currently exists', NAMEINSOURCE '"SYS"."M_LIVECACHE_OMS_VERSIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LIVECACHE_PROCEDURE_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_NAME string(128) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'VARCHAR'),
    METHOD_NAME string(128) OPTIONS (ANNOTATION 'Method name', NAMEINSOURCE '"METHOD_NAME"', NATIVE_TYPE 'VARCHAR'),
    CALL_COUNT long OPTIONS (ANNOTATION 'Number of calls of the procedure', NAMEINSOURCE '"CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_RUN_TIME long OPTIONS (ANNOTATION 'Sum runtime of the procedure', NAMEINSOURCE '"SUM_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_RUN_TIME long OPTIONS (ANNOTATION 'Max runtime of the procedure', NAMEINSOURCE '"MAX_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_RUN_TIME long OPTIONS (ANNOTATION 'Min runtime of the procedure', NAMEINSOURCE '"MIN_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_RUN_TIME long OPTIONS (ANNOTATION 'Average runtime of the procedure', NAMEINSOURCE '"AVERAGE_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs', NAMEINSOURCE '"DEREF_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_BASE_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs against basis', NAMEINSOURCE '"DEREF_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs against basis from within an OMS version', NAMEINSOURCE '"DEREF_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of key derefs', NAMEINSOURCE '"DEREF_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of key derefs against basis', NAMEINSOURCE '"DEREF_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of key derefs against basis from within an OMS version', NAMEINSOURCE '"DEREF_KEYED_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_BASE_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis', NAMEINSOURCE '"ITER_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of objects read via a key-iterator from the basis', NAMEINSOURCE '"ITER_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis from within an OMS version', NAMEINSOURCE '"ITER_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects, created in an OMS-version, read via an OID-iterator', NAMEINSOURCE '"ITER_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis from within an OMS version', NAMEINSOURCE '"ITER_KEYED_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects, created in an OMS version, read via a key-iterator', NAMEINSOURCE '"ITER_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects', NAMEINSOURCE '"DEREF_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects against basis', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_SIZE long OPTIONS (ANNOTATION 'Accumulated size of var objects read from the basis', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects against basis from within an OMS version', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_IN_VERSION_SIZE long OPTIONS (ANNOTATION 'Accumulated size of var objects read from the basis from within an OMS version', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_IN_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created standard objects', NAMEINSOURCE '"NEW_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created keyed objects', NAMEINSOURCE '"NEW_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created var objects', NAMEINSOURCE '"NEW_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created standard objects in an OMS version', NAMEINSOURCE '"NEW_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created keyed objects in an OMS version', NAMEINSOURCE '"NEW_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created var objects in an OMS version', NAMEINSOURCE '"NEW_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_COUNT long OPTIONS (ANNOTATION 'Number of store calls on standard objects', NAMEINSOURCE '"STORE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on standard objects in an OMS versino', NAMEINSOURCE '"STORE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of store calls on keyed objects', NAMEINSOURCE '"STORE_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on keyed objects in an OMS version', NAMEINSOURCE '"STORE_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of store calls on var objects', NAMEINSOURCE '"STORE_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_SIZE long OPTIONS (ANNOTATION 'Accumulated size of store calls on var objects', NAMEINSOURCE '"STORE_VAR_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on var objects in an OMS version', NAMEINSOURCE '"STORE_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_IN_VERSION_SIZE long OPTIONS (ANNOTATION 'Accumulated size of store calls on var objects in an OMS version', NAMEINSOURCE '"STORE_VAR_OBJECT_IN_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of standard objects in the basis', NAMEINSOURCE '"STORE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of keyed objects in the basis', NAMEINSOURCE '"STORE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of var objects in the basis', NAMEINSOURCE '"STORE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_BASE_SIZE long OPTIONS (ANNOTATION 'Accumulated sizes of updated objects in the basis', NAMEINSOURCE '"STORE_VAR_OBJECT_BASE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on standard objects', NAMEINSOURCE '"DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on keyed objects', NAMEINSOURCE '"DELETE_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on var objects', NAMEINSOURCE '"DELETE_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on standard objects in an OMS version', NAMEINSOURCE '"DELETE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on keyed objects in an OMS version', NAMEINSOURCE '"DELETE_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on var objects in an OMS version', NAMEINSOURCE '"DELETE_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted standard objects in the basis', NAMEINSOURCE '"DELETE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted keyed objects in the basis', NAMEINSOURCE '"DELETE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted var objects in the basis', NAMEINSOURCE '"DELETE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on standard objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on standard objects in the basis', NAMEINSOURCE '"LOCK_SHARE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on keyed objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on keyed objects in the basis', NAMEINSOURCE '"LOCK_SHARE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on var objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on var objects in the basis', NAMEINSOURCE '"LOCK_SHARE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_CALLED_COUNT long OPTIONS (ANNOTATION 'Number of OMS release calls', NAMEINSOURCE '"RELEASE_CALLED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_COUNT long OPTIONS (ANNOTATION 'Number of released standard objects', NAMEINSOURCE '"RELEASE_EXECUTED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of releases keyed objects', NAMEINSOURCE '"RELEASE_EXECUTED_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of releases var objects', NAMEINSOURCE '"RELEASE_EXECUTED_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_HOP_COUNT long OPTIONS (ANNOTATION 'Number of hops in the history chain during deref', NAMEINSOURCE '"HISTORY_HOP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_HISTORY_HOP_COUNT long OPTIONS (ANNOTATION 'Number of hops in the history chain during iteration', NAMEINSOURCE '"ITER_HISTORY_HOP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of dbp-exceptions thrown', NAMEINSOURCE '"EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OUT_OF_DATE_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of out-of-date-exceptions thrown', NAMEINSOURCE '"OUT_OF_DATE_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OUT_OF_MEMORY_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of out-of-memory-exceptions thrown', NAMEINSOURCE '"OUT_OF_MEMORY_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of timeout-exceptions thrown', NAMEINSOURCE '"TIMEOUT_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_TERMINATE_COUNT long OPTIONS (ANNOTATION 'Number of OMS terminate calls', NAMEINSOURCE '"OMS_TERMINATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBTRANSACTION_ROLLBACK_COUNT long OPTIONS (ANNOTATION 'Number of rolled back sub-transactions', NAMEINSOURCE '"SUBTRANSACTION_ROLLBACK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBTRANSACTION_COMMIT_COUNT long OPTIONS (ANNOTATION 'Number of committed sub-transactions', NAMEINSOURCE '"SUBTRANSACTION_COMMIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SUBTRANSACTION_LEVEL long OPTIONS (ANNOTATION 'Maximal subtransaction level', NAMEINSOURCE '"MAX_SUBTRANSACTION_LEVEL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_CONSISTENT_VIEW_COUNT long OPTIONS (ANNOTATION 'Number of new-consistent-view calls with objects', NAMEINSOURCE '"NEW_CONSISTENT_VIEW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_NEW_CONSISTENT_VIEW_WAIT_TIME long OPTIONS (ANNOTATION 'Average wait time of new-consistent-view calls with objects', NAMEINSOURCE '"AVERAGE_NEW_CONSISTENT_VIEW_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_CONSISTENT_VIEW_MAX_WAIT_TIME long OPTIONS (ANNOTATION 'Maximal wait time of new-consistent-view calls with objects', NAMEINSOURCE '"NEW_CONSISTENT_VIEW_MAX_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_CACHE_HIT_COUNT long OPTIONS (ANNOTATION 'Number of cache hits in the key-cache', NAMEINSOURCE '"KEY_CACHE_HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_MISS_CACHE_HIT_COUNT long OPTIONS (ANNOTATION 'Number of cache hits in the key-miss-cache', NAMEINSOURCE '"KEY_MISS_CACHE_HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VERSION_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of key-derefs in an OMS version on objects created in this version', NAMEINSOURCE '"DEREF_VERSION_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_REHASH_COUNT long OPTIONS (ANNOTATION 'Number of rehashes of the OMS-object-hash', NAMEINSOURCE '"OMS_REHASH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_HASH_CHAIN_SEARCH_LENGTH long OPTIONS (ANNOTATION 'Average search length on the hash-chains of the OMS-object-hash', NAMEINSOURCE '"AVERAGE_HASH_CHAIN_SEARCH_LENGTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_HASH_CHAIN_LENGTH long OPTIONS (ANNOTATION 'Maximum length of a hash-chain of the OMS-object-hash', NAMEINSOURCE '"MAX_HASH_CHAIN_LENGTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_CREATE_COUNT long OPTIONS (ANNOTATION 'Number of created OMS versions', NAMEINSOURCE '"VERSION_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_OPEN_COUNT long OPTIONS (ANNOTATION 'Number of open-version calls', NAMEINSOURCE '"VERSION_OPEN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_CLOSE_COUNT long OPTIONS (ANNOTATION 'Number of close-version calls', NAMEINSOURCE '"VERSION_CLOSE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_DROP_COUNT long OPTIONS (ANNOTATION 'Number of dropped OMS versions', NAMEINSOURCE '"VERSION_DROP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_ALLOC_COUNT long OPTIONS (ANNOTATION 'Number of allocations via a user allocator', NAMEINSOURCE '"USER_ALLOC_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MAX_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_MAX_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MIN_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_MIN_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_AVERAGE_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_AVERAGE_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_DELETE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations via a user allocator', NAMEINSOURCE '"USER_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MAX_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_MAX_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MIN_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_MIN_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_AVERAGE_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_AVERAGE_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_DELTA_MAX_SIZE long OPTIONS (ANNOTATION 'Maximal difference between allocation and deallocation on a user allocator during the execution of a method', NAMEINSOURCE '"USER_DELTA_MAX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_ALLOC_COUNT long OPTIONS (ANNOTATION 'Number of allocations via an OMS internal allocator', NAMEINSOURCE '"OMS_ALLOC_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MAX_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MAX_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MIN_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MIN_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_AVERAGE_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_AVERAGE_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_DELETE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations via an OMS internal allocator', NAMEINSOURCE '"OMS_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MAX_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MAX_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MIN_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MIN_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_AVERAGE_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_AVERAGE_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_DELTA_MAX_SIZE long OPTIONS (ANNOTATION 'Maximum difference between allocation and deallocation on an OMS internal allocator during the execution of a method', NAMEINSOURCE '"OMS_DELTA_MAX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_COMMUNICATION_TIME long OPTIONS (ANNOTATION 'Average stream communication time', NAMEINSOURCE '"STREAM_COMMUNICATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_READ_COUNT long OPTIONS (ANNOTATION 'Number of communications for reading ABAP tables', NAMEINSOURCE '"STREAM_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_WRITE_COUNT long OPTIONS (ANNOTATION 'Number of communications for writing ABAP tables', NAMEINSOURCE '"STREAM_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_READ_ROW_COUNT long OPTIONS (ANNOTATION 'Number of rows read from ABAP tables', NAMEINSOURCE '"STREAM_READ_ROW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_WRITE_ROW_COUNT long OPTIONS (ANNOTATION 'Number of rows written to ABAP tables', NAMEINSOURCE '"STREAM_WRITE_ROW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'LiveCache procedure statistics', NAMEINSOURCE '"SYS"."M_LIVECACHE_PROCEDURE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LIVECACHE_PROCEDURE_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_NAME string(128) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'VARCHAR'),
    METHOD_NAME string(128) OPTIONS (ANNOTATION 'Method name', NAMEINSOURCE '"METHOD_NAME"', NATIVE_TYPE 'VARCHAR'),
    CALL_COUNT long OPTIONS (ANNOTATION 'Number of calls of the procedure', NAMEINSOURCE '"CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_RUN_TIME long OPTIONS (ANNOTATION 'Sum runtime of the procedure', NAMEINSOURCE '"SUM_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_RUN_TIME long OPTIONS (ANNOTATION 'Max runtime of the procedure', NAMEINSOURCE '"MAX_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_RUN_TIME long OPTIONS (ANNOTATION 'Min runtime of the procedure', NAMEINSOURCE '"MIN_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_RUN_TIME long OPTIONS (ANNOTATION 'Average runtime of the procedure', NAMEINSOURCE '"AVERAGE_RUN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs', NAMEINSOURCE '"DEREF_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_BASE_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs against basis', NAMEINSOURCE '"DEREF_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of OID derefs against basis from within an OMS version', NAMEINSOURCE '"DEREF_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of key derefs', NAMEINSOURCE '"DEREF_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of key derefs against basis', NAMEINSOURCE '"DEREF_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_KEYED_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of key derefs against basis from within an OMS version', NAMEINSOURCE '"DEREF_KEYED_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_BASE_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis', NAMEINSOURCE '"ITER_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of objects read via a key-iterator from the basis', NAMEINSOURCE '"ITER_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis from within an OMS version', NAMEINSOURCE '"ITER_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects, created in an OMS-version, read via an OID-iterator', NAMEINSOURCE '"ITER_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects read via an OID-iterator from the basis from within an OMS version', NAMEINSOURCE '"ITER_KEYED_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of objects, created in an OMS version, read via a key-iterator', NAMEINSOURCE '"ITER_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects', NAMEINSOURCE '"DEREF_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects against basis', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_SIZE long OPTIONS (ANNOTATION 'Accumulated size of var objects read from the basis', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of derefs of var objects against basis from within an OMS version', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VAR_OBJECT_BASE_IN_VERSION_SIZE long OPTIONS (ANNOTATION 'Accumulated size of var objects read from the basis from within an OMS version', NAMEINSOURCE '"DEREF_VAR_OBJECT_BASE_IN_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created standard objects', NAMEINSOURCE '"NEW_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created keyed objects', NAMEINSOURCE '"NEW_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of newly created var objects', NAMEINSOURCE '"NEW_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created standard objects in an OMS version', NAMEINSOURCE '"NEW_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created keyed objects in an OMS version', NAMEINSOURCE '"NEW_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of newly created var objects in an OMS version', NAMEINSOURCE '"NEW_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_COUNT long OPTIONS (ANNOTATION 'Number of store calls on standard objects', NAMEINSOURCE '"STORE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on standard objects in an OMS versino', NAMEINSOURCE '"STORE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of store calls on keyed objects', NAMEINSOURCE '"STORE_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on keyed objects in an OMS version', NAMEINSOURCE '"STORE_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of store calls on var objects', NAMEINSOURCE '"STORE_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_SIZE long OPTIONS (ANNOTATION 'Accumulated size of store calls on var objects', NAMEINSOURCE '"STORE_VAR_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of store calls on var objects in an OMS version', NAMEINSOURCE '"STORE_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_IN_VERSION_SIZE long OPTIONS (ANNOTATION 'Accumulated size of store calls on var objects in an OMS version', NAMEINSOURCE '"STORE_VAR_OBJECT_IN_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of standard objects in the basis', NAMEINSOURCE '"STORE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of keyed objects in the basis', NAMEINSOURCE '"STORE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of updates of var objects in the basis', NAMEINSOURCE '"STORE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STORE_VAR_OBJECT_BASE_SIZE long OPTIONS (ANNOTATION 'Accumulated sizes of updated objects in the basis', NAMEINSOURCE '"STORE_VAR_OBJECT_BASE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on standard objects', NAMEINSOURCE '"DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on keyed objects', NAMEINSOURCE '"DELETE_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on var objects', NAMEINSOURCE '"DELETE_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on standard objects in an OMS version', NAMEINSOURCE '"DELETE_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on keyed objects in an OMS version', NAMEINSOURCE '"DELETE_KEYED_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_IN_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete calls on var objects in an OMS version', NAMEINSOURCE '"DELETE_VAR_OBJECT_IN_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted standard objects in the basis', NAMEINSOURCE '"DELETE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted keyed objects in the basis', NAMEINSOURCE '"DELETE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of deleted var objects in the basis', NAMEINSOURCE '"DELETE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on standard objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on standard objects in the basis', NAMEINSOURCE '"LOCK_SHARE_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on keyed objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_KEYED_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on keyed objects in the basis', NAMEINSOURCE '"LOCK_SHARE_KEYED_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_EXCLUSIVE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of exclusive lock requests on var objects in the basis', NAMEINSOURCE '"LOCK_EXCLUSIVE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_SHARE_VAR_OBJECT_BASE_COUNT long OPTIONS (ANNOTATION 'Number of share lock reqeusts on var objects in the basis', NAMEINSOURCE '"LOCK_SHARE_VAR_OBJECT_BASE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_CALLED_COUNT long OPTIONS (ANNOTATION 'Number of OMS release calls', NAMEINSOURCE '"RELEASE_CALLED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_COUNT long OPTIONS (ANNOTATION 'Number of released standard objects', NAMEINSOURCE '"RELEASE_EXECUTED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of releases keyed objects', NAMEINSOURCE '"RELEASE_EXECUTED_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RELEASE_EXECUTED_VAR_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of releases var objects', NAMEINSOURCE '"RELEASE_EXECUTED_VAR_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HISTORY_HOP_COUNT long OPTIONS (ANNOTATION 'Number of hops in the history chain during deref', NAMEINSOURCE '"HISTORY_HOP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITER_HISTORY_HOP_COUNT long OPTIONS (ANNOTATION 'Number of hops in the history chain during iteration', NAMEINSOURCE '"ITER_HISTORY_HOP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of dbp-exceptions thrown', NAMEINSOURCE '"EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OUT_OF_DATE_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of out-of-date-exceptions thrown', NAMEINSOURCE '"OUT_OF_DATE_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OUT_OF_MEMORY_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of out-of-memory-exceptions thrown', NAMEINSOURCE '"OUT_OF_MEMORY_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_EXCEPTION_COUNT long OPTIONS (ANNOTATION 'Number of timeout-exceptions thrown', NAMEINSOURCE '"TIMEOUT_EXCEPTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_TERMINATE_COUNT long OPTIONS (ANNOTATION 'Number of OMS terminate calls', NAMEINSOURCE '"OMS_TERMINATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBTRANSACTION_ROLLBACK_COUNT long OPTIONS (ANNOTATION 'Number of rolled back sub-transactions', NAMEINSOURCE '"SUBTRANSACTION_ROLLBACK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBTRANSACTION_COMMIT_COUNT long OPTIONS (ANNOTATION 'Number of committed sub-transactions', NAMEINSOURCE '"SUBTRANSACTION_COMMIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SUBTRANSACTION_LEVEL long OPTIONS (ANNOTATION 'Maximal subtransaction level', NAMEINSOURCE '"MAX_SUBTRANSACTION_LEVEL"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_CONSISTENT_VIEW_COUNT long OPTIONS (ANNOTATION 'Number of new-consistent-view calls with objects', NAMEINSOURCE '"NEW_CONSISTENT_VIEW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_NEW_CONSISTENT_VIEW_WAIT_TIME long OPTIONS (ANNOTATION 'Average wait time of new-consistent-view calls with objects', NAMEINSOURCE '"AVERAGE_NEW_CONSISTENT_VIEW_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_CONSISTENT_VIEW_MAX_WAIT_TIME long OPTIONS (ANNOTATION 'Maximal wait time of new-consistent-view calls with objects', NAMEINSOURCE '"NEW_CONSISTENT_VIEW_MAX_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_CACHE_HIT_COUNT long OPTIONS (ANNOTATION 'Number of cache hits in the key-cache', NAMEINSOURCE '"KEY_CACHE_HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_MISS_CACHE_HIT_COUNT long OPTIONS (ANNOTATION 'Number of cache hits in the key-miss-cache', NAMEINSOURCE '"KEY_MISS_CACHE_HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEREF_VERSION_KEYED_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of key-derefs in an OMS version on objects created in this version', NAMEINSOURCE '"DEREF_VERSION_KEYED_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_REHASH_COUNT long OPTIONS (ANNOTATION 'Number of rehashes of the OMS-object-hash', NAMEINSOURCE '"OMS_REHASH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVERAGE_HASH_CHAIN_SEARCH_LENGTH long OPTIONS (ANNOTATION 'Average search length on the hash-chains of the OMS-object-hash', NAMEINSOURCE '"AVERAGE_HASH_CHAIN_SEARCH_LENGTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_HASH_CHAIN_LENGTH long OPTIONS (ANNOTATION 'Maximum length of a hash-chain of the OMS-object-hash', NAMEINSOURCE '"MAX_HASH_CHAIN_LENGTH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_CREATE_COUNT long OPTIONS (ANNOTATION 'Number of created OMS versions', NAMEINSOURCE '"VERSION_CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_OPEN_COUNT long OPTIONS (ANNOTATION 'Number of open-version calls', NAMEINSOURCE '"VERSION_OPEN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_CLOSE_COUNT long OPTIONS (ANNOTATION 'Number of close-version calls', NAMEINSOURCE '"VERSION_CLOSE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_DROP_COUNT long OPTIONS (ANNOTATION 'Number of dropped OMS versions', NAMEINSOURCE '"VERSION_DROP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_ALLOC_COUNT long OPTIONS (ANNOTATION 'Number of allocations via a user allocator', NAMEINSOURCE '"USER_ALLOC_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MAX_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_MAX_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MIN_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_MIN_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_AVERAGE_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk allocated via a user allocator', NAMEINSOURCE '"USER_AVERAGE_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_DELETE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations via a user allocator', NAMEINSOURCE '"USER_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MAX_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_MAX_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MIN_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_MIN_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_AVERAGE_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk deallocated via a user allocator', NAMEINSOURCE '"USER_AVERAGE_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_DELTA_MAX_SIZE long OPTIONS (ANNOTATION 'Maximal difference between allocation and deallocation on a user allocator during the execution of a method', NAMEINSOURCE '"USER_DELTA_MAX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_ALLOC_COUNT long OPTIONS (ANNOTATION 'Number of allocations via an OMS internal allocator', NAMEINSOURCE '"OMS_ALLOC_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MAX_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MAX_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MIN_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MIN_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_AVERAGE_CHUNK_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk allocated via an OMS internal allocator', NAMEINSOURCE '"OMS_AVERAGE_CHUNK_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_DELETE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations via an OMS internal allocator', NAMEINSOURCE '"OMS_DELETE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MAX_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Max size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MAX_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_MIN_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Min size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_MIN_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_AVERAGE_CHUNK_DELETED_SIZE long OPTIONS (ANNOTATION 'Average size of an chunk deallocated via an OMS internal allocator', NAMEINSOURCE '"OMS_AVERAGE_CHUNK_DELETED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OMS_DELTA_MAX_SIZE long OPTIONS (ANNOTATION 'Maximum difference between allocation and deallocation on an OMS internal allocator during the execution of a method', NAMEINSOURCE '"OMS_DELTA_MAX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_COMMUNICATION_TIME long OPTIONS (ANNOTATION 'Average stream communication time', NAMEINSOURCE '"STREAM_COMMUNICATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_READ_COUNT long OPTIONS (ANNOTATION 'Number of communications for reading ABAP tables', NAMEINSOURCE '"STREAM_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_WRITE_COUNT long OPTIONS (ANNOTATION 'Number of communications for writing ABAP tables', NAMEINSOURCE '"STREAM_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_READ_ROW_COUNT long OPTIONS (ANNOTATION 'Number of rows read from ABAP tables', NAMEINSOURCE '"STREAM_READ_ROW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STREAM_WRITE_ROW_COUNT long OPTIONS (ANNOTATION 'Number of rows written to ABAP tables', NAMEINSOURCE '"STREAM_WRITE_ROW_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'LiveCache procedure statistics', NAMEINSOURCE '"SYS"."M_LIVECACHE_PROCEDURE_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LIVECACHE_SCHEMA_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_SCHEMA_HANDLE integer OPTIONS (ANNOTATION 'OMS schema ID', NAMEINSOURCE '"OMS_SCHEMA_HANDLE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_SCHEMA_NAME string(96) OPTIONS (ANNOTATION 'OMS schema name', NAMEINSOURCE '"OMS_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Create timestamp', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'LiveCache schema statistics', NAMEINSOURCE '"SYS"."M_LIVECACHE_SCHEMA_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LIVECACHE_SCHEMA_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_SCHEMA_HANDLE integer OPTIONS (ANNOTATION 'OMS schema ID', NAMEINSOURCE '"OMS_SCHEMA_HANDLE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OMS_SCHEMA_NAME string(96) OPTIONS (ANNOTATION 'OMS schema name', NAMEINSOURCE '"OMS_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Create timestamp', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'LiveCache schema statistics', NAMEINSOURCE '"SYS"."M_LIVECACHE_SCHEMA_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LOCK_WAITS_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_TYPE string(32) OPTIONS (ANNOTATION 'Lock type: RECORD, TABLE, METADATA', NAMEINSOURCE '"LOCK_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TOTAL_LOCK_WAITS long OPTIONS (ANNOTATION 'Total lock wait count', NAMEINSOURCE '"TOTAL_LOCK_WAITS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Total lock wait duration (unit: micro second)', NAMEINSOURCE '"TOTAL_LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Accumulated lock wait count and duration for record lock, table lock and metadata lock for all available services from DB startup until now', NAMEINSOURCE '"SYS"."M_LOCK_WAITS_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LOG_BUFFERS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOG_MODE string(16) OPTIONS (ANNOTATION 'Log mode', NAMEINSOURCE '"LOG_MODE"', NATIVE_TYPE 'VARCHAR'),
    BUFFER_SIZE long OPTIONS (ANNOTATION 'Size of one log buffer in memory', NAMEINSOURCE '"BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BUFFER_COUNT long OPTIONS (ANNOTATION 'Count of log buffers in memory', NAMEINSOURCE '"BUFFER_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEGMENT_SIZE long OPTIONS (ANNOTATION 'Maximum size of one log segment', NAMEINSOURCE '"SEGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKUP_ENABLED string(5) OPTIONS (ANNOTATION 'Log segment backup enabled: ''TRUE''/''FALSE'' (''FALSE'' on log backup history broken)', NAMEINSOURCE '"BACKUP_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    BACKUP_TIMEOUT long OPTIONS (ANNOTATION 'Log segment backup timeout', NAMEINSOURCE '"BACKUP_TIMEOUT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_NOWAIT_COUNT long OPTIONS (ANNOTATION 'Count of buffer switches without blocking on buffer semaphore', NAMEINSOURCE '"SWITCH_NOWAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of buffer switches with blocking on buffer semaphore', NAMEINSOURCE '"SWITCH_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_OPEN_COUNT long OPTIONS (ANNOTATION 'Count of ignored still-open buffer switches (resolved races)', NAMEINSOURCE '"SWITCH_OPEN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Log buffer statistics', NAMEINSOURCE '"SYS"."M_LOG_BUFFERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LOG_BUFFERS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOG_MODE string(16) OPTIONS (ANNOTATION 'Log mode', NAMEINSOURCE '"LOG_MODE"', NATIVE_TYPE 'VARCHAR'),
    BUFFER_SIZE long OPTIONS (ANNOTATION 'Size of one log buffer in memory', NAMEINSOURCE '"BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BUFFER_COUNT long OPTIONS (ANNOTATION 'Count of log buffers in memory', NAMEINSOURCE '"BUFFER_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEGMENT_SIZE long OPTIONS (ANNOTATION 'Maximum size of one log segment', NAMEINSOURCE '"SEGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKUP_ENABLED string(5) OPTIONS (ANNOTATION 'Log segment backup enabled: ''TRUE''/''FALSE'' (''FALSE'' on log backup history broken)', NAMEINSOURCE '"BACKUP_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    BACKUP_TIMEOUT long OPTIONS (ANNOTATION 'Log segment backup timeout', NAMEINSOURCE '"BACKUP_TIMEOUT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_NOWAIT_COUNT long OPTIONS (ANNOTATION 'Count of buffer switches without blocking on buffer semaphore', NAMEINSOURCE '"SWITCH_NOWAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of buffer switches with blocking on buffer semaphore', NAMEINSOURCE '"SWITCH_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWITCH_OPEN_COUNT long OPTIONS (ANNOTATION 'Count of ignored still-open buffer switches (resolved races)', NAMEINSOURCE '"SWITCH_OPEN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Log buffer statistics', NAMEINSOURCE '"SYS"."M_LOG_BUFFERS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LOG_PARTITIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARTITION_ID long OPTIONS (ANNOTATION 'Log partition ID', NAMEINSOURCE '"PARTITION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PATH string(512) OPTIONS (ANNOTATION 'Log partition root path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    LAST_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (last)', NAMEINSOURCE '"LAST_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (max)', NAMEINSOURCE '"MAX_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (min)', NAMEINSOURCE '"MIN_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (total)', NAMEINSOURCE '"SUM_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (avg)', NAMEINSOURCE '"AVG_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (last)', NAMEINSOURCE '"LAST_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (max)', NAMEINSOURCE '"MAX_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (min)', NAMEINSOURCE '"MIN_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (total)', NAMEINSOURCE '"SUM_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (avg)', NAMEINSOURCE '"AVG_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (last)', NAMEINSOURCE '"LAST_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (max)', NAMEINSOURCE '"MAX_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (min)', NAMEINSOURCE '"MIN_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (total)', NAMEINSOURCE '"SUM_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (avg)', NAMEINSOURCE '"AVG_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (last)', NAMEINSOURCE '"LAST_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (max)', NAMEINSOURCE '"MAX_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (min)', NAMEINSOURCE '"MIN_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (total)', NAMEINSOURCE '"SUM_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (avg)', NAMEINSOURCE '"AVG_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (last)', NAMEINSOURCE '"LAST_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (max)', NAMEINSOURCE '"MAX_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (min)', NAMEINSOURCE '"MIN_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (total)', NAMEINSOURCE '"SUM_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (avg)', NAMEINSOURCE '"AVG_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARED_BUFFERS long OPTIONS (ANNOTATION 'Count of buffers prepared for I/O', NAMEINSOURCE '"PREPARED_BUFFERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITTEN_BUFFERS long OPTIONS (ANNOTATION 'Count of completed and written buffers', NAMEINSOURCE '"WRITTEN_BUFFERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITTEN_BUFFERS_OOO long OPTIONS (ANNOTATION 'Count of buffers written out-of-order', NAMEINSOURCE '"WRITTEN_BUFFERS_OOO"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_SEGMENT_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of new log segment requests', NAMEINSOURCE '"NEW_SEGMENT_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently free log segments', NAMEINSOURCE '"FREE_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently in-backup log segments', NAMEINSOURCE '"IN_BACKUP_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP_TRUNCATED_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently in-backup truncated log segments', NAMEINSOURCE '"IN_BACKUP_TRUNCATED_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKED_UP_SEGMENTS long OPTIONS (ANNOTATION 'Count of log segments backed up so far', NAMEINSOURCE '"BACKED_UP_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SEGMENTS long OPTIONS (ANNOTATION 'Total log segment count in the partition', NAMEINSOURCE '"TOTAL_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_IN_LOAD long OPTIONS (ANNOTATION 'Count of segments in-load during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_IN_LOAD"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_WAITING_FOR_LOAD long OPTIONS (ANNOTATION 'Count of segments waiting for load during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_WAITING_FOR_LOAD"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_IN_PROCESS long OPTIONS (ANNOTATION 'Count of segments in process during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_IN_PROCESS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_PROCESSED long OPTIONS (ANNOTATION 'Count of segments processed during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_PROCESSED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_COUNT long OPTIONS (ANNOTATION 'Count of commits', NAMEINSOURCE '"COMMIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (last)', NAMEINSOURCE '"LAST_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (max)', NAMEINSOURCE '"MAX_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (min)', NAMEINSOURCE '"MIN_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (total)', NAMEINSOURCE '"SUM_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (avg)', NAMEINSOURCE '"AVG_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Log partition statistics', NAMEINSOURCE '"SYS"."M_LOG_PARTITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LOG_PARTITIONS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARTITION_ID long OPTIONS (ANNOTATION 'Log partition ID', NAMEINSOURCE '"PARTITION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PATH string(512) OPTIONS (ANNOTATION 'Log partition root path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    LAST_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (last)', NAMEINSOURCE '"LAST_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (max)', NAMEINSOURCE '"MAX_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (min)', NAMEINSOURCE '"MIN_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (total)', NAMEINSOURCE '"SUM_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_PREPARE_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at prepare time (actual log data size) (avg)', NAMEINSOURCE '"AVG_BUFFER_PREPARE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (last)', NAMEINSOURCE '"LAST_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (max)', NAMEINSOURCE '"MAX_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (min)', NAMEINSOURCE '"MIN_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (total)', NAMEINSOURCE '"SUM_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_OVERHEAD_SIZE long OPTIONS (ANNOTATION 'Size of log buffer alignment overhead at I/O time (avg)', NAMEINSOURCE '"AVG_BUFFER_OVERHEAD_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (last)', NAMEINSOURCE '"LAST_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (max)', NAMEINSOURCE '"MAX_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (min)', NAMEINSOURCE '"MIN_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (total)', NAMEINSOURCE '"SUM_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BUFFER_IO_SIZE long OPTIONS (ANNOTATION 'Size of log buffer at I/O time (actual data plus alignment overhead) (avg)', NAMEINSOURCE '"AVG_BUFFER_IO_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (last)', NAMEINSOURCE '"LAST_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (max)', NAMEINSOURCE '"MAX_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (min)', NAMEINSOURCE '"MIN_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (total)', NAMEINSOURCE '"SUM_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_GROUP_COMMIT_FREQUENCY long OPTIONS (ANNOTATION 'Group commit frequency (callback count per buffer with sync callback) (avg)', NAMEINSOURCE '"AVG_GROUP_COMMIT_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (last)', NAMEINSOURCE '"LAST_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (max)', NAMEINSOURCE '"MAX_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (min)', NAMEINSOURCE '"MIN_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (total)', NAMEINSOURCE '"SUM_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CALLBACK_TIME long OPTIONS (ANNOTATION 'Callback time per buffer with sync callback (avg)', NAMEINSOURCE '"AVG_CALLBACK_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARED_BUFFERS long OPTIONS (ANNOTATION 'Count of buffers prepared for I/O', NAMEINSOURCE '"PREPARED_BUFFERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITTEN_BUFFERS long OPTIONS (ANNOTATION 'Count of completed and written buffers', NAMEINSOURCE '"WRITTEN_BUFFERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITTEN_BUFFERS_OOO long OPTIONS (ANNOTATION 'Count of buffers written out-of-order', NAMEINSOURCE '"WRITTEN_BUFFERS_OOO"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEW_SEGMENT_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of new log segment requests', NAMEINSOURCE '"NEW_SEGMENT_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently free log segments', NAMEINSOURCE '"FREE_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently in-backup log segments', NAMEINSOURCE '"IN_BACKUP_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP_TRUNCATED_SEGMENTS long OPTIONS (ANNOTATION 'Count of currently in-backup truncated log segments', NAMEINSOURCE '"IN_BACKUP_TRUNCATED_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BACKED_UP_SEGMENTS long OPTIONS (ANNOTATION 'Count of log segments backed up so far', NAMEINSOURCE '"BACKED_UP_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SEGMENTS long OPTIONS (ANNOTATION 'Total log segment count in the partition', NAMEINSOURCE '"TOTAL_SEGMENTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_IN_LOAD long OPTIONS (ANNOTATION 'Count of segments in-load during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_IN_LOAD"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_WAITING_FOR_LOAD long OPTIONS (ANNOTATION 'Count of segments waiting for load during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_WAITING_FOR_LOAD"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_IN_PROCESS long OPTIONS (ANNOTATION 'Count of segments in process during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_IN_PROCESS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECOVERY_SEGMENTS_PROCESSED long OPTIONS (ANNOTATION 'Count of segments processed during recovery', NAMEINSOURCE '"RECOVERY_SEGMENTS_PROCESSED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_COUNT long OPTIONS (ANNOTATION 'Count of commits', NAMEINSOURCE '"COMMIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (last)', NAMEINSOURCE '"LAST_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (max)', NAMEINSOURCE '"MAX_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (min)', NAMEINSOURCE '"MIN_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (total)', NAMEINSOURCE '"SUM_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_COMMIT_IO_LATENCY long OPTIONS (ANNOTATION 'Time needed to synchronize flush of commit log entries. (avg)', NAMEINSOURCE '"AVG_COMMIT_IO_LATENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Log partition statistics', NAMEINSOURCE '"SYS"."M_LOG_PARTITIONS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LOG_SEGMENTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARTITION_ID long OPTIONS (ANNOTATION 'Log partition ID', NAMEINSOURCE '"PARTITION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEGMENT_ID long OPTIONS (ANNOTATION 'Log segment ID within partition', NAMEINSOURCE '"SEGMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILE_NAME string(512) OPTIONS (ANNOTATION 'Log segment file name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILE_OFFSET long OPTIONS (ANNOTATION 'Start position of log segment in the file', NAMEINSOURCE '"FILE_OFFSET"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATE string(16) OPTIONS (ANNOTATION 'Log segment state', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    MIN_POSITION long OPTIONS (ANNOTATION 'First position contained in this log segment', NAMEINSOURCE '"MIN_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_POSITION long OPTIONS (ANNOTATION 'Position behind the last log record in this log segment (closed log segments only)', NAMEINSOURCE '"MAX_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOLE_POSITION long OPTIONS (ANNOTATION 'Start position of the log hole before this log segment (equal to min position if no hole)', NAMEINSOURCE '"HOLE_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'Used log segment size in bytes', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'Total log segment size in bytes', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP string(5) OPTIONS (ANNOTATION 'Flag for log segment in backup: ''TRUE''/''FALSE''', NAMEINSOURCE '"IN_BACKUP"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Log segment statistics', NAMEINSOURCE '"SYS"."M_LOG_SEGMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_LOG_SEGMENTS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARTITION_ID long OPTIONS (ANNOTATION 'Log partition ID', NAMEINSOURCE '"PARTITION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEGMENT_ID long OPTIONS (ANNOTATION 'Log segment ID within partition', NAMEINSOURCE '"SEGMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILE_NAME string(512) OPTIONS (ANNOTATION 'Log segment file name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILE_OFFSET long OPTIONS (ANNOTATION 'Start position of log segment in the file', NAMEINSOURCE '"FILE_OFFSET"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATE string(16) OPTIONS (ANNOTATION 'Log segment state', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    MIN_POSITION long OPTIONS (ANNOTATION 'First position contained in this log segment', NAMEINSOURCE '"MIN_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_POSITION long OPTIONS (ANNOTATION 'Position behind the last log record in this log segment (closed log segments only)', NAMEINSOURCE '"MAX_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HOLE_POSITION long OPTIONS (ANNOTATION 'Start position of the log hole before this log segment (equal to min position if no hole)', NAMEINSOURCE '"HOLE_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'Used log segment size in bytes', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'Total log segment size in bytes', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IN_BACKUP string(5) OPTIONS (ANNOTATION 'Flag for log segment in backup: ''TRUE''/''FALSE''', NAMEINSOURCE '"IN_BACKUP"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Log segment statistics', NAMEINSOURCE '"SYS"."M_LOG_SEGMENTS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NAME string(256) OPTIONS (ANNOTATION 'Type of memory', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" long OPTIONS (ANNOTATION 'Size of memory', NAMEINSOURCE '"VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Deprecated: use M_SERVICE_MEMORY instead', NAMEINSOURCE '"SYS"."M_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_MEMORY_OBJECT_DISPOSITIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(128) OPTIONS (ANNOTATION 'Object (statistic) type)', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    TEMPORARY_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of temporary objects', NAMEINSOURCE '"TEMPORARY_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EARLY_UNLOAD_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of early unload objects', NAMEINSOURCE '"EARLY_UNLOAD_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERNAL_SHORT_TERM_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of internal short term objects', NAMEINSOURCE '"INTERNAL_SHORT_TERM_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_TERM_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of short term objects', NAMEINSOURCE '"SHORT_TERM_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MID_TERM_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of mid term objects', NAMEINSOURCE '"MID_TERM_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LONG_TERM_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of long term objects', NAMEINSOURCE '"LONG_TERM_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NON_SWAPPABLE_OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of non swappable objects', NAMEINSOURCE '"NON_SWAPPABLE_OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEMPORARY_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of temporary objects', NAMEINSOURCE '"TEMPORARY_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EARLY_UNLOAD_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of early unload objects', NAMEINSOURCE '"EARLY_UNLOAD_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTERNAL_SHORT_TERM_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of internal short term objects', NAMEINSOURCE '"INTERNAL_SHORT_TERM_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_TERM_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of short term objects', NAMEINSOURCE '"SHORT_TERM_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MID_TERM_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of mid term objects', NAMEINSOURCE '"MID_TERM_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LONG_TERM_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of long term objects', NAMEINSOURCE '"LONG_TERM_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NON_SWAPPABLE_OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of non swappable objects', NAMEINSOURCE '"NON_SWAPPABLE_OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Disposition specific memory object statistics. The statistics are calculated and reading them may take a while.', NAMEINSOURCE '"SYS"."M_MEMORY_OBJECT_DISPOSITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_MEMORY_OBJECTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(128) OPTIONS (ANNOTATION 'Object (statistic) type', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of objects currently in memory object container', NAMEINSOURCE '"OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of objects currently in memory object container', NAMEINSOURCE '"OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NON_SWAPPABLE_SIZE long OPTIONS (ANNOTATION 'Size of non swappable objects currently in memory object container', NAMEINSOURCE '"NON_SWAPPABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWAPPABLE_SIZE long OPTIONS (ANNOTATION 'Size of swappable objects currently in memory object container', NAMEINSOURCE '"SWAPPABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PUT_COUNT long OPTIONS (ANNOTATION 'Total number of put objects', NAMEINSOURCE '"PUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PUT_SIZE long OPTIONS (ANNOTATION 'Total size of put objects', NAMEINSOURCE '"PUT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICT_COUNT long OPTIONS (ANNOTATION 'Total number of evicted objects', NAMEINSOURCE '"EVICT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICT_SIZE long OPTIONS (ANNOTATION 'Total size of evicted objects', NAMEINSOURCE '"EVICT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEMP_EVICT_COUNT long OPTIONS (ANNOTATION 'Total number of temp-evicted objects', NAMEINSOURCE '"TEMP_EVICT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEMP_EVICT_SIZE long OPTIONS (ANNOTATION 'Total size of temp-evicted objects', NAMEINSOURCE '"TEMP_EVICT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_COUNT long OPTIONS (ANNOTATION 'Total number of resizes', NAMEINSOURCE '"RESIZE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_DELTA_SIZE long OPTIONS (ANNOTATION 'Total size delta changed by resize of objects', NAMEINSOURCE '"RESIZE_DELTA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHRINK_COUNT long OPTIONS (ANNOTATION 'Total number of shrunk objects', NAMEINSOURCE '"SHRINK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHRINK_SIZE long OPTIONS (ANNOTATION 'Total size of shrunk objects', NAMEINSOURCE '"SHRINK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_SHRINK_COUNT long OPTIONS (ANNOTATION 'Total number of objects shrink failed to remove', NAMEINSOURCE '"FAILED_SHRINK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_SHRINK_SIZE long OPTIONS (ANNOTATION 'Total size of objects shrink failed to remove', NAMEINSOURCE '"FAILED_SHRINK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Memory object statistics', NAMEINSOURCE '"SYS"."M_MEMORY_OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_MEMORY_OBJECTS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(128) OPTIONS (ANNOTATION 'Object (statistic) type', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_COUNT long OPTIONS (ANNOTATION 'Number of objects currently in memory object container', NAMEINSOURCE '"OBJECT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SIZE long OPTIONS (ANNOTATION 'Size of objects currently in memory object container', NAMEINSOURCE '"OBJECT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NON_SWAPPABLE_SIZE long OPTIONS (ANNOTATION 'Size of non swappable objects currently in memory object container', NAMEINSOURCE '"NON_SWAPPABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SWAPPABLE_SIZE long OPTIONS (ANNOTATION 'Size of swappable objects currently in memory object container', NAMEINSOURCE '"SWAPPABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PUT_COUNT long OPTIONS (ANNOTATION 'Total number of put objects', NAMEINSOURCE '"PUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PUT_SIZE long OPTIONS (ANNOTATION 'Total size of put objects', NAMEINSOURCE '"PUT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICT_COUNT long OPTIONS (ANNOTATION 'Total number of evicted objects', NAMEINSOURCE '"EVICT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICT_SIZE long OPTIONS (ANNOTATION 'Total size of evicted objects', NAMEINSOURCE '"EVICT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEMP_EVICT_COUNT long OPTIONS (ANNOTATION 'Total number of temp-evicted objects', NAMEINSOURCE '"TEMP_EVICT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TEMP_EVICT_SIZE long OPTIONS (ANNOTATION 'Total size of temp-evicted objects', NAMEINSOURCE '"TEMP_EVICT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_COUNT long OPTIONS (ANNOTATION 'Total number of resizes', NAMEINSOURCE '"RESIZE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_DELTA_SIZE long OPTIONS (ANNOTATION 'Total size delta changed by resize of objects', NAMEINSOURCE '"RESIZE_DELTA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHRINK_COUNT long OPTIONS (ANNOTATION 'Total number of shrunk objects', NAMEINSOURCE '"SHRINK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHRINK_SIZE long OPTIONS (ANNOTATION 'Total size of shrunk objects', NAMEINSOURCE '"SHRINK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_SHRINK_COUNT long OPTIONS (ANNOTATION 'Total number of objects shrink failed to remove', NAMEINSOURCE '"FAILED_SHRINK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_SHRINK_SIZE long OPTIONS (ANNOTATION 'Total size of objects shrink failed to remove', NAMEINSOURCE '"FAILED_SHRINK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Memory object statistics', NAMEINSOURCE '"SYS"."M_MEMORY_OBJECTS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_MERGED_TRACES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'Database user', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Application user', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service Name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Update transaction ID', NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATEMENT_ID long OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    THREAD_ID long OPTIONS (ANNOTATION 'ID of thread that wrote trace entry', NAMEINSOURCE '"THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Time when trace entry was written', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TRACE_LEVEL string(16) OPTIONS (ANNOTATION 'Trace level', NAMEINSOURCE '"TRACE_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT string(16) OPTIONS (ANNOTATION 'Trace component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_FILE_NAME string(512) OPTIONS (ANNOTATION 'Source file which contains trace', NAMEINSOURCE '"SOURCE_FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SOURCE_FILE_LINE long OPTIONS (ANNOTATION 'Source file line', NAMEINSOURCE '"SOURCE_FILE_LINE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRACE_TEXT clob OPTIONS (ANNOTATION 'Traced text', NAMEINSOURCE '"TRACE_TEXT"', NATIVE_TYPE 'NCLOB'),
    TRACE_FILE_NAME string(256) OPTIONS (ANNOTATION 'Name of trace file containing trace entry', NAMEINSOURCE '"TRACE_FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    TRACE_FILE_LINE integer OPTIONS (ANNOTATION 'Trace file line', NAMEINSOURCE '"TRACE_FILE_LINE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Application name', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_SOURCE string(256) OPTIONS (ANNOTATION 'Application source', NAMEINSOURCE '"APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR'),
    PASSPORT_ROOT_CONTEXT_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying source of request', NAMEINSOURCE '"PASSPORT_ROOT_CONTEXT_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_TRANSACTION_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying business transaction', NAMEINSOURCE '"PASSPORT_TRANSACTION_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_CONNECTION_ID string(32) OPTIONS (ANNOTATION 'SAP EPP Passport GUID identifying connection', NAMEINSOURCE '"PASSPORT_CONNECTION_ID"', NATIVE_TYPE 'VARCHAR'),
    PASSPORT_CONNECTION_COUNTER long OPTIONS (ANNOTATION 'SAP EPP Passport connection counter', NAMEINSOURCE '"PASSPORT_CONNECTION_COUNTER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PASSPORT_COMPONENT_NAME string(32) OPTIONS (ANNOTATION 'SAP EPP Passport component name of initial/root context', NAMEINSOURCE '"PASSPORT_COMPONENT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PASSPORT_ACTION string(40) OPTIONS (ANNOTATION 'SAP EPP Passport action', NAMEINSOURCE '"PASSPORT_ACTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Contains the merged content of the server trace files for all of the SAP HANA services', NAMEINSOURCE '"SYS"."M_MERGED_TRACES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_MONITOR_COLUMNS" (
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of monitoring view', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of monitoring view column', NAMEINSOURCE '"VIEW_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'Column data type ID', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Column data type name', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the column in a record', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEFAULT_VALUE string(5000) OPTIONS (ANNOTATION 'Default value ', NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    UNIT string(16) OPTIONS (ANNOTATION 'Unit for the value', NAMEINSOURCE '"UNIT"', NATIVE_TYPE 'VARCHAR'),
    COLLATION string(256) OPTIONS (ANNOTATION 'Collation', NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'Length', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Scale', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'TRUE, if NULL value is allowed', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) OPTIONS (ANNOTATION 'Short description of the monitoring view column', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'All the columns in the monitoring views', NAMEINSOURCE '"SYS"."M_MONITOR_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_MONITORS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'Name of monitoring view', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(2000) OPTIONS (ANNOTATION 'Short description of the monitoring view', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    RESETTABLE string(5) OPTIONS (ANNOTATION 'Set to TRUE, if values of this monitor can be reset', NAMEINSOURCE '"RESETTABLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Available monitoring views', NAMEINSOURCE '"SYS"."M_MONITORS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_MUTEXES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_COUNT long OPTIONS (ANNOTATION 'Count of lock calls', NAMEINSOURCE '"LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking lock calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SPURIOUS_WAKEUP_COUNT long OPTIONS (ANNOTATION 'Count of spurious wakeups (collisions on futex)', NAMEINSOURCE '"SPURIOUS_WAKEUP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate in percent', NAMEINSOURCE '"COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OWNER_ID long OPTIONS (ANNOTATION 'Context ID of the owner context', NAMEINSOURCE '"OWNER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (last)', NAMEINSOURCE '"LAST_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (max)', NAMEINSOURCE '"MAX_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (min)', NAMEINSOURCE '"MIN_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (total)', NAMEINSOURCE '"SUM_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (avg)', NAMEINSOURCE '"AVG_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of mutex creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of mutex destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Mutex statistics', NAMEINSOURCE '"SYS"."M_MUTEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_MUTEXES_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_COUNT long OPTIONS (ANNOTATION 'Count of lock calls', NAMEINSOURCE '"LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking lock calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SPURIOUS_WAKEUP_COUNT long OPTIONS (ANNOTATION 'Count of spurious wakeups (collisions on futex)', NAMEINSOURCE '"SPURIOUS_WAKEUP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate in percent', NAMEINSOURCE '"COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OWNER_ID long OPTIONS (ANNOTATION 'Context ID of the owner context', NAMEINSOURCE '"OWNER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (last)', NAMEINSOURCE '"LAST_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (max)', NAMEINSOURCE '"MAX_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (min)', NAMEINSOURCE '"MIN_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (total)', NAMEINSOURCE '"SUM_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking lock calls (avg)', NAMEINSOURCE '"AVG_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of mutex creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of mutex destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Mutex statistics', NAMEINSOURCE '"SYS"."M_MUTEXES_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_MVCC_OVERVIEW" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VERSION_COUNT long OPTIONS (ANNOTATION 'Number of all versions in the host', NAMEINSOURCE '"VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_MVCC_SNAPSHOT_TIMESTAMP long OPTIONS (ANNOTATION 'Minimum MVCC timestamp which at least one transaction holds', NAMEINSOURCE '"MIN_MVCC_SNAPSHOT_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GLOBAL_MVCC_TIMESTAMP long OPTIONS (ANNOTATION 'Current Global MVCC timestamp', NAMEINSOURCE '"GLOBAL_MVCC_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TRANSACTION_ID long OPTIONS (ANNOTATION 'All active transactions can see changes of TRANSACTION IDs less than or equal to MIN_READ_TRANSACTION_ID', NAMEINSOURCE '"MIN_READ_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TRANSACTION_ID long OPTIONS (ANNOTATION 'All write transactions with TRANSACTION ID less than or equal to MIN_WRITE_TRANSACTION_ID are closed', NAMEINSOURCE '"MIN_WRITE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NEXT_WRITE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Maximum TRANSACTION ID which will be assigned to next write transaction', NAMEINSOURCE '"NEXT_WRITE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_LOCK_COUNT long OPTIONS (ANNOTATION 'Number of Acquired Records Locks', NAMEINSOURCE '"ACQUIRED_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_VERSIONS_PER_PARTITION long OPTIONS (ANNOTATION 'Max number of versions per partition', NAMEINSOURCE '"MAX_VERSIONS_PER_PARTITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Overview of row-store Multiversion Concurrency Control (MVCC) manager', NAMEINSOURCE '"SYS"."M_MVCC_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_MVCC_TABLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NAME string(256) OPTIONS (ANNOTATION 'Name column', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(128) OPTIONS (ANNOTATION 'Value column', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Statistics of row-store Multiversion Concurrency Control (MVCC) manager', NAMEINSOURCE '"SYS"."M_MVCC_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_OBJECT_LOCK_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Object Type: RECORD, TABLE, VIEW, SYNONYM, SEQUENCE.. ', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name that the Object belongs to', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object Name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition no. (0 for non-partitioned tables, -1 for not supported)', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_ID long OPTIONS (ANNOTATION 'Object ID', NAMEINSOURCE '"OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_TYPE string(32) OPTIONS (ANNOTATION 'Lock Type: OBJECT, RECORD', NAMEINSOURCE '"LOCK_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Lock Wait Count', NAMEINSOURCE '"LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Lock Wait Time (unit: micro second)', NAMEINSOURCE '"LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_FAILED_COUNT long OPTIONS (ANNOTATION 'Lock Failed Count (only supported RECORD type lock failed count)', NAMEINSOURCE '"LOCK_FAILED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Lock contention statistics - lock wait count, wait time, failed count for each objects', NAMEINSOURCE '"SYS"."M_OBJECT_LOCK_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_OBJECT_LOCK_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Object Type: RECORD, TABLE, VIEW, SYNONYM, SEQUENCE.. ', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name that the Object belongs to', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object Name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition no. (0 for non-partitioned tables, -1 for not supported)', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_ID long OPTIONS (ANNOTATION 'Object ID', NAMEINSOURCE '"OBJECT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_TYPE string(32) OPTIONS (ANNOTATION 'Lock Type: OBJECT, RECORD', NAMEINSOURCE '"LOCK_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Lock Wait Count', NAMEINSOURCE '"LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_WAIT_TIME long OPTIONS (ANNOTATION 'Lock Wait Time (unit: micro second)', NAMEINSOURCE '"LOCK_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_FAILED_COUNT long OPTIONS (ANNOTATION 'Lock Failed Count (only supported RECORD type lock failed count)', NAMEINSOURCE '"LOCK_FAILED_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Lock contention statistics - lock wait count, wait time, failed count for each objects', NAMEINSOURCE '"SYS"."M_OBJECT_LOCK_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_OBJECT_LOCKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_TIME timestamp OPTIONS (ANNOTATION 'Lock acquisition time', NAMEINSOURCE '"ACQUIRED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Object type', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_MODE string(32) OPTIONS (ANNOTATION 'Lock mode: EXCLUSIVE, INTENTIONAL EXCLUSIVE', NAMEINSOURCE '"LOCK_MODE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Status of currently acquired locks on objects with detailed information such as lock acquisition time, lock mode', NAMEINSOURCE '"SYS"."M_OBJECT_LOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_PAGEACCESS_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(32) OPTIONS (ANNOTATION 'Type of pageaccess', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CHUNK_SIZE integer OPTIONS (ANNOTATION 'Chunk size', NAMEINSOURCE '"CHUNK_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOCATE_COUNT long OPTIONS (ANNOTATION 'Number of allocations', NAMEINSOURCE '"ALLOCATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GET_COUNT long OPTIONS (ANNOTATION 'Number of gets', NAMEINSOURCE '"GET_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOAD_COUNT long OPTIONS (ANNOTATION 'Number of synchronous loads', NAMEINSOURCE '"LOAD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_LOAD_COUNT long OPTIONS (ANNOTATION 'Number of asynchronous loads', NAMEINSOURCE '"TRIGGER_LOAD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEALLOCATE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations', NAMEINSOURCE '"DEALLOCATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'PageAccess statistics', NAMEINSOURCE '"SYS"."M_PAGEACCESS_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_PAGEACCESS_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(32) OPTIONS (ANNOTATION 'Type of pageaccess', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CHUNK_SIZE integer OPTIONS (ANNOTATION 'Chunk size', NAMEINSOURCE '"CHUNK_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOCATE_COUNT long OPTIONS (ANNOTATION 'Number of allocations', NAMEINSOURCE '"ALLOCATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GET_COUNT long OPTIONS (ANNOTATION 'Number of gets', NAMEINSOURCE '"GET_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOAD_COUNT long OPTIONS (ANNOTATION 'Number of synchronous loads', NAMEINSOURCE '"LOAD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_LOAD_COUNT long OPTIONS (ANNOTATION 'Number of asynchronous loads', NAMEINSOURCE '"TRIGGER_LOAD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEALLOCATE_COUNT long OPTIONS (ANNOTATION 'Number of deallocations', NAMEINSOURCE '"DEALLOCATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'PageAccess statistics', NAMEINSOURCE '"SYS"."M_PAGEACCESS_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_PASSWORD_POLICY" (
    PROPERTY string(128) OPTIONS (ANNOTATION 'Configuration property', NAMEINSOURCE '"PROPERTY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(16) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Configuration values concerning password policy', NAMEINSOURCE '"SYS"."M_PASSWORD_POLICY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_PERFTRACE" (
    STATUS string(16) OPTIONS (ANNOTATION 'Status: STOPPED, STARTED, SAVING', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STOP_TIME timestamp OPTIONS (ANNOTATION 'Stop time', NAMEINSOURCE '"STOP_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    FILE_SIZE long OPTIONS (ANNOTATION 'Size of collected trace files. Only valid if stopped and not saved', NAMEINSOURCE '"FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMAINING_SECONDS integer OPTIONS (ANNOTATION 'Remaining seconds until automatic stop', NAMEINSOURCE '"REMAINING_SECONDS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'SQL user name filter', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Application user name filter', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Application name filter', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PASSPORT_TRACELEVEL string(8) OPTIONS (ANNOTATION 'Passport filter: ''MEDIUM''/''HIGH''', NAMEINSOURCE '"PASSPORT_TRACELEVEL"', NATIVE_TYPE 'VARCHAR'),
    PLAN_EXECUTION string(5) OPTIONS (ANNOTATION 'Flag if plan execution details are recorded', NAMEINSOURCE '"PLAN_EXECUTION"', NATIVE_TYPE 'VARCHAR'),
    FUNCTION_PROFILER string(5) OPTIONS (ANNOTATION 'Flag if function profiler details are recorded: ''TRUE''/''FALSE''', NAMEINSOURCE '"FUNCTION_PROFILER"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Current PerfTrace state', NAMEINSOURCE '"SYS"."M_PERFTRACE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_PERSISTENCE_ENCRYPTION_KEYS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VALID_FROM_SAVEPOINT integer OPTIONS (ANNOTATION 'Valid from savepoint version', NAMEINSOURCE '"VALID_FROM_SAVEPOINT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VALID_FROM_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Valid from timestamp given in UTC', NAMEINSOURCE '"VALID_FROM_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IS_ENCRYPTED string(5) OPTIONS (ANNOTATION 'Persistence encryption is active: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_ENCRYPTED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Information about encryption page keys', NAMEINSOURCE '"SYS"."M_PERSISTENCE_ENCRYPTION_KEYS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_PERSISTENCE_ENCRYPTION_STATUS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ENCRYPTION_ACTIVE string(5) OPTIONS (ANNOTATION 'Encryption is currently active for writing into persistence: ''TRUE''/''FALSE''', NAMEINSOURCE '"ENCRYPTION_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    ENCRYPTION_ACTIVE_AFTER_NEXT_SAVEPOINT string(5) OPTIONS (ANNOTATION 'Encryption will be active for writing into persistence after next savepoint: ''TRUE''/''FALSE''', NAMEINSOURCE '"ENCRYPTION_ACTIVE_AFTER_NEXT_SAVEPOINT"', NATIVE_TYPE 'VARCHAR'),
    KEY_CHANGE_WITH_NEXT_SAVEPOINT string(5) OPTIONS (ANNOTATION 'Next savepoint will activate a new key: ''TRUE''/''FALSE''', NAMEINSOURCE '"KEY_CHANGE_WITH_NEXT_SAVEPOINT"', NATIVE_TYPE 'VARCHAR'),
    ROOT_KEY_CHANGE_WITH_NEXT_SAVEPOINT string(5) OPTIONS (ANNOTATION 'Next savepoint will activate a new root key: ''TRUE''/''FALSE''', NAMEINSOURCE '"ROOT_KEY_CHANGE_WITH_NEXT_SAVEPOINT"', NATIVE_TYPE 'VARCHAR'),
    DATA_CONVERSION_ACTIVE string(5) OPTIONS (ANNOTATION 'Conversion of data to latest encryption status or key active: ''TRUE''/''FALSE''', NAMEINSOURCE '"DATA_CONVERSION_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    KEY_PAGE_ENTRY_COUNT long OPTIONS (ANNOTATION 'Number of entries within key page', NAMEINSOURCE '"KEY_PAGE_ENTRY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Information about persistence encryption', NAMEINSOURCE '"SYS"."M_PERSISTENCE_ENCRYPTION_STATUS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_PERSISTENCE_MANAGERS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TID long OPTIONS (ANNOTATION 'Maximum known TID', NAMEINSOURCE '"MAX_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CCH_COUNT long OPTIONS (ANNOTATION 'Count of normal consistent changes (terminated sessions)', NAMEINSOURCE '"CCH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MASS_CCH_COUNT long OPTIONS (ANNOTATION 'Count of consistent changes for mass operations (terminated sessions)', NAMEINSOURCE '"MASS_CCH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (last)', NAMEINSOURCE '"LAST_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (max)', NAMEINSOURCE '"MAX_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (min)', NAMEINSOURCE '"MIN_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (total)', NAMEINSOURCE '"SUM_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (avg)', NAMEINSOURCE '"AVG_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (last)', NAMEINSOURCE '"LAST_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (max)', NAMEINSOURCE '"MAX_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (min)', NAMEINSOURCE '"MIN_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (total)', NAMEINSOURCE '"SUM_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (avg)', NAMEINSOURCE '"AVG_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARE_COMMIT_POS long OPTIONS (ANNOTATION 'Newest known log position of prepare commit (slave only)', NAMEINSOURCE '"PREPARE_COMMIT_POS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MASTER_COMMIT_POS long OPTIONS (ANNOTATION 'Newest known log position of commit record on transaction master from the point of view of this node', NAMEINSOURCE '"MASTER_COMMIT_POS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_WAITERS long OPTIONS (ANNOTATION 'Count of in-doubt waiters for currently-running COMMIT (master only)', NAMEINSOURCE '"INDOUBT_WAITERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_RESTART_COUNT long OPTIONS (ANNOTATION 'Count of open in-doubt transactions before restart (master only)', NAMEINSOURCE '"INDOUBT_RESTART_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_ONLINE_COUNT long OPTIONS (ANNOTATION 'Count of open in-doubt transactions since last restart (master only)', NAMEINSOURCE '"INDOUBT_ONLINE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINT_CONFIG_FREQUENCY long OPTIONS (ANNOTATION 'Configured savepoint frequency', NAMEINSOURCE '"SAVEPOINT_CONFIG_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINT_ACTIVE_FREQUENCY long OPTIONS (ANNOTATION 'Currently active savepoint frequency', NAMEINSOURCE '"SAVEPOINT_ACTIVE_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CHECKSUM_ALGORITHM string(16) OPTIONS (ANNOTATION 'Currently used checksum algorithm for modified pages and log buffers', NAMEINSOURCE '"CHECKSUM_ALGORITHM"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Persistence manager statistics', NAMEINSOURCE '"SYS"."M_PERSISTENCE_MANAGERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_PERSISTENCE_MANAGERS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TID long OPTIONS (ANNOTATION 'Maximum known TID', NAMEINSOURCE '"MAX_TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CCH_COUNT long OPTIONS (ANNOTATION 'Count of normal consistent changes (terminated sessions)', NAMEINSOURCE '"CCH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MASS_CCH_COUNT long OPTIONS (ANNOTATION 'Count of consistent changes for mass operations (terminated sessions)', NAMEINSOURCE '"MASS_CCH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (last)', NAMEINSOURCE '"LAST_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (max)', NAMEINSOURCE '"MAX_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (min)', NAMEINSOURCE '"MIN_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (total)', NAMEINSOURCE '"SUM_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in normal consistent changes (terminated sessions) (avg)', NAMEINSOURCE '"AVG_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (last)', NAMEINSOURCE '"LAST_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (max)', NAMEINSOURCE '"MAX_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (min)', NAMEINSOURCE '"MIN_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (total)', NAMEINSOURCE '"SUM_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_MASS_CCH_TIME long OPTIONS (ANNOTATION 'Time spent in consistent changes for mass operations (terminated sessions) (avg)', NAMEINSOURCE '"AVG_MASS_CCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARE_COMMIT_POS long OPTIONS (ANNOTATION 'Newest known log position of prepare commit (slave only)', NAMEINSOURCE '"PREPARE_COMMIT_POS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MASTER_COMMIT_POS long OPTIONS (ANNOTATION 'Newest known log position of commit record on transaction master from the point of view of this node', NAMEINSOURCE '"MASTER_COMMIT_POS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_WAITERS long OPTIONS (ANNOTATION 'Count of in-doubt waiters for currently-running COMMIT (master only)', NAMEINSOURCE '"INDOUBT_WAITERS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_RESTART_COUNT long OPTIONS (ANNOTATION 'Count of open in-doubt transactions before restart (master only)', NAMEINSOURCE '"INDOUBT_RESTART_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDOUBT_ONLINE_COUNT long OPTIONS (ANNOTATION 'Count of open in-doubt transactions since last restart (master only)', NAMEINSOURCE '"INDOUBT_ONLINE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINT_CONFIG_FREQUENCY long OPTIONS (ANNOTATION 'Configured savepoint frequency', NAMEINSOURCE '"SAVEPOINT_CONFIG_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAVEPOINT_ACTIVE_FREQUENCY long OPTIONS (ANNOTATION 'Currently active savepoint frequency', NAMEINSOURCE '"SAVEPOINT_ACTIVE_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CHECKSUM_ALGORITHM string(16) OPTIONS (ANNOTATION 'Currently used checksum algorithm for modified pages and log buffers', NAMEINSOURCE '"CHECKSUM_ALGORITHM"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Persistence manager statistics', NAMEINSOURCE '"SYS"."M_PERSISTENCE_MANAGERS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_PLUGIN_MANIFESTS" (
    PLUGIN_NAME string(32) OPTIONS (ANNOTATION 'Plugin name', NAMEINSOURCE '"PLUGIN_NAME"', NATIVE_TYPE 'VARCHAR'),
    KEY string(64) OPTIONS (ANNOTATION 'Key', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Information about installed plugins', NAMEINSOURCE '"SYS"."M_PLUGIN_MANIFESTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_PREPARED_STATEMENTS" (
    HOST string(64) NOT NULL OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer NOT NULL OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer NOT NULL OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Prepared statement ID', NAMEINSOURCE '"STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    START_MVCC_TIMESTAMP long OPTIONS (ANNOTATION 'Internal MVCC timestamp of the transaction start time', NAMEINSOURCE '"START_MVCC_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPILED_TIME timestamp OPTIONS (ANNOTATION 'Compilation timestamp of the statement', NAMEINSOURCE '"COMPILED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATEMENT_STATUS string(128) OPTIONS (ANNOTATION 'Status of SQL statement', NAMEINSOURCE '"STATEMENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'SQL statement', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    ALLOCATED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Current snapshot of allocated memory size for executing this statement', NAMEINSOURCE '"ALLOCATED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Current snapshot of used memory size for executing this statement', NAMEINSOURCE '"USED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_ID long OPTIONS (ANNOTATION 'Logical plan ID', NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_EXECUTED_TIME timestamp OPTIONS (ANNOTATION 'Recently executed time of statement. This timestamp is updated when opening cursors and executing DML/DDL but not when fetching cursor results or closing cursors.', NAMEINSOURCE '"LAST_EXECUTED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_ACTION_TIME timestamp OPTIONS (ANNOTATION 'Recently performed time of action against the statement. This timestamp is updated when opening cursors, executing DML/DDL, fetching results, and closing cursors.', NAMEINSOURCE '"LAST_ACTION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RECOMPILE_COUNT long OPTIONS (ANNOTATION 'Recompile count', NAMEINSOURCE '"RECOMPILE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT long OPTIONS (ANNOTATION 'Count of executions', NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_TIME long OPTIONS (ANNOTATION 'Average time of statement execution', NAMEINSOURCE '"AVG_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum time of statement execution', NAMEINSOURCE '"MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_TIME long OPTIONS (ANNOTATION 'Minimum time of statement execution', NAMEINSOURCE '"MIN_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Sum of statement execution time', NAMEINSOURCE '"TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CURSOR_DURATION long OPTIONS (ANNOTATION 'Average time of statement execution including communication time with clients', NAMEINSOURCE '"AVG_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CURSOR_DURATION long OPTIONS (ANNOTATION 'Maximum time of statement execution including communication time with clients', NAMEINSOURCE '"MAX_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Minimum time of statement execution including communication time with clients', NAMEINSOURCE '"MIN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CURSOR_DURATION long OPTIONS (ANNOTATION 'Sum of statement execution time including communication time with clients', NAMEINSOURCE '"TOTAL_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Average memory size used during each execution', NAMEINSOURCE '"AVG_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Maximum memory size used during each execution', NAMEINSOURCE '"MAX_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Minimum memory size used during each execution', NAMEINSOURCE '"MIN_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_MEMORY_SIZE long OPTIONS (ANNOTATION 'Sum of memory size used during each execution', NAMEINSOURCE '"TOTAL_EXECUTION_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Average lock wait time for the statement', NAMEINSOURCE '"AVG_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Maximum lock wait time for the statement', NAMEINSOURCE '"MAX_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Minimum lock wait time for the statement', NAMEINSOURCE '"MIN_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCKWAIT_COUNT long OPTIONS (ANNOTATION 'Total lock wait count for the statement', NAMEINSOURCE '"TOTAL_LOCKWAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCKWAIT_TIME long OPTIONS (ANNOTATION 'Accumulated lock wait time for the statement', NAMEINSOURCE '"TOTAL_LOCKWAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (ANNOTATION 'Average time of statement preparation', NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (ANNOTATION 'Maximum time of statement preparation', NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Minimum time of statement preparation', NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (ANNOTATION 'Total time of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_COUNT long OPTIONS (ANNOTATION 'Total count of statement preparation', NAMEINSOURCE '"TOTAL_PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HAS_HOLDABLE_CURSOR string(5) OPTIONS (ANNOTATION 'Holdable cursor existence', NAMEINSOURCE '"HAS_HOLDABLE_CURSOR"', NATIVE_TYPE 'VARCHAR'),
    CURSOR_TYPE string(18) OPTIONS (ANNOTATION 'Type of cursor', NAMEINSOURCE '"CURSOR_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PARENT_STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Parent prepared statement ID', NAMEINSOURCE '"PARENT_STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    APPLICATION_SOURCE string(256) OPTIONS (ANNOTATION 'Application source information', NAMEINSOURCE '"APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Prepared statements list', NAMEINSOURCE '"SYS"."M_PREPARED_STATEMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_QUERY_CACHED_PLANS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'Username who prepared the plan', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name where the query plan belongs to . ', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ABAP_VARCHAR_MODE string(5) OPTIONS (NAMEINSOURCE '"ABAP_VARCHAR_MODE"', NATIVE_TYPE 'VARCHAR'),
    IS_REMOTE string(5) OPTIONS (NAMEINSOURCE '"IS_REMOTE"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_STRING clob OPTIONS (NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    PLAN_ID long OPTIONS (NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REFERENCE_COUNT long OPTIONS (NAMEINSOURCE '"REFERENCE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_MEMORY_SIZE long OPTIONS (NAMEINSOURCE '"USED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARING_TYPE string(128) OPTIONS (NAMEINSOURCE '"SHARING_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OWNER_CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"OWNER_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Deprecated: use M_SQL_PLAN_CACHE instead', NAMEINSOURCE '"SYS"."M_QUERY_CACHED_PLANS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_READWRITELOCKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_ID long OPTIONS (ANNOTATION 'Context ID of the owner context (for exclusive/intent locks)', NAMEINSOURCE '"OWNER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of exclusive lock calls', NAMEINSOURCE '"EXCLUSIVE_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking exclusive lock calls', NAMEINSOURCE '"EXCLUSIVE_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on exclusive lock', NAMEINSOURCE '"EXCLUSIVE_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on exclusive lock in percent', NAMEINSOURCE '"EXCLUSIVE_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (last)', NAMEINSOURCE '"LAST_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (max)', NAMEINSOURCE '"MAX_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (min)', NAMEINSOURCE '"MIN_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (total)', NAMEINSOURCE '"SUM_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (avg)', NAMEINSOURCE '"AVG_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of intent lock calls', NAMEINSOURCE '"INTENT_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking intent lock calls', NAMEINSOURCE '"INTENT_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on intent lock', NAMEINSOURCE '"INTENT_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timed out intent lock calls', NAMEINSOURCE '"INTENT_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on intent lock in percent', NAMEINSOURCE '"INTENT_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (last)', NAMEINSOURCE '"LAST_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (max)', NAMEINSOURCE '"MAX_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (min)', NAMEINSOURCE '"MIN_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (total)', NAMEINSOURCE '"SUM_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (avg)', NAMEINSOURCE '"AVG_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of shared lock calls', NAMEINSOURCE '"SHARED_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking shared lock calls', NAMEINSOURCE '"SHARED_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on shared lock', NAMEINSOURCE '"SHARED_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timed out shared lock calls', NAMEINSOURCE '"SHARED_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on shared lock in percent', NAMEINSOURCE '"SHARED_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (last)', NAMEINSOURCE '"LAST_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (max)', NAMEINSOURCE '"MAX_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (min)', NAMEINSOURCE '"MIN_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (total)', NAMEINSOURCE '"SUM_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (avg)', NAMEINSOURCE '"AVG_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLLISION_RATE double OPTIONS (ANNOTATION 'Global collision rate', NAMEINSOURCE '"COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of read/write lock creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of read/write lock destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Read/Write lock statistics', NAMEINSOURCE '"SYS"."M_READWRITELOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_READWRITELOCKS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_ID long OPTIONS (ANNOTATION 'Context ID of the owner context (for exclusive/intent locks)', NAMEINSOURCE '"OWNER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of exclusive lock calls', NAMEINSOURCE '"EXCLUSIVE_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking exclusive lock calls', NAMEINSOURCE '"EXCLUSIVE_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on exclusive lock', NAMEINSOURCE '"EXCLUSIVE_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCLUSIVE_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on exclusive lock in percent', NAMEINSOURCE '"EXCLUSIVE_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (last)', NAMEINSOURCE '"LAST_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (max)', NAMEINSOURCE '"MAX_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (min)', NAMEINSOURCE '"MIN_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (total)', NAMEINSOURCE '"SUM_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXCLUSIVE_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking exclusive lock calls (avg)', NAMEINSOURCE '"AVG_EXCLUSIVE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of intent lock calls', NAMEINSOURCE '"INTENT_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking intent lock calls', NAMEINSOURCE '"INTENT_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on intent lock', NAMEINSOURCE '"INTENT_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timed out intent lock calls', NAMEINSOURCE '"INTENT_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INTENT_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on intent lock in percent', NAMEINSOURCE '"INTENT_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (last)', NAMEINSOURCE '"LAST_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (max)', NAMEINSOURCE '"MAX_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (min)', NAMEINSOURCE '"MIN_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (total)', NAMEINSOURCE '"SUM_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_INTENT_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking intent lock calls (avg)', NAMEINSOURCE '"AVG_INTENT_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_LOCK_COUNT long OPTIONS (ANNOTATION 'Count of shared lock calls', NAMEINSOURCE '"SHARED_LOCK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_WAIT_COUNT long OPTIONS (ANNOTATION 'Count of blocking shared lock calls', NAMEINSOURCE '"SHARED_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_CAS_COLLISION_COUNT long OPTIONS (ANNOTATION 'Collision count on atomic operation on shared lock', NAMEINSOURCE '"SHARED_CAS_COLLISION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timed out shared lock calls', NAMEINSOURCE '"SHARED_TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_COLLISION_RATE double OPTIONS (ANNOTATION 'Collision rate on shared lock in percent', NAMEINSOURCE '"SHARED_COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (last)', NAMEINSOURCE '"LAST_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (max)', NAMEINSOURCE '"MAX_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (min)', NAMEINSOURCE '"MIN_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (total)', NAMEINSOURCE '"SUM_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHARED_WAIT_TIME long OPTIONS (ANNOTATION 'Time of blocking shared lock calls (avg)', NAMEINSOURCE '"AVG_SHARED_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLLISION_RATE double OPTIONS (ANNOTATION 'Global collision rate', NAMEINSOURCE '"COLLISION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of read/write lock creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of read/write lock destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Read/Write lock statistics', NAMEINSOURCE '"SYS"."M_READWRITELOCKS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_RECORD_LOCKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_TIME timestamp OPTIONS (ANNOTATION 'Lock acquisition time', NAMEINSOURCE '"ACQUIRED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RECORD_ID string(256) OPTIONS (ANNOTATION 'Record ID', NAMEINSOURCE '"RECORD_ID"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    LOCK_MODE string(32) OPTIONS (ANNOTATION 'Lock mode:I (Exclusive Lock)', NAMEINSOURCE '"LOCK_MODE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Record lock status', NAMEINSOURCE '"SYS"."M_RECORD_LOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_REMOTE_CONNECTIONS" (
    CONNECTION_ID integer NOT NULL OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOTE_SOURCE_NAME string(256) OPTIONS (ANNOTATION 'Remote source name', NAMEINSOURCE '"REMOTE_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ADAPTER_NAME string(256) OPTIONS (ANNOTATION 'Adapter name', NAMEINSOURCE '"ADAPTER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_SOURCE_USER_NAME string(256) OPTIONS (ANNOTATION 'Remote source user name', NAMEINSOURCE '"REMOTE_SOURCE_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Connected time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CONNECTION_STATUS string(16) OPTIONS (ANNOTATION 'Connection status: CONNECTED or DISCONNECTED', NAMEINSOURCE '"CONNECTION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    DETAILS string(512) OPTIONS (ANNOTATION 'Adapter properties', NAMEINSOURCE '"DETAILS"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_COUNT long OPTIONS (ANNOTATION 'Number of executed statements', NAMEINSOURCE '"STATEMENT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Detailed information on remote connections between database and remote sources. Information includes connection status, adapter name and adapter properties', NAMEINSOURCE '"SYS"."M_REMOTE_CONNECTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_REMOTE_STATEMENTS" (
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOTE_SOURCE_NAME string(256) OPTIONS (ANNOTATION 'Remote source name', NAMEINSOURCE '"REMOTE_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Statement start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_TIME timestamp OPTIONS (ANNOTATION 'Time when the statement is closed', NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    FETCHED_RECORD_COUNT long OPTIONS (ANNOTATION 'Number of fetched records', NAMEINSOURCE '"FETCHED_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_STATEMENT_STATUS string(16) OPTIONS (ANNOTATION 'Statement status: ''EXECUTING''/''CLOSED''', NAMEINSOURCE '"REMOTE_STATEMENT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    REMOTE_STATEMENT_STRING clob OPTIONS (ANNOTATION 'Statement string', NAMEINSOURCE '"REMOTE_STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Detailed information on executed remote queries. Information includes query status, number of fetched rows', NAMEINSOURCE '"SYS"."M_REMOTE_STATEMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_REORG_ALGORITHMS" (
    ALGORITHM_ID integer OPTIONS (ANNOTATION 'ID of algorithm', NAMEINSOURCE '"ALGORITHM_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESCRIPTION string(256) OPTIONS (ANNOTATION 'Description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR'),
    PARAMETERS string(256) OPTIONS (ANNOTATION 'Optional parameters', NAMEINSOURCE '"PARAMETERS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Landscape redistribution algorithms', NAMEINSOURCE '"SYS"."M_REORG_ALGORITHMS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_REPO_TRANSPORT_FILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME string(256) OPTIONS (ANNOTATION 'File name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILE_SIZE long OPTIONS (ANNOTATION 'File size', NAMEINSOURCE '"FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILE_MTIME timestamp OPTIONS (ANNOTATION 'File date', NAMEINSOURCE '"FILE_MTIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'All repository transport files', NAMEINSOURCE '"SYS"."M_REPO_TRANSPORT_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_RS_INDEXES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Index name', NAMEINSOURCE '"INDEX_NAME"', NATIVE_TYPE 'NVARCHAR'),
    KEY_TYPE string(128) OPTIONS (ANNOTATION 'Key type (data type or composite)', NAMEINSOURCE '"KEY_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_STATUS string(16) OPTIONS (ANNOTATION 'Index status: ''VALID''/''INVALID''/''UNUSABLE''', NAMEINSOURCE '"INDEX_STATUS"', NATIVE_TYPE 'VARCHAR'),
    TREE_HEIGHT long OPTIONS (ANNOTATION 'B-tree level', NAMEINSOURCE '"TREE_HEIGHT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LEAF_NODE_COUNT long OPTIONS (ANNOTATION 'Number of leaf nodes', NAMEINSOURCE '"LEAF_NODE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NONLEAF_NODE_COUNT long OPTIONS (ANNOTATION 'Number of intermediate nodes', NAMEINSOURCE '"NONLEAF_NODE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NODE_SIZE long OPTIONS (ANNOTATION 'Node size', NAMEINSOURCE '"NODE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FANOUT double OPTIONS (ANNOTATION 'Index fan-out', NAMEINSOURCE '"FANOUT"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    BULKLOAD_FACTOR double OPTIONS (ANNOTATION 'Fill factor of creating or recovering indexes', NAMEINSOURCE '"BULKLOAD_FACTOR"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    INDEX_SIZE long OPTIONS (ANNOTATION 'Index size in memory = number of nodes * node size', NAMEINSOURCE '"INDEX_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENTRY_COUNT long OPTIONS (ANNOTATION 'Number of indexed records', NAMEINSOURCE '"ENTRY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_LEAF_NODE_COUNT long OPTIONS (ANNOTATION 'Number of fixed leaf nodes. ''FIXED'' means that the key lengths of all entries in the node have the same value', NAMEINSOURCE '"FIXED_LEAF_NODE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_NONLEAF_NODE_COUNT long OPTIONS (ANNOTATION 'Number of fixed non-leaf nodes', NAMEINSOURCE '"FIXED_NONLEAF_NODE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_LEAF_OFFSET_SIZE double OPTIONS (ANNOTATION 'Average offset size of leaf nodes', NAMEINSOURCE '"AVG_LEAF_OFFSET_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    AVG_NONLEAF_OFFSET_SIZE double OPTIONS (ANNOTATION 'Average offset size of non-leaf nodes', NAMEINSOURCE '"AVG_NONLEAF_OFFSET_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    AVG_LEAF_POINTER_SIZE double OPTIONS (ANNOTATION 'Average pointer size of leaf nodes', NAMEINSOURCE '"AVG_LEAF_POINTER_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    AVG_NONLEAF_POINTER_SIZE double OPTIONS (ANNOTATION 'Average pointer size of non-leaf nodes', NAMEINSOURCE '"AVG_NONLEAF_POINTER_SIZE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LEAF_PARTIAL_KEY_SIZE long OPTIONS (ANNOTATION 'Partial key length of leaf node', NAMEINSOURCE '"LEAF_PARTIAL_KEY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NONLEAF_PARTIAL_KEY_SIZE long OPTIONS (ANNOTATION 'Partial key length of non-leaf node', NAMEINSOURCE '"NONLEAF_PARTIAL_KEY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_UTILIZATION double OPTIONS (ANNOTATION 'Index utilization (num_entries / max_entries)', NAMEINSOURCE '"INDEX_UTILIZATION"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    IS_UNIQUE string(5) OPTIONS (ANNOTATION 'Information whether the index is unique: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNIQUE"', NATIVE_TYPE 'VARCHAR'),
    SEARCH_COUNT long OPTIONS (ANNOTATION 'Number of search operations on this CPB-tree index since monitoring level was changed to 2', NAMEINSOURCE '"SEARCH_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSERT_COUNT long OPTIONS (ANNOTATION 'Number of insert operations on this CPB-tree index since monitoring level was changed to 2', NAMEINSOURCE '"INSERT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOVE_COUNT long OPTIONS (ANNOTATION 'Number of remove operations on this CPB-tree index since monitoring level was changed to 2', NAMEINSOURCE '"REMOVE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_KEY_REFERENCE_COUNT long OPTIONS (ANNOTATION 'Number of references of full keys on this CPB-tree index since monitoring level was changed to 2. Full key references occur when keys cannot be resolved by partial keys in CPB-tree nodes', NAMEINSOURCE '"FULL_KEY_REFERENCE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DISTINCT_KEY_COUNT long OPTIONS (ANNOTATION 'Number of distinct keys', NAMEINSOURCE '"DISTINCT_KEY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    KEY_COUNT long OPTIONS (ANNOTATION 'Number of keys', NAMEINSOURCE '"KEY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ELIMINATED_DUPLICATE_LEAF_NODE_COUNT long OPTIONS (ANNOTATION 'Number of leaf nodes whose duplicate keys are eliminated', NAMEINSOURCE '"ELIMINATED_DUPLICATE_LEAF_NODE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNUSED_LEAF_SLOTS_PER_NODE double OPTIONS (ANNOTATION 'Number of unused slots per leaf node', NAMEINSOURCE '"UNUSED_LEAF_SLOTS_PER_NODE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION 'Statistics of B-tree and CPB-tree indexes', NAMEINSOURCE '"SYS"."M_RS_INDEXES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_RS_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Module name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Allocated memory size of the module', NAMEINSOURCE '"ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'Used memory size of the module', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_SIZE long OPTIONS (ANNOTATION 'Free memory size of the module', NAMEINSOURCE '"FREE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'RS Memory Statistics', NAMEINSOURCE '"SYS"."M_RS_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_RS_TABLE_VERSION_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Name of schema to which the container belongs', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of the container', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_ID integer OPTIONS (ANNOTATION 'Some tables may have several containers to store its data. Container ID is an unique identifier of each container', NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_SYSTEM_TABLE string(5) OPTIONS (ANNOTATION 'TRUE if the table is a system table', NAMEINSOURCE '"IS_SYSTEM_TABLE"', NATIVE_TYPE 'VARCHAR'),
    VERSION_COUNT long OPTIONS (ANNOTATION 'Number of all versions in the container. This includes all versions regardless of their version type and status.', NAMEINSOURCE '"VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSERT_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of insert-versions in the container', NAMEINSOURCE '"INSERT_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of update-versions in the container', NAMEINSOURCE '"UPDATE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of delete-versions in the container', NAMEINSOURCE '"DELETE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of all committed versions in the container (includes all types)', NAMEINSOURCE '"COMMITTED_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_INSERT_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of committed insert-versions in the container', NAMEINSOURCE '"COMMITTED_INSERT_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_UPDATE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of committed update-versions in the container', NAMEINSOURCE '"COMMITTED_UPDATE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_DELETE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of committed delete-versions in the container', NAMEINSOURCE '"COMMITTED_DELETE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of all uncommitted versions in the container (includes all types)', NAMEINSOURCE '"UNCOMMITTED_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_INSERT_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of uncommitted insert-versions in the container', NAMEINSOURCE '"UNCOMMITTED_INSERT_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_UPDATE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of uncommitted update-versions in the container', NAMEINSOURCE '"UNCOMMITTED_UPDATE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_DELETE_VERSION_COUNT long OPTIONS (ANNOTATION 'Number of uncommitted delete-versions in the container', NAMEINSOURCE '"UNCOMMITTED_DELETE_VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of versions in the container. This includes all versions regardless of their version type and status.', NAMEINSOURCE '"VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INSERT_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of insert-versions in the container', NAMEINSOURCE '"INSERT_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of update-versions in the container', NAMEINSOURCE '"UPDATE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELETE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of delete-versions in the container', NAMEINSOURCE '"DELETE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of all committed versions in the container (includes all types)', NAMEINSOURCE '"COMMITTED_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_INSERT_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of committed insert-versions in the container', NAMEINSOURCE '"COMMITTED_INSERT_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_UPDATE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of committed update-versions in the container', NAMEINSOURCE '"COMMITTED_UPDATE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMITTED_DELETE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of committed delete-versions in the container', NAMEINSOURCE '"COMMITTED_DELETE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of all uncommitted versions in the container (includes all types)', NAMEINSOURCE '"UNCOMMITTED_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_INSERT_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of uncommitted insert-versions in the container', NAMEINSOURCE '"UNCOMMITTED_INSERT_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_UPDATE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of uncommitted update-versions in the container', NAMEINSOURCE '"UNCOMMITTED_UPDATE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNCOMMITTED_DELETE_VERSION_SIZE long OPTIONS (ANNOTATION 'Used sized of uncommitted delete-versions in the container', NAMEINSOURCE '"UNCOMMITTED_DELETE_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_COMMIT_ID long OPTIONS (ANNOTATION 'Each committed version has its commit ID. MIN_COMMIT_ID refers to the minimum value of commit ID among all committed versions', NAMEINSOURCE '"MIN_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Information on row table versions: detailed version counts and used sizes', NAMEINSOURCE '"SYS"."M_RS_TABLE_VERSION_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_RS_TABLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RECORD_COUNT long OPTIONS (ANNOTATION 'Number of records in this table', NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_FIXED_PART_SIZE long OPTIONS (ANNOTATION 'Allocated memory size for fixed-size part', NAMEINSOURCE '"ALLOCATED_FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_PAGE_HEADER_SIZE long OPTIONS (ANNOTATION 'Allocated and used memory size for page headers of fixed-size part', NAMEINSOURCE '"FIXED_PAGE_HEADER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_PAGE_FRAGMENT_SIZE long OPTIONS (ANNOTATION 'Fragmented memory size of fixed-size part', NAMEINSOURCE '"FIXED_PAGE_FRAGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_FIXED_PART_SIZE long OPTIONS (ANNOTATION 'Used memory size for fixed-size part', NAMEINSOURCE '"USED_FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_PART_FRAGMENT_SIZE long OPTIONS (ANNOTATION 'Fragmented memory size of used fixed-size part', NAMEINSOURCE '"FIXED_PART_FRAGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FIXED_PART_FREE_SIZE long OPTIONS (ANNOTATION 'Free memory size in the pages of fixed-size part', NAMEINSOURCE '"FIXED_PART_FREE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATED_VARIABLE_PART_SIZE long OPTIONS (ANNOTATION 'Allocated memory size for variable-size part', NAMEINSOURCE '"ALLOCATED_VARIABLE_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_VARIABLE_PART_SIZE long OPTIONS (ANNOTATION 'Used memory size for variable-size part', NAMEINSOURCE '"USED_VARIABLE_PART_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VARIABLE_PART_FRAGMENT_SIZE long OPTIONS (ANNOTATION 'Fragmented memory size of used variable-size part', NAMEINSOURCE '"VARIABLE_PART_FRAGMENT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOAD_STATUS string(32) OPTIONS (ANNOTATION 'Loading state of table: ''LOADED''/''NOW_LOADING''/''PREPARING_UNLOAD''/''NOW_UNLOADING''/''UNLOADED''/''NOT_SUPPORTED''', NAMEINSOURCE '"LOAD_STATUS"', NATIVE_TYPE 'VARCHAR'),
    IS_REPLICA string(5) OPTIONS (ANNOTATION 'Flag to indicate replica', NAMEINSOURCE '"IS_REPLICA"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Information on row tables: detailed table sizes and record count', NAMEINSOURCE '"SYS"."M_RS_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SAVEPOINT_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SAVEPOINTS long OPTIONS (ANNOTATION 'Count of executed savepoints', NAMEINSOURCE '"SAVEPOINTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Last savepoint start time clock)', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE string(16) OPTIONS (ANNOTATION 'Last savepoint state', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    VERSION integer OPTIONS (ANNOTATION 'Last savepoint version', NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REQUESTED_FREQUENCY long OPTIONS (ANNOTATION 'Currently active configured savepoint frequency', NAMEINSOURCE '"REQUESTED_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FREQUENCY long OPTIONS (ANNOTATION 'Actual savepoint frequency (time between last two savepoints) (last)', NAMEINSOURCE '"LAST_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FREQUENCY long OPTIONS (ANNOTATION 'Actual savepoint frequency (time between last two savepoints) (avg)', NAMEINSOURCE '"AVG_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_DURATION long OPTIONS (ANNOTATION 'Total time spent creating savepoint (last)', NAMEINSOURCE '"LAST_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_DURATION long OPTIONS (ANNOTATION 'Total time spent creating savepoint (avg)', NAMEINSOURCE '"AVG_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CRITICAL_PHASE_DURATION long OPTIONS (ANNOTATION 'Time spent in critical phase (updates are blocked during this phase) (last)', NAMEINSOURCE '"LAST_CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CRITICAL_PHASE_DURATION long OPTIONS (ANNOTATION 'Time spent in critical phase (updates are blocked during this phase) (avg)', NAMEINSOURCE '"AVG_CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_TOTAL_SIZE long OPTIONS (ANNOTATION 'Total amount of bytes written for a savepoint (last)', NAMEINSOURCE '"LAST_TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TOTAL_SIZE long OPTIONS (ANNOTATION 'Total amount of bytes written for a savepoint (avg)', NAMEINSOURCE '"AVG_TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed pages (last)', NAMEINSOURCE '"LAST_FLUSHED_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_PAGES double OPTIONS (ANNOTATION 'Count of asynchronously flushed pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_PAGES"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_PAGES_IN_CRITICAL_PHASE double OPTIONS (ANNOTATION 'Count of pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_PAGES_IN_CRITICAL_PHASE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_ROWSTORE_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed row store pages (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_PAGES double OPTIONS (ANNOTATION 'Count of asynchronously flushed row store pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_PAGES"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of row store pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE double OPTIONS (ANNOTATION 'Count of row store pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed pages (last)', NAMEINSOURCE '"LAST_FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed row store pages (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed row store pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of row store pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of row store pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_RTT_SIZE long OPTIONS (ANNOTATION 'Total size of rollback transaction table at last savepoint (may be less than sum of components if there are duplicate TIDs)', NAMEINSOURCE '"LAST_RTT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Savepoint statistics', NAMEINSOURCE '"SYS"."M_SAVEPOINT_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SAVEPOINT_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SAVEPOINTS long OPTIONS (ANNOTATION 'Count of executed savepoints', NAMEINSOURCE '"SAVEPOINTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Last savepoint start time clock)', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE string(16) OPTIONS (ANNOTATION 'Last savepoint state', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    VERSION integer OPTIONS (ANNOTATION 'Last savepoint version', NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REQUESTED_FREQUENCY long OPTIONS (ANNOTATION 'Currently active configured savepoint frequency', NAMEINSOURCE '"REQUESTED_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FREQUENCY long OPTIONS (ANNOTATION 'Actual savepoint frequency (time between last two savepoints) (last)', NAMEINSOURCE '"LAST_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FREQUENCY long OPTIONS (ANNOTATION 'Actual savepoint frequency (time between last two savepoints) (avg)', NAMEINSOURCE '"AVG_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_DURATION long OPTIONS (ANNOTATION 'Total time spent creating savepoint (last)', NAMEINSOURCE '"LAST_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_DURATION long OPTIONS (ANNOTATION 'Total time spent creating savepoint (avg)', NAMEINSOURCE '"AVG_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CRITICAL_PHASE_DURATION long OPTIONS (ANNOTATION 'Time spent in critical phase (updates are blocked during this phase) (last)', NAMEINSOURCE '"LAST_CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CRITICAL_PHASE_DURATION long OPTIONS (ANNOTATION 'Time spent in critical phase (updates are blocked during this phase) (avg)', NAMEINSOURCE '"AVG_CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_TOTAL_SIZE long OPTIONS (ANNOTATION 'Total amount of bytes written for a savepoint (last)', NAMEINSOURCE '"LAST_TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TOTAL_SIZE long OPTIONS (ANNOTATION 'Total amount of bytes written for a savepoint (avg)', NAMEINSOURCE '"AVG_TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed pages (last)', NAMEINSOURCE '"LAST_FLUSHED_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_PAGES double OPTIONS (ANNOTATION 'Count of asynchronously flushed pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_PAGES"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_PAGES_IN_CRITICAL_PHASE double OPTIONS (ANNOTATION 'Count of pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_PAGES_IN_CRITICAL_PHASE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_ROWSTORE_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed row store pages (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_PAGES double OPTIONS (ANNOTATION 'Count of asynchronously flushed row store pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_PAGES"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of row store pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE double OPTIONS (ANNOTATION 'Count of row store pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_FLUSHED_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed pages (last)', NAMEINSOURCE '"LAST_FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed row store pages (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed row store pages (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of row store pages flushed in critical phase (last)', NAMEINSOURCE '"LAST_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of row store pages flushed in critical phase (avg)', NAMEINSOURCE '"AVG_FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_RTT_SIZE long OPTIONS (ANNOTATION 'Total size of rollback transaction table at last savepoint (may be less than sum of components if there are duplicate TIDs)', NAMEINSOURCE '"LAST_RTT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Savepoint statistics', NAMEINSOURCE '"SYS"."M_SAVEPOINT_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SAVEPOINTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Savepoint start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    STATE string(16) OPTIONS (ANNOTATION 'Savepoint state', NAMEINSOURCE '"STATE"', NATIVE_TYPE 'VARCHAR'),
    VERSION integer OPTIONS (ANNOTATION 'Savepoint version', NAMEINSOURCE '"VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REQUESTED_FREQUENCY long OPTIONS (ANNOTATION 'Configured savepoint frequency', NAMEINSOURCE '"REQUESTED_FREQUENCY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIME_SINCE_PREVIOUS long OPTIONS (ANNOTATION 'Time between previous and this savepoint', NAMEINSOURCE '"TIME_SINCE_PREVIOUS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DURATION long OPTIONS (ANNOTATION 'Total time spent for creating savepoint', NAMEINSOURCE '"DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CRITICAL_PHASE_START_TIME timestamp OPTIONS (ANNOTATION 'Last critical phase start time)', NAMEINSOURCE '"CRITICAL_PHASE_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CRITICAL_PHASE_DURATION long OPTIONS (ANNOTATION 'Time spent in critical phase (updates are blocked during this)', NAMEINSOURCE '"CRITICAL_PHASE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CRITICAL_PHASE_WAIT_TIME long OPTIONS (ANNOTATION 'Wait time for critical phase', NAMEINSOURCE '"CRITICAL_PHASE_WAIT_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'Total amount of bytes written for this savepoint', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed pages', NAMEINSOURCE '"FLUSHED_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of pages flushed in critical phase', NAMEINSOURCE '"FLUSHED_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_PAGES long OPTIONS (ANNOTATION 'Count of asynchronously flushed row store pages', NAMEINSOURCE '"FLUSHED_ROWSTORE_PAGES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Count of row store pages flushed in critical phase', NAMEINSOURCE '"FLUSHED_ROWSTORE_PAGES_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed pages', NAMEINSOURCE '"FLUSHED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of pages flushed in critical phase', NAMEINSOURCE '"FLUSHED_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_SIZE long OPTIONS (ANNOTATION 'Size of asynchronously flushed row store pages', NAMEINSOURCE '"FLUSHED_ROWSTORE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE long OPTIONS (ANNOTATION 'Size of row store pages flushed in critical phase', NAMEINSOURCE '"FLUSHED_ROWSTORE_SIZE_IN_CRITICAL_PHASE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RTT_SIZE long OPTIONS (ANNOTATION 'Total size of rollback transaction table at this savepoint', NAMEINSOURCE '"RTT_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Current and historical savepoint statistics', NAMEINSOURCE '"SYS"."M_SAVEPOINTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SEMAPHORES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of wait calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKING_COUNT long OPTIONS (ANNOTATION 'Count of blocking wait calls', NAMEINSOURCE '"BLOCKING_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timeouts', NAMEINSOURCE '"TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_RATE double OPTIONS (ANNOTATION 'Wait rate', NAMEINSOURCE '"WAIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (last)', NAMEINSOURCE '"LAST_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (max)', NAMEINSOURCE '"MAX_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (min)', NAMEINSOURCE '"MIN_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (total)', NAMEINSOURCE '"SUM_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (avg)', NAMEINSOURCE '"AVG_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of semaphore creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of semaphore destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Semaphore statistics', NAMEINSOURCE '"SYS"."M_SEMAPHORES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SEMAPHORES_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    STATISTICS_ID long OPTIONS (ANNOTATION 'Statistics object unique ID', NAMEINSOURCE '"STATISTICS_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_COUNT long OPTIONS (ANNOTATION 'Count of wait calls', NAMEINSOURCE '"WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKING_COUNT long OPTIONS (ANNOTATION 'Count of blocking wait calls', NAMEINSOURCE '"BLOCKING_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TIMEOUT_COUNT long OPTIONS (ANNOTATION 'Count of timeouts', NAMEINSOURCE '"TIMEOUT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WAIT_RATE double OPTIONS (ANNOTATION 'Wait rate', NAMEINSOURCE '"WAIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LAST_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (last)', NAMEINSOURCE '"LAST_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (max)', NAMEINSOURCE '"MAX_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (min)', NAMEINSOURCE '"MIN_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (total)', NAMEINSOURCE '"SUM_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_BLOCKING_TIME long OPTIONS (ANNOTATION 'Time of blocking wait calls (avg)', NAMEINSOURCE '"AVG_BLOCKING_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_COUNT long OPTIONS (ANNOTATION 'Count of semaphore creation (for shared statistics only)', NAMEINSOURCE '"CREATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESTROY_COUNT long OPTIONS (ANNOTATION 'Count of semaphore destruction (for shared statistics only)', NAMEINSOURCE '"DESTROY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(32) OPTIONS (ANNOTATION 'Component', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Semaphore statistics', NAMEINSOURCE '"SYS"."M_SEMAPHORES_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SEQUENCES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host where the sequence cache exists', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port where the sequence cache exists', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the sequence', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEQUENCE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Sequence name', NAMEINSOURCE '"SEQUENCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CACHE_SIZE short OPTIONS (ANNOTATION 'Cache size of the sequence cache', NAMEINSOURCE '"CACHE_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    START_VALUE long OPTIONS (ANNOTATION 'Start value of the sequence cache', NAMEINSOURCE '"START_VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    END_VALUE long OPTIONS (ANNOTATION 'End value of the sequence cache', NAMEINSOURCE '"END_VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CURRENT_VALUE long OPTIONS (ANNOTATION 'Current value of the sequence cache', NAMEINSOURCE '"CURRENT_VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Sequence statistics', NAMEINSOURCE '"SYS"."M_SEQUENCES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICE_COMPONENT_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host where the service is running', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port where the service is running', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMPONENT string(64) OPTIONS (ANNOTATION 'The logical component for which memory usage is reported', NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'VARCHAR'),
    USED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Amount of memory which is currently actually used for the logical component', NAMEINSOURCE '"USED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Service-specific memory usage by logical component', NAMEINSOURCE '"SYS"."M_SERVICE_COMPONENT_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICE_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PROCESS_ID integer OPTIONS (ANNOTATION 'Process ID', NAMEINSOURCE '"PROCESS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOGICAL_MEMORY_SIZE long OPTIONS (ANNOTATION 'Virtual memory size (operating system perspective)', NAMEINSOURCE '"LOGICAL_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PHYSICAL_MEMORY_SIZE long OPTIONS (ANNOTATION 'Physical/resident memory size (operating system perspective)', NAMEINSOURCE '"PHYSICAL_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CODE_SIZE long OPTIONS (ANNOTATION 'Code size, including shared libraries', NAMEINSOURCE '"CODE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STACK_SIZE long OPTIONS (ANNOTATION 'Stack size', NAMEINSOURCE '"STACK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HEAP_MEMORY_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Heap part of the memory pool', NAMEINSOURCE '"HEAP_MEMORY_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    HEAP_MEMORY_USED_SIZE long OPTIONS (ANNOTATION 'Amount of pool heap memory that is currently actually in use', NAMEINSOURCE '"HEAP_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_MEMORY_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Shared memory part of the memory pool', NAMEINSOURCE '"SHARED_MEMORY_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHARED_MEMORY_USED_SIZE long OPTIONS (ANNOTATION 'Amount of pool shared memory that is currently actually in use', NAMEINSOURCE '"SHARED_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPACTORS_ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Part of the memory pool that can potentially (=if unpinned) be freed on memory shortage', NAMEINSOURCE '"COMPACTORS_ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPACTORS_FREEABLE_SIZE long OPTIONS (ANNOTATION 'Memory which can actually be freed on memory shortage', NAMEINSOURCE '"COMPACTORS_FREEABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALLOCATION_LIMIT long OPTIONS (ANNOTATION 'Maximum memory pool size (configurable value)', NAMEINSOURCE '"ALLOCATION_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EFFECTIVE_ALLOCATION_LIMIT long OPTIONS (ANNOTATION 'Effective maximum memory pool size, considering pool sizes of other processes (computed value)', NAMEINSOURCE '"EFFECTIVE_ALLOCATION_LIMIT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_MEMORY_USED_SIZE long OPTIONS (ANNOTATION 'Amount of memory from the memory pool that is currently actually in use', NAMEINSOURCE '"TOTAL_MEMORY_USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Detailed information on memory utilization by services', NAMEINSOURCE '"SYS"."M_SERVICE_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICE_NETWORK_IO" (
    SENDER_HOST string(64) OPTIONS (ANNOTATION 'Host name of the sending service', NAMEINSOURCE '"SENDER_HOST"', NATIVE_TYPE 'VARCHAR'),
    SENDER_PORT integer OPTIONS (ANNOTATION 'Port that the sending service listens on', NAMEINSOURCE '"SENDER_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RECEIVER_HOST string(64) OPTIONS (ANNOTATION 'Host name of the receiving service', NAMEINSOURCE '"RECEIVER_HOST"', NATIVE_TYPE 'VARCHAR'),
    RECEIVER_PORT integer OPTIONS (ANNOTATION 'Port that the receiving service listens on', NAMEINSOURCE '"RECEIVER_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEND_SIZE long OPTIONS (ANNOTATION 'Number of bytes sent', NAMEINSOURCE '"SEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVE_SIZE long OPTIONS (ANNOTATION 'Number of bytes received', NAMEINSOURCE '"RECEIVE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEND_DURATION long OPTIONS (ANNOTATION 'Time spent sending', NAMEINSOURCE '"SEND_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVE_DURATION long OPTIONS (ANNOTATION 'Time spent receiving', NAMEINSOURCE '"RECEIVE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUEST_COUNT long OPTIONS (ANNOTATION 'Number of requests handled', NAMEINSOURCE '"REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Service network I/O statistics', NAMEINSOURCE '"SYS"."M_SERVICE_NETWORK_IO"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICE_NETWORK_IO_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SENDER_HOST string(64) OPTIONS (ANNOTATION 'Host name of the sending service', NAMEINSOURCE '"SENDER_HOST"', NATIVE_TYPE 'VARCHAR'),
    SENDER_PORT integer OPTIONS (ANNOTATION 'Port that the sending service listens on', NAMEINSOURCE '"SENDER_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RECEIVER_HOST string(64) OPTIONS (ANNOTATION 'Host name of the receiving service', NAMEINSOURCE '"RECEIVER_HOST"', NATIVE_TYPE 'VARCHAR'),
    RECEIVER_PORT integer OPTIONS (ANNOTATION 'Port that the receiving service listens on', NAMEINSOURCE '"RECEIVER_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SEND_SIZE long OPTIONS (ANNOTATION 'Number of bytes sent', NAMEINSOURCE '"SEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVE_SIZE long OPTIONS (ANNOTATION 'Number of bytes received', NAMEINSOURCE '"RECEIVE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEND_DURATION long OPTIONS (ANNOTATION 'Time spent sending', NAMEINSOURCE '"SEND_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECEIVE_DURATION long OPTIONS (ANNOTATION 'Time spent receiving', NAMEINSOURCE '"RECEIVE_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUEST_COUNT long OPTIONS (ANNOTATION 'Number of requests handled', NAMEINSOURCE '"REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Service network I/O statistics', NAMEINSOURCE '"SYS"."M_SERVICE_NETWORK_IO_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICE_REPLICATION" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SITE_ID integer OPTIONS (ANNOTATION 'Generated site ID', NAMEINSOURCE '"SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SITE_NAME string(256) OPTIONS (ANNOTATION 'Logical site name', NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SECONDARY_HOST string(64) OPTIONS (ANNOTATION 'Secondary Host Name', NAMEINSOURCE '"SECONDARY_HOST"', NATIVE_TYPE 'VARCHAR'),
    SECONDARY_PORT integer OPTIONS (ANNOTATION 'Secondary Port', NAMEINSOURCE '"SECONDARY_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SECONDARY_SITE_ID integer OPTIONS (ANNOTATION 'Generated ID of secondary site', NAMEINSOURCE '"SECONDARY_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SECONDARY_SITE_NAME string(256) OPTIONS (ANNOTATION 'Secondary logical site name', NAMEINSOURCE '"SECONDARY_SITE_NAME"', NATIVE_TYPE 'VARCHAR'),
    SECONDARY_ACTIVE_STATUS string(16) OPTIONS (ANNOTATION 'Secondary Active Status', NAMEINSOURCE '"SECONDARY_ACTIVE_STATUS"', NATIVE_TYPE 'VARCHAR'),
    SECONDARY_CONNECT_TIME timestamp OPTIONS (ANNOTATION 'Time the connection was established from the secondary', NAMEINSOURCE '"SECONDARY_CONNECT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SECONDARY_RECONNECT_COUNT integer OPTIONS (ANNOTATION 'Secondary Reconnect Count', NAMEINSOURCE '"SECONDARY_RECONNECT_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SECONDARY_FAILOVER_COUNT integer OPTIONS (ANNOTATION 'Secondary Failover Count', NAMEINSOURCE '"SECONDARY_FAILOVER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REPLICATION_MODE string(16) OPTIONS (ANNOTATION 'Replication Mode', NAMEINSOURCE '"REPLICATION_MODE"', NATIVE_TYPE 'VARCHAR'),
    REPLICATION_STATUS string(16) OPTIONS (ANNOTATION 'Replication Status', NAMEINSOURCE '"REPLICATION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    REPLICATION_STATUS_DETAILS string(1024) OPTIONS (ANNOTATION 'Replication Status Details', NAMEINSOURCE '"REPLICATION_STATUS_DETAILS"', NATIVE_TYPE 'VARCHAR'),
    FULL_SYNC string(16) OPTIONS (ANNOTATION 'Full sync status', NAMEINSOURCE '"FULL_SYNC"', NATIVE_TYPE 'VARCHAR'),
    LAST_LOG_POSITION long OPTIONS (ANNOTATION 'Current Log Pos', NAMEINSOURCE '"LAST_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_LOG_POSITION_TIME timestamp OPTIONS (ANNOTATION 'Current Log Pos Timestamp', NAMEINSOURCE '"LAST_LOG_POSITION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_SAVEPOINT_VERSION integer OPTIONS (ANNOTATION 'Current Savepoint Version', NAMEINSOURCE '"LAST_SAVEPOINT_VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_SAVEPOINT_LOG_POSITION long OPTIONS (ANNOTATION 'Current Savepoint Log Position', NAMEINSOURCE '"LAST_SAVEPOINT_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_SAVEPOINT_START_TIME timestamp OPTIONS (ANNOTATION 'Current Savepoint Timestamp', NAMEINSOURCE '"LAST_SAVEPOINT_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_LOG_POSITION long OPTIONS (ANNOTATION 'Shipped Log Positon', NAMEINSOURCE '"SHIPPED_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LOG_POSITION_TIME timestamp OPTIONS (ANNOTATION 'Shipped Log Position Timestamp', NAMEINSOURCE '"SHIPPED_LOG_POSITION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_LOG_BUFFERS_COUNT long OPTIONS (ANNOTATION 'Shipped Log Buffers Count', NAMEINSOURCE '"SHIPPED_LOG_BUFFERS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LOG_BUFFERS_SIZE long OPTIONS (ANNOTATION 'Shipped Log Buffers Size in Bytes', NAMEINSOURCE '"SHIPPED_LOG_BUFFERS_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LOG_BUFFERS_DURATION long OPTIONS (ANNOTATION 'Shipped Log Buffer Duration in microseconds', NAMEINSOURCE '"SHIPPED_LOG_BUFFERS_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_SAVEPOINT_VERSION integer OPTIONS (ANNOTATION 'Shipped Savepoint Version', NAMEINSOURCE '"SHIPPED_SAVEPOINT_VERSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SHIPPED_SAVEPOINT_LOG_POSITION long OPTIONS (ANNOTATION 'Shipped Savepoint Log Position', NAMEINSOURCE '"SHIPPED_SAVEPOINT_LOG_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_SAVEPOINT_START_TIME timestamp OPTIONS (ANNOTATION 'Shipped Savepoint Start Time', NAMEINSOURCE '"SHIPPED_SAVEPOINT_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_FULL_REPLICA_COUNT long OPTIONS (ANNOTATION 'Shipped Full Replica Count', NAMEINSOURCE '"SHIPPED_FULL_REPLICA_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_FULL_REPLICA_SIZE long OPTIONS (ANNOTATION 'Shipped Full Replica Size in Bytes', NAMEINSOURCE '"SHIPPED_FULL_REPLICA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_FULL_REPLICA_DURATION long OPTIONS (ANNOTATION 'Shipped Full Replica Duration in microseconds', NAMEINSOURCE '"SHIPPED_FULL_REPLICA_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LAST_FULL_REPLICA_SIZE long OPTIONS (ANNOTATION 'Shipped Last Full Replica Size in Bytes', NAMEINSOURCE '"SHIPPED_LAST_FULL_REPLICA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LAST_FULL_REPLICA_START_TIME timestamp OPTIONS (ANNOTATION 'Shipped Last Full Replica Start Time', NAMEINSOURCE '"SHIPPED_LAST_FULL_REPLICA_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_LAST_FULL_REPLICA_END_TIME timestamp OPTIONS (ANNOTATION 'Shipped Last Full Replica End Time', NAMEINSOURCE '"SHIPPED_LAST_FULL_REPLICA_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_DELTA_REPLICA_COUNT long OPTIONS (ANNOTATION 'Shipped Delta Replica Count', NAMEINSOURCE '"SHIPPED_DELTA_REPLICA_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_DELTA_REPLICA_SIZE long OPTIONS (ANNOTATION 'Shipped Delta Replica Size in Bytes', NAMEINSOURCE '"SHIPPED_DELTA_REPLICA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_DELTA_REPLICA_DURATION long OPTIONS (ANNOTATION 'Shipped Delta Replica Duration in microseconds', NAMEINSOURCE '"SHIPPED_DELTA_REPLICA_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LAST_DELTA_REPLICA_SIZE long OPTIONS (ANNOTATION 'Shipped Last Delta Replica Size in Bytes', NAMEINSOURCE '"SHIPPED_LAST_DELTA_REPLICA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHIPPED_LAST_DELTA_REPLICA_START_TIME timestamp OPTIONS (ANNOTATION 'Shipped Last Delta Replica Start Time', NAMEINSOURCE '"SHIPPED_LAST_DELTA_REPLICA_START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SHIPPED_LAST_DELTA_REPLICA_END_TIME timestamp OPTIONS (ANNOTATION 'Shipped Last Delta Replica End Time', NAMEINSOURCE '"SHIPPED_LAST_DELTA_REPLICA_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Information about replicated services', NAMEINSOURCE '"SYS"."M_SERVICE_REPLICATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICE_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PROCESS_ID integer OPTIONS (ANNOTATION 'Process ID', NAMEINSOURCE '"PROCESS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DETAIL string(128) OPTIONS (ANNOTATION 'Detail information, similar to COORDINATOR_TYPE in M_SERVICES', NAMEINSOURCE '"DETAIL"', NATIVE_TYPE 'VARCHAR'),
    ACTIVE_STATUS string(16) OPTIONS (ANNOTATION 'NO, YES, UNKNOWN, STARTING, STOPPING', NAMEINSOURCE '"ACTIVE_STATUS"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Process start timestamp', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SYS_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Current system timestamp', NAMEINSOURCE '"SYS_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PROCESS_CPU short OPTIONS (ANNOTATION 'CPU usage of current process', NAMEINSOURCE '"PROCESS_CPU"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    PROCESS_CPU_TIME long OPTIONS (ANNOTATION 'CPU usage of current process since start', NAMEINSOURCE '"PROCESS_CPU_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CPU short OPTIONS (ANNOTATION 'CPU usage of all processes', NAMEINSOURCE '"TOTAL_CPU"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TOTAL_CPU_TIME long OPTIONS (ANNOTATION 'CPU usage of all processes since start', NAMEINSOURCE '"TOTAL_CPU_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESS_MEMORY long OPTIONS (ANNOTATION 'Process logical memory usage', NAMEINSOURCE '"PROCESS_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCESS_PHYSICAL_MEMORY long OPTIONS (ANNOTATION 'Process physical memory usage', NAMEINSOURCE '"PROCESS_PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_MEMORY long OPTIONS (ANNOTATION 'Host physical+swap memory usage', NAMEINSOURCE '"TOTAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVAILABLE_MEMORY long OPTIONS (ANNOTATION 'Host physical+swap memory size', NAMEINSOURCE '"AVAILABLE_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PHYSICAL_MEMORY long OPTIONS (ANNOTATION 'Host physical memory size', NAMEINSOURCE '"PHYSICAL_MEMORY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_PER_SEC double OPTIONS (ANNOTATION 'Requests per second. Average over last 1000 requests', NAMEINSOURCE '"REQUESTS_PER_SEC"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    RESPONSE_TIME integer OPTIONS (ANNOTATION 'Request response time. Average over last 1000 requests', NAMEINSOURCE '"RESPONSE_TIME"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FINISHED_NON_INTERNAL_REQUEST_COUNT long OPTIONS (ANNOTATION 'Finished requests', NAMEINSOURCE '"FINISHED_NON_INTERNAL_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ALL_FINISHED_REQUEST_COUNT long OPTIONS (ANNOTATION 'Finished requests including internal requests', NAMEINSOURCE '"ALL_FINISHED_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_REQUEST_COUNT integer OPTIONS (ANNOTATION 'Number of active requests', NAMEINSOURCE '"ACTIVE_REQUEST_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PENDING_REQUEST_COUNT integer OPTIONS (ANNOTATION 'Number of pending requests', NAMEINSOURCE '"PENDING_REQUEST_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ACTIVE_THREAD_COUNT integer OPTIONS (ANNOTATION 'Number of active threads', NAMEINSOURCE '"ACTIVE_THREAD_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    THREAD_COUNT integer OPTIONS (ANNOTATION 'Number of total threads', NAMEINSOURCE '"THREAD_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OPEN_FILE_COUNT integer OPTIONS (ANNOTATION 'Number of open files', NAMEINSOURCE '"OPEN_FILE_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Statistics on active services', NAMEINSOURCE '"SYS"."M_SERVICE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICE_THREAD_CALLSTACKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name. See M_SERVICE_TYPES for all known service names', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    THREAD_ID long OPTIONS (ANNOTATION 'Thread ID', NAMEINSOURCE '"THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FRAME_LEVEL integer OPTIONS (ANNOTATION 'Level of stack frame', NAMEINSOURCE '"FRAME_LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FRAME_NAME string(256) OPTIONS (ANNOTATION 'Name of stack frame (function, file, library, ...)', NAMEINSOURCE '"FRAME_NAME"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Stack frame information for service threads', NAMEINSOURCE '"SYS"."M_SERVICE_THREAD_CALLSTACKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICE_THREAD_SAMPLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Timestamp of the record', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    THREAD_ID long OPTIONS (ANNOTATION 'Thread ID', NAMEINSOURCE '"THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    THREAD_TYPE string(128) OPTIONS (ANNOTATION 'Thread type', NAMEINSOURCE '"THREAD_TYPE"', NATIVE_TYPE 'VARCHAR'),
    THREAD_METHOD string(256) OPTIONS (ANNOTATION 'Thread method', NAMEINSOURCE '"THREAD_METHOD"', NATIVE_TYPE 'VARCHAR'),
    THREAD_DETAIL string(256) OPTIONS (ANNOTATION 'Thread detail (truncated)', NAMEINSOURCE '"THREAD_DETAIL"', NATIVE_TYPE 'NVARCHAR'),
    THREAD_STATE string(32) OPTIONS (ANNOTATION 'Thread state', NAMEINSOURCE '"THREAD_STATE"', NATIVE_TYPE 'VARCHAR'),
    DURATION long OPTIONS (ANNOTATION 'Duration of the operation', NAMEINSOURCE '"DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STATEMENT_ID string(20) OPTIONS (ANNOTATION 'Statement ID', NAMEINSOURCE '"STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    STATEMENT_HASH string(32) OPTIONS (ANNOTATION 'Unique identifier for an SQL string', NAMEINSOURCE '"STATEMENT_HASH"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID (This number increments)', NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'SQL user name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Name of the application', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Application user name', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_SOURCE string(256) OPTIONS (ANNOTATION 'Application can define which source file SAP HANA is called from. Usage is up to the application. This value is also displayed in M_PREPARED_STATEMENTS.APPLICATION_SOURCE', NAMEINSOURCE '"APPLICATION_SOURCE"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT_IP string(16) OPTIONS (ANNOTATION 'IP of client machine', NAMEINSOURCE '"CLIENT_IP"', NATIVE_TYPE 'VARCHAR'),
    CLIENT_PID long OPTIONS (ANNOTATION 'Client process ID', NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_WAIT_COMPONENT string(32) OPTIONS (ANNOTATION 'Waiting for lock component', NAMEINSOURCE '"LOCK_WAIT_COMPONENT"', NATIVE_TYPE 'VARCHAR'),
    LOCK_WAIT_NAME string(128) OPTIONS (ANNOTATION 'Waiting for lock ID (can be joined with STATISTICS_NAME from e.g. M_MUTEXES)', NAMEINSOURCE '"LOCK_WAIT_NAME"', NATIVE_TYPE 'VARCHAR'),
    LOCK_OWNER_THREAD_ID long OPTIONS (ANNOTATION 'Waiting for thread ID', NAMEINSOURCE '"LOCK_OWNER_THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Detailed information about locks held by threads', NAMEINSOURCE '"SYS"."M_SERVICE_THREAD_SAMPLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICE_THREADS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name. See M_SERVICE_TYPES for all known service names', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    HIERARCHY string(128) OPTIONS (ANNOTATION 'Thread grouping information. Filled with Connection-ID/Update-Transaction-ID/Transaction-ID or left empty for inactive threads', NAMEINSOURCE '"HIERARCHY"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    THREAD_ID long OPTIONS (ANNOTATION 'Thread ID', NAMEINSOURCE '"THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    THREAD_TYPE string(128) OPTIONS (ANNOTATION 'Thread Type', NAMEINSOURCE '"THREAD_TYPE"', NATIVE_TYPE 'VARCHAR'),
    THREAD_METHOD string(256) OPTIONS (ANNOTATION 'Thread method', NAMEINSOURCE '"THREAD_METHOD"', NATIVE_TYPE 'VARCHAR'),
    THREAD_DETAIL clob OPTIONS (ANNOTATION 'Thread detail', NAMEINSOURCE '"THREAD_DETAIL"', NATIVE_TYPE 'NCLOB'),
    THREAD_STATE string(32) OPTIONS (ANNOTATION 'Thread state', NAMEINSOURCE '"THREAD_STATE"', NATIVE_TYPE 'VARCHAR'),
    IS_ACTIVE string(5) OPTIONS (ANNOTATION 'Is thread active', NAMEINSOURCE '"IS_ACTIVE"', NATIVE_TYPE 'VARCHAR'),
    DURATION long OPTIONS (ANNOTATION 'Thread Duration', NAMEINSOURCE '"DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CALLER string(256) OPTIONS (ANNOTATION 'The service which called this thread', NAMEINSOURCE '"CALLER"', NATIVE_TYPE 'VARCHAR'),
    CALLING string(256) OPTIONS (ANNOTATION 'The service which the thread calls', NAMEINSOURCE '"CALLING"', NATIVE_TYPE 'VARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'SQL user name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    APPLICATION_USER_NAME string(256) OPTIONS (ANNOTATION 'Application user name', NAMEINSOURCE '"APPLICATION_USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CPU_TIME_SELF long OPTIONS (ANNOTATION 'CPU time of thread', NAMEINSOURCE '"CPU_TIME_SELF"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CPU_TIME_CUMULATIVE long OPTIONS (ANNOTATION 'CPU time of thread and associated children', NAMEINSOURCE '"CPU_TIME_CUMULATIVE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction ID', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Update transaction ID', NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOCK_WAIT_COMPONENT string(32) OPTIONS (ANNOTATION 'Waiting for lock component', NAMEINSOURCE '"LOCK_WAIT_COMPONENT"', NATIVE_TYPE 'VARCHAR'),
    LOCK_WAIT_NAME string(128) OPTIONS (ANNOTATION 'Waiting for lock ID (can be joined with STATISTICS_NAME from e.g. M_MUTEXES)', NAMEINSOURCE '"LOCK_WAIT_NAME"', NATIVE_TYPE 'VARCHAR'),
    LOCK_OWNER_THREAD_ID long OPTIONS (ANNOTATION 'Waiting for thread ID', NAMEINSOURCE '"LOCK_OWNER_THREAD_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Detailed information on threads created by services', NAMEINSOURCE '"SYS"."M_SERVICE_THREADS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICE_TRACES" (
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMPONENT_NAME string(32) OPTIONS (ANNOTATION 'Trace component name', NAMEINSOURCE '"COMPONENT_NAME"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Configured trace components for each service type', NAMEINSOURCE '"SYS"."M_SERVICE_TRACES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICE_TYPES" (
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    INIFILE string(36) OPTIONS (ANNOTATION 'Configuration file name of service', NAMEINSOURCE '"INIFILE"', NATIVE_TYPE 'VARCHAR'),
    HAS_DETAIL string(5) OPTIONS (ANNOTATION 'Service shows details in M_SERVICE_STATISTICS: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_DETAIL"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Service types', NAMEINSOURCE '"SYS"."M_SERVICE_TYPES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SERVICES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name. See M_SERVICE_TYPES for all known service names', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    PROCESS_ID integer OPTIONS (ANNOTATION 'Process ID', NAMEINSOURCE '"PROCESS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DETAIL string(128) OPTIONS (ANNOTATION 'Only for display. Use COORDINATOR_TYPE to test service role', NAMEINSOURCE '"DETAIL"', NATIVE_TYPE 'VARCHAR'),
    ACTIVE_STATUS string(16) OPTIONS (ANNOTATION 'NO, YES, UNKNOWN, STARTING, STOPPING', NAMEINSOURCE '"ACTIVE_STATUS"', NATIVE_TYPE 'VARCHAR'),
    SQL_PORT integer OPTIONS (ANNOTATION 'SQL port', NAMEINSOURCE '"SQL_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COORDINATOR_TYPE string(16) OPTIONS (ANNOTATION 'Coordinator type in distributed landscape: MASTER, SLAVE, STANDBY, NONE', NAMEINSOURCE '"COORDINATOR_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Status of all services', NAMEINSOURCE '"SYS"."M_SERVICES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SESSION_CONTEXT" (
    HOST string(64) NOT NULL OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer NOT NULL OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer NOT NULL OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY string(32) OPTIONS (ANNOTATION 'Key name of a session context variable', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(512) OPTIONS (ANNOTATION 'Value of a session context variable', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    SECTION string(8) OPTIONS (ANNOTATION 'Section name to distinguish system and user variables: USER=application defined variable using SET command or client API call, SYSTEM=predefined variable or server property', NAMEINSOURCE '"SECTION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Session variables for each connection', NAMEINSOURCE '"SYS"."M_SESSION_CONTEXT"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SHARED_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CATEGORY string(128) OPTIONS (ANNOTATION 'Module name', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    ALLOCATED_SIZE long OPTIONS (ANNOTATION 'Allocated shared memory size on the module', NAMEINSOURCE '"ALLOCATED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_SIZE long OPTIONS (ANNOTATION 'Used shared memory size on the module', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_SIZE long OPTIONS (ANNOTATION 'Free shared memory size on the module', NAMEINSOURCE '"FREE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Shared memory usage information by SAP HANA indexserver', NAMEINSOURCE '"SYS"."M_SHARED_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SNAPSHOTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ID long OPTIONS (ANNOTATION 'Snapshot ID', NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Creation time', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    FOR_BACKUP string(5) OPTIONS (ANNOTATION 'Created for backup: ''TRUE''/''FALSE''', NAMEINSOURCE '"FOR_BACKUP"', NATIVE_TYPE 'VARCHAR'),
    ANCHOR long OPTIONS (ANNOTATION 'Anchor', NAMEINSOURCE '"ANCHOR"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Existing snapshots', NAMEINSOURCE '"SYS"."M_SNAPSHOTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SQL_CLIENT_NETWORK_IO" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CLIENT_HOST string(64) OPTIONS (ANNOTATION 'The host of the client machine, also found in M_CONNECTIONS.CLIENT_HOST', NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'VARCHAR'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'The connection ID of the physical server connection', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MESSAGE_ID long OPTIONS (ANNOTATION 'The client message ID on the physical server connection', NAMEINSOURCE '"MESSAGE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLIENT_DURATION long OPTIONS (ANNOTATION 'Elapsed time on client side including send, server execution and receive', NAMEINSOURCE '"CLIENT_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SERVER_DURATION long OPTIONS (ANNOTATION 'Execution time on server side. Transport time is the delta between CLIENT_DURATION and SERVER_DURATION', NAMEINSOURCE '"SERVER_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SERVER_RECEIVED_TIME timestamp OPTIONS (ANNOTATION 'Time when message was received on server side and begin of execution', NAMEINSOURCE '"SERVER_RECEIVED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    RECEIVED_MESSAGE_SIZE long OPTIONS (ANNOTATION 'Size of messages received on server side', NAMEINSOURCE '"RECEIVED_MESSAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SEND_MESSAGE_SIZE long OPTIONS (ANNOTATION 'Size of messages sent to client side', NAMEINSOURCE '"SEND_MESSAGE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'This view shows client and server elapsed time as well as message sizes for client network messages', NAMEINSOURCE '"SYS"."M_SQL_CLIENT_NETWORK_IO"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SQL_PLAN_CACHE" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'Statement string', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    STATEMENT_HASH string(32) OPTIONS (ANNOTATION 'MD5 hash value for STATEMENT_STRING', NAMEINSOURCE '"STATEMENT_HASH"', NATIVE_TYPE 'VARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name who prepared the plan', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name that the SQL plan belongs to. SQL plans are generated in each schema even though the statement string is the same since the query optimizer statistics might be different', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_VALID string(5) OPTIONS (ANNOTATION 'TRUE if the plan is currently valid. A plan is invalidated whenever its corresponding schema objects, such as table and view, are changed. Invalidated plans are recompiled if the same statement is executed, otherwise they are evicted by another plan when newly compiled', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR'),
    IS_INTERNAL string(5) OPTIONS (ANNOTATION 'TRUE if the plan is executed from a database internal connection. FALSE if it is executed from a remote connection', NAMEINSOURCE '"IS_INTERNAL"', NATIVE_TYPE 'VARCHAR'),
    IS_DISTRIBUTED_EXECUTION string(5) OPTIONS (ANNOTATION 'TRUE if tables are located in multi nodes, FALSE otherwise', NAMEINSOURCE '"IS_DISTRIBUTED_EXECUTION"', NATIVE_TYPE 'VARCHAR'),
    IS_PINNED_PLAN string(5) OPTIONS (ANNOTATION 'TRUE if plan is explicitly stored by PlanViz utility, mainly used by PlanViz', NAMEINSOURCE '"IS_PINNED_PLAN"', NATIVE_TYPE 'VARCHAR'),
    ABAP_VARCHAR_MODE string(5) OPTIONS (ANNOTATION 'TRUE if ABAP VARCHAR mode enabled, FALSE otherwise. ABAP application developers concern this mode, which indicates null terminated string or not', NAMEINSOURCE '"ABAP_VARCHAR_MODE"', NATIVE_TYPE 'VARCHAR'),
    ACCESSED_OBJECTS string(5000) OPTIONS (ANNOTATION 'Relevant table object ID list accessed in the plan. Format is <OID>(<metadata version>) for a list entry, entries separated by comma', NAMEINSOURCE '"ACCESSED_OBJECTS"', NATIVE_TYPE 'VARCHAR'),
    TABLE_LOCATIONS string(2000) OPTIONS (ANNOTATION 'Relevant table locations for the plan', NAMEINSOURCE '"TABLE_LOCATIONS"', NATIVE_TYPE 'VARCHAR'),
    TABLE_TYPES string(128) OPTIONS (ANNOTATION 'Specification whether the plan refers Column store only, Row store only or mixed, displayed as one of three possible values ''ROW''/''COLUMN''/''ROW, COLUMN''', NAMEINSOURCE '"TABLE_TYPES"', NATIVE_TYPE 'VARCHAR'),
    PLAN_SHARING_TYPE string(128) OPTIONS (ANNOTATION 'Plan sharing type: ''GLOBAL''/''SESSION EXCLUSIVE GLOBAL''/''SESSION LOCAL''', NAMEINSOURCE '"PLAN_SHARING_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OWNER_CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection owning the plan', NAMEINSOURCE '"OWNER_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PLAN_ID long OPTIONS (ANNOTATION 'Logical plan ID which is a non-negative value', NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory size used by the plan', NAMEINSOURCE '"PLAN_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REFERENCE_COUNT long OPTIONS (ANNOTATION 'Number of statements using the plan. When the count reaches zero, it can be evicted by the victim selection policy of plan cache', NAMEINSOURCE '"REFERENCE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMETER_COUNT long OPTIONS (ANNOTATION 'Number of parameters to be assigned for the execution', NAMEINSOURCE '"PARAMETER_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATED_TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the updated table for the plan', NAMEINSOURCE '"UPDATED_TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT long OPTIONS (ANNOTATION 'Accumulated count of plan execution', NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT_BY_ROUTING long OPTIONS (ANNOTATION 'Accumulated count of plan execution by client-routed connection in statement routing. This column shows how many times the statement is executed in routed connection. The routed connection means a physical connection in a part of the logical session', NAMEINSOURCE '"EXECUTION_COUNT_BY_ROUTING"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CURSOR_DURATION long OPTIONS (ANNOTATION 'Sum of time of plan execution including communication time with clients', NAMEINSOURCE '"TOTAL_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CURSOR_DURATION long OPTIONS (ANNOTATION 'Average time of plan execution including communicate time with clients', NAMEINSOURCE '"AVG_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Minimum time of plan execution including communicate time with clients', NAMEINSOURCE '"MIN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CURSOR_DURATION long OPTIONS (ANNOTATION 'Maximum time of plan execution including communicate time with clients', NAMEINSOURCE '"MAX_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Sum of time of plan executions', NAMEINSOURCE '"TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_TIME long OPTIONS (ANNOTATION 'Average time of plan execution', NAMEINSOURCE '"AVG_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_TIME long OPTIONS (ANNOTATION 'Minimum time of plan execution', NAMEINSOURCE '"MIN_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum time of plan execution', NAMEINSOURCE '"MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Sum of time of establishing result sets', NAMEINSOURCE '"TOTAL_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Average time for cursor open', NAMEINSOURCE '"AVG_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor close', NAMEINSOURCE '"MIN_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor close', NAMEINSOURCE '"MAX_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Sum of time for transferring rows', NAMEINSOURCE '"TOTAL_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Average time for cursor fetch', NAMEINSOURCE '"AVG_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor fetch', NAMEINSOURCE '"MIN_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor fetch', NAMEINSOURCE '"MAX_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Sum of time for cleanup of result sets', NAMEINSOURCE '"TOTAL_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Average time for cursor close', NAMEINSOURCE '"AVG_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor close', NAMEINSOURCE '"MIN_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor close', NAMEINSOURCE '"MAX_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_METADATA_CACHE_MISS_COUNT long OPTIONS (ANNOTATION 'Accumulated count of metadata cache misses during plan preparation and plan execution. When a metadata object is first requested to be accessed in a slave server instance, it gets the object from a master server instance via network communication, if the object does not exist or is out of date.', NAMEINSOURCE '"TOTAL_METADATA_CACHE_MISS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Sum of table loading time during plan preparation', NAMEINSOURCE '"TOTAL_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Average table loading time during plan preparation', NAMEINSOURCE '"AVG_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Minimum table loading time during plan preparation', NAMEINSOURCE '"MIN_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Maximum table loading time during plan preparation', NAMEINSOURCE '"MAX_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARATION_COUNT long OPTIONS (ANNOTATION 'Number of plan preparations', NAMEINSOURCE '"PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (ANNOTATION 'Sum of time of plan preparation', NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (ANNOTATION 'Average time of plan preparation', NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Minimum time of plan preparation', NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (ANNOTATION 'Maximum time of plan preparation', NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_RESULT_RECORD_COUNT long OPTIONS (ANNOTATION 'Accumulated number of records during plan execution.', NAMEINSOURCE '"TOTAL_RESULT_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Accumulated lock wait count for the plan', NAMEINSOURCE '"TOTAL_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_DURATION long OPTIONS (ANNOTATION 'Accumulated lock wait duration for the plan', NAMEINSOURCE '"TOTAL_LOCK_WAIT_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CONNECTION_ID integer OPTIONS (ANNOTATION 'The last connection ID that executed the plan', NAMEINSOURCE '"LAST_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Last execution timestamp', NAMEINSOURCE '"LAST_EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_PREPARATION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Last preparation timestamp', NAMEINSOURCE '"LAST_PREPARATION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Statistics of an individual execution plan', NAMEINSOURCE '"SYS"."M_SQL_PLAN_CACHE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SQL_PLAN_CACHE_OVERVIEW" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PLAN_CACHE_ENABLED integer OPTIONS (ANNOTATION 'TRUE if SQL Plan Cache is turned on<br><font color="red"> ALTER SYSTEM ALTER CONFIGURATION (''indexserver.ini'',''system'') SET(''sql'', ''plan_cache_enabled'') = <''True'' or ''False''> WITH RECONFIGURE</font>', NAMEINSOURCE '"PLAN_CACHE_ENABLED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_COLLECTION_ENABLED string(5) OPTIONS (ANNOTATION 'TRUE if runtime statistics are collected<br><font color="red"> ALTER SYSTEM ALTER CONFIGURATION (''indexserver.ini'',''system'') SET(''sql'', ''plan_cache_statistics_enabled'') = <''True'' or ''False''> WITH RECONFIGURE</font>', NAMEINSOURCE '"STATISTICS_COLLECTION_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    PLAN_CACHE_CAPACITY long OPTIONS (ANNOTATION 'Maximum SQL Plan Cache size<br><font color="red"> ALTER SYSTEM ALTER CONFIGURATION (''indexserver.ini'',''system'') SET(''sql'', ''plan_cache_size'') = ''268435456'' WITH RECONFIGURE</font>', NAMEINSOURCE '"PLAN_CACHE_CAPACITY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_SIZE long OPTIONS (ANNOTATION 'Total size of SQL Plan Cache', NAMEINSOURCE '"CACHED_PLAN_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_CACHE_HIT_RATIO float OPTIONS (ANNOTATION 'SQL Plan Cache hit ratio', NAMEINSOURCE '"PLAN_CACHE_HIT_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    PLAN_CACHE_LOOKUP_COUNT long OPTIONS (ANNOTATION 'Number of plan lookup count from SQL Plan Cache', NAMEINSOURCE '"PLAN_CACHE_LOOKUP_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_CACHE_HIT_COUNT long OPTIONS (ANNOTATION 'Number of hit count from SQL Plan Cache', NAMEINSOURCE '"PLAN_CACHE_HIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_AVG_CACHE_TIME long OPTIONS (ANNOTATION 'Average Duration between plan cache insertion and eviction  ', NAMEINSOURCE '"EVICTED_PLAN_AVG_CACHE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_COUNT long OPTIONS (ANNOTATION 'Number of evicted plans from SQL Plan Cache', NAMEINSOURCE '"EVICTED_PLAN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_PREPARATION_COUNT long OPTIONS (ANNOTATION 'Total plan preparation count for evicted plans', NAMEINSOURCE '"EVICTED_PLAN_PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_EXECUTION_COUNT long OPTIONS (ANNOTATION 'Total plan execution count for evicted plans', NAMEINSOURCE '"EVICTED_PLAN_EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Total duration for plan preparation for all evicted plans. Sum of evicted plan''s TOTAL_PREPARATION_TIME', NAMEINSOURCE '"EVICTED_PLAN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Total cursor duration for evicted plans. Sum of evicted plan''s TOTAL_CUSOR_DURATION', NAMEINSOURCE '"EVICTED_PLAN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time for evicted plans. Sum of evicted plan''s TOTAL_EXECUTION_TIME', NAMEINSOURCE '"EVICTED_PLAN_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EVICTED_PLAN_SIZE long OPTIONS (ANNOTATION 'Accumulated total size of evicted plans', NAMEINSOURCE '"EVICTED_PLAN_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_COUNT long OPTIONS (ANNOTATION 'Total cached plan count in SQL Plan Cache', NAMEINSOURCE '"CACHED_PLAN_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_PREPARATION_COUNT long OPTIONS (ANNOTATION 'Total plan preparation count for cached plans', NAMEINSOURCE '"CACHED_PLAN_PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_EXECUTION_COUNT long OPTIONS (ANNOTATION 'Total execution count for cached plans', NAMEINSOURCE '"CACHED_PLAN_EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Total plan preparation duration for cached plans', NAMEINSOURCE '"CACHED_PLAN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Total cursor duration for cached plans', NAMEINSOURCE '"CACHED_PLAN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CACHED_PLAN_TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Total execution time for cached plans', NAMEINSOURCE '"CACHED_PLAN_TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLEAR_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Timestamp when SQL Plan Cache was cleared for the last time using ALTER SYSTEM CLEAR SQL PLAN CACHE', NAMEINSOURCE '"CLEAR_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Overall statistics of evicted and cached plans', NAMEINSOURCE '"SYS"."M_SQL_PLAN_CACHE_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SQL_PLAN_CACHE_PARAMETERS" (
    PLAN_ID long OPTIONS (ANNOTATION 'Logical plan ID which is a non-negative value, same with the one in M_SQL_PLAN_CACHE', NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Data type of the parameter', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Position of the parameter in SQL statement', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARAMETER_VALUE clob OPTIONS (ANNOTATION 'Value of the captured parameter', NAMEINSOURCE '"PARAMETER_VALUE"', NATIVE_TYPE 'NCLOB'),
    BATCH_EXECUTION_ORDER integer OPTIONS (ANNOTATION 'Execution order in a batch processing', NAMEINSOURCE '"BATCH_EXECUTION_ORDER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Timestamp when the parameter value is captured', NAMEINSOURCE '"EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Bind parameters for statements cached in SQL Plan Cache. It saves parameter set of the most expensive execution for each plan', NAMEINSOURCE '"SYS"."M_SQL_PLAN_CACHE_PARAMETERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SQL_PLAN_CACHE_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_STRING clob OPTIONS (ANNOTATION 'Statement string', NAMEINSOURCE '"STATEMENT_STRING"', NATIVE_TYPE 'NCLOB'),
    STATEMENT_HASH string(32) OPTIONS (ANNOTATION 'MD5 hash value for STATEMENT_STRING', NAMEINSOURCE '"STATEMENT_HASH"', NATIVE_TYPE 'VARCHAR'),
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name who prepared the plan', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name that the SQL plan belongs to. SQL plans are generated in each schema even though the statement string is the same since the query optimizer statistics might be different', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    IS_VALID string(5) OPTIONS (ANNOTATION 'TRUE if the plan is currently valid. A plan is invalidated whenever its corresponding schema objects, such as table and view, are changed. Invalidated plans are recompiled if the same statement is executed, otherwise they are evicted by another plan when newly compiled', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR'),
    IS_INTERNAL string(5) OPTIONS (ANNOTATION 'TRUE if the plan is executed from a database internal connection. FALSE if it is executed from a remote connection', NAMEINSOURCE '"IS_INTERNAL"', NATIVE_TYPE 'VARCHAR'),
    IS_DISTRIBUTED_EXECUTION string(5) OPTIONS (ANNOTATION 'TRUE if tables are located in multi nodes, FALSE otherwise', NAMEINSOURCE '"IS_DISTRIBUTED_EXECUTION"', NATIVE_TYPE 'VARCHAR'),
    IS_PINNED_PLAN string(5) OPTIONS (ANNOTATION 'TRUE if plan is explicitly stored by PlanViz utility, mainly used by PlanViz', NAMEINSOURCE '"IS_PINNED_PLAN"', NATIVE_TYPE 'VARCHAR'),
    ABAP_VARCHAR_MODE string(5) OPTIONS (ANNOTATION 'TRUE if ABAP VARCHAR mode enabled, FALSE otherwise. ABAP application developers concern this mode, which indicates null terminated string or not', NAMEINSOURCE '"ABAP_VARCHAR_MODE"', NATIVE_TYPE 'VARCHAR'),
    ACCESSED_OBJECTS string(5000) OPTIONS (ANNOTATION 'Relevant table object ID list accessed in the plan. Format is <OID>(<metadata version>) for a list entry, entries separated by comma', NAMEINSOURCE '"ACCESSED_OBJECTS"', NATIVE_TYPE 'VARCHAR'),
    TABLE_LOCATIONS string(2000) OPTIONS (ANNOTATION 'Relevant table locations for the plan', NAMEINSOURCE '"TABLE_LOCATIONS"', NATIVE_TYPE 'VARCHAR'),
    TABLE_TYPES string(128) OPTIONS (ANNOTATION 'Specification whether the plan refers Column store only, Row store only or mixed, displayed as one of three possible values ''ROW''/''COLUMN''/''ROW, COLUMN''', NAMEINSOURCE '"TABLE_TYPES"', NATIVE_TYPE 'VARCHAR'),
    PLAN_SHARING_TYPE string(128) OPTIONS (ANNOTATION 'Plan sharing type: ''GLOBAL''/''SESSION EXCLUSIVE GLOBAL''/''SESSION LOCAL''', NAMEINSOURCE '"PLAN_SHARING_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OWNER_CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection owning the plan', NAMEINSOURCE '"OWNER_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PLAN_ID long OPTIONS (ANNOTATION 'Logical plan ID which is a non-negative value', NAMEINSOURCE '"PLAN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PLAN_MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory size used by the plan', NAMEINSOURCE '"PLAN_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REFERENCE_COUNT long OPTIONS (ANNOTATION 'Number of statements using the plan. When the count reaches zero, it can be evicted by the victim selection policy of plan cache', NAMEINSOURCE '"REFERENCE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMETER_COUNT long OPTIONS (ANNOTATION 'Number of parameters to be assigned for the execution', NAMEINSOURCE '"PARAMETER_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATED_TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the updated table for the plan', NAMEINSOURCE '"UPDATED_TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT long OPTIONS (ANNOTATION 'Accumulated count of plan execution', NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTION_COUNT_BY_ROUTING long OPTIONS (ANNOTATION 'Accumulated count of plan execution by client-routed connection in statement routing. This column shows how many times the statement is executed in routed connection. The routed connection means a physical connection in a part of the logical session', NAMEINSOURCE '"EXECUTION_COUNT_BY_ROUTING"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_CURSOR_DURATION long OPTIONS (ANNOTATION 'Sum of time of plan execution including communication time with clients', NAMEINSOURCE '"TOTAL_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_CURSOR_DURATION long OPTIONS (ANNOTATION 'Average time of plan execution including communicate time with clients', NAMEINSOURCE '"AVG_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CURSOR_DURATION long OPTIONS (ANNOTATION 'Minimum time of plan execution including communicate time with clients', NAMEINSOURCE '"MIN_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_CURSOR_DURATION long OPTIONS (ANNOTATION 'Maximum time of plan execution including communicate time with clients', NAMEINSOURCE '"MAX_CURSOR_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_TIME long OPTIONS (ANNOTATION 'Sum of time of plan executions', NAMEINSOURCE '"TOTAL_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_TIME long OPTIONS (ANNOTATION 'Average time of plan execution', NAMEINSOURCE '"AVG_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_TIME long OPTIONS (ANNOTATION 'Minimum time of plan execution', NAMEINSOURCE '"MIN_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_TIME long OPTIONS (ANNOTATION 'Maximum time of plan execution', NAMEINSOURCE '"MAX_EXECUTION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Sum of time of establishing result sets', NAMEINSOURCE '"TOTAL_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Average time for cursor open', NAMEINSOURCE '"AVG_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor close', NAMEINSOURCE '"MIN_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_OPEN_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor close', NAMEINSOURCE '"MAX_EXECUTION_OPEN_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Sum of time for transferring rows', NAMEINSOURCE '"TOTAL_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Average time for cursor fetch', NAMEINSOURCE '"AVG_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor fetch', NAMEINSOURCE '"MIN_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_FETCH_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor fetch', NAMEINSOURCE '"MAX_EXECUTION_FETCH_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Sum of time for cleanup of result sets', NAMEINSOURCE '"TOTAL_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Average time for cursor close', NAMEINSOURCE '"AVG_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Minimum time for cursor close', NAMEINSOURCE '"MIN_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_EXECUTION_CLOSE_TIME long OPTIONS (ANNOTATION 'Maximum time for cursor close', NAMEINSOURCE '"MAX_EXECUTION_CLOSE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_METADATA_CACHE_MISS_COUNT long OPTIONS (ANNOTATION 'Accumulated count of metadata cache misses during plan preparation and plan execution. When a metadata object is first requested to be accessed in a slave server instance, it gets the object from a master server instance via network communication, if the object does not exist or is out of date.', NAMEINSOURCE '"TOTAL_METADATA_CACHE_MISS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Sum of table loading time during plan preparation', NAMEINSOURCE '"TOTAL_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Average table loading time during plan preparation', NAMEINSOURCE '"AVG_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Minimum table loading time during plan preparation', NAMEINSOURCE '"MIN_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TABLE_LOAD_TIME_DURING_PREPARATION long OPTIONS (ANNOTATION 'Maximum table loading time during plan preparation', NAMEINSOURCE '"MAX_TABLE_LOAD_TIME_DURING_PREPARATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PREPARATION_COUNT long OPTIONS (ANNOTATION 'Number of plan preparations', NAMEINSOURCE '"PREPARATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_PREPARATION_TIME long OPTIONS (ANNOTATION 'Sum of time of plan preparation', NAMEINSOURCE '"TOTAL_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_PREPARATION_TIME long OPTIONS (ANNOTATION 'Average time of plan preparation', NAMEINSOURCE '"AVG_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_PREPARATION_TIME long OPTIONS (ANNOTATION 'Minimum time of plan preparation', NAMEINSOURCE '"MIN_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_PREPARATION_TIME long OPTIONS (ANNOTATION 'Maximum time of plan preparation', NAMEINSOURCE '"MAX_PREPARATION_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_RESULT_RECORD_COUNT long OPTIONS (ANNOTATION 'Accumulated number of records during plan execution.', NAMEINSOURCE '"TOTAL_RESULT_RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_COUNT long OPTIONS (ANNOTATION 'Accumulated lock wait count for the plan', NAMEINSOURCE '"TOTAL_LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_LOCK_WAIT_DURATION long OPTIONS (ANNOTATION 'Accumulated lock wait duration for the plan', NAMEINSOURCE '"TOTAL_LOCK_WAIT_DURATION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_CONNECTION_ID integer OPTIONS (ANNOTATION 'The last connection ID that executed the plan', NAMEINSOURCE '"LAST_CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LAST_EXECUTION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Last execution timestamp', NAMEINSOURCE '"LAST_EXECUTION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_PREPARATION_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Last preparation timestamp', NAMEINSOURCE '"LAST_PREPARATION_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Statistics of an individual execution plan', NAMEINSOURCE '"SYS"."M_SQL_PLAN_CACHE_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_STATISTICS_LASTVALUES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port name', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NAME string(128) OPTIONS (ANNOTATION 'Value name', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    INDEX string(1024) OPTIONS (ANNOTATION 'Index of value', NAMEINSOURCE '"INDEX"', NATIVE_TYPE 'NVARCHAR'),
    REACHED_AT timestamp OPTIONS (ANNOTATION 'Value reached at', NAMEINSOURCE '"REACHED_AT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Last value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'In-memory version of _SYS_STATISTICS.STATISTICS_LASTVALUES', NAMEINSOURCE '"SYS"."M_STATISTICS_LASTVALUES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SYSTEM_INFORMATION_STATEMENTS" (
    NAME string(64) OPTIONS (ANNOTATION 'Statement name', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(256) OPTIONS (ANNOTATION 'Statement description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT clob OPTIONS (ANNOTATION 'Actual SQL statement', NAMEINSOURCE '"STATEMENT"', NATIVE_TYPE 'NCLOB')
) OPTIONS (ANNOTATION 'System information statements', NAMEINSOURCE '"SYS"."M_SYSTEM_INFORMATION_STATEMENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SYSTEM_LIMITS" (
    CATEGORY string(128) OPTIONS (ANNOTATION 'Category of system limit is adaptable ', NAMEINSOURCE '"CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    NAME string(256) OPTIONS (ANNOTATION 'Name of system limit ', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Value of system limit', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(128) OPTIONS (ANNOTATION 'Type of value ', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    UNIT string(256) OPTIONS (ANNOTATION 'Unit of value', NAMEINSOURCE '"UNIT"', NATIVE_TYPE 'VARCHAR'),
    COMMENT string(2000) OPTIONS (ANNOTATION 'Additional comment for system limits', NAMEINSOURCE '"COMMENT"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'System limits information', NAMEINSOURCE '"SYS"."M_SYSTEM_LIMITS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_SYSTEM_OVERVIEW" (
    SECTION string(16) OPTIONS (ANNOTATION 'Section name', NAMEINSOURCE '"SECTION"', NATIVE_TYPE 'VARCHAR'),
    NAME string(32) OPTIONS (ANNOTATION 'Key name in section', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    STATUS string(8) OPTIONS (ANNOTATION 'Status value: OK, ERROR, WARNING or empty for info items', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Key value in section', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Overview of system status including important resource usage information and alerts', NAMEINSOURCE '"SYS"."M_SYSTEM_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TABLE_LOB_FILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Part ID of split table', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_OID long OPTIONS (ANNOTATION 'Table OID, same as owner_oid if the table is found; 0 otherwise', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTAINER_ID long OPTIONS (ANNOTATION 'Container ID', NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PHYSICAL_SIZE long OPTIONS (ANNOTATION 'File size', NAMEINSOURCE '"PHYSICAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BINARY_SIZE long OPTIONS (ANNOTATION 'LOB size', NAMEINSOURCE '"BINARY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CHARACTER_SIZE integer OPTIONS (ANNOTATION 'Number of characters in NCLOB', NAMEINSOURCE '"CHARACTER_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PAGE_COUNT long OPTIONS (ANNOTATION 'Number of pages used for a LOB file', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOB_TYPE string(5) OPTIONS (ANNOTATION 'Type of the lob', NAMEINSOURCE '"LOB_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'All LOB files that belong to a table', NAMEINSOURCE '"SYS"."M_TABLE_LOB_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TABLE_LOCATIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host where table data is located. Empty for Views', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port where table data is located. 0 for Views', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCATION string(75) OPTIONS (ANNOTATION 'Host and port where the table data is located', NAMEINSOURCE '"LOCATION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Tables and their logical location. Physical locations are shown in M_TABLE_PERSISTENCE_LOCATIONS', NAMEINSOURCE '"SYS"."M_TABLE_LOCATIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TABLE_LOCKS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_OWNER_UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID owning the lock', NAMEINSOURCE '"LOCK_OWNER_UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_TIME timestamp OPTIONS (ANNOTATION 'Lock acquisition time', NAMEINSOURCE '"ACQUIRED_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) NOT NULL OPTIONS (ANNOTATION 'Object type', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCK_MODE string(32) OPTIONS (ANNOTATION 'Lock mode: EXCLUSIVE, INTENTIONAL EXCLUSIVE', NAMEINSOURCE '"LOCK_MODE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Deprecated: use M_OBJECT_LOCKS instead', NAMEINSOURCE '"SYS"."M_TABLE_LOCKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TABLE_PERSISTENCE_LOCATIONS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables. -1 if the whole table is unloaded.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_HISTORY string(5) OPTIONS (ANNOTATION 'Is this the history part of a table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_HISTORY"', NATIVE_TYPE 'VARCHAR'),
    PERSISTENCE_HOST string(64) OPTIONS (ANNOTATION 'Host where table data is located', NAMEINSOURCE '"PERSISTENCE_HOST"', NATIVE_TYPE 'VARCHAR'),
    PERSISTENCE_PORT integer OPTIONS (ANNOTATION 'Port where table data is located', NAMEINSOURCE '"PERSISTENCE_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Column store tables and their physical data locations', NAMEINSOURCE '"SYS"."M_TABLE_PERSISTENCE_LOCATIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TABLE_PERSISTENCE_STATISTICS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema Name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table Name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DISK_SIZE long NOT NULL OPTIONS (ANNOTATION 'Total disk size of all table parts', NAMEINSOURCE '"DISK_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_COUNT long NOT NULL OPTIONS (ANNOTATION 'Total number of pages of all table parts', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTES_WRITTEN long NOT NULL OPTIONS (ANNOTATION 'Number of bytes written to the table', NAMEINSOURCE '"BYTES_WRITTEN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTES_APPENDED long NOT NULL OPTIONS (ANNOTATION 'Number of bytes appended to the table', NAMEINSOURCE '"BYTES_APPENDED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTES_READ long NOT NULL OPTIONS (ANNOTATION 'Number of bytes read from the table', NAMEINSOURCE '"BYTES_READ"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BYTESTREAM_WRITTEN long NOT NULL OPTIONS (ANNOTATION 'Number of bytes written to the table via streaming interface', NAMEINSOURCE '"BYTESTREAM_WRITTEN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    APPEND_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was appended to', NAMEINSOURCE '"APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was written to', NAMEINSOURCE '"WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OPTIMIZE_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was written to optimized', NAMEINSOURCE '"OPTIMIZE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was read from', NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRUNCATE_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was truncated', NAMEINSOURCE '"TRUNCATE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COPY_COUNT long NOT NULL OPTIONS (ANNOTATION 'Number of times the table was copied', NAMEINSOURCE '"COPY_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Persistence virtual file summary statistics for tables', NAMEINSOURCE '"SYS"."M_TABLE_PERSISTENCE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TABLE_SNAPSHOTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema Name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table Name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Table Object ID', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_TYPE string(16) OPTIONS (ANNOTATION 'Table Type: Row, Column', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    MIN_MVCC_SNAPSHOT_TIMESTAMP long OPTIONS (ANNOTATION 'Minimum MVCC Timestamp which is held by table-wise GC blocker transaction or cursor', NAMEINSOURCE '"MIN_MVCC_SNAPSHOT_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VERSION_COUNT long OPTIONS (ANNOTATION 'Number of versions (For column table, the number of unconsolidated udivlists', NAMEINSOURCE '"VERSION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Snapshot information of tables which are blocked by table-wise GC', NAMEINSOURCE '"SYS"."M_TABLE_SNAPSHOTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TABLE_VIRTUAL_FILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PART_ID integer OPTIONS (ANNOTATION 'Partition ID. 0 for non-partitioned tables, 1 through number of partitions for partitioned tables.', NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_HISTORY string(5) OPTIONS (ANNOTATION 'Is this the history part of a table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_HISTORY"', NATIVE_TYPE 'VARCHAR'),
    CONTAINER_ID long NOT NULL OPTIONS (ANNOTATION 'Container ID', NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAMESPACE string(512) OPTIONS (ANNOTATION 'Namespace address in the database storage system', NAMEINSOURCE '"NAMESPACE"', NATIVE_TYPE 'VARCHAR'),
    NAME string(512) OPTIONS (ANNOTATION 'Name in the database storage system', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    PHYSICAL_SIZE long OPTIONS (ANNOTATION 'Storage size used for the file', NAMEINSOURCE '"PHYSICAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_COUNT long OPTIONS (ANNOTATION 'Number of storage pages used for the file', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'All virtual files that belong to a table', NAMEINSOURCE '"SYS"."M_TABLE_VIRTUAL_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TABLES" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RECORD_COUNT long OPTIONS (ANNOTATION 'Number of records in this table', NAMEINSOURCE '"RECORD_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_SIZE long OPTIONS (ANNOTATION 'Allocated memory size for fixed-size and variable-size part', NAMEINSOURCE '"TABLE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_COLUMN_TABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table is a column table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_TABLE"', NATIVE_TYPE 'VARCHAR'),
    TABLE_TYPE string(16) NOT NULL OPTIONS (ANNOTATION 'Specifies type of the table: ''ROW''/''COLUMN''/''HYBRID''', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_PARTITIONED string(5) OPTIONS (ANNOTATION 'Specifies whether the table is partitioned: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_PARTITIONED"', NATIVE_TYPE 'VARCHAR'),
    IS_REPLICATED string(5) OPTIONS (ANNOTATION 'Specifies whether the table is replicated: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_REPLICATED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Information on row and column tables', NAMEINSOURCE '"SYS"."M_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TEMPORARY_JOIN_CONDITIONS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONDITION_NAME string(256) OPTIONS (ANNOTATION 'Join condition name', NAMEINSOURCE '"JOIN_CONDITION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_ORDER long OPTIONS (ANNOTATION 'Join order number', NAMEINSOURCE '"JOIN_ORDER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_SCHEMA_NAME1 string(256) OPTIONS (ANNOTATION 'Schema name of column1', NAMEINSOURCE '"TABLE_SCHEMA_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME1 string(256) OPTIONS (ANNOTATION 'Table name of column1', NAMEINSOURCE '"TABLE_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME1 string(256) OPTIONS (ANNOTATION 'Name of column1', NAMEINSOURCE '"COLUMN_NAME1"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER1 integer OPTIONS (ANNOTATION 'Alias number of table name1', NAMEINSOURCE '"ALIAS_NUMBER1"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_SCHEMA_NAME2 string(256) OPTIONS (ANNOTATION 'Schema name of column2', NAMEINSOURCE '"TABLE_SCHEMA_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME2 string(256) OPTIONS (ANNOTATION 'Table name of column2', NAMEINSOURCE '"TABLE_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME2 string(256) OPTIONS (ANNOTATION 'Name of column2', NAMEINSOURCE '"COLUMN_NAME2"', NATIVE_TYPE 'NVARCHAR'),
    ALIAS_NUMBER2 integer OPTIONS (ANNOTATION 'Alias number of table name2', NAMEINSOURCE '"ALIAS_NUMBER2"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONSTRAINTS string(256) OPTIONS (ANNOTATION 'Join constraint name', NAMEINSOURCE '"CONSTRAINTS"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_TYPE string(5) OPTIONS (ANNOTATION 'Join type', NAMEINSOURCE '"JOIN_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CARDINALITY string(3) OPTIONS (ANNOTATION 'Join cardinality', NAMEINSOURCE '"CARDINALITY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'This view shows temporary join condition.', NAMEINSOURCE '"SYS"."M_TEMPORARY_JOIN_CONDITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TEMPORARY_JOIN_CONSTRAINTS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'View name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    JOIN_CONSTRAINT_NAME string(256) OPTIONS (ANNOTATION 'Join constraint name', NAMEINSOURCE '"JOIN_CONSTRAINT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONSTRAINT_TYPE string(32) OPTIONS (ANNOTATION 'Operator', NAMEINSOURCE '"CONSTRAINT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LOCATION string(256) OPTIONS (ANNOTATION 'Name of constraint owner', NAMEINSOURCE '"LOCATION"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of column', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OPERATOR string(256) OPTIONS (ANNOTATION 'Operator', NAMEINSOURCE '"OPERATOR"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'This view shows temporary join constraints', NAMEINSOURCE '"SYS"."M_TEMPORARY_JOIN_CONSTRAINTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TEMPORARY_KEY_FIGURES" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'Join view name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    KEY_FIGURE_NAME string(256) OPTIONS (ANNOTATION 'Key figure name', NAMEINSOURCE '"KEY_FIGURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_AGGREGATION_TYPE string(32) OPTIONS (ANNOTATION 'Aggregation type', NAMEINSOURCE '"DEFAULT_AGGREGATION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) OPTIONS (ANNOTATION 'Description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    UNIT_CONVERSION_NAME string(256) OPTIONS (ANNOTATION 'Name of Unit Conversion', NAMEINSOURCE '"UNIT_CONVERSION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema Name of Column', NAMEINSOURCE '"TABLE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table Name of Column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    EXPRESSION_FLAGS string(32) OPTIONS (ANNOTATION 'Expression flags', NAMEINSOURCE '"EXPRESSION_FLAGS"', NATIVE_TYPE 'VARCHAR'),
    EXPRESSION string(256) OPTIONS (ANNOTATION 'Expression', NAMEINSOURCE '"EXPRESSION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Column of temporary key figures', NAMEINSOURCE '"SYS"."M_TEMPORARY_KEY_FIGURES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TEMPORARY_OBJECT_DEPENDENCIES" (
    BASE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the base object', NAMEINSOURCE '"BASE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BASE_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the base object', NAMEINSOURCE '"BASE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BASE_OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the base object', NAMEINSOURCE '"BASE_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    BASE_OBJECT_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the base object', NAMEINSOURCE '"BASE_OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BASE_OBJECT_IS_TEMPORARY string(5) NOT NULL OPTIONS (ANNOTATION 'Temporary property of the base object', NAMEINSOURCE '"BASE_OBJECT_IS_TEMPORARY"', NATIVE_TYPE 'VARCHAR'),
    DEPENDENT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the dependent object', NAMEINSOURCE '"DEPENDENT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the dependent object', NAMEINSOURCE '"DEPENDENT_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the dependent dependent', NAMEINSOURCE '"DEPENDENT_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DEPENDENT_OBJECT_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the dependent dependent', NAMEINSOURCE '"DEPENDENT_OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEPENDENT_OBJECT_IS_TEMPORARY string(5) NOT NULL OPTIONS (ANNOTATION 'Temporary property of the dependent dependent', NAMEINSOURCE '"DEPENDENT_OBJECT_IS_TEMPORARY"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Dependencies between temporary objects, for example, temporary views which refer to a specific table', NAMEINSOURCE '"SYS"."M_TEMPORARY_OBJECT_DEPENDENCIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TEMPORARY_TABLE_COLUMNS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Name of the column', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the table column', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'SQL data type ID of the column', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'SQL data type name of the column', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "OFFSET" short OPTIONS (ANNOTATION 'Offset of the column in the record', NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LENGTH integer OPTIONS (ANNOTATION '# of chars for char types; # of max digits for numeric types; # of chars for datetime types; # of bytes for LOB types', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Numeric types: the maximum number of digits to the right of the decimal point; time, timestamp: the decimal digits are defined as the number of digits to the right of the decimal point in the second''s component of the data', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the column is allowed to accept a null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (ANNOTATION 'Default value of the column', NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    COLLATION string(5000) OPTIONS (ANNOTATION 'Collation of the column', NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Comments on the column', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(5000) OPTIONS (ANNOTATION 'Maximum value', NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    MIN_VALUE string(5000) OPTIONS (ANNOTATION 'Minimum value', NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    CS_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'Column store data type ID', NAMEINSOURCE '"CS_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Column store data type name', NAMEINSOURCE '"CS_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DDIC_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'DDIC data type ID', NAMEINSOURCE '"DDIC_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DDIC_DATA_TYPE_NAME string(7) OPTIONS (ANNOTATION 'DDIC data type name', NAMEINSOURCE '"DDIC_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMPRESSION_TYPE string(9) NOT NULL OPTIONS (ANNOTATION 'Type of compression: ''DEFAULT''/''PREFIXED''/''SPARSE''/''CLUSTERED''/''INDIRECT''/''RLE''', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(4) NOT NULL OPTIONS (ANNOTATION 'Type of index: ''NONE''/''FULL''', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_ID long OPTIONS (ANNOTATION 'ID of the column', NAMEINSOURCE '"COLUMN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRELOAD string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if a column is preloaded: ''TRUE''/''FALSE''', NAMEINSOURCE '"PRELOAD"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Columns of temporary tables', NAMEINSOURCE '"SYS"."M_TEMPORARY_TABLE_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TEMPORARY_TABLES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Comment on the table', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    FIXED_PART_SIZE short OPTIONS (ANNOTATION 'Fixed-size part of record', NAMEINSOURCE '"FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    IS_LOGGED string(5) OPTIONS (ANNOTATION 'Specifies whether logging is enabled for the table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_LOGGED"', NATIVE_TYPE 'VARCHAR'),
    IS_SYSTEM_TABLE string(5) OPTIONS (ANNOTATION 'Specifies whether the table is a system table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_SYSTEM_TABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_COLUMN_TABLE string(5) OPTIONS (ANNOTATION 'Specifies whether the table is a column table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_TABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_INSERT_ONLY string(5) OPTIONS (ANNOTATION 'Specifies whether the table is an ''insert only'' table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_INSERT_ONLY"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED_DATA string(5) OPTIONS (ANNOTATION 'Specifies whether the table can be shared among other instances: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED_DATA"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED_METADATA string(5) OPTIONS (ANNOTATION 'Specifies whether the table is a global table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED_METADATA"', NATIVE_TYPE 'VARCHAR'),
    SESSION_TYPE string(16) OPTIONS (ANNOTATION 'Session type: ''NONE''/''SIMPLE''/''HISTORY''. For ''HISTORY'', time travel is possible', NAMEINSOURCE '"SESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_TEMPORARY string(5) OPTIONS (ANNOTATION 'Specifies whether the table is a temporary table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TEMPORARY"', NATIVE_TYPE 'VARCHAR'),
    TEMPORARY_TABLE_TYPE string(8) OPTIONS (ANNOTATION 'Temporary table type', NAMEINSOURCE '"TEMPORARY_TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_USER_DEFINED_TYPE string(5) OPTIONS (ANNOTATION '''TRUE'' if user defined table type, ''FALSE'' otherwise', NAMEINSOURCE '"IS_USER_DEFINED_TYPE"', NATIVE_TYPE 'VARCHAR'),
    PRELOAD string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses preloading, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"PRELOAD"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Temporary tables', NAMEINSOURCE '"SYS"."M_TEMPORARY_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TEMPORARY_VIEW_COLUMNS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'View name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_OID long OPTIONS (ANNOTATION 'Object ID of the view', NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) OPTIONS (ANNOTATION 'View column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the view column', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'SQL data type ID of the column', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'SQL data type name of the column', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "OFFSET" short OPTIONS (ANNOTATION 'Offset of the column in a record', NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LENGTH integer OPTIONS (ANNOTATION '# of chars for char types; # of max digits for numeric types; # of chars for datetime types; # of bytes for LOB types', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Numeric types: the maximum number of digits to the right of the decimal point; time, timestamp: the decimal digits are defined as the number of digits to the right of the decimal point in the second''s component of the data', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the column is allowed to accept null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (ANNOTATION 'Default value', NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    COLLATION string(5000) OPTIONS (ANNOTATION 'Collation', NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Description for this column', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(5000) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    MIN_VALUE string(5000) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    CS_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'Column store data type ID', NAMEINSOURCE '"CS_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Column store data type name', NAMEINSOURCE '"CS_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DDIC_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'DDIC data type ID', NAMEINSOURCE '"DDIC_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DDIC_DATA_TYPE_NAME string(7) OPTIONS (ANNOTATION 'DDIC data type name', NAMEINSOURCE '"DDIC_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMPRESSION_TYPE string(9) NOT NULL OPTIONS (ANNOTATION 'Type of compression: ''DEFAULT''/''PREFIXED''/''SPARSE''/''CLUSTERED''/''INDIRECT''/''RLE''', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(4) NOT NULL OPTIONS (ANNOTATION 'Type of index: ''NONE''/''FULL''', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_ID long OPTIONS (ANNOTATION 'ID of the column', NAMEINSOURCE '"COLUMN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRELOAD string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column is preloaded: ''TRUE''/''FALSE''', NAMEINSOURCE '"PRELOAD"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Columns of temporary tables', NAMEINSOURCE '"SYS"."M_TEMPORARY_VIEW_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TEMPORARY_VIEWS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) OPTIONS (ANNOTATION 'View name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_OID long OPTIONS (ANNOTATION 'Object ID of the view', NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_UNICODE string(5) OPTIONS (ANNOTATION 'Specifies whether the query string contains Unicode: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNICODE"', NATIVE_TYPE 'VARCHAR'),
    IS_READ_ONLY string(5) OPTIONS (ANNOTATION 'Specifies whether this view is a read-only or an updatable view: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_READ_ONLY"', NATIVE_TYPE 'VARCHAR'),
    HAS_CHECK_OPTION string(5) OPTIONS (ANNOTATION 'Specifies whether this view has an updatable view condition: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_CHECK_OPTION"', NATIVE_TYPE 'VARCHAR'),
    HAS_COLUMN_ALIASE string(5) OPTIONS (ANNOTATION 'Specifies whether the view has a columns alias : ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_COLUMN_ALIASE"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION clob OPTIONS (ANNOTATION 'Definition of the view', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NCLOB'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Description on the view', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    IS_COLUMN_VIEW string(5) OPTIONS (ANNOTATION 'Specifies whether this view is a column view or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_VIEW"', NATIVE_TYPE 'VARCHAR'),
    VIEW_TYPE string(16) OPTIONS (ANNOTATION 'Type of view : ''ROW''/''OLAP''/''JOIN''/''HIERARCHY''/''CALC''', NAMEINSOURCE '"VIEW_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED string(5) OPTIONS (ANNOTATION 'Specifies whether the view metadata can be shared across tenants: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Temporary views', NAMEINSOURCE '"SYS"."M_TEMPORARY_VIEWS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TENANTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Tenant service host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Tenant service internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TENANT_NAME string(256) OPTIONS (ANNOTATION 'Tenant name', NAMEINSOURCE '"TENANT_NAME"', NATIVE_TYPE 'VARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Creation time', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TENANT_STATUS string(16) OPTIONS (ANNOTATION 'Suspend status:  SUSPENDED, ACTIVE, PENDING', NAMEINSOURCE '"TENANT_STATUS"', NATIVE_TYPE 'VARCHAR'),
    SQL_PORT integer OPTIONS (ANNOTATION 'Tenant service SQL port', NAMEINSOURCE '"SQL_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Available tenant information', NAMEINSOURCE '"SYS"."M_TENANTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TEXT_ANALYSIS_LANGUAGES" (
    LANGUAGE_NAME string(256) OPTIONS (ANNOTATION 'Language name', NAMEINSOURCE '"LANGUAGE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LANGUAGE_CODE string(2) OPTIONS (ANNOTATION 'Language ISO 639-1 code', NAMEINSOURCE '"LANGUAGE_CODE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'List of supported languages', NAMEINSOURCE '"SYS"."M_TEXT_ANALYSIS_LANGUAGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TEXT_ANALYSIS_MIME_TYPES" (
    MIME_TYPE_NAME string(256) OPTIONS (ANNOTATION 'Name of the mime type', NAMEINSOURCE '"MIME_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    MIME_TYPE_DESCRIPTION string(256) OPTIONS (ANNOTATION 'Description of the mime type', NAMEINSOURCE '"MIME_TYPE_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'List of supported mime types', NAMEINSOURCE '"SYS"."M_TEXT_ANALYSIS_MIME_TYPES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TOPOLOGY_TREE" (
    PATH string(512) OPTIONS (ANNOTATION 'Path to Key', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    NAME string(256) OPTIONS (ANNOTATION 'Key name', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Key value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR'),
    LEAF string(5) OPTIONS (ANNOTATION 'Leaf flag: ''TRUE''/''FALSE''', NAMEINSOURCE '"LEAF"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'SAP HANA nameserver topology content', NAMEINSOURCE '"SYS"."M_TOPOLOGY_TREE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TRACE_CONFIGURATION" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    TRACE_DIRECTORY string(512) OPTIONS (ANNOTATION 'Default Trace level', NAMEINSOURCE '"TRACE_DIRECTORY"', NATIVE_TYPE 'VARCHAR'),
    FORMATTER string(16) OPTIONS (ANNOTATION 'Trace formatter name', NAMEINSOURCE '"FORMATTER"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME_PREFIX string(512) OPTIONS (ANNOTATION 'Trace file name prefix', NAMEINSOURCE '"FILE_NAME_PREFIX"', NATIVE_TYPE 'VARCHAR'),
    ALERT_FORMATTER string(16) OPTIONS (ANNOTATION 'Alert trace formatter name', NAMEINSOURCE '"ALERT_FORMATTER"', NATIVE_TYPE 'VARCHAR'),
    ALERT_FILE_NAME_PREFIX string(512) OPTIONS (ANNOTATION 'Alert trace file name prefix', NAMEINSOURCE '"ALERT_FILE_NAME_PREFIX"', NATIVE_TYPE 'VARCHAR'),
    TRACE_FLUSH_INTERVAL integer OPTIONS (ANNOTATION 'Trace flush interval', NAMEINSOURCE '"TRACE_FLUSH_INTERVAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_TRACE_LEVEL string(16) OPTIONS (ANNOTATION 'Trace level for alert traces', NAMEINSOURCE '"ALERT_TRACE_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_TRACE_LEVEL string(16) OPTIONS (ANNOTATION 'Default Trace level', NAMEINSOURCE '"DEFAULT_TRACE_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    TRACE_BUFFER_SIZE integer OPTIONS (ANNOTATION 'Trace buffer size', NAMEINSOURCE '"TRACE_BUFFER_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TRACE_FILE_SIZE long OPTIONS (ANNOTATION 'Max trace file size', NAMEINSOURCE '"MAX_TRACE_FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRACE_FILE_ID integer OPTIONS (ANNOTATION 'Max trace file id', NAMEINSOURCE '"MAX_TRACE_FILE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TRACE_FILES integer OPTIONS (ANNOTATION 'Max trace files to keep', NAMEINSOURCE '"MAX_TRACE_FILES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_TRACE_BUFFER_SIZE integer OPTIONS (ANNOTATION 'Alert trace buffer size', NAMEINSOURCE '"ALERT_TRACE_BUFFER_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_ALERT_TRACE_FILE_SIZE long OPTIONS (ANNOTATION 'Max alert trace file size', NAMEINSOURCE '"MAX_ALERT_TRACE_FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRACE_COMPRESSION_INTERVAL integer OPTIONS (ANNOTATION 'Interval to check for trace files that need to be compressed', NAMEINSOURCE '"TRACE_COMPRESSION_INTERVAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Trace configuration statistics', NAMEINSOURCE '"SYS"."M_TRACE_CONFIGURATION"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TRACE_CONFIGURATION_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATISTICS_NAME string(128) OPTIONS (ANNOTATION 'Statistics object name', NAMEINSOURCE '"STATISTICS_NAME"', NATIVE_TYPE 'VARCHAR'),
    TRACE_DIRECTORY string(512) OPTIONS (ANNOTATION 'Default Trace level', NAMEINSOURCE '"TRACE_DIRECTORY"', NATIVE_TYPE 'VARCHAR'),
    FORMATTER string(16) OPTIONS (ANNOTATION 'Trace formatter name', NAMEINSOURCE '"FORMATTER"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME_PREFIX string(512) OPTIONS (ANNOTATION 'Trace file name prefix', NAMEINSOURCE '"FILE_NAME_PREFIX"', NATIVE_TYPE 'VARCHAR'),
    ALERT_FORMATTER string(16) OPTIONS (ANNOTATION 'Alert trace formatter name', NAMEINSOURCE '"ALERT_FORMATTER"', NATIVE_TYPE 'VARCHAR'),
    ALERT_FILE_NAME_PREFIX string(512) OPTIONS (ANNOTATION 'Alert trace file name prefix', NAMEINSOURCE '"ALERT_FILE_NAME_PREFIX"', NATIVE_TYPE 'VARCHAR'),
    TRACE_FLUSH_INTERVAL integer OPTIONS (ANNOTATION 'Trace flush interval', NAMEINSOURCE '"TRACE_FLUSH_INTERVAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_TRACE_LEVEL string(16) OPTIONS (ANNOTATION 'Trace level for alert traces', NAMEINSOURCE '"ALERT_TRACE_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_TRACE_LEVEL string(16) OPTIONS (ANNOTATION 'Default Trace level', NAMEINSOURCE '"DEFAULT_TRACE_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    TRACE_BUFFER_SIZE integer OPTIONS (ANNOTATION 'Trace buffer size', NAMEINSOURCE '"TRACE_BUFFER_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TRACE_FILE_SIZE long OPTIONS (ANNOTATION 'Max trace file size', NAMEINSOURCE '"MAX_TRACE_FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRACE_FILE_ID integer OPTIONS (ANNOTATION 'Max trace file id', NAMEINSOURCE '"MAX_TRACE_FILE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_TRACE_FILES integer OPTIONS (ANNOTATION 'Max trace files to keep', NAMEINSOURCE '"MAX_TRACE_FILES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALERT_TRACE_BUFFER_SIZE integer OPTIONS (ANNOTATION 'Alert trace buffer size', NAMEINSOURCE '"ALERT_TRACE_BUFFER_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAX_ALERT_TRACE_FILE_SIZE long OPTIONS (ANNOTATION 'Max alert trace file size', NAMEINSOURCE '"MAX_ALERT_TRACE_FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRACE_COMPRESSION_INTERVAL integer OPTIONS (ANNOTATION 'Interval to check for trace files that need to be compressed', NAMEINSOURCE '"TRACE_COMPRESSION_INTERVAL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Trace configuration statistics', NAMEINSOURCE '"SYS"."M_TRACE_CONFIGURATION_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TRACEFILE_CONTENTS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME string(256) OPTIONS (ANNOTATION 'File name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "OFFSET" long OPTIONS (ANNOTATION 'File offset', NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTENT string(1000) OPTIONS (ANNOTATION 'File content at offset', NAMEINSOURCE '"CONTENT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'SAP HANA information from trace files', NAMEINSOURCE '"SYS"."M_TRACEFILE_CONTENTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TRACEFILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME string(256) OPTIONS (ANNOTATION 'File name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    FILE_SIZE long OPTIONS (ANNOTATION 'File size', NAMEINSOURCE '"FILE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILE_MTIME timestamp OPTIONS (ANNOTATION 'File date', NAMEINSOURCE '"FILE_MTIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'All trace files', NAMEINSOURCE '"SYS"."M_TRACEFILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_TRANSACTIONS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONNECTION_ID integer OPTIONS (ANNOTATION 'Connection ID', NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID (This number is reused after a transaction is closed)', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Volume ID where the transaction has started', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PRIMARY_TRANSACTION_ID integer OPTIONS (ANNOTATION 'Primary transaction object ID for the external transaction', NAMEINSOURCE '"PRIMARY_TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSACTION_SEQUENCE integer OPTIONS (ANNOTATION 'Transaction sequence number in a transaction', NAMEINSOURCE '"TRANSACTION_SEQUENCE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATE_TRANSACTION_ID long OPTIONS (ANNOTATION 'Write transaction ID (This number is ever increasing)', NAMEINSOURCE '"UPDATE_TRANSACTION_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRANSACTION_STATUS string(128) NOT NULL OPTIONS (ANNOTATION 'Transaction status; INACTIVE, ACTIVE, PRECOMMITTED, ABORTING, PARTIAL_ABORTING, ACTIVE_PREPARE_COMMIT', NAMEINSOURCE '"TRANSACTION_STATUS"', NATIVE_TYPE 'VARCHAR'),
    TRANSACTION_TYPE string(128) NOT NULL OPTIONS (ANNOTATION 'Transaction type; USER, VERSION GARBAGE COLLECTION, DDL VERSION GARBAGE COLLECTION, INTERNAL, EXTERNAL', NAMEINSOURCE '"TRANSACTION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    START_TIME timestamp OPTIONS (ANNOTATION 'Start time', NAMEINSOURCE '"START_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_TIME timestamp OPTIONS (ANNOTATION 'End time', NAMEINSOURCE '"END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    START_MVCC_TIMESTAMP long OPTIONS (ANNOTATION 'Internal MVCC timestamp of the transaction start time', NAMEINSOURCE '"START_MVCC_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    END_MVCC_TIMESTAMP long OPTIONS (ANNOTATION 'Internal MVCC timestamp of the transaction end time', NAMEINSOURCE '"END_MVCC_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXECUTED_STATEMENT_COUNT integer OPTIONS (ANNOTATION 'Number of executed statements in the transaction', NAMEINSOURCE '"EXECUTED_STATEMENT_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CREATED_VERSION_COUNT integer OPTIONS (ANNOTATION 'Number of created versions in the transaction', NAMEINSOURCE '"CREATED_VERSION_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOCATED_VERSION_SIZE long OPTIONS (ANNOTATION 'Allocated version size in the transaction', NAMEINSOURCE '"ALLOCATED_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_LOCK_COUNT integer OPTIONS (ANNOTATION 'Number of acquired locks in the transaction', NAMEINSOURCE '"ACQUIRED_LOCK_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_WAIT_COUNT integer OPTIONS (ANNOTATION 'Number of lock waits in the transaction', NAMEINSOURCE '"LOCK_WAIT_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOCK_WAIT_TIME double OPTIONS (ANNOTATION 'Accumulated lock wait time in the transaction', NAMEINSOURCE '"LOCK_WAIT_TIME"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    LOCK_WAIT_TIMEOUT integer OPTIONS (ANNOTATION 'Number of milliseconds a statement waits for a lock to be released', NAMEINSOURCE '"LOCK_WAIT_TIMEOUT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOG_SIZE long OPTIONS (ANNOTATION 'Generated log amount in the transaction', NAMEINSOURCE '"LOG_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CURRENT_STATEMENT_ID string(256) OPTIONS (ANNOTATION 'Current statement ID', NAMEINSOURCE '"CURRENT_STATEMENT_ID"', NATIVE_TYPE 'VARCHAR'),
    CURRENT_STATEMENT_SEQUENCE integer OPTIONS (ANNOTATION 'Sequence number of the currently executed statement', NAMEINSOURCE '"CURRENT_STATEMENT_SEQUENCE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOCATED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Memory size occupied by the transaction', NAMEINSOURCE '"ALLOCATED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACQUIRED_METALOCK_INDEX integer OPTIONS (ANNOTATION 'Index of acquired metalock', NAMEINSOURCE '"ACQUIRED_METALOCK_INDEX"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOG_PARTITION_ID short OPTIONS (ANNOTATION 'Log partition ID of the transaction', NAMEINSOURCE '"LOG_PARTITION_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    REDO_LOG_AMOUNT long NOT NULL OPTIONS (ANNOTATION 'Size of redo log amount generated by the transaction', NAMEINSOURCE '"REDO_LOG_AMOUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNDO_LOG_AMOUNT long NOT NULL OPTIONS (ANNOTATION 'Size of undo log amount generated by the transaction', NAMEINSOURCE '"UNDO_LOG_AMOUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_MVCC_SNAPSHOT_TIMESTAMP long OPTIONS (ANNOTATION 'Logical timestamp of the first executed statement in the transaction', NAMEINSOURCE '"MIN_MVCC_SNAPSHOT_TIMESTAMP"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_COMMIT_ID long OPTIONS (ANNOTATION 'Last commit ID of the transaction', NAMEINSOURCE '"LAST_COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_STATEMENT_COUNT integer OPTIONS (ANNOTATION 'Number of opened cursors in the transaction', NAMEINSOURCE '"ACTIVE_STATEMENT_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ISOLATION_LEVEL string(128) OPTIONS (ANNOTATION 'Isolation level of each transaction: READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE', NAMEINSOURCE '"ISOLATION_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    LOG_FLUSH_ENABLED string(5) OPTIONS (ANNOTATION 'TRUE if logging is enabled for the transaction, FALSE otherwise', NAMEINSOURCE '"LOG_FLUSH_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    LOGGING_ENABLED string(5) OPTIONS (ANNOTATION 'TRUE if logging is enabled for the transaction, FALSE otherwise', NAMEINSOURCE '"LOGGING_ENABLED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'All transactions created by users or database', NAMEINSOURCE '"SYS"."M_TRANSACTIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_UNDO_CLEANUP_FILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPE string(16) OPTIONS (ANNOTATION 'File type (UNDO, CLEANUP, FREE)', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    TID long OPTIONS (ANNOTATION 'Transaction ID', NAMEINSOURCE '"TID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PAGE_COUNT long OPTIONS (ANNOTATION 'Page count', NAMEINSOURCE '"PAGE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RAW_SIZE long OPTIONS (ANNOTATION 'Raw size', NAMEINSOURCE '"RAW_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLEANUP_MARK long OPTIONS (ANNOTATION 'Cleanup position mark', NAMEINSOURCE '"CLEANUP_MARK"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NESTED_SESSION_ID integer OPTIONS (ANNOTATION 'Nested session ID', NAMEINSOURCE '"NESTED_SESSION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NESTED_SESSION_PARENT_ID integer OPTIONS (ANNOTATION 'Nested session parent ID', NAMEINSOURCE '"NESTED_SESSION_PARENT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEPENDENT_INDEX integer OPTIONS (ANNOTATION 'Dependent index during redo', NAMEINSOURCE '"DEPENDENT_INDEX"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INDOUBT_FLAG string(5) OPTIONS (ANNOTATION 'Indoubt flag for distributed transaction: ''TRUE''/''FALSE''', NAMEINSOURCE '"INDOUBT_FLAG"', NATIVE_TYPE 'VARCHAR'),
    TENTATIVE_PRECOMMIT_POSITION long OPTIONS (ANNOTATION 'Tentative precommit position', NAMEINSOURCE '"TENTATIVE_PRECOMMIT_POSITION"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Information about undo files and cleanup files', NAMEINSOURCE '"SYS"."M_UNDO_CLEANUP_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VERSION_MEMORY" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ALLOCATED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Size of memory allocated for row-store version space', NAMEINSOURCE '"ALLOCATED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USED_MEMORY_SIZE long OPTIONS (ANNOTATION 'Size of memory actually used by row-store versions', NAMEINSOURCE '"USED_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RECLAIMED_VERSION_SIZE long OPTIONS (ANNOTATION 'Size of memory reclaimed by row-store version garbage collection', NAMEINSOURCE '"RECLAIMED_VERSION_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FREE_MEMORY_SIZE long OPTIONS (ANNOTATION 'Size of memory freed and reusable in row-store version space', NAMEINSOURCE '"FREE_MEMORY_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Memory usage of row-store Multiversion Concurrency Control (MVCC) manager', NAMEINSOURCE '"SYS"."M_VERSION_MEMORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_FILES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FILE_TYPE string(16) OPTIONS (ANNOTATION 'Type of file (DATA, LOG, TRACER, ...)', NAMEINSOURCE '"FILE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    FILE_NAME string(256) OPTIONS (ANNOTATION 'File name', NAMEINSOURCE '"FILE_NAME"', NATIVE_TYPE 'VARCHAR'),
    USED_SIZE long OPTIONS (ANNOTATION 'Size of used data within file', NAMEINSOURCE '"USED_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SIZE long OPTIONS (ANNOTATION 'Total file size', NAMEINSOURCE '"TOTAL_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Information about volume files', NAMEINSOURCE '"SYS"."M_VOLUME_FILES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_IO_DETAILED_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER_SIZE long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    APPEND_COUNT long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of active appends', NAMEINSOURCE '"ACTIVE_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (min)', NAMEINSOURCE '"MIN_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (avg)', NAMEINSOURCE '"AVG_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (max)', NAMEINSOURCE '"MAX_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (min)', NAMEINSOURCE '"MIN_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (avg)', NAMEINSOURCE '"AVG_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (max)', NAMEINSOURCE '"MAX_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COUNT long OPTIONS (ANNOTATION 'Count of writes', NAMEINSOURCE '"WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of active writes', NAMEINSOURCE '"ACTIVE_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (min)', NAMEINSOURCE '"MIN_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (avg)', NAMEINSOURCE '"AVG_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (max)', NAMEINSOURCE '"MAX_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (min)', NAMEINSOURCE '"MIN_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (avg)', NAMEINSOURCE '"AVG_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (max)', NAMEINSOURCE '"MAX_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of trigger asynchronous writes', NAMEINSOURCE '"TRIGGER_ASYNC_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_TRIGGER_ASYNC_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of active trigger asynchronous writes', NAMEINSOURCE '"ACTIVE_TRIGGER_ASYNC_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COUNT long OPTIONS (ANNOTATION 'Count of reads', NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_READ_COUNT long OPTIONS (ANNOTATION 'Count of active reads', NAMEINSOURCE '"ACTIVE_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (min)', NAMEINSOURCE '"MIN_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (avg)', NAMEINSOURCE '"AVG_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (max)', NAMEINSOURCE '"MAX_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (min)', NAMEINSOURCE '"MIN_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (avg)', NAMEINSOURCE '"AVG_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (max)', NAMEINSOURCE '"MAX_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_READ_COUNT long OPTIONS (ANNOTATION 'Count of trigger asynchronous reads', NAMEINSOURCE '"TRIGGER_ASYNC_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_TRIGGER_ASYNC_READ_COUNT long OPTIONS (ANNOTATION 'Count of active trigger asynchronous reads', NAMEINSOURCE '"ACTIVE_TRIGGER_ASYNC_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'File access detailed statistics', NAMEINSOURCE '"SYS"."M_VOLUME_IO_DETAILED_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_IO_DETAILED_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER_SIZE long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    APPEND_COUNT long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of active appends', NAMEINSOURCE '"ACTIVE_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (min)', NAMEINSOURCE '"MIN_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (avg)', NAMEINSOURCE '"AVG_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_APPEND_SIZE long OPTIONS (ANNOTATION 'Size of appended data (max)', NAMEINSOURCE '"MAX_APPEND_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (min)', NAMEINSOURCE '"MIN_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (avg)', NAMEINSOURCE '"AVG_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_APPEND_TIME long OPTIONS (ANNOTATION 'Time for appends (max)', NAMEINSOURCE '"MAX_APPEND_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COUNT long OPTIONS (ANNOTATION 'Count of writes', NAMEINSOURCE '"WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of active writes', NAMEINSOURCE '"ACTIVE_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (min)', NAMEINSOURCE '"MIN_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (avg)', NAMEINSOURCE '"AVG_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (max)', NAMEINSOURCE '"MAX_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (min)', NAMEINSOURCE '"MIN_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (avg)', NAMEINSOURCE '"AVG_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_TIME long OPTIONS (ANNOTATION 'Time for writes (max)', NAMEINSOURCE '"MAX_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of trigger asynchronous writes', NAMEINSOURCE '"TRIGGER_ASYNC_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_TRIGGER_ASYNC_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of active trigger asynchronous writes', NAMEINSOURCE '"ACTIVE_TRIGGER_ASYNC_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous write data (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_WRITE_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous writes (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COUNT long OPTIONS (ANNOTATION 'Count of reads', NAMEINSOURCE '"READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_READ_COUNT long OPTIONS (ANNOTATION 'Count of active reads', NAMEINSOURCE '"ACTIVE_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (min)', NAMEINSOURCE '"MIN_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (avg)', NAMEINSOURCE '"AVG_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (max)', NAMEINSOURCE '"MAX_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (min)', NAMEINSOURCE '"MIN_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (avg)', NAMEINSOURCE '"AVG_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_TIME long OPTIONS (ANNOTATION 'Time for reads (max)', NAMEINSOURCE '"MAX_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_READ_COUNT long OPTIONS (ANNOTATION 'Count of trigger asynchronous reads', NAMEINSOURCE '"TRIGGER_ASYNC_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIVE_TRIGGER_ASYNC_READ_COUNT long OPTIONS (ANNOTATION 'Count of active trigger asynchronous reads', NAMEINSOURCE '"ACTIVE_TRIGGER_ASYNC_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_READ_SIZE long OPTIONS (ANNOTATION 'Size of trigger asynchronous read data (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (min)', NAMEINSOURCE '"MIN_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (avg)', NAMEINSOURCE '"AVG_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_TRIGGER_ASYNC_READ_TIME long OPTIONS (ANNOTATION 'Time for trigger asynchronous reads (max)', NAMEINSOURCE '"MAX_TRIGGER_ASYNC_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'File access detailed statistics', NAMEINSOURCE '"SYS"."M_VOLUME_IO_DETAILED_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_IO_PERFORMANCE_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_SYNC long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"READ_SYNC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_SYNC long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"WRITE_SYNC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_REQUESTS long OPTIONS (ANNOTATION 'Count of read requests', NAMEINSOURCE '"READ_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of write requests', NAMEINSOURCE '"WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COMPLETIONS long OPTIONS (ANNOTATION 'Count of read completions', NAMEINSOURCE '"READ_COMPLETIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COMPLETIONS long OPTIONS (ANNOTATION 'Count of write completions', NAMEINSOURCE '"WRITE_COMPLETIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_READS long OPTIONS (ANNOTATION 'Count of short reads', NAMEINSOURCE '"SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_WRITES long OPTIONS (ANNOTATION 'Count of short writes', NAMEINSOURCE '"SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELAYED_READ_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of delayed read requests', NAMEINSOURCE '"DELAYED_READ_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELAYED_WRITE_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of delayed write requests', NAMEINSOURCE '"DELAYED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEQUEUED_DELAYED_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of dequeued delayed requests', NAMEINSOURCE '"DEQUEUED_DELAYED_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESUBMITTED_DELAYED_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of resubmitted delayed requests', NAMEINSOURCE '"RESUBMITTED_DELAYED_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESUBMITTED_DELAYED_REQUESTS_DELAYED_AGAIN long NOT NULL OPTIONS (ANNOTATION 'Count of resubmitted delayed requests delayed', NAMEINSOURCE '"RESUBMITTED_DELAYED_REQUESTS_DELAYED_AGAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITEMS_IN_DELAY_QUEUE long NOT NULL OPTIONS (ANNOTATION 'Count of items in delay queue', NAMEINSOURCE '"ITEMS_IN_DELAY_QUEUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ITEMS_IN_DELAY_QUEUE long NOT NULL OPTIONS (ANNOTATION 'Maximum size of delay queue', NAMEINSOURCE '"MAX_ITEMS_IN_DELAY_QUEUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (last)', NAMEINSOURCE '"LAST_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (max)', NAMEINSOURCE '"MAX_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (min)', NAMEINSOURCE '"MIN_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (total)', NAMEINSOURCE '"SUM_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (avg)', NAMEINSOURCE '"AVG_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (last)', NAMEINSOURCE '"LAST_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (max)', NAMEINSOURCE '"MAX_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (min)', NAMEINSOURCE '"MIN_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (total)', NAMEINSOURCE '"SUM_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (avg)', NAMEINSOURCE '"AVG_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (last)', NAMEINSOURCE '"LAST_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (max)', NAMEINSOURCE '"MAX_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (min)', NAMEINSOURCE '"MIN_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (total)', NAMEINSOURCE '"SUM_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (avg)', NAMEINSOURCE '"AVG_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (last)', NAMEINSOURCE '"LAST_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (max)', NAMEINSOURCE '"MAX_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (min)', NAMEINSOURCE '"MIN_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (total)', NAMEINSOURCE '"SUM_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (avg)', NAMEINSOURCE '"AVG_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (last)', NAMEINSOURCE '"LAST_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (max)', NAMEINSOURCE '"MAX_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (min)', NAMEINSOURCE '"MIN_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (total)', NAMEINSOURCE '"SUM_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (avg)', NAMEINSOURCE '"AVG_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (last)', NAMEINSOURCE '"LAST_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (max)', NAMEINSOURCE '"MAX_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (min)', NAMEINSOURCE '"MIN_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (total)', NAMEINSOURCE '"SUM_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (avg)', NAMEINSOURCE '"AVG_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (last)', NAMEINSOURCE '"LAST_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (max)', NAMEINSOURCE '"MAX_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (min)', NAMEINSOURCE '"MIN_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (total)', NAMEINSOURCE '"SUM_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (avg)', NAMEINSOURCE '"AVG_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (last)', NAMEINSOURCE '"LAST_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (max)', NAMEINSOURCE '"MAX_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (min)', NAMEINSOURCE '"MIN_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (total)', NAMEINSOURCE '"SUM_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (avg)', NAMEINSOURCE '"AVG_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (last)', NAMEINSOURCE '"LAST_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (max)', NAMEINSOURCE '"MAX_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (min)', NAMEINSOURCE '"MIN_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (total)', NAMEINSOURCE '"SUM_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (avg)', NAMEINSOURCE '"AVG_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (last)', NAMEINSOURCE '"LAST_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (max)', NAMEINSOURCE '"MAX_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (min)', NAMEINSOURCE '"MIN_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (total)', NAMEINSOURCE '"SUM_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (avg)', NAMEINSOURCE '"AVG_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Deprecated. Please use M_VOLUME_IO_TOTAL_STATISTICS instead', NAMEINSOURCE '"SYS"."M_VOLUME_IO_PERFORMANCE_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_IO_PERFORMANCE_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_SYNC long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"READ_SYNC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_SYNC long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"WRITE_SYNC"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_REQUESTS long OPTIONS (ANNOTATION 'Count of read requests', NAMEINSOURCE '"READ_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of write requests', NAMEINSOURCE '"WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    READ_COMPLETIONS long OPTIONS (ANNOTATION 'Count of read completions', NAMEINSOURCE '"READ_COMPLETIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    WRITE_COMPLETIONS long OPTIONS (ANNOTATION 'Count of write completions', NAMEINSOURCE '"WRITE_COMPLETIONS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_READS long OPTIONS (ANNOTATION 'Count of short reads', NAMEINSOURCE '"SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_WRITES long OPTIONS (ANNOTATION 'Count of short writes', NAMEINSOURCE '"SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELAYED_READ_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of delayed read requests', NAMEINSOURCE '"DELAYED_READ_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DELAYED_WRITE_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of delayed write requests', NAMEINSOURCE '"DELAYED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEQUEUED_DELAYED_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of dequeued delayed requests', NAMEINSOURCE '"DEQUEUED_DELAYED_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESUBMITTED_DELAYED_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of resubmitted delayed requests', NAMEINSOURCE '"RESUBMITTED_DELAYED_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESUBMITTED_DELAYED_REQUESTS_DELAYED_AGAIN long NOT NULL OPTIONS (ANNOTATION 'Count of resubmitted delayed requests delayed', NAMEINSOURCE '"RESUBMITTED_DELAYED_REQUESTS_DELAYED_AGAIN"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ITEMS_IN_DELAY_QUEUE long NOT NULL OPTIONS (ANNOTATION 'Count of items in delay queue', NAMEINSOURCE '"ITEMS_IN_DELAY_QUEUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_ITEMS_IN_DELAY_QUEUE long NOT NULL OPTIONS (ANNOTATION 'Maximum size of delay queue', NAMEINSOURCE '"MAX_ITEMS_IN_DELAY_QUEUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (last)', NAMEINSOURCE '"LAST_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (max)', NAMEINSOURCE '"MAX_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (min)', NAMEINSOURCE '"MIN_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (total)', NAMEINSOURCE '"SUM_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous reads (avg)', NAMEINSOURCE '"AVG_READ_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (last)', NAMEINSOURCE '"LAST_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (max)', NAMEINSOURCE '"MAX_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (min)', NAMEINSOURCE '"MIN_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (total)', NAMEINSOURCE '"SUM_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SYNC_TIME long OPTIONS (ANNOTATION 'Time for synchronous writes (avg)', NAMEINSOURCE '"AVG_WRITE_SYNC_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (last)', NAMEINSOURCE '"LAST_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (max)', NAMEINSOURCE '"MAX_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (min)', NAMEINSOURCE '"MIN_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (total)', NAMEINSOURCE '"SUM_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_TIME long OPTIONS (ANNOTATION 'Time for read events (avg)', NAMEINSOURCE '"AVG_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (last)', NAMEINSOURCE '"LAST_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (max)', NAMEINSOURCE '"MAX_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (min)', NAMEINSOURCE '"MIN_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (total)', NAMEINSOURCE '"SUM_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_TIME long OPTIONS (ANNOTATION 'Time for write events (avg)', NAMEINSOURCE '"AVG_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (last)', NAMEINSOURCE '"LAST_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (max)', NAMEINSOURCE '"MAX_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (min)', NAMEINSOURCE '"MIN_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (total)', NAMEINSOURCE '"SUM_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing read I/O events (avg)', NAMEINSOURCE '"AVG_READ_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (last)', NAMEINSOURCE '"LAST_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (max)', NAMEINSOURCE '"MAX_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (min)', NAMEINSOURCE '"MIN_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (total)', NAMEINSOURCE '"SUM_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_ENQUEUE_TIME long NOT NULL OPTIONS (ANNOTATION 'Time for enqueuing write I/O events (avg)', NAMEINSOURCE '"AVG_WRITE_ENQUEUE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (last)', NAMEINSOURCE '"LAST_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (max)', NAMEINSOURCE '"MAX_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (min)', NAMEINSOURCE '"MIN_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (total)', NAMEINSOURCE '"SUM_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data (avg)', NAMEINSOURCE '"AVG_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (last)', NAMEINSOURCE '"LAST_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (max)', NAMEINSOURCE '"MAX_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (min)', NAMEINSOURCE '"MIN_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (total)', NAMEINSOURCE '"SUM_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data (avg)', NAMEINSOURCE '"AVG_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (last)', NAMEINSOURCE '"LAST_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (max)', NAMEINSOURCE '"MAX_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (min)', NAMEINSOURCE '"MIN_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (total)', NAMEINSOURCE '"SUM_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_READ_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously read data (avg)', NAMEINSOURCE '"AVG_READ_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LAST_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (last)', NAMEINSOURCE '"LAST_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (max)', NAMEINSOURCE '"MAX_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (min)', NAMEINSOURCE '"MIN_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUM_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (total)', NAMEINSOURCE '"SUM_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_WRITE_SYNC_SIZE long OPTIONS (ANNOTATION 'Size of synchronously written data (avg)', NAMEINSOURCE '"AVG_WRITE_SYNC_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Deprecated. Please use M_VOLUME_IO_TOTAL_STATISTICS instead', NAMEINSOURCE '"SYS"."M_VOLUME_IO_PERFORMANCE_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_IO_RETRY_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER_SIZE long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of all appends', NAMEINSOURCE '"TOTAL_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of failed appends', NAMEINSOURCE '"FAILED_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of all writes', NAMEINSOURCE '"TOTAL_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"FAILED_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of short writes', NAMEINSOURCE '"SHORT_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_SHORT_WRITES_COUNT long OPTIONS (ANNOTATION 'Count of requests with short writes', NAMEINSOURCE '"REQUESTS_WITH_SHORT_WRITES_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHORT_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short writes per request with short writes (avg)', NAMEINSOURCE '"AVG_SHORT_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHORT_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short writes per request (max)', NAMEINSOURCE '"MAX_SHORT_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"FULL_RETRY_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_FULL_RETRY_WRITES_COUNT long OPTIONS (ANNOTATION 'Count of requests with full retry writes', NAMEINSOURCE '"REQUESTS_WITH_FULL_RETRY_WRITES_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FULL_RETRY_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes per request with full retry writes (avg)', NAMEINSOURCE '"AVG_FULL_RETRY_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_FULL_RETRY_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes per request (max)', NAMEINSOURCE '"MAX_FULL_RETRY_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_COUNT long OPTIONS (ANNOTATION 'Count of all reads', NAMEINSOURCE '"TOTAL_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_READ_COUNT long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"FAILED_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_READ_COUNT long OPTIONS (ANNOTATION 'Count of short reads', NAMEINSOURCE '"SHORT_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_SHORT_READS_COUNT long OPTIONS (ANNOTATION 'Count of requests with short reads', NAMEINSOURCE '"REQUESTS_WITH_SHORT_READS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHORT_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short reads per request with short reads (avg)', NAMEINSOURCE '"AVG_SHORT_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHORT_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short reads per request (max)', NAMEINSOURCE '"MAX_SHORT_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_READ_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"FULL_RETRY_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_FULL_RETRY_READS_COUNT long OPTIONS (ANNOTATION 'Count of requests with full retry reads', NAMEINSOURCE '"REQUESTS_WITH_FULL_RETRY_READS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FULL_RETRY_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads per request with full retry reads (avg)', NAMEINSOURCE '"AVG_FULL_RETRY_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_FULL_RETRY_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads per request (max)', NAMEINSOURCE '"MAX_FULL_RETRY_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'File access retry statistics', NAMEINSOURCE '"SYS"."M_VOLUME_IO_RETRY_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_IO_RETRY_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    MAX_IO_BUFFER_SIZE long OPTIONS (ANNOTATION 'Max. I/O buffer size', NAMEINSOURCE '"MAX_IO_BUFFER_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of all appends', NAMEINSOURCE '"TOTAL_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_APPEND_COUNT long OPTIONS (ANNOTATION 'Count of failed appends', NAMEINSOURCE '"FAILED_APPEND_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of all writes', NAMEINSOURCE '"TOTAL_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"FAILED_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of short writes', NAMEINSOURCE '"SHORT_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_SHORT_WRITES_COUNT long OPTIONS (ANNOTATION 'Count of requests with short writes', NAMEINSOURCE '"REQUESTS_WITH_SHORT_WRITES_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHORT_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short writes per request with short writes (avg)', NAMEINSOURCE '"AVG_SHORT_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHORT_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short writes per request (max)', NAMEINSOURCE '"MAX_SHORT_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_WRITE_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"FULL_RETRY_WRITE_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_FULL_RETRY_WRITES_COUNT long OPTIONS (ANNOTATION 'Count of requests with full retry writes', NAMEINSOURCE '"REQUESTS_WITH_FULL_RETRY_WRITES_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FULL_RETRY_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes per request with full retry writes (avg)', NAMEINSOURCE '"AVG_FULL_RETRY_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_FULL_RETRY_WRITES_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry writes per request (max)', NAMEINSOURCE '"MAX_FULL_RETRY_WRITES_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_COUNT long OPTIONS (ANNOTATION 'Count of all reads', NAMEINSOURCE '"TOTAL_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FAILED_READ_COUNT long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"FAILED_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SHORT_READ_COUNT long OPTIONS (ANNOTATION 'Count of short reads', NAMEINSOURCE '"SHORT_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_SHORT_READS_COUNT long OPTIONS (ANNOTATION 'Count of requests with short reads', NAMEINSOURCE '"REQUESTS_WITH_SHORT_READS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_SHORT_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short reads per request with short reads (avg)', NAMEINSOURCE '"AVG_SHORT_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_SHORT_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of short reads per request (max)', NAMEINSOURCE '"MAX_SHORT_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FULL_RETRY_READ_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"FULL_RETRY_READ_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REQUESTS_WITH_FULL_RETRY_READS_COUNT long OPTIONS (ANNOTATION 'Count of requests with full retry reads', NAMEINSOURCE '"REQUESTS_WITH_FULL_RETRY_READS_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    AVG_FULL_RETRY_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads per request with full retry reads (avg)', NAMEINSOURCE '"AVG_FULL_RETRY_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_FULL_RETRY_READS_PER_REQUEST_COUNT long OPTIONS (ANNOTATION 'Count of full retry reads per request (max)', NAMEINSOURCE '"MAX_FULL_RETRY_READS_PER_REQUEST_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'File access retry statistics', NAMEINSOURCE '"SYS"."M_VOLUME_IO_RETRY_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_IO_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    OPEN_CALL_COUNT long OPTIONS (ANNOTATION 'Count of open calls', NAMEINSOURCE '"OPEN_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLOSE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of close calls', NAMEINSOURCE '"CLOSE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXISTS_CALL_COUNT long OPTIONS (ANNOTATION 'Count of exists calls', NAMEINSOURCE '"EXISTS_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOVE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of remove calls', NAMEINSOURCE '"REMOVE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of resize calls', NAMEINSOURCE '"RESIZE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SYNC_CALL_COUNT long OPTIONS (ANNOTATION 'Count of sync calls', NAMEINSOURCE '"SYNC_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETSIZE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get size calls', NAMEINSOURCE '"GETSIZE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETMODIFICATIONTIME_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get modification time calls', NAMEINSOURCE '"GETMODIFICATIONTIME_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETDEVICEID_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get DeviceID calls', NAMEINSOURCE '"GETDEVICEID_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENQUEUED_WRITE_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of enqueued write requests (deprecated)', NAMEINSOURCE '"ENQUEUED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of blocked write requests', NAMEINSOURCE '"BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Max. count of blocked write requests', NAMEINSOURCE '"MAX_BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EOF_READS long OPTIONS (ANNOTATION 'Count of EOF reads', NAMEINSOURCE '"EOF_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SYNC_READS long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"TOTAL_SYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ASYNC_READS long NOT NULL OPTIONS (ANNOTATION 'Count of asynchronous reads with waiting', NAMEINSOURCE '"TOTAL_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_READS long OPTIONS (ANNOTATION 'Count of triggered asynchronous reads', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_READ_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous reads', NAMEINSOURCE '"TRIGGER_ASYNC_READ_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_READS long OPTIONS (ANNOTATION 'Count of reads that read less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"TOTAL_FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"TOTAL_FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data', NAMEINSOURCE '"TOTAL_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_TIME long OPTIONS (ANNOTATION 'Total read time', NAMEINSOURCE '"TOTAL_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPENDS long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"TOTAL_APPENDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SYNC_WRITES long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"TOTAL_SYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ASYNC_WRITES long NOT NULL OPTIONS (ANNOTATION 'Count of asynchronous writes with waiting', NAMEINSOURCE '"TOTAL_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_WRITES long OPTIONS (ANNOTATION 'Count of triggered asynchronous writes', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_WRITE_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous writes', NAMEINSOURCE '"TRIGGER_ASYNC_WRITE_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_WRITES long OPTIONS (ANNOTATION 'Count of writes that wrote less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"TOTAL_FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"TOTAL_FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data', NAMEINSOURCE '"TOTAL_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_TIME long OPTIONS (ANNOTATION 'Total write time', NAMEINSOURCE '"TOTAL_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_IO_TIME long OPTIONS (ANNOTATION 'Total IO time', NAMEINSOURCE '"TOTAL_IO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Deprecated. Please use M_VOLUME_IO_TOTAL_STATISTICS instead', NAMEINSOURCE '"SYS"."M_VOLUME_IO_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_IO_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    OPEN_CALL_COUNT long OPTIONS (ANNOTATION 'Count of open calls', NAMEINSOURCE '"OPEN_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CLOSE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of close calls', NAMEINSOURCE '"CLOSE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXISTS_CALL_COUNT long OPTIONS (ANNOTATION 'Count of exists calls', NAMEINSOURCE '"EXISTS_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOVE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of remove calls', NAMEINSOURCE '"REMOVE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESIZE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of resize calls', NAMEINSOURCE '"RESIZE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SYNC_CALL_COUNT long OPTIONS (ANNOTATION 'Count of sync calls', NAMEINSOURCE '"SYNC_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETSIZE_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get size calls', NAMEINSOURCE '"GETSIZE_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETMODIFICATIONTIME_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get modification time calls', NAMEINSOURCE '"GETMODIFICATIONTIME_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GETDEVICEID_CALL_COUNT long OPTIONS (ANNOTATION 'Count of get DeviceID calls', NAMEINSOURCE '"GETDEVICEID_CALL_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ENQUEUED_WRITE_REQUESTS long NOT NULL OPTIONS (ANNOTATION 'Count of enqueued write requests (deprecated)', NAMEINSOURCE '"ENQUEUED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of blocked write requests', NAMEINSOURCE '"BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Max. count of blocked write requests', NAMEINSOURCE '"MAX_BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EOF_READS long OPTIONS (ANNOTATION 'Count of EOF reads', NAMEINSOURCE '"EOF_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SYNC_READS long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"TOTAL_SYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ASYNC_READS long NOT NULL OPTIONS (ANNOTATION 'Count of asynchronous reads with waiting', NAMEINSOURCE '"TOTAL_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_READS long OPTIONS (ANNOTATION 'Count of triggered asynchronous reads', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_READ_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous reads', NAMEINSOURCE '"TRIGGER_ASYNC_READ_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_READS long OPTIONS (ANNOTATION 'Count of reads that read less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"TOTAL_FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"TOTAL_FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data', NAMEINSOURCE '"TOTAL_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_TIME long OPTIONS (ANNOTATION 'Total read time', NAMEINSOURCE '"TOTAL_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPENDS long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"TOTAL_APPENDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_SYNC_WRITES long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"TOTAL_SYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_ASYNC_WRITES long NOT NULL OPTIONS (ANNOTATION 'Count of asynchronous writes with waiting', NAMEINSOURCE '"TOTAL_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_WRITES long OPTIONS (ANNOTATION 'Count of triggered asynchronous writes', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_ASYNC_WRITE_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous writes', NAMEINSOURCE '"TRIGGER_ASYNC_WRITE_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_WRITES long OPTIONS (ANNOTATION 'Count of writes that wrote less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"TOTAL_FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"TOTAL_FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data', NAMEINSOURCE '"TOTAL_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_TIME long OPTIONS (ANNOTATION 'Total write time', NAMEINSOURCE '"TOTAL_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_IO_TIME long OPTIONS (ANNOTATION 'Total IO time', NAMEINSOURCE '"TOTAL_IO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Deprecated. Please use M_VOLUME_IO_TOTAL_STATISTICS instead', NAMEINSOURCE '"SYS"."M_VOLUME_IO_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_IO_TOTAL_STATISTICS" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of blocked write requests', NAMEINSOURCE '"BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Max. count of blocked write requests', NAMEINSOURCE '"MAX_BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READS long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"TOTAL_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_READS long OPTIONS (ANNOTATION 'Count of triggered asynchronous reads', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_READ_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous reads', NAMEINSOURCE '"TRIGGER_READ_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_READS long OPTIONS (ANNOTATION 'Count of reads that read less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"TOTAL_FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"TOTAL_FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data', NAMEINSOURCE '"TOTAL_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_TIME long OPTIONS (ANNOTATION 'Total read time', NAMEINSOURCE '"TOTAL_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPENDS long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"TOTAL_APPENDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITES long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"TOTAL_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_WRITES long OPTIONS (ANNOTATION 'Count of triggered asynchronous writes', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_WRITE_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous writes', NAMEINSOURCE '"TRIGGER_WRITE_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_WRITES long OPTIONS (ANNOTATION 'Count of writes that wrote less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"TOTAL_FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"TOTAL_FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data', NAMEINSOURCE '"TOTAL_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_TIME long OPTIONS (ANNOTATION 'Total write time', NAMEINSOURCE '"TOTAL_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_IO_TIME long OPTIONS (ANNOTATION 'Total IO time', NAMEINSOURCE '"TOTAL_IO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'File access total statistics', NAMEINSOURCE '"SYS"."M_VOLUME_IO_TOTAL_STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_IO_TOTAL_STATISTICS_RESET" (
    RESET_TIME timestamp OPTIONS (ANNOTATION 'Last reset timestamp', NAMEINSOURCE '"RESET_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Persistence Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PATH string(512) OPTIONS (ANNOTATION 'Filesystem path', NAMEINSOURCE '"PATH"', NATIVE_TYPE 'VARCHAR'),
    FILESYSTEM_TYPE string(16) OPTIONS (ANNOTATION 'Filesystem type', NAMEINSOURCE '"FILESYSTEM_TYPE"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(16) OPTIONS (ANNOTATION 'Type of contained files', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONFIGURATION string(128) OPTIONS (ANNOTATION 'Configuration parameters', NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'VARCHAR'),
    BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Count of blocked write requests', NAMEINSOURCE '"BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_BLOCKED_WRITE_REQUESTS long OPTIONS (ANNOTATION 'Max. count of blocked write requests', NAMEINSOURCE '"MAX_BLOCKED_WRITE_REQUESTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READS long OPTIONS (ANNOTATION 'Count of synchronous reads', NAMEINSOURCE '"TOTAL_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_READS long OPTIONS (ANNOTATION 'Count of triggered asynchronous reads', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_READ_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous reads', NAMEINSOURCE '"TRIGGER_READ_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_READS long OPTIONS (ANNOTATION 'Count of reads that read less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_READS long OPTIONS (ANNOTATION 'Count of full retry reads', NAMEINSOURCE '"TOTAL_FULL_RETRY_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_READS long OPTIONS (ANNOTATION 'Count of failed reads', NAMEINSOURCE '"TOTAL_FAILED_READS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_SIZE long OPTIONS (ANNOTATION 'Size of read data', NAMEINSOURCE '"TOTAL_READ_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_READ_TIME long OPTIONS (ANNOTATION 'Total read time', NAMEINSOURCE '"TOTAL_READ_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_APPENDS long OPTIONS (ANNOTATION 'Count of appends', NAMEINSOURCE '"TOTAL_APPENDS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITES long OPTIONS (ANNOTATION 'Count of synchronous writes', NAMEINSOURCE '"TOTAL_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_TRIGGER_ASYNC_WRITES long OPTIONS (ANNOTATION 'Count of triggered asynchronous writes', NAMEINSOURCE '"TOTAL_TRIGGER_ASYNC_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TRIGGER_WRITE_RATIO double OPTIONS (ANNOTATION 'Trigger-Ratio of asynchronous writes', NAMEINSOURCE '"TRIGGER_WRITE_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOTAL_SHORT_WRITES long OPTIONS (ANNOTATION 'Count of writes that wrote less bytes than requested', NAMEINSOURCE '"TOTAL_SHORT_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FULL_RETRY_WRITES long OPTIONS (ANNOTATION 'Count of full retry writes', NAMEINSOURCE '"TOTAL_FULL_RETRY_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_FAILED_WRITES long OPTIONS (ANNOTATION 'Count of failed writes', NAMEINSOURCE '"TOTAL_FAILED_WRITES"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_SIZE long OPTIONS (ANNOTATION 'Size of written data', NAMEINSOURCE '"TOTAL_WRITE_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_WRITE_TIME long OPTIONS (ANNOTATION 'Total write time', NAMEINSOURCE '"TOTAL_WRITE_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TOTAL_IO_TIME long OPTIONS (ANNOTATION 'Total IO time', NAMEINSOURCE '"TOTAL_IO_TIME"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'File access total statistics', NAMEINSOURCE '"SYS"."M_VOLUME_IO_TOTAL_STATISTICS_RESET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUME_SIZES" (
    VOLUME_ID integer OPTIONS (ANNOTATION 'Volume ID. See M_VOLUMES', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DISK_ID integer OPTIONS (ANNOTATION 'Disk ID. See M_DISKS', NAMEINSOURCE '"DISK_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_SIZE long OPTIONS (ANNOTATION 'Data area size', NAMEINSOURCE '"DATA_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LOG_SIZE long OPTIONS (ANNOTATION 'Log area size', NAMEINSOURCE '"LOG_SIZE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Volume sizes used by SAP HANA servers', NAMEINSOURCE '"SYS"."M_VOLUME_SIZES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_VOLUMES" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SERVICE_NAME string(32) OPTIONS (ANNOTATION 'Service name', NAMEINSOURCE '"SERVICE_NAME"', NATIVE_TYPE 'VARCHAR'),
    VOLUME_ID integer OPTIONS (ANNOTATION 'Volume ID', NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SUBPATH string(512) OPTIONS (ANNOTATION 'Subpath appended to M_DISKS.PATH', NAMEINSOURCE '"SUBPATH"', NATIVE_TYPE 'VARCHAR'),
    LIVECACHE_STORE string(10) OPTIONS (ANNOTATION 'Livecache is enabled', NAMEINSOURCE '"LIVECACHE_STORE"', NATIVE_TYPE 'VARCHAR'),
    REMOVE_STATUS string(16) OPTIONS (ANNOTATION 'Remove progress', NAMEINSOURCE '"REMOVE_STATUS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Volumes used by SAP HANA servers', NAMEINSOURCE '"SYS"."M_VOLUMES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_WORKLOAD" (
    HOST string(64) OPTIONS (ANNOTATION 'Host name', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Internal port', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXECUTION_COUNT long OPTIONS (ANNOTATION 'Total count of all executed statements for data manipulation, data definition, and system control', NAMEINSOURCE '"EXECUTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPILATION_COUNT long OPTIONS (ANNOTATION 'Number of statement preparation', NAMEINSOURCE '"COMPILATION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_TRANSACTION_COUNT long OPTIONS (ANNOTATION 'Number of update transactions', NAMEINSOURCE '"UPDATE_TRANSACTION_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMIT_COUNT long OPTIONS (ANNOTATION 'Number of transaction commits', NAMEINSOURCE '"COMMIT_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLLBACK_COUNT long OPTIONS (ANNOTATION 'Number of transaction rollbacks', NAMEINSOURCE '"ROLLBACK_COUNT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CURRENT_EXECUTION_RATE double OPTIONS (ANNOTATION 'Current statement execution count per minute', NAMEINSOURCE '"CURRENT_EXECUTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_EXECUTION_RATE double OPTIONS (ANNOTATION 'Peak statement execution count per minute', NAMEINSOURCE '"PEAK_EXECUTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_COMPILATION_RATE double OPTIONS (ANNOTATION 'Current statement preparation count per minute', NAMEINSOURCE '"CURRENT_COMPILATION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_COMPILATION_RATE double OPTIONS (ANNOTATION 'Peak statement preparation count per minute', NAMEINSOURCE '"PEAK_COMPILATION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_UPDATE_TRANSACTION_RATE double OPTIONS (ANNOTATION 'Current update transaction count per minute', NAMEINSOURCE '"CURRENT_UPDATE_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_UPDATE_TRANSACTION_RATE double OPTIONS (ANNOTATION 'Peak update transaction count per minute', NAMEINSOURCE '"PEAK_UPDATE_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_TRANSACTION_RATE double OPTIONS (ANNOTATION 'Current transaction count per minute', NAMEINSOURCE '"CURRENT_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_TRANSACTION_RATE double OPTIONS (ANNOTATION 'Peak transaction count per minute', NAMEINSOURCE '"PEAK_TRANSACTION_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_COMMIT_RATE double OPTIONS (ANNOTATION 'Total number of commits per minute', NAMEINSOURCE '"CURRENT_COMMIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_COMMIT_RATE double OPTIONS (ANNOTATION 'Peak commit counts per minute', NAMEINSOURCE '"PEAK_COMMIT_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_ROLLBACK_RATE double OPTIONS (ANNOTATION 'Total number of rollbacks per minute', NAMEINSOURCE '"CURRENT_ROLLBACK_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_ROLLBACK_RATE double OPTIONS (ANNOTATION 'Peak rollback count per minute', NAMEINSOURCE '"PEAK_ROLLBACK_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    CURRENT_MEMORY_USAGE_RATE double OPTIONS (ANNOTATION 'Total size of used memory per minute', NAMEINSOURCE '"CURRENT_MEMORY_USAGE_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    PEAK_MEMORY_USAGE_RATE double OPTIONS (ANNOTATION 'Peak size of used memory per minute', NAMEINSOURCE '"PEAK_MEMORY_USAGE_RATE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION 'Database workload collected every minute', NAMEINSOURCE '"SYS"."M_WORKLOAD"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_XS_APPLICATION_ISSUES" (
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Name of the application', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ERROR_MESSAGE string(1024) OPTIONS (ANNOTATION 'Textual description of the issue', NAMEINSOURCE '"ERROR_MESSAGE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Issues related to applications in SAP HANA XS', NAMEINSOURCE '"SYS"."M_XS_APPLICATION_ISSUES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.M_XS_APPLICATIONS" (
    APPLICATION_NAME string(256) OPTIONS (ANNOTATION 'Name of the application', NAMEINSOURCE '"APPLICATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DELIVERY_UNIT string(256) OPTIONS (ANNOTATION 'Name of the delivery unit that this application belongs to', NAMEINSOURCE '"DELIVERY_UNIT"', NATIVE_TYPE 'NVARCHAR'),
    VENDOR string(256) OPTIONS (ANNOTATION 'Vendor of the delivery unit', NAMEINSOURCE '"VENDOR"', NATIVE_TYPE 'NVARCHAR'),
    VERSION string(256) OPTIONS (ANNOTATION 'Version information of the delivery unit', NAMEINSOURCE '"VERSION"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_SP string(16) OPTIONS (ANNOTATION 'SP version information of the delivery unit', NAMEINSOURCE '"VERSION_SP"', NATIVE_TYPE 'NVARCHAR'),
    VERSION_PATCH string(16) OPTIONS (ANNOTATION 'Patch version information of the delivery unit', NAMEINSOURCE '"VERSION_PATCH"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Applications deployed and running in SAP HANA XS', NAMEINSOURCE '"SYS"."M_XS_APPLICATIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.OBJECT_DEPENDENCIES" (
    BASE_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the base object', NAMEINSOURCE '"BASE_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BASE_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the base object', NAMEINSOURCE '"BASE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    BASE_OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the base object', NAMEINSOURCE '"BASE_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DEPENDENT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the dependent object', NAMEINSOURCE '"DEPENDENT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name of the dependent object', NAMEINSOURCE '"DEPENDENT_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEPENDENT_OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the base dependent', NAMEINSOURCE '"DEPENDENT_OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    DEPENDENCY_TYPE integer OPTIONS (ANNOTATION 'Type of dependency between base and dependent object', NAMEINSOURCE '"DEPENDENCY_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Dependencies between objects, for example, views which refer to a specific table', NAMEINSOURCE '"SYS"."OBJECT_DEPENDENCIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.OBJECTS" (
    OBJECT_CATEGORY string(1) OPTIONS (ANNOTATION 'Object category of the object (default = null)', NAMEINSOURCE '"OBJECT_CATEGORY"', NATIVE_TYPE 'VARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the object', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) NOT NULL OPTIONS (ANNOTATION 'Object type', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_OID long OPTIONS (ANNOTATION 'Object ID', NAMEINSOURCE '"OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Available objects', NAMEINSOURCE '"SYS"."OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.OWNERSHIP" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the object', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OWNER_NAME string(256) OPTIONS (ANNOTATION 'Name of the object owner', NAMEINSOURCE '"OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Object type', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    OBJECT_OID long OPTIONS (ANNOTATION 'Object ID', NAMEINSOURCE '"OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (ANNOTATION 'Ownership of available objects when users create any object in other users'' schemas', NAMEINSOURCE '"SYS"."OWNERSHIP"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_ASSIGNEDROLES_" (
    GRANTEEID long OPTIONS (NAMEINSOURCE '"GRANTEEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLEID long OPTIONS (NAMEINSOURCE '"ROLEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GRANTERID long OPTIONS (NAMEINSOURCE '"GRANTERID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ADMIN_OPTION byte OPTIONS (NAMEINSOURCE '"ADMIN_OPTION"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_ASSIGNEDROLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_AUDITEDACTIONS_" (
    POLICYID_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"POLICYID_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTIONID integer OPTIONS (NAMEINSOURCE '"ACTIONID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."P_AUDITEDACTIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_AUDITEDOBJECTS_" (
    POLICYID_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"POLICYID_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECTID_TYPEID short OPTIONS (NAMEINSOURCE '"OBJECTID_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    OBJECTID_SUBTYPEID short OPTIONS (NAMEINSOURCE '"OBJECTID_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    OBJECTID_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"OBJECTID_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_AUDITEDOBJECTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_AUDITEDUSERS_" (
    POLICYID_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"POLICYID_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USERID long OPTIONS (NAMEINSOURCE '"USERID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    EXCEPT_USER byte OPTIONS (NAMEINSOURCE '"EXCEPT_USER"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_AUDITEDUSERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_AUDITPOLICIES_" (
    POLICYID_RESERVED integer OPTIONS (NAMEINSOURCE '"POLICYID_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POLICYID_TYPEID short OPTIONS (NAMEINSOURCE '"POLICYID_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    POLICYID_SUBTYPEID short OPTIONS (NAMEINSOURCE '"POLICYID_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    POLICYID_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"POLICYID_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    POLICY_TYPEID short OPTIONS (NAMEINSOURCE '"POLICY_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ACTION_STATUS short OPTIONS (NAMEINSOURCE '"ACTION_STATUS"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LEVEL short OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ACTIVE byte OPTIONS (NAMEINSOURCE '"ACTIVE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_AUDITPOLICIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_AUTHDEPENDENCIES_" (
    DEP_RESERVED integer OPTIONS (NAMEINSOURCE '"DEP_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEP_TYPEID short OPTIONS (NAMEINSOURCE '"DEP_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEP_SUBTYPEID short OPTIONS (NAMEINSOURCE '"DEP_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEP_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"DEP_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UND_RESERVED integer OPTIONS (NAMEINSOURCE '"UND_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UND_TYPEID short OPTIONS (NAMEINSOURCE '"UND_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    UND_SUBTYPEID short OPTIONS (NAMEINSOURCE '"UND_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    UND_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"UND_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEP_USER long OPTIONS (NAMEINSOURCE '"DEP_USER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEP_TYPE short OPTIONS (NAMEINSOURCE '"DEP_TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    PRIVILEGEID long OPTIONS (NAMEINSOURCE '"PRIVILEGEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VALIDITY byte OPTIONS (NAMEINSOURCE '"VALIDITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_AUTHDEPENDENCIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_CONSTRAINTS_" (
    CID integer NOT NULL OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POSITION short NOT NULL OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE byte NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CSTABLE byte OPTIONS (NAMEINSOURCE '"CSTABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_CONSTRAINTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_CREDENTIALS_" (
    USER_ID long OPTIONS (NAMEINSOURCE '"USER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMPONENT string(256) OPTIONS (NAMEINSOURCE '"COMPONENT"', NATIVE_TYPE 'NVARCHAR'),
    PURPOSE string(256) OPTIONS (NAMEINSOURCE '"PURPOSE"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(64) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_CREDENTIALS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_DATATYPES_" (
    INTERNAL_TYPE_ID short NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TYPE_NAME string(16) OPTIONS (NAMEINSOURCE '"TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_SIZE integer OPTIONS (NAMEINSOURCE '"COLUMN_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LITERAL_PREFIX string(1) OPTIONS (NAMEINSOURCE '"LITERAL_PREFIX"', CHAR_OCTET_LENGTH 3, NATIVE_TYPE 'CHAR'),
    LITERAL_SUFFIX string(1) OPTIONS (NAMEINSOURCE '"LITERAL_SUFFIX"', CHAR_OCTET_LENGTH 3, NATIVE_TYPE 'CHAR'),
    CREATE_PARAMS string(16) OPTIONS (NAMEINSOURCE '"CREATE_PARAMS"', NATIVE_TYPE 'VARCHAR'),
    NULLABLE byte OPTIONS (NAMEINSOURCE '"NULLABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CASE_SENSITIVE byte OPTIONS (NAMEINSOURCE '"CASE_SENSITIVE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SEARCHABLE byte OPTIONS (NAMEINSOURCE '"SEARCHABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    UNSIGNED_ATTRIBUTE byte OPTIONS (NAMEINSOURCE '"UNSIGNED_ATTRIBUTE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FIXED_PREC_SCALE byte OPTIONS (NAMEINSOURCE '"FIXED_PREC_SCALE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    AUTO_UNIQUE_VALUE byte OPTIONS (NAMEINSOURCE '"AUTO_UNIQUE_VALUE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    LOCAL_TYPE_NAME string(16) OPTIONS (NAMEINSOURCE '"LOCAL_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    MINIMUM_SCALE short OPTIONS (NAMEINSOURCE '"MINIMUM_SCALE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    MAXIMUM_SCALE short OPTIONS (NAMEINSOURCE '"MAXIMUM_SCALE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SQL_DATA_TYPE short OPTIONS (NAMEINSOURCE '"SQL_DATA_TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SQL_DATETIME_SUB short OPTIONS (NAMEINSOURCE '"SQL_DATETIME_SUB"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    NUM_PREC_RADIX integer OPTIONS (NAMEINSOURCE '"NUM_PREC_RADIX"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INTERVAL_PRECISION short OPTIONS (NAMEINSOURCE '"INTERVAL_PRECISION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_DATATYPES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_DPAPI_KEY_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CALLER string(20) OPTIONS (NAMEINSOURCE '"CALLER"', NATIVE_TYPE 'NVARCHAR'),
    RECORD_ID string(512) OPTIONS (NAMEINSOURCE '"RECORD_ID"', NATIVE_TYPE 'NVARCHAR'),
    KEY_ID integer OPTIONS (NAMEINSOURCE '"KEY_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    KEY varbinary(128) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARBINARY'),
    CREATE_USER string(256) OPTIONS (NAMEINSOURCE '"CREATE_USER"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    DATA_ENCRYPTION_ALGORITHM byte OPTIONS (NAMEINSOURCE '"DATA_ENCRYPTION_ALGORITHM"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_CURRENT_KEY byte OPTIONS (NAMEINSOURCE '"IS_CURRENT_KEY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_DPAPI_KEY_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_EXTENDED_INDEXES_" (
    INDEX_OID long NOT NULL OPTIONS (NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REFERENCED_CONSTRAINT_OID long OPTIONS (NAMEINSOURCE '"REFERENCED_CONSTRAINT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UPDATE_RULE byte OPTIONS (NAMEINSOURCE '"UPDATE_RULE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DELETE_RULE byte OPTIONS (NAMEINSOURCE '"DELETE_RULE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FLUSH_AFTER_DOCUMENTS integer OPTIONS (NAMEINSOURCE '"FLUSH_AFTER_DOCUMENTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLUSH_EVERY_MINUTES integer OPTIONS (NAMEINSOURCE '"FLUSH_EVERY_MINUTES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."P_EXTENDED_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_EXTERNALOBJS_" (
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJNAME string(256) OPTIONS (NAMEINSOURCE '"OBJNAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_EXTERNALOBJS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_EXTERNALOWNERSHIPS_" (
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USERID long OPTIONS (NAMEINSOURCE '"USERID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_EXTERNALOWNERSHIPS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_FILTEROPERANDS_" (
    FILTEROPERAND_OID long OPTIONS (NAMEINSOURCE '"FILTEROPERAND_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILTER_OID long OPTIONS (NAMEINSOURCE '"FILTER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OPERAND_ORDER integer OPTIONS (NAMEINSOURCE '"OPERAND_ORDER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OPERAND_STRING string(256) OPTIONS (NAMEINSOURCE '"OPERAND_STRING"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_FILTEROPERANDS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_FILTERS_" (
    FILTER_OID long OPTIONS (NAMEINSOURCE '"FILTER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILTERTYPE byte OPTIONS (NAMEINSOURCE '"FILTERTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    RESTRICTION_RESERVED integer OPTIONS (NAMEINSOURCE '"RESTRICTION_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RESTRICTION_TYPEID short OPTIONS (NAMEINSOURCE '"RESTRICTION_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    RESTRICTION_SUBTYPEID short OPTIONS (NAMEINSOURCE '"RESTRICTION_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    RESTRICTION_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"RESTRICTION_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VALUEFILTEROP integer OPTIONS (NAMEINSOURCE '"VALUEFILTEROP"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NEGATED byte OPTIONS (NAMEINSOURCE '"NEGATED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_FILTERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_FULL_TEXT_INDEXES_" (
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INDEX_OID long OPTIONS (NAMEINSOURCE '"INDEX_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    LANGUAGE_COLUMN string(256) OPTIONS (NAMEINSOURCE '"LANGUAGE_COLUMN"', NATIVE_TYPE 'NVARCHAR'),
    MIME_TYPE_COLUMN string(256) OPTIONS (NAMEINSOURCE '"MIME_TYPE_COLUMN"', NATIVE_TYPE 'NVARCHAR'),
    LANGUAGE_DETECTION string(256) OPTIONS (NAMEINSOURCE '"LANGUAGE_DETECTION"', NATIVE_TYPE 'NVARCHAR'),
    INTERNAL_COLUMN_NAME string(512) OPTIONS (NAMEINSOURCE '"INTERNAL_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONFIGURATION string(256) OPTIONS (NAMEINSOURCE '"CONFIGURATION"', NATIVE_TYPE 'NVARCHAR'),
    PHRASE_INDEX_RATIO float OPTIONS (NAMEINSOURCE '"PHRASE_INDEX_RATIO"', RADIX 2, CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'REAL'),
    FLUSH_EVERY_MINUTES integer OPTIONS (NAMEINSOURCE '"FLUSH_EVERY_MINUTES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLUSH_AFTER_DOCUMENTS integer OPTIONS (NAMEINSOURCE '"FLUSH_AFTER_DOCUMENTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLAGS integer OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MIME_TYPE string(256) OPTIONS (NAMEINSOURCE '"MIME_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    TOKEN_SEPARATORS string(256) OPTIONS (NAMEINSOURCE '"TOKEN_SEPARATORS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_FULL_TEXT_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_GRANTEDPRIVS_" (
    PRINCIPALID long OPTIONS (NAMEINSOURCE '"PRINCIPALID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GRANTER long OPTIONS (NAMEINSOURCE '"GRANTER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRIVILEGEID long OPTIONS (NAMEINSOURCE '"PRIVILEGEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GRANTABLE byte OPTIONS (NAMEINSOURCE '"GRANTABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    VALIDITY byte OPTIONS (NAMEINSOURCE '"VALIDITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_GRANTEDPRIVS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_INDEXCOLUMNS_" (
    OID long NOT NULL OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CID long NOT NULL OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ASCENDINGORDER byte OPTIONS (NAMEINSOURCE '"ASCENDINGORDER"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_INDEXCOLUMNS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_INDEXES_" (
    CID long NOT NULL OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE short OPTIONS (NAMEINSOURCE '"TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    "CONSTRAINT" short OPTIONS (NAMEINSOURCE '"CONSTRAINT"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    KEYLENGTH short OPTIONS (NAMEINSOURCE '"KEYLENGTH"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    BTREEFILLFACTOR short OPTIONS (NAMEINSOURCE '"BTREEFILLFACTOR"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    BTREESPLITTYPE byte OPTIONS (NAMEINSOURCE '"BTREESPLITTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    BTREESPLITPOS byte OPTIONS (NAMEINSOURCE '"BTREESPLITPOS"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CSTABLE byte OPTIONS (NAMEINSOURCE '"CSTABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    INDEX_ARRAY_POS integer OPTIONS (NAMEINSOURCE '"INDEX_ARRAY_POS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_INDEXES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_INVALID_CONNECTS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INVALID_CONNECT_ATTEMPTS long OPTIONS (NAMEINSOURCE '"INVALID_CONNECT_ATTEMPTS"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUCCESSFUL_CONNECT_TIME timestamp OPTIONS (NAMEINSOURCE '"SUCCESSFUL_CONNECT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SYS"."P_INVALID_CONNECTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_LAST_PASSWORDS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PASSWORD string(256) OPTIONS (NAMEINSOURCE '"PASSWORD"', NATIVE_TYPE 'NVARCHAR'),
    PASSWORD_CHANGE_TIME timestamp OPTIONS (NAMEINSOURCE '"PASSWORD_CHANGE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SYS"."P_LAST_PASSWORDS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_MIN_CID_INFO_" (
    TABLE_OID long NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PART_ID long NOT NULL OPTIONS (NAMEINSOURCE '"PART_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_CID long OPTIONS (NAMEINSOURCE '"MIN_CID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_MIN_CID_INFO_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_OBJECTDEPENDENCY_" (
    BASEOID long NOT NULL OPTIONS (NAMEINSOURCE '"BASEOID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BASETYPE byte NOT NULL OPTIONS (NAMEINSOURCE '"BASETYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DEPENDENTOID long NOT NULL OPTIONS (NAMEINSOURCE '"DEPENDENTOID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEPENDENTTYPE byte NOT NULL OPTIONS (NAMEINSOURCE '"DEPENDENTTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DEPENDENCYTYPE integer OPTIONS (NAMEINSOURCE '"DEPENDENCYTYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."P_OBJECTDEPENDENCY_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_OBJECTS_" (
    SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE byte OPTIONS (NAMEINSOURCE '"TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_OBJECTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_OBJTYPES_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    INTERNALTYPE byte OPTIONS (NAMEINSOURCE '"INTERNALTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_OBJTYPES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_PRINCIPALS_" (
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE byte OPTIONS (NAMEINSOURCE '"TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATOR string(256) OPTIONS (NAMEINSOURCE '"CREATOR"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SYS"."P_PRINCIPALS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_PRIVAVAILABILITY_" (
    PRIVILEGEID long OPTIONS (NAMEINSOURCE '"PRIVILEGEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VALIDITY byte OPTIONS (NAMEINSOURCE '"VALIDITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_PRIVAVAILABILITY_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_PRIVILEGES_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE byte OPTIONS (NAMEINSOURCE '"TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_PRIVILEGES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_PROCEDURE_OBJECTS_" (
    SCHEMA_NAME string(128) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_NAME string(128) OPTIONS (NAMEINSOURCE '"PROCEDURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SCHEMA string(128) OPTIONS (NAMEINSOURCE '"OBJECT_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(128) OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE_ID integer OPTIONS (NAMEINSOURCE '"OBJECT_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    START_POSITION integer OPTIONS (NAMEINSOURCE '"START_POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    END_POSITION integer OPTIONS (NAMEINSOURCE '"END_POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."P_PROCEDURE_OBJECTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_PROCEDURES_" (
    SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROGRAMSTRING clob(24) OPTIONS (NAMEINSOURCE '"PROGRAMSTRING"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    NUM_INPUT_PARAMS integer OPTIONS (NAMEINSOURCE '"NUM_INPUT_PARAMS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUM_OUTPUT_PARAMS integer OPTIONS (NAMEINSOURCE '"NUM_OUTPUT_PARAMS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUM_INOUT_PARAMS integer OPTIONS (NAMEINSOURCE '"NUM_INOUT_PARAMS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUM_RETURN_VALUES integer OPTIONS (NAMEINSOURCE '"NUM_RETURN_VALUES"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "LANGUAGE" byte OPTIONS (NAMEINSOURCE '"LANGUAGE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    PROCEDURE_TYPE byte OPTIONS (NAMEINSOURCE '"PROCEDURE_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_TEMPLATE byte OPTIONS (NAMEINSOURCE '"IS_TEMPLATE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_DETERMINISTIC byte OPTIONS (NAMEINSOURCE '"IS_DETERMINISTIC"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SQL_SECURITY byte OPTIONS (NAMEINSOURCE '"SQL_SECURITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    LAST_UPDATED long OPTIONS (NAMEINSOURCE '"LAST_UPDATED"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ABAP_SID integer OPTIONS (NAMEINSOURCE '"ABAP_SID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    AFL_CREATE_DATE date OPTIONS (NAMEINSOURCE '"AFL_CREATE_DATE"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'DATE'),
    AFL_CREATE_TIME time OPTIONS (NAMEINSOURCE '"AFL_CREATE_TIME"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'TIME'),
    AFL_PACKAGE string(256) OPTIONS (NAMEINSOURCE '"AFL_PACKAGE"', NATIVE_TYPE 'NVARCHAR'),
    IS_ROUTABLE byte OPTIONS (NAMEINSOURCE '"IS_ROUTABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_PROCEDURES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_PROCEDURES_EXT_" (
    OWNER_OID long NOT NULL OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEFAULT_SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"DEFAULT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_PROCEDURES_EXT_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_PROCPARAMS_" (
    PID long OPTIONS (NAMEINSOURCE '"PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMNAME string(256) OPTIONS (NAMEINSOURCE '"PARAMNAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPEID integer OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MODE byte OPTIONS (NAMEINSOURCE '"MODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DEF byte OPTIONS (NAMEINSOURCE '"DEF"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    POSITION integer OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_TYPE_SCHEMA string(256) OPTIONS (NAMEINSOURCE '"TABLE_TYPE_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_TYPE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    IS_TEMPLATE_PARAM byte OPTIONS (NAMEINSOURCE '"IS_TEMPLATE_PARAM"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    LVC_DIMENSION integer OPTIONS (NAMEINSOURCE '"LVC_DIMENSION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LVC_OFFSET integer OPTIONS (NAMEINSOURCE '"LVC_OFFSET"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LVC_ASCII_OFFSET integer OPTIONS (NAMEINSOURCE '"LVC_ASCII_OFFSET"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LVC_UNICODE_OFFSET integer OPTIONS (NAMEINSOURCE '"LVC_UNICODE_OFFSET"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LVC_CODE string(16) OPTIONS (NAMEINSOURCE '"LVC_CODE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_PROCPARAMS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_PROCSOURCES_" (
    PID long NOT NULL OPTIONS (NAMEINSOURCE '"PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE string(16) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    LINE integer NOT NULL OPTIONS (NAMEINSOURCE '"LINE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TEXT string(5000) OPTIONS (NAMEINSOURCE '"TEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_PROCSOURCES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_QTABLES_" (
    CID integer NOT NULL OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEQISOLEVEL_ byte OPTIONS (NAMEINSOURCE '"DEQISOLEVEL_"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    ISAUTOENQTIME byte OPTIONS (NAMEINSOURCE '"ISAUTOENQTIME"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DEQTIMEOUT_ long OPTIONS (NAMEINSOURCE '"DEQTIMEOUT_"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_QTABLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_QUERIES_" (
    SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    QUERYSTRING clob(24) OPTIONS (NAMEINSOURCE '"QUERYSTRING"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    USESTREAM byte OPTIONS (NAMEINSOURCE '"USESTREAM"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SYSTEMQUERY byte OPTIONS (NAMEINSOURCE '"SYSTEMQUERY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_QUERIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_QUERYPLANS" (
    CONNECTION_ID integer OPTIONS (NAMEINSOURCE '"CONNECTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PLAN_ID string(256) OPTIONS (NAMEINSOURCE '"PLAN_ID"', NATIVE_TYPE 'VARCHAR'),
    OP_NAME string(5000) OPTIONS (NAMEINSOURCE '"OP_NAME"', NATIVE_TYPE 'VARCHAR'),
    OP_DETAILS clob(24) OPTIONS (NAMEINSOURCE '"OP_DETAILS"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    OBJ_NAME string(256) OPTIONS (NAMEINSOURCE '"OBJ_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE string(5000) OPTIONS (NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    SUBTREE_COST double OPTIONS (NAMEINSOURCE '"SUBTREE_COST"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    INPUT_CARDINALITY double OPTIONS (NAMEINSOURCE '"INPUT_CARDINALITY"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OUTPUT_CARDINALITY double OPTIONS (NAMEINSOURCE '"OUTPUT_CARDINALITY"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OP_ID integer OPTIONS (NAMEINSOURCE '"OP_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARENT_OP_ID integer OPTIONS (NAMEINSOURCE '"PARENT_OP_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL integer OPTIONS (NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POSITION integer OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "TIMESTAMP" timestamp OPTIONS (NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(256) OPTIONS (NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    EXECUTION_ENGINE string(256) OPTIONS (NAMEINSOURCE '"EXECUTION_ENGINE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_QUERYPLANS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_RESTRICTIONS_" (
    RESTRICTION_RESERVED integer OPTIONS (NAMEINSOURCE '"RESTRICTION_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RESTRICTION_TYPEID short OPTIONS (NAMEINSOURCE '"RESTRICTION_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    RESTRICTION_SUBTYPEID short OPTIONS (NAMEINSOURCE '"RESTRICTION_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    RESTRICTION_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"RESTRICTION_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ANALYTICAL_RESERVED integer OPTIONS (NAMEINSOURCE '"ANALYTICAL_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ANALYTICAL_TYPEID short OPTIONS (NAMEINSOURCE '"ANALYTICAL_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ANALYTICAL_SUBTYPEID short OPTIONS (NAMEINSOURCE '"ANALYTICAL_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    ANALYTICAL_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"ANALYTICAL_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILTERVALUE_DATATYPE short OPTIONS (NAMEINSOURCE '"FILTERVALUE_DATATYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    RESTRICTED_OBJ_NAME string(256) OPTIONS (NAMEINSOURCE '"RESTRICTED_OBJ_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_RESTRICTIONS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_ROLES_" (
    ROLE_ID long NOT NULL OPTIONS (NAMEINSOURCE '"ROLE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CONTEXT string(2048) OPTIONS (NAMEINSOURCE '"CONTEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_ROLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_RTABLES_" (
    CID integer NOT NULL OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REPID integer OPTIONS (NAMEINSOURCE '"REPID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TIMESTAMPOFFSET integer OPTIONS (NAMEINSOURCE '"TIMESTAMPOFFSET"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REPGROUPID integer OPTIONS (NAMEINSOURCE '"REPGROUPID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."P_RTABLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_SAML_PROVIDERS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_NAME string(512) OPTIONS (NAMEINSOURCE '"SUBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ISSUER_NAME string(512) OPTIONS (NAMEINSOURCE '"ISSUER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_CREATION_ENABLED byte OPTIONS (NAMEINSOURCE '"USER_CREATION_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_SAML_PROVIDERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_SCHEMAS_" (
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OWNER string(256) OPTIONS (NAMEINSOURCE '"OWNER"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_SCHEMAS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_SEGMENT_MAPPINGS_" (
    SEGMENT_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"SEGMENT_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CONTAINER_ID integer OPTIONS (NAMEINSOURCE '"CONTAINER_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."P_SEGMENT_MAPPINGS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_SEQUENCES_" (
    SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STARTWITH long OPTIONS (NAMEINSOURCE '"STARTWITH"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MINVALUE long OPTIONS (NAMEINSOURCE '"MINVALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAXVALUE long OPTIONS (NAMEINSOURCE '"MAXVALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCREMENT long OPTIONS (NAMEINSOURCE '"INCREMENT"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "CYCLE" byte OPTIONS (NAMEINSOURCE '"CYCLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    RESETBY clob(24) OPTIONS (NAMEINSOURCE '"RESETBY"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CACHE_SIZE short OPTIONS (NAMEINSOURCE '"CACHE_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_SEQUENCES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_SESSION_COOKIES_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COOKIE string(64) OPTIONS (NAMEINSOURCE '"COOKIE"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT_HOST string(64) OPTIONS (NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT_PID long OPTIONS (NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_CONNECT_TIME timestamp OPTIONS (NAMEINSOURCE '"LAST_CONNECT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SESSION_END_TIME timestamp OPTIONS (NAMEINSOURCE '"SESSION_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SYS"."P_SESSION_COOKIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_SQLSCRIPT_TRACE2_" (
    TRACE_TIMESTAMP timestamp OPTIONS (NAMEINSOURCE '"TRACE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TRANSACTION_ID integer OPTIONS (NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_ID long OPTIONS (NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCEDURE_OID long OPTIONS (NAMEINSOURCE '"PROCEDURE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VARIABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"VARIABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_SQLSCRIPT_TRACE2_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_SQLSCRIPTTRACE_" (
    PID long NOT NULL OPTIONS (NAMEINSOURCE '"PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TID integer NOT NULL OPTIONS (NAMEINSOURCE '"TID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VARNAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"VARNAME"', NATIVE_TYPE 'VARCHAR'),
    TABLENAME string(256) OPTIONS (NAMEINSOURCE '"TABLENAME"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_SQLSCRIPTTRACE_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_STATISTICS_" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short NOT NULL OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    MINVALUE double OPTIONS (NAMEINSOURCE '"MINVALUE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MINVALUE_STR string(256) OPTIONS (NAMEINSOURCE '"MINVALUE_STR"', NATIVE_TYPE 'NVARCHAR'),
    MAXVALUE double OPTIONS (NAMEINSOURCE '"MAXVALUE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAXVALUE_STR string(256) OPTIONS (NAMEINSOURCE '"MAXVALUE_STR"', NATIVE_TYPE 'NVARCHAR'),
    COUNT double OPTIONS (NAMEINSOURCE '"COUNT"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    DCOUNT double OPTIONS (NAMEINSOURCE '"DCOUNT"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    NULLCOUNT double OPTIONS (NAMEINSOURCE '"NULLCOUNT"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (NAMEINSOURCE '"SYS"."P_STATISTICS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_SUBOBJTYPES_" (
    SUBTYPEID long OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    INTERNALTYPE byte OPTIONS (NAMEINSOURCE '"INTERNALTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_SUBOBJTYPES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_SYNONYMS_" (
    SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BASEOID long OPTIONS (NAMEINSOURCE '"BASEOID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    BASETYPE byte OPTIONS (NAMEINSOURCE '"BASETYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_SYNONYMS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_TRIGGERS_" (
    SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBJECT_TABLE_SCHEMA string(256) OPTIONS (NAMEINSOURCE '"SUBJECT_TABLE_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"SUBJECT_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRIGGER_ACTION_TIME byte OPTIONS (NAMEINSOURCE '"TRIGGER_ACTION_TIME"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TRIGGER_EVENT byte OPTIONS (NAMEINSOURCE '"TRIGGER_EVENT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TRIGGERED_ACTION_LEVEL byte OPTIONS (NAMEINSOURCE '"TRIGGERED_ACTION_LEVEL"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    OLD_TRANSITION_VARIABLE string(256) OPTIONS (NAMEINSOURCE '"OLD_TRANSITION_VARIABLE"', NATIVE_TYPE 'NVARCHAR'),
    NEW_TRANSITION_VARIABLE string(256) OPTIONS (NAMEINSOURCE '"NEW_TRANSITION_VARIABLE"', NATIVE_TYPE 'NVARCHAR'),
    OLD_TRANSITION_TABLE string(256) OPTIONS (NAMEINSOURCE '"OLD_TRANSITION_TABLE"', NATIVE_TYPE 'NVARCHAR'),
    NEW_TRANSITION_TABLE string(256) OPTIONS (NAMEINSOURCE '"NEW_TRANSITION_TABLE"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_TABLE_OID long OPTIONS (NAMEINSOURCE '"SUBJECT_TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ACTION_STRING clob(24) OPTIONS (NAMEINSOURCE '"ACTION_STRING"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    PARAMS byte OPTIONS (NAMEINSOURCE '"PARAMS"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_TRIGGERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_USER_KERBEROS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    "IDENTITY" string(256) OPTIONS (NAMEINSOURCE '"IDENTITY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_USER_KERBEROS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_USER_PASSWORD_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PASSWORD string(256) OPTIONS (NAMEINSOURCE '"PASSWORD"', NATIVE_TYPE 'NVARCHAR'),
    PASSWORD_CHANGE_TIME timestamp OPTIONS (NAMEINSOURCE '"PASSWORD_CHANGE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PASSWORD_CHANGE_NEEDED byte OPTIONS (NAMEINSOURCE '"PASSWORD_CHANGE_NEEDED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    ADMIN_GIVEN_PASSWORD byte OPTIONS (NAMEINSOURCE '"ADMIN_GIVEN_PASSWORD"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_USER_PASSWORD_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_USER_SAML_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SAML_PROVIDER_OID long OPTIONS (NAMEINSOURCE '"SAML_PROVIDER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAPPED_USER_NAME string(256) OPTIONS (NAMEINSOURCE '"MAPPED_USER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_USER_SAML_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_USER_X509_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBJECT_NAME string(512) OPTIONS (NAMEINSOURCE '"SUBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ISSUER_NAME string(512) OPTIONS (NAMEINSOURCE '"ISSUER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRUST_STORE_NAME string(256) OPTIONS (NAMEINSOURCE '"TRUST_STORE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."P_USER_X509_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_USERS_" (
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    LAST_SUCCESSFUL_CONNECT timestamp OPTIONS (NAMEINSOURCE '"LAST_SUCCESSFUL_CONNECT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_INVALID_CONNECT_ATTEMPT timestamp OPTIONS (NAMEINSOURCE '"LAST_INVALID_CONNECT_ATTEMPT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INVALID_CONNECT_ATTEMPTS integer OPTIONS (NAMEINSOURCE '"INVALID_CONNECT_ATTEMPTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_DEACTIVATED byte OPTIONS (NAMEINSOURCE '"USER_DEACTIVATED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DEACTIVATION_TIME timestamp OPTIONS (NAMEINSOURCE '"DEACTIVATION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IS_PASSWORD_ENABLED byte OPTIONS (NAMEINSOURCE '"IS_PASSWORD_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_KERBEROS_ENABLED byte OPTIONS (NAMEINSOURCE '"IS_KERBEROS_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_SAML_ENABLED byte OPTIONS (NAMEINSOURCE '"IS_SAML_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_X509_ENABLED byte OPTIONS (NAMEINSOURCE '"IS_X509_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_CREATED_BY_SAML_PROVIDER byte OPTIONS (NAMEINSOURCE '"IS_CREATED_BY_SAML_PROVIDER"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_TICKET_ENABLED byte OPTIONS (NAMEINSOURCE '"IS_TICKET_ENABLED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_RESTRICTED byte OPTIONS (NAMEINSOURCE '"IS_RESTRICTED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."P_USERS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.P_UTABLES_" (
    CID integer NOT NULL OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ENABLEUPDATELOGTABLE byte OPTIONS (NAMEINSOURCE '"ENABLEUPDATELOGTABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    BASETABLEID integer OPTIONS (NAMEINSOURCE '"BASETABLEID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TRANSQUEUEID integer OPTIONS (NAMEINSOURCE '"TRANSQUEUEID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UPDATELOGGROUPID integer OPTIONS (NAMEINSOURCE '"UPDATELOGGROUPID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REPORTTABLEID integer OPTIONS (NAMEINSOURCE '"REPORTTABLEID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SIZELIMIT integer OPTIONS (NAMEINSOURCE '"SIZELIMIT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."P_UTABLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.PINNED_SQL_PLANS_" (
    ID long NOT NULL OPTIONS (NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VOLUME_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    USER_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT_STRING clob(24) NOT NULL OPTIONS (NAMEINSOURCE '"STATEMENT_STRING"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    STATEMENT_HASH string(32) NOT NULL OPTIONS (NAMEINSOURCE '"STATEMENT_HASH"', NATIVE_TYPE 'VARCHAR'),
    IS_INTERNAL byte NOT NULL OPTIONS (NAMEINSOURCE '"IS_INTERNAL"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    ABAP_VARCHAR_MODE byte NOT NULL OPTIONS (NAMEINSOURCE '"ABAP_VARCHAR_MODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IS_VALID byte NOT NULL OPTIONS (NAMEINSOURCE '"IS_VALID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    PLAN_SKELETON clob(24) OPTIONS (NAMEINSOURCE '"PLAN_SKELETON"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    PLV clob(24) OPTIONS (NAMEINSOURCE '"PLV"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB')
) OPTIONS (NAMEINSOURCE '"SYS"."PINNED_SQL_PLANS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.PRIVILEGES" (
    NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Privilege name', NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(32) OPTIONS (ANNOTATION '''SYSTEMPRIVILEGE'', ''OBJECTPRIVILEGE'', ''PACKAGEPRIVILEGE'', ''APPLICATIONPRIVILEGE''', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Available privileges', NAMEINSOURCE '"SYS"."PRIVILEGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.PROCEDURE_DATAFLOWS" (
    DEFINER_NAME string(256) OPTIONS (NAMEINSOURCE '"DEFINER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_NAME string(256) OPTIONS (NAMEINSOURCE '"PROCEDURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATAFLOW_NAME string(128) OPTIONS (NAMEINSOURCE '"DATAFLOW_NAME"', NATIVE_TYPE 'VARCHAR'),
    DATAFLOW_ID long OPTIONS (NAMEINSOURCE '"DATAFLOW_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARENT_DATAFLOW_NAME string(128) OPTIONS (NAMEINSOURCE '"PARENT_DATAFLOW_NAME"', NATIVE_TYPE 'VARCHAR'),
    INLINED_DATAFLOW_NAME string(128) OPTIONS (NAMEINSOURCE '"INLINED_DATAFLOW_NAME"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(128) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."PROCEDURE_DATAFLOWS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.PROCEDURE_MAPPING" (
    DEFINER_NAME string(256) OPTIONS (NAMEINSOURCE '"DEFINER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_NAME string(256) OPTIONS (NAMEINSOURCE '"PROCEDURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    STATEMENT_ID long OPTIONS (NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TYPE string(24) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    LINE integer OPTIONS (NAMEINSOURCE '"LINE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "COLUMN" integer OPTIONS (NAMEINSOURCE '"COLUMN"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT clob(24) OPTIONS (NAMEINSOURCE '"STATEMENT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    RENAMED_STATEMENT clob(24) OPTIONS (NAMEINSOURCE '"RENAMED_STATEMENT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    DATAFLOW_NAME string(128) OPTIONS (NAMEINSOURCE '"DATAFLOW_NAME"', NATIVE_TYPE 'VARCHAR'),
    VARIABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"VARIABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCENARIO_NAME string(256) OPTIONS (NAMEINSOURCE '"SCENARIO_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NODE_NAME string(256) OPTIONS (NAMEINSOURCE '"NODE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."PROCEDURE_MAPPING"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.PROCEDURE_OBJECTS" (
    SCHEMA_NAME string(128) OPTIONS (ANNOTATION 'Schema name of the stored procedure', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_NAME string(128) OPTIONS (ANNOTATION 'Procedure name of the stored procedure', NAMEINSOURCE '"PROCEDURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_SCHEMA string(128) OPTIONS (ANNOTATION 'Schema name of the object in the stored procedure code', NAMEINSOURCE '"OBJECT_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(128) OPTIONS (ANNOTATION 'Object name of the object in the  stored procedure code', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE_ID integer OPTIONS (ANNOTATION 'Type ID of the object in the stored procedure code', NAMEINSOURCE '"OBJECT_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OBJECT_TYPE string(32) OPTIONS (ANNOTATION 'Type of the object in the stored procedure code', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    START_POSITION integer OPTIONS (ANNOTATION 'Start position of the object in the stored procedure code', NAMEINSOURCE '"START_POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    END_POSITION integer OPTIONS (ANNOTATION 'End position of the object in the stored procedure code', NAMEINSOURCE '"END_POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Contains results of the system procedure GET_PROCEDURE_OBJECTS', NAMEINSOURCE '"SYS"."PROCEDURE_OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.PROCEDURE_PARAMETERS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the stored procedure', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the stored procedure', NAMEINSOURCE '"PROCEDURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the stored procedure', NAMEINSOURCE '"PROCEDURE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PARAMETER_NAME string(256) OPTIONS (ANNOTATION 'Parameter name', NAMEINSOURCE '"PARAMETER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'Data type ID', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Data type name', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'Parameter length', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Scale of the parameter', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the parameter', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TABLE_TYPE_SCHEMA string(256) OPTIONS (ANNOTATION 'Schema name of table type if DATA_TYPE_NAME is TABLE_TYPE', NAMEINSOURCE '"TABLE_TYPE_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_TYPE_NAME string(256) OPTIONS (ANNOTATION 'Name of table type if DATA_TYPE_NAME is TABLE_TYPE', NAMEINSOURCE '"TABLE_TYPE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PARAMETER_TYPE string(7) OPTIONS (ANNOTATION 'Parameter mode: ''IN''/''OUT''/''INOUT''', NAMEINSOURCE '"PARAMETER_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HAS_DEFAULT_VALUE string(5) OPTIONS (ANNOTATION 'Specifies whether the parameter has a default value or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_DEFAULT_VALUE"', NATIVE_TYPE 'VARCHAR'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the parameter accepts a null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Parameters of stored procedures', NAMEINSOURCE '"SYS"."PROCEDURE_PARAMETERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.PROCEDURES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the stored procedure', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the stored procedure', NAMEINSOURCE '"PROCEDURE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PROCEDURE_OID long OPTIONS (ANNOTATION 'Object ID of the stored procedure', NAMEINSOURCE '"PROCEDURE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEFAULT_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the unqualified objects in the procedure', NAMEINSOURCE '"DEFAULT_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INPUT_PARAMETER_COUNT integer OPTIONS (ANNOTATION 'Input type parameter count', NAMEINSOURCE '"INPUT_PARAMETER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OUTPUT_PARAMETER_COUNT integer OPTIONS (ANNOTATION 'Output type parameter count', NAMEINSOURCE '"OUTPUT_PARAMETER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    INOUT_PARAMETER_COUNT integer OPTIONS (ANNOTATION 'In-out type parameter count', NAMEINSOURCE '"INOUT_PARAMETER_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RESULT_SET_COUNT integer OPTIONS (ANNOTATION 'Result set count', NAMEINSOURCE '"RESULT_SET_COUNT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_UNICODE string(5) OPTIONS (ANNOTATION 'Specifies whether the stored procedure contains Unicode or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNICODE"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION clob OPTIONS (ANNOTATION 'Query string of the stored procedure', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NCLOB'),
    PROCEDURE_TYPE string(10) NOT NULL OPTIONS (ANNOTATION 'Type of the stored procedure', NAMEINSOURCE '"PROCEDURE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    READ_ONLY string(5) OPTIONS (ANNOTATION 'Specifies whether the procedure is read-only or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"READ_ONLY"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the procedure is valid or not. This becomes ''FALSE'' when its base objects are changed or dropped: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Available stored procedures', NAMEINSOURCE '"SYS"."PROCEDURES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.QUERY_PLANS" (
    PLAN_ID string(256) OPTIONS (ANNOTATION 'Plan ID', NAMEINSOURCE '"PLAN_ID"', NATIVE_TYPE 'VARCHAR'),
    OPERATOR_NAME string(5000) OPTIONS (ANNOTATION 'Operator name', NAMEINSOURCE '"OPERATOR_NAME"', NATIVE_TYPE 'VARCHAR'),
    OPERATOR_DETAILS clob OPTIONS (ANNOTATION 'Detailed information on operators in the query plan', NAMEINSOURCE '"OPERATOR_DETAILS"', NATIVE_TYPE 'NCLOB'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Object name', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUBTREE_COST double OPTIONS (ANNOTATION 'Subtree cost', NAMEINSOURCE '"SUBTREE_COST"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    INPUT_CARDINALITY double OPTIONS (ANNOTATION 'Input cardinality', NAMEINSOURCE '"INPUT_CARDINALITY"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OUTPUT_CARDINALITY double OPTIONS (ANNOTATION 'Output cardinality', NAMEINSOURCE '"OUTPUT_CARDINALITY"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    OPERATOR_ID integer OPTIONS (ANNOTATION 'Operator ID', NAMEINSOURCE '"OPERATOR_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARENT_OPERATOR_ID integer OPTIONS (ANNOTATION 'Parent operator ID', NAMEINSOURCE '"PARENT_OPERATOR_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LEVEL integer OPTIONS (ANNOTATION 'Level', NAMEINSOURCE '"LEVEL"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POSITION integer OPTIONS (ANNOTATION 'Position', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    "TIMESTAMP" timestamp OPTIONS (ANNOTATION 'Timestamp', NAMEINSOURCE '"TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    HOST string(256) OPTIONS (ANNOTATION 'Host where the plan operator is executed', NAMEINSOURCE '"HOST"', NATIVE_TYPE 'VARCHAR'),
    PORT integer OPTIONS (ANNOTATION 'Port where the plan operator is executed', NAMEINSOURCE '"PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Plans how to handle query execution', NAMEINSOURCE '"SYS"."QUERY_PLANS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REFERENTIAL_CONSTRAINTS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short NOT NULL OPTIONS (ANNOTATION 'Column position in this constraint', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    CONSTRAINT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Constraint name', NAMEINSOURCE '"CONSTRAINT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REFERENCED_SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the table referenced by this constraint', NAMEINSOURCE '"REFERENCED_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REFERENCED_TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name of the table referenced by this constraint', NAMEINSOURCE '"REFERENCED_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REFERENCED_COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of column referenced by this column', NAMEINSOURCE '"REFERENCED_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REFERENCED_CONSTRAINT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of unique constraint referenced by this constraint', NAMEINSOURCE '"REFERENCED_CONSTRAINT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UPDATE_RULE string(16) OPTIONS (ANNOTATION 'Update rule: ''CASCADE''/''SET NULL''/''SET DEFAULT''/''RESTRICT''', NAMEINSOURCE '"UPDATE_RULE"', NATIVE_TYPE 'VARCHAR'),
    DELETE_RULE string(16) OPTIONS (ANNOTATION 'Delete rule: ''CASCADE''/''SET NULL''/''SET DEFAULT''/''RESTRICT''', NAMEINSOURCE '"DELETE_RULE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Referential constraints', NAMEINSOURCE '"SYS"."REFERENTIAL_CONSTRAINTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REMOTE_COLUMNS_" (
    COLUMN_OID long NOT NULL OPTIONS (NAMEINSOURCE '"COLUMN_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_OBJECT_OID long OPTIONS (NAMEINSOURCE '"REMOTE_OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_COLUMN_NAME string(256) OPTIONS (NAMEINSOURCE '"REMOTE_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_DATA_TYPE_NAME string(32) OPTIONS (NAMEINSOURCE '"REMOTE_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    REMOTE_LENGTH integer OPTIONS (NAMEINSOURCE '"REMOTE_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOTE_SCALE integer OPTIONS (NAMEINSOURCE '"REMOTE_SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."REMOTE_COLUMNS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REMOTE_OBJECTS_" (
    REMOTE_OBJECT_OID long NOT NULL OPTIONS (NAMEINSOURCE '"REMOTE_OBJECT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_SOURCE_OID long OPTIONS (NAMEINSOURCE '"REMOTE_SOURCE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_DB_NAME string(256) OPTIONS (NAMEINSOURCE '"REMOTE_DB_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_OWNER_NAME string(256) OPTIONS (NAMEINSOURCE '"REMOTE_OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"REMOTE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_OBJECT_TYPE integer OPTIONS (NAMEINSOURCE '"REMOTE_OBJECT_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."REMOTE_OBJECTS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REMOTE_SOURCES" (
    REMOTE_SOURCE_NAME string(256) OPTIONS (ANNOTATION 'Remote source name', NAMEINSOURCE '"REMOTE_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ADAPTER_NAME string(256) OPTIONS (ANNOTATION 'Adapter name', NAMEINSOURCE '"ADAPTER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONNECTION_INFO string(256) OPTIONS (ANNOTATION 'Connection information', NAMEINSOURCE '"CONNECTION_INFO"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Remote sources', NAMEINSOURCE '"SYS"."REMOTE_SOURCES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REMOTE_SOURCES_" (
    REMOTE_SOURCE_OID long NOT NULL OPTIONS (NAMEINSOURCE '"REMOTE_SOURCE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    REMOTE_SOURCE_NAME string(256) OPTIONS (NAMEINSOURCE '"REMOTE_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ADAPTER_NAME string(256) OPTIONS (NAMEINSOURCE '"ADAPTER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONNECTION_INFO string(256) OPTIONS (NAMEINSOURCE '"CONNECTION_INFO"', NATIVE_TYPE 'NVARCHAR'),
    INI_FILE string(256) OPTIONS (NAMEINSOURCE '"INI_FILE"', NATIVE_TYPE 'NVARCHAR'),
    VOLUME_ID integer OPTIONS (NAMEINSOURCE '"VOLUME_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."REMOTE_SOURCES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REORG_OVERVIEW" (
    REORG_ID integer NOT NULL OPTIONS (ANNOTATION 'Reorg ID', NAMEINSOURCE '"REORG_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS string(32) OPTIONS (ANNOTATION 'Status message', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    START_DATE timestamp OPTIONS (ANNOTATION 'Start date', NAMEINSOURCE '"START_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_DATE timestamp OPTIONS (ANNOTATION 'End date', NAMEINSOURCE '"END_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    "USER" string(256) OPTIONS (ANNOTATION 'User', NAMEINSOURCE '"USER"', NATIVE_TYPE 'VARCHAR'),
    ALGORITHM_ID integer OPTIONS (ANNOTATION 'Algorithm ID', NAMEINSOURCE '"ALGORITHM_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARAMETERS string(1024) OPTIONS (ANNOTATION 'Parameter values for algorithm', NAMEINSOURCE '"PARAMETERS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Overview of landscape redistributions', NAMEINSOURCE '"SYS"."REORG_OVERVIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REORG_OVERVIEW_" (
    REORG_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"REORG_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS string(32) OPTIONS (NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    START_DATE timestamp OPTIONS (NAMEINSOURCE '"START_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_DATE timestamp OPTIONS (NAMEINSOURCE '"END_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    "USER" string(256) OPTIONS (NAMEINSOURCE '"USER"', NATIVE_TYPE 'VARCHAR'),
    ALGORITHM_ID integer OPTIONS (NAMEINSOURCE '"ALGORITHM_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    PARAMETERS string(1024) OPTIONS (NAMEINSOURCE '"PARAMETERS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."REORG_OVERVIEW_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REORG_PLAN" (
    STEP_ID integer OPTIONS (ANNOTATION 'Step ID', NAMEINSOURCE '"STEP_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NEW_PARTITION_SPEC clob OPTIONS (ANNOTATION 'New partition specification', NAMEINSOURCE '"NEW_PARTITION_SPEC"', NATIVE_TYPE 'NCLOB'),
    OLD_PARTITION_SPEC clob OPTIONS (ANNOTATION 'Old partition specification', NAMEINSOURCE '"OLD_PARTITION_SPEC"', NATIVE_TYPE 'NCLOB'),
    "PARTITION" integer OPTIONS (ANNOTATION 'Partition ID', NAMEINSOURCE '"PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NEW_HOST string(64) OPTIONS (ANNOTATION 'Host where the table/partition is moved to', NAMEINSOURCE '"NEW_HOST"', NATIVE_TYPE 'VARCHAR'),
    NEW_PORT integer OPTIONS (ANNOTATION 'Port where the table/partition is moved to', NAMEINSOURCE '"NEW_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OLD_HOST string(64) OPTIONS (ANNOTATION 'Host where the table/partition was located', NAMEINSOURCE '"OLD_HOST"', NATIVE_TYPE 'VARCHAR'),
    OLD_PORT integer OPTIONS (ANNOTATION 'Port where the table/partition was located', NAMEINSOURCE '"OLD_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Current plan for landscape reorganization', NAMEINSOURCE '"SYS"."REORG_PLAN"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REORG_PLAN_" (
    STEP_ID integer OPTIONS (NAMEINSOURCE '"STEP_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STEP_GROUP integer OPTIONS (NAMEINSOURCE '"STEP_GROUP"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NEW_PARTITION_SPEC clob(24) OPTIONS (NAMEINSOURCE '"NEW_PARTITION_SPEC"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    OLD_PARTITION_SPEC clob(24) OPTIONS (NAMEINSOURCE '"OLD_PARTITION_SPEC"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    "PARTITION" integer OPTIONS (NAMEINSOURCE '"PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NEW_HOST string(64) OPTIONS (NAMEINSOURCE '"NEW_HOST"', NATIVE_TYPE 'VARCHAR'),
    NEW_PORT integer OPTIONS (NAMEINSOURCE '"NEW_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OLD_HOST string(64) OPTIONS (NAMEINSOURCE '"OLD_HOST"', NATIVE_TYPE 'VARCHAR'),
    OLD_PORT integer OPTIONS (NAMEINSOURCE '"OLD_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."REORG_PLAN_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REORG_PLAN_INFOS" (
    KEY string(256) OPTIONS (ANNOTATION 'Key', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(1024) OPTIONS (ANNOTATION 'Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Additional informations about current landscape reorganization plan', NAMEINSOURCE '"SYS"."REORG_PLAN_INFOS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REORG_PLAN_INFOS_" (
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'VARCHAR'),
    "VALUE" string(1024) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."REORG_PLAN_INFOS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REORG_STEPS" (
    REORG_ID integer NOT NULL OPTIONS (ANNOTATION 'Reorg ID', NAMEINSOURCE '"REORG_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STEP_ID integer NOT NULL OPTIONS (ANNOTATION 'Step ID', NAMEINSOURCE '"STEP_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NEW_PARTITION_SPEC clob OPTIONS (ANNOTATION 'New partition specification', NAMEINSOURCE '"NEW_PARTITION_SPEC"', NATIVE_TYPE 'NCLOB'),
    OLD_PARTITION_SPEC clob OPTIONS (ANNOTATION 'Old partition specification', NAMEINSOURCE '"OLD_PARTITION_SPEC"', NATIVE_TYPE 'NCLOB'),
    "PARTITION" integer OPTIONS (ANNOTATION 'Partition ID', NAMEINSOURCE '"PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NEW_HOST string(64) OPTIONS (ANNOTATION 'Host where the table/partition is moved to', NAMEINSOURCE '"NEW_HOST"', NATIVE_TYPE 'VARCHAR'),
    NEW_PORT integer OPTIONS (ANNOTATION 'Port where the table/partition is moved to', NAMEINSOURCE '"NEW_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OLD_HOST string(64) OPTIONS (ANNOTATION 'Host where the table/partition was located', NAMEINSOURCE '"OLD_HOST"', NATIVE_TYPE 'VARCHAR'),
    OLD_PORT integer OPTIONS (ANNOTATION 'Port where the table/partition was located', NAMEINSOURCE '"OLD_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS string(32) OPTIONS (ANNOTATION 'Status message', NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    "ERROR" string(1024) OPTIONS (ANNOTATION 'Error message', NAMEINSOURCE '"ERROR"', NATIVE_TYPE 'VARCHAR'),
    START_DATE timestamp OPTIONS (ANNOTATION 'Start date', NAMEINSOURCE '"START_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_DATE timestamp OPTIONS (ANNOTATION 'End date', NAMEINSOURCE '"END_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Details of landscape redistribution', NAMEINSOURCE '"SYS"."REORG_STEPS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.REORG_STEPS_" (
    REORG_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"REORG_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STEP_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"STEP_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STEP_GROUP integer OPTIONS (NAMEINSOURCE '"STEP_GROUP"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    NEW_PARTITION_SPEC clob(24) OPTIONS (NAMEINSOURCE '"NEW_PARTITION_SPEC"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    OLD_PARTITION_SPEC clob(24) OPTIONS (NAMEINSOURCE '"OLD_PARTITION_SPEC"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    "PARTITION" integer OPTIONS (NAMEINSOURCE '"PARTITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NEW_HOST string(64) OPTIONS (NAMEINSOURCE '"NEW_HOST"', NATIVE_TYPE 'VARCHAR'),
    NEW_PORT integer OPTIONS (NAMEINSOURCE '"NEW_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OLD_HOST string(64) OPTIONS (NAMEINSOURCE '"OLD_HOST"', NATIVE_TYPE 'VARCHAR'),
    OLD_PORT integer OPTIONS (NAMEINSOURCE '"OLD_PORT"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATUS string(32) OPTIONS (NAMEINSOURCE '"STATUS"', NATIVE_TYPE 'VARCHAR'),
    "ERROR" string(1024) OPTIONS (NAMEINSOURCE '"ERROR"', NATIVE_TYPE 'VARCHAR'),
    START_DATE timestamp OPTIONS (NAMEINSOURCE '"START_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    END_DATE timestamp OPTIONS (NAMEINSOURCE '"END_DATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (NAMEINSOURCE '"SYS"."REORG_STEPS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.RESERVED_KEYWORDS" (
    RESERVED_KEYWORD string(256) OPTIONS (ANNOTATION 'Reserved keyword', NAMEINSOURCE '"RESERVED_KEYWORD"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Reserved keywords not allowed to be used as simple identifier ', NAMEINSOURCE '"SYS"."RESERVED_KEYWORDS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.ROLES" (
    ROLE_NAME string(256) OPTIONS (ANNOTATION 'Role name', NAMEINSOURCE '"ROLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROLE_ID long OPTIONS (ANNOTATION 'Role ID', NAMEINSOURCE '"ROLE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ROLE_MODE string(5) NOT NULL OPTIONS (ANNOTATION 'Mode of the role: ''LOCAL''', NAMEINSOURCE '"ROLE_MODE"', NATIVE_TYPE 'VARCHAR'),
    GLOBAL_IDENTITY string(256) OPTIONS (ANNOTATION 'Identity specified for role with ROLE_MODE GLOBAL', NAMEINSOURCE '"GLOBAL_IDENTITY"', NATIVE_TYPE 'NVARCHAR'),
    CREATOR string(256) OPTIONS (ANNOTATION 'Name of user who created the role', NAMEINSOURCE '"CREATOR"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Time the role was created', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CONTEXT string(2048) OPTIONS (ANNOTATION 'Context the role is valid for', NAMEINSOURCE '"CONTEXT"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Shows available roles', NAMEINSOURCE '"SYS"."ROLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.RS_COLUMNS_" (
    CID long NOT NULL OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMNID long OPTIONS (NAMEINSOURCE '"COLUMNID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    FIELDTYPE byte OPTIONS (NAMEINSOURCE '"FIELDTYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TYPEID byte OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CS_TYPE integer OPTIONS (NAMEINSOURCE '"CS_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ABAP_TYPE integer OPTIONS (NAMEINSOURCE '"ABAP_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MDRS_TYPE integer OPTIONS (NAMEINSOURCE '"MDRS_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLLATION string(256) OPTIONS (NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    "OFFSET" short OPTIONS (NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEFAULTVALUE string(5000) OPTIONS (NAMEINSOURCE '"DEFAULTVALUE"', NATIVE_TYPE 'NVARCHAR'),
    "CONSTRAINT" byte OPTIONS (NAMEINSOURCE '"CONSTRAINT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DERIVED byte NOT NULL OPTIONS (NAMEINSOURCE '"DERIVED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    IMPLEMENTATION_FLAGS integer OPTIONS (NAMEINSOURCE '"IMPLEMENTATION_FLAGS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FLAGS byte OPTIONS (NAMEINSOURCE '"FLAGS"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    MINIMUM_CARDINALITY integer OPTIONS (NAMEINSOURCE '"MINIMUM_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    MAXIMUM_CARDINALITY integer OPTIONS (NAMEINSOURCE '"MAXIMUM_CARDINALITY"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."RS_COLUMNS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.RS_TABLES_" (
    SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CID integer NOT NULL OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    VID short OPTIONS (NAMEINSOURCE '"VID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    FIXEDPARTSIZE short OPTIONS (NAMEINSOURCE '"FIXEDPARTSIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LOGGING byte OPTIONS (NAMEINSOURCE '"LOGGING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TABLETYPE integer OPTIONS (NAMEINSOURCE '"TABLETYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TABLE_LOCKKEY_ID integer OPTIONS (NAMEINSOURCE '"TABLE_LOCKKEY_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UNLOAD_PRIORITY byte OPTIONS (NAMEINSOURCE '"UNLOAD_PRIORITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."RS_TABLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.RS_VIEWS_" (
    SCHEMA string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    OID long OPTIONS (NAMEINSOURCE '"OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNICODE byte OPTIONS (NAMEINSOURCE '"UNICODE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    FIXEDPARTSIZE short OPTIONS (NAMEINSOURCE '"FIXEDPARTSIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    READONLY byte OPTIONS (NAMEINSOURCE '"READONLY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WITHCHECK byte OPTIONS (NAMEINSOURCE '"WITHCHECK"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    WITHCOLUMN byte OPTIONS (NAMEINSOURCE '"WITHCOLUMN"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    QUERYSTRING clob(24) OPTIONS (NAMEINSOURCE '"QUERYSTRING"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'NCLOB'),
    SHARED byte OPTIONS (NAMEINSOURCE '"SHARED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    VIEWTYPE integer OPTIONS (NAMEINSOURCE '"VIEWTYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."RS_VIEWS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.SAML_PROVIDERS" (
    SAML_PROVIDER_NAME string(256) OPTIONS (ANNOTATION 'Provider name', NAMEINSOURCE '"SAML_PROVIDER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_NAME string(512) OPTIONS (ANNOTATION 'Subject of the X.509 certificate of the SAML provider', NAMEINSOURCE '"SUBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ISSUER_NAME string(512) OPTIONS (ANNOTATION 'Issuer of the X.509 certificate of the SAML provider', NAMEINSOURCE '"ISSUER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Shows available SAML provider', NAMEINSOURCE '"SYS"."SAML_PROVIDERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.SAML_USER_MAPPINGS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SAML_PROVIDER_NAME string(256) OPTIONS (ANNOTATION 'Provider name', NAMEINSOURCE '"SAML_PROVIDER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    EXTERNAL_IDENTITY string(256) OPTIONS (ANNOTATION 'Name of the user known to the provider', NAMEINSOURCE '"EXTERNAL_IDENTITY"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Shows the SAML providers known for each user', NAMEINSOURCE '"SYS"."SAML_USER_MAPPINGS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.SCHEMAS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SCHEMA_OWNER string(256) OPTIONS (ANNOTATION 'Schema owner', NAMEINSOURCE '"SCHEMA_OWNER"', NATIVE_TYPE 'NVARCHAR'),
    HAS_PRIVILEGES string(5) NOT NULL OPTIONS (ANNOTATION 'Shows if user is schema owner or has any privilege for the schema or any object within the schema: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_PRIVILEGES"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Shows available schemas', NAMEINSOURCE '"SYS"."SCHEMAS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.SEARCH_RULE_SET_CONDITIONS" (
    SEARCH_RULE_SET_PACKAGE_ID string(256) OPTIONS (ANNOTATION 'Name of the repository package of the search rule set', NAMEINSOURCE '"SEARCH_RULE_SET_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    SEARCH_RULE_SET_NAME string(256) OPTIONS (ANNOTATION 'Name of the search rule set', NAMEINSOURCE '"SEARCH_RULE_SET_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RULE_NUMBER integer OPTIONS (ANNOTATION 'Number of the rule that contains the column', NAMEINSOURCE '"RULE_NUMBER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    RULE_ID string(256) OPTIONS (ANNOTATION 'Unique ID/name of the rule that contains the column', NAMEINSOURCE '"RULE_ID"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_COLUMN_NAME string(256) OPTIONS (ANNOTATION 'Name of a column that is used by a search rule set', NAMEINSOURCE '"SEARCHED_COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_COLUMN_CONDITION string(20) OPTIONS (ANNOTATION 'The condition. Possible values are EQUALS, NOT EMPTY, MISSING', NAMEINSOURCE '"SEARCHED_COLUMN_CONDITION"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_COLUMN_VALUE string(5000) OPTIONS (ANNOTATION 'The value the user input is compared to, if condition is EQUALS', NAMEINSOURCE '"SEARCHED_COLUMN_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_COLUMN_VALUE_REPLACED_BY string(5000) OPTIONS (ANNOTATION 'The user input is replaced by this value if the action is REPLACE', NAMEINSOURCE '"SEARCHED_COLUMN_VALUE_REPLACED_BY"', NATIVE_TYPE 'NVARCHAR'),
    ACTION string(20) OPTIONS (ANNOTATION 'Action that is done when the condition is true. Possible values are SKIP COLUMN, SKIP RULE, REPLACE', NAMEINSOURCE '"ACTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Shows conditions to available search rule sets', NAMEINSOURCE '"SYS"."SEARCH_RULE_SET_CONDITIONS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.SEARCH_RULE_SETS" (
    SEARCH_RULE_SET_PACKAGE_ID string(256) OPTIONS (ANNOTATION 'Name of the repository package of the search rule set', NAMEINSOURCE '"SEARCH_RULE_SET_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    SEARCH_RULE_SET_NAME string(256) OPTIONS (ANNOTATION 'Name of the search rule set', NAMEINSOURCE '"SEARCH_RULE_SET_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name of the catalog object that is searched by the given search rule set', NAMEINSOURCE '"SEARCHED_SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the catalog object that is searched by the given search rule set', NAMEINSOURCE '"SEARCHED_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_REPOSITORY_PACKAGE_ID string(256) OPTIONS (ANNOTATION 'Name of the repository package of the repository object that is searched by the given search rule set', NAMEINSOURCE '"SEARCHED_REPOSITORY_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    SEARCHED_REPOSITORY_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the repository object that is searched by the given search rule set', NAMEINSOURCE '"SEARCHED_REPOSITORY_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Shows information about available search rule sets', NAMEINSOURCE '"SYS"."SEARCH_RULE_SETS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.SEQUENCES" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the sequence', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEQUENCE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the sequence', NAMEINSOURCE '"SEQUENCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SEQUENCE_OID long OPTIONS (ANNOTATION 'Object ID of the sequence', NAMEINSOURCE '"SEQUENCE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    START_NUMBER long OPTIONS (ANNOTATION 'Start number', NAMEINSOURCE '"START_NUMBER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MIN_VALUE long OPTIONS (ANNOTATION 'Minimum value of the sequence', NAMEINSOURCE '"MIN_VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    MAX_VALUE long OPTIONS (ANNOTATION 'Maximum value of the sequence', NAMEINSOURCE '"MAX_VALUE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    INCREMENT_BY long OPTIONS (ANNOTATION 'Incremental value', NAMEINSOURCE '"INCREMENT_BY"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_CYCLED string(5) OPTIONS (ANNOTATION 'Specifies whether the sequence will start with MIN_VALUE after having reached MAX_VALUE in case of INCREMENT_BY greater than 0 or start with MAX_VALUE after having reached MIN_VALUE in case of INCREMENT_BY less than 0: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_CYCLED"', NATIVE_TYPE 'VARCHAR'),
    RESET_BY_QUERY clob OPTIONS (ANNOTATION 'Reset by query string for the sequence', NAMEINSOURCE '"RESET_BY_QUERY"', NATIVE_TYPE 'NCLOB'),
    CACHE_SIZE short OPTIONS (ANNOTATION 'Cache size of the sequence', NAMEINSOURCE '"CACHE_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT')
) OPTIONS (ANNOTATION 'Available sequences', NAMEINSOURCE '"SYS"."SEQUENCES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.SESSION_COOKIES" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user this session cookie was created for', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT_HOST string(64) OPTIONS (ANNOTATION 'Host name of client machine', NAMEINSOURCE '"CLIENT_HOST"', NATIVE_TYPE 'NVARCHAR'),
    CLIENT_PID long OPTIONS (ANNOTATION 'Client Process ID', NAMEINSOURCE '"CLIENT_PID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'The time the session cookie was created', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_CONNECT_TIME timestamp OPTIONS (ANNOTATION 'The last time the session cookie was used for successful re-connection', NAMEINSOURCE '"LAST_CONNECT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    SESSION_END_TIME timestamp OPTIONS (ANNOTATION 'The time the main connection has ended', NAMEINSOURCE '"SESSION_END_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP')
) OPTIONS (ANNOTATION 'Shows information about available session cookies', NAMEINSOURCE '"SYS"."SESSION_COOKIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.SQLSCRIPT_TRACE" (
    TRACE_TIMESTAMP timestamp OPTIONS (ANNOTATION 'Timestamp generated when a TRACE is performed', NAMEINSOURCE '"TRACE_TIMESTAMP"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    TRANSACTION_ID integer OPTIONS (ANNOTATION 'Transaction object ID ', NAMEINSOURCE '"TRANSACTION_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    STATEMENT_ID long OPTIONS (ANNOTATION 'Logical ID of the outmost user statement, which triggers the procedure execution (direct or indirect)', NAMEINSOURCE '"STATEMENT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PROCEDURE_OID long OPTIONS (ANNOTATION 'The procedure object ID', NAMEINSOURCE '"PROCEDURE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VARIABLE_NAME string(256) OPTIONS (ANNOTATION 'The internal variable name used for the variable to which the TRACE operator is assigned', NAMEINSOURCE '"VARIABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'The name of the local temporary table containing the table result', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Contains the names of the local temporary tables created by the SQLScript TRACE operator', NAMEINSOURCE '"SYS"."SQLSCRIPT_TRACE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.ST_GEOMETRY_COLUMNS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the schema to which the table containing the spatial column belongs', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the table containing the spatial column', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the spatial column', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRS_ID integer NOT NULL OPTIONS (ANNOTATION 'Numeric identifier (SRID) for the spatial reference system (SRS) associated with the spatial column', NAMEINSOURCE '"SRS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SRS_NAME string(256) OPTIONS (ANNOTATION 'Name of the SRS associated with the spatial column', NAMEINSOURCE '"SRS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Spatial data type', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Spatial columns', NAMEINSOURCE '"SYS"."ST_GEOMETRY_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.ST_SPATIAL_REFERENCE_SYSTEMS" (
    OWNER_NAME string(256) OPTIONS (ANNOTATION 'Owner name of this spatial reference system (SRS)', NAMEINSOURCE '"OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRS_ID integer OPTIONS (ANNOTATION 'Numeric identifier (SRID) of this spatial reference system', NAMEINSOURCE '"SRS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SRS_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of this spatial reference system', NAMEINSOURCE '"SRS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROUND_EARTH string(7) NOT NULL OPTIONS (ANNOTATION 'Whether the SRS type is ROUND EARTH (''TRUE'') or PLANAR (''FALSE'')', NAMEINSOURCE '"ROUND_EARTH"', NATIVE_TYPE 'VARCHAR'),
    AXIS_ORDER string(12) NOT NULL OPTIONS (ANNOTATION 'Describes how the database server interprets points with regards to latitude and longitude: ''x/y/z/m''/''long/lat/z/m''/''lat/long/z/m''', NAMEINSOURCE '"AXIS_ORDER"', NATIVE_TYPE 'VARCHAR'),
    SNAP_TO_GRID double OPTIONS (ANNOTATION 'Defines the size of the grid when performing calculations', NAMEINSOURCE '"SNAP_TO_GRID"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOLERANCE double OPTIONS (ANNOTATION 'Defines the precision to use when comparing points', NAMEINSOURCE '"TOLERANCE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    SEMI_MAJOR_AXIS double OPTIONS (ANNOTATION 'Distance from center of the ellipsoid to the equator for a ROUND EARTH SRS', NAMEINSOURCE '"SEMI_MAJOR_AXIS"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    SEMI_MINOR_AXIS double OPTIONS (ANNOTATION 'Distance from center of the ellipsoid to the poles for a ROUND EARTH SRS', NAMEINSOURCE '"SEMI_MINOR_AXIS"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    INV_FLATTENING double OPTIONS (ANNOTATION 'The inverse flattening used for the ellipsoid in a ROUND EARTH SRS', NAMEINSOURCE '"INV_FLATTENING"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_X double OPTIONS (ANNOTATION 'Minimum x value allowed in coordinates', NAMEINSOURCE '"MIN_X"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_X double OPTIONS (ANNOTATION 'Maximum x value allowed in coordinates', NAMEINSOURCE '"MAX_X"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_Y double OPTIONS (ANNOTATION 'Minimum y value allowed in coordinates', NAMEINSOURCE '"MIN_Y"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_Y double OPTIONS (ANNOTATION 'Maximum y value allowed in coordinates', NAMEINSOURCE '"MAX_Y"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_Z double OPTIONS (ANNOTATION 'Minimum z value allowed in coordinates', NAMEINSOURCE '"MIN_Z"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_Z double OPTIONS (ANNOTATION 'Maximum z value allowed in coordinates', NAMEINSOURCE '"MAX_Z"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    ORGANIZATION string(256) OPTIONS (ANNOTATION 'Name of the organization that created the coordinate system used by this spatial reference system', NAMEINSOURCE '"ORGANIZATION"', NATIVE_TYPE 'NVARCHAR'),
    ORGANIZATION_COORDSYS_ID integer OPTIONS (ANNOTATION 'ID given to the coordinate system by the organization that created it', NAMEINSOURCE '"ORGANIZATION_COORDSYS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SRS_TYPE string(11) NOT NULL OPTIONS (ANNOTATION 'Type of SRS as defined by the SQL/MM standard: ''GEOGRAPHIC''/''PROJECTED''/''ENGINEERING''', NAMEINSOURCE '"SRS_TYPE"', NATIVE_TYPE 'VARCHAR'),
    LINEAR_UNIT_OF_MEASURE string(256) NOT NULL OPTIONS (ANNOTATION 'Linear unit of measure used by this spatial reference system', NAMEINSOURCE '"LINEAR_UNIT_OF_MEASURE"', NATIVE_TYPE 'NVARCHAR'),
    ANGULAR_UNIT_OF_MEASURE string(256) OPTIONS (ANNOTATION 'Angular unit of measure used by this spatial reference system', NAMEINSOURCE '"ANGULAR_UNIT_OF_MEASURE"', NATIVE_TYPE 'NVARCHAR'),
    POLYGON_FORMAT string(16) NOT NULL OPTIONS (ANNOTATION 'Orientation of the rings in a polygon: ''COUNTERCLOCKWISE''/''CLOCKWISE''/''EVENODD''', NAMEINSOURCE '"POLYGON_FORMAT"', NATIVE_TYPE 'VARCHAR'),
    STORAGE_FORMAT string(8) NOT NULL OPTIONS (ANNOTATION 'Whether the data is stored in normalized format (''INTERNAL''), unnormalized format (''ORIGINAL''), or both (''MIXED'')', NAMEINSOURCE '"STORAGE_FORMAT"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION string(256) OPTIONS (ANNOTATION 'WKT definition of this spatial reference system in the format defined by the OGC standard', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NVARCHAR'),
    TRANSFORM_DEFINITION string(256) OPTIONS (ANNOTATION 'Transform definition settings for use when transforming data from this SRS to another', NAMEINSOURCE '"TRANSFORM_DEFINITION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Spatial reference systems', NAMEINSOURCE '"SYS"."ST_SPATIAL_REFERENCE_SYSTEMS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.ST_SPATIAL_REFERENCE_SYSTEMS_" (
    SRS_OID long OPTIONS (NAMEINSOURCE '"SRS_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SRS_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SRS_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRS_ID integer OPTIONS (NAMEINSOURCE '"SRS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ROUND_EARTH byte OPTIONS (NAMEINSOURCE '"ROUND_EARTH"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    AXIS_ORDER byte OPTIONS (NAMEINSOURCE '"AXIS_ORDER"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    POLYGON_FORMAT byte OPTIONS (NAMEINSOURCE '"POLYGON_FORMAT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    STORAGE_FORMAT byte OPTIONS (NAMEINSOURCE '"STORAGE_FORMAT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    SNAP_TO_GRID double OPTIONS (NAMEINSOURCE '"SNAP_TO_GRID"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    TOLERANCE double OPTIONS (NAMEINSOURCE '"TOLERANCE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    SEMI_MAJOR_AXIS double OPTIONS (NAMEINSOURCE '"SEMI_MAJOR_AXIS"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    SEMI_MINOR_AXIS double OPTIONS (NAMEINSOURCE '"SEMI_MINOR_AXIS"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    INV_FLATTENING double OPTIONS (NAMEINSOURCE '"INV_FLATTENING"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_X double OPTIONS (NAMEINSOURCE '"MIN_X"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_X double OPTIONS (NAMEINSOURCE '"MAX_X"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_Y double OPTIONS (NAMEINSOURCE '"MIN_Y"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_Y double OPTIONS (NAMEINSOURCE '"MAX_Y"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_Z double OPTIONS (NAMEINSOURCE '"MIN_Z"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_Z double OPTIONS (NAMEINSOURCE '"MAX_Z"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MIN_M double OPTIONS (NAMEINSOURCE '"MIN_M"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAX_M double OPTIONS (NAMEINSOURCE '"MAX_M"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    ORGANIZATION string(256) OPTIONS (NAMEINSOURCE '"ORGANIZATION"', NATIVE_TYPE 'NVARCHAR'),
    LINEAR_UNIT_OF_MEASURE long OPTIONS (NAMEINSOURCE '"LINEAR_UNIT_OF_MEASURE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    ANGULAR_UNIT_OF_MEASURE long OPTIONS (NAMEINSOURCE '"ANGULAR_UNIT_OF_MEASURE"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEFINITION string(256) OPTIONS (NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NVARCHAR'),
    TRANSFORM_DEFINITION string(256) OPTIONS (NAMEINSOURCE '"TRANSFORM_DEFINITION"', NATIVE_TYPE 'NVARCHAR'),
    ORGANIZATION_COORDSYS_ID integer OPTIONS (NAMEINSOURCE '"ORGANIZATION_COORDSYS_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SRS_TYPE byte OPTIONS (NAMEINSOURCE '"SRS_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."ST_SPATIAL_REFERENCE_SYSTEMS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.ST_UNITS_OF_MEASURE" (
    OWNER_NAME string(256) OPTIONS (ANNOTATION 'Owner name of this unit of measure', NAMEINSOURCE '"OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNIT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of this unit of measure', NAMEINSOURCE '"UNIT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    UNIT_TYPE string(7) NOT NULL OPTIONS (ANNOTATION 'Type of this unit of measure: ''ANGULAR''/''LINEAR''', NAMEINSOURCE '"UNIT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    CONVERSION_FACTOR double OPTIONS (ANNOTATION 'Conversion factor of this unit of measure', NAMEINSOURCE '"CONVERSION_FACTOR"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION 'Spatial units of measure', NAMEINSOURCE '"SYS"."ST_UNITS_OF_MEASURE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.ST_UNITS_OF_MEASURE_" (
    UNIT_OID long OPTIONS (NAMEINSOURCE '"UNIT_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UNIT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"UNIT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    CONVERSION_FACTOR double OPTIONS (NAMEINSOURCE '"CONVERSION_FACTOR"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    UNIT_TYPE byte OPTIONS (NAMEINSOURCE '"UNIT_TYPE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."ST_UNITS_OF_MEASURE_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.STATISTICS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short NOT NULL OPTIONS (ANNOTATION 'Ordinal position of the column in the table', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    MINVALUE double OPTIONS (ANNOTATION 'Min value of the column. The value is manipulated into the Double type value', NAMEINSOURCE '"MINVALUE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MINVALUE_STR string(256) OPTIONS (ANNOTATION 'String representation of the column', NAMEINSOURCE '"MINVALUE_STR"', NATIVE_TYPE 'NVARCHAR'),
    MAXVALUE double OPTIONS (ANNOTATION 'Max value of the column. The value is manipulated into the Double type value', NAMEINSOURCE '"MAXVALUE"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    MAXVALUE_STR string(256) OPTIONS (ANNOTATION 'String representation of the column', NAMEINSOURCE '"MAXVALUE_STR"', NATIVE_TYPE 'NVARCHAR'),
    COUNT double OPTIONS (ANNOTATION 'Number of not null value of the column', NAMEINSOURCE '"COUNT"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    DCOUNT double OPTIONS (ANNOTATION 'Number of distinct value of the column', NAMEINSOURCE '"DCOUNT"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE'),
    NULLCOUNT double OPTIONS (ANNOTATION 'Number of null values of the column', NAMEINSOURCE '"NULLCOUNT"', RADIX 2, CHAR_OCTET_LENGTH 8, NATIVE_TYPE 'DOUBLE')
) OPTIONS (ANNOTATION 'Stores a histogram of tables. The histogram can be used by query optimizer to calculate size of an intermediate result', NAMEINSOURCE '"SYS"."STATISTICS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.STRUCTURED_PRIVILEGES" (
    STRUCTURED_PRIVILEGE_ID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the structured privilege', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    STRUCTURED_PRIVILEGE_NAME string(256) OPTIONS (ANNOTATION 'Name of the structured privilege', NAMEINSOURCE '"STRUCTURED_PRIVILEGE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    RESTRICTION_TYPE string(256) NOT NULL OPTIONS (ANNOTATION 'Type of the restriction: ''CUBERESTRICTION''/''ACTIVITYRESTRICTION''/''VALIDITYRESTRICTION''/''DIMENSIONRESTRICTION''', NAMEINSOURCE '"RESTRICTION_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    DIMENSION_ATTRIBUTE string(256) OPTIONS (ANNOTATION 'Name of the dimension attribute', NAMEINSOURCE '"DIMENSION_ATTRIBUTE"', NATIVE_TYPE 'NVARCHAR'),
    FILTER_ID long OPTIONS (ANNOTATION 'Number of filter to be able to combine all operators/ operands belonging to one filter', NAMEINSOURCE '"FILTER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    FILTER_TYPE string(16) OPTIONS (ANNOTATION 'Type of filter: ''STATIC''/''DYNAMIC''', NAMEINSOURCE '"FILTER_TYPE"', NATIVE_TYPE 'VARCHAR'),
    NEGATED string(5) OPTIONS (ANNOTATION 'Operator was negated in filter; ''TRUE''/''FALSE''', NAMEINSOURCE '"NEGATED"', NATIVE_TYPE 'VARCHAR'),
    OPERATOR string(16) NOT NULL OPTIONS (ANNOTATION 'Type of operator: ''CONTAINS PATTERN''/''BETWEEN''/''EQUAL''/''IN''/''LESS THAN''/''LESS EQUAL''/''GREATER THAN''/''GREATER EQUAL''', NAMEINSOURCE '"OPERATOR"', NATIVE_TYPE 'VARCHAR'),
    OPERAND_ORDER integer OPTIONS (ANNOTATION 'Sequence of operands per filter ID', NAMEINSOURCE '"OPERAND_ORDER"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    OPERAND string(513) OPTIONS (ANNOTATION 'Value the operator will be compared to', NAMEINSOURCE '"OPERAND"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Available structured privileges', NAMEINSOURCE '"SYS"."STRUCTURED_PRIVILEGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.SYNONYMS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the synonym', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SYNONYM_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the synonym', NAMEINSOURCE '"SYNONYM_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SYNONYM_OID long OPTIONS (ANNOTATION 'Object ID of the synonym', NAMEINSOURCE '"SYNONYM_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJECT_SCHEMA string(256) OPTIONS (ANNOTATION 'Schema name of the referenced object', NAMEINSOURCE '"OBJECT_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Name of the referenced object', NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_TYPE string(32) NOT NULL OPTIONS (ANNOTATION 'Type of the referenced object', NAMEINSOURCE '"OBJECT_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_COLUMN_OBJECT string(5) OPTIONS (ANNOTATION 'Specifies whether this view is a column object or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_OBJECT"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) OPTIONS (ANNOTATION 'Specifies whether the synonym is valid or not. This becomes ''FALSE'' when its base object is dropped: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Available synonyms', NAMEINSOURCE '"SYS"."SYNONYMS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TABLE_COLUMNS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the column', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the column in a record', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'SQL data type ID of the column', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'SQL data type name of the column', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "OFFSET" short OPTIONS (ANNOTATION 'Offset of the column in the record', NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LENGTH integer OPTIONS (ANNOTATION 'Number of chars for char types, number of max digits for numeric types; number of chars for datetime types, number of bytes for LOB types', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Numeric types: the maximum number of digits to the right of the decimal point; time, timestamp: the decimal digits are defined as the number of digits to the right of the decimal point in the second''s component of the data', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the column is allowed to accept null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (ANNOTATION 'Default value of the column', NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    COLLATION string(256) OPTIONS (ANNOTATION 'Collation used for this column', NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Description for this column', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(1) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'VARCHAR'),
    MIN_VALUE string(1) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'VARCHAR'),
    CS_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'Column store data type ID', NAMEINSOURCE '"CS_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Column store data type name', NAMEINSOURCE '"CS_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DDIC_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'DDIC data type ID', NAMEINSOURCE '"DDIC_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DDIC_DATA_TYPE_NAME string(7) OPTIONS (ANNOTATION 'DDIC data type name', NAMEINSOURCE '"DDIC_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMPRESSION_TYPE string(9) NOT NULL OPTIONS (ANNOTATION 'Type of compression: ''DEFAULT''/''PREFIXED''/''SPARSE''/''CLUSTERED''/''INDIRECT''/''RLE''. Columns in TABLE_COLUMNS show the default value which can be specified during table creation. They can also be updated using an ''ALTER TABLE'' statement.', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(4) NOT NULL OPTIONS (ANNOTATION 'Type of index: ''NONE''/''FULL''', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_ID long OPTIONS (ANNOTATION 'ID of the column', NAMEINSOURCE '"COLUMN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRELOAD string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column is preloaded: ''TRUE''/''FALSE''', NAMEINSOURCE '"PRELOAD"', NATIVE_TYPE 'VARCHAR'),
    GENERATED_ALWAYS_AS string(1000) OPTIONS (ANNOTATION 'Specifies the expression of the column created by GENERATED ... AS', NAMEINSOURCE '"GENERATED_ALWAYS_AS"', NATIVE_TYPE 'NVARCHAR'),
    HAS_SCHEMA_FLEXIBILITY string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column has schema flexibility: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_SCHEMA_FLEXIBILITY"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_INDEX string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column has fuzzy search index: ''TRUE''/''FALSE''', NAMEINSOURCE '"FUZZY_SEARCH_INDEX"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_MODE string(16) OPTIONS (ANNOTATION 'Specifies fuzzy search mode', NAMEINSOURCE '"FUZZY_SEARCH_MODE"', NATIVE_TYPE 'VARCHAR'),
    MEMORY_THRESHOLD integer OPTIONS (ANNOTATION 'Specifies memory threshold in bytes for LOB types', NAMEINSOURCE '"MEMORY_THRESHOLD"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOAD_UNIT string(6) OPTIONS (ANNOTATION 'Specifies unit of column data loading: ''TABLE''/''COLUMN''/''PAGE''', NAMEINSOURCE '"LOAD_UNIT"', NATIVE_TYPE 'VARCHAR'),
    GENERATION_TYPE string(22) OPTIONS (ANNOTATION '''ALWAYS AS'' if the column is generation column, ''ALWAYS AS IDENTITY''/''BY DEFAULT AS IDENTITY'' if the column is an identity column whose values are always generated or generated by default, NULL otherwise', NAMEINSOURCE '"GENERATION_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Available table columns', NAMEINSOURCE '"SYS"."TABLE_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TABLE_COLUMNS_ODBC" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Name of the column', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'SQL data type ID of the column', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'SQL data type name of the column', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_SIZE integer OPTIONS (ANNOTATION 'Total number of characters required to display the value when it is converted to characters', NAMEINSOURCE '"COLUMN_SIZE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    BUFFER_LENGTH integer OPTIONS (ANNOTATION 'Length in bytes required to transfer the value', NAMEINSOURCE '"BUFFER_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DECIMAL_DIGITS integer OPTIONS (ANNOTATION 'Total number of significant digits to the right of the decimal point', NAMEINSOURCE '"DECIMAL_DIGITS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NUM_PREC_RADIX integer OPTIONS (ANNOTATION 'For numeric data types either 10 or 2. Specifies how to interpret columns COLUMN_SIZE and DECIMAL_DIGITS', NAMEINSOURCE '"NUM_PREC_RADIX"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the column is allowed to accept null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_DEF string(5000) OPTIONS (ANNOTATION 'Default value of the column', NAMEINSOURCE '"COLUMN_DEF"', NATIVE_TYPE 'NVARCHAR'),
    SQL_DATA_TYPE short OPTIONS (ANNOTATION 'SQL data type ID of the column', NAMEINSOURCE '"SQL_DATA_TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SQL_DATETIME_SUB short OPTIONS (ANNOTATION 'Subtype code for datetime data types', NAMEINSOURCE '"SQL_DATETIME_SUB"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    CHAR_OCTET_LENGTH integer OPTIONS (ANNOTATION 'Maximum length in bytes of a character or binary data type column', NAMEINSOURCE '"CHAR_OCTET_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the column in a record', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Description for this column', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Available table columns', NAMEINSOURCE '"SYS"."TABLE_COLUMNS_ODBC"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TABLE_GROUPS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_TYPE string(256) OPTIONS (ANNOTATION 'Group type', NAMEINSOURCE '"GROUP_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    SUBTYPE string(256) OPTIONS (ANNOTATION 'Subtype', NAMEINSOURCE '"SUBTYPE"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_NAME string(256) OPTIONS (ANNOTATION 'Group name', NAMEINSOURCE '"GROUP_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Overview of table groups relations', NAMEINSOURCE '"SYS"."TABLE_GROUPS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TABLE_GROUPS_" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_TYPE string(256) OPTIONS (NAMEINSOURCE '"GROUP_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    SUBTYPE string(256) OPTIONS (NAMEINSOURCE '"SUBTYPE"', NATIVE_TYPE 'NVARCHAR'),
    GROUP_NAME string(256) OPTIONS (NAMEINSOURCE '"GROUP_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."TABLE_GROUPS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TABLE_REPLICAS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SOURCE_TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"SOURCE_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REPLICA_TABLE_NAME string(256) OPTIONS (ANNOTATION 'Replica name', NAMEINSOURCE '"REPLICA_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Replicated tables and their replicas', NAMEINSOURCE '"SYS"."TABLE_REPLICAS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TABLES" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_OID long OPTIONS (ANNOTATION 'Object ID of the table', NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Table description', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    FIXED_PART_SIZE short OPTIONS (ANNOTATION 'Fixed part size of the table', NAMEINSOURCE '"FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    IS_LOGGED string(5) OPTIONS (ANNOTATION 'Specifies whether or not logging was on for the table at last restart time: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_LOGGED"', NATIVE_TYPE 'VARCHAR'),
    IS_SYSTEM_TABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Deprecated: only used internally. Possible values: ''TRUE''/''FALSE''. Cannot be used to distinguish customer tables from predefined tables', NAMEINSOURCE '"IS_SYSTEM_TABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_COLUMN_TABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table is a column table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_TABLE"', NATIVE_TYPE 'VARCHAR'),
    TABLE_TYPE string(16) OPTIONS (ANNOTATION 'Specifies type of the table: ''ROW''/''COLUMN''/''HYBRID''', NAMEINSOURCE '"TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_INSERT_ONLY string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table is an ''insert only'' table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_INSERT_ONLY"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED_DATA string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table can be shared among other instances: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED_DATA"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED_METADATA string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table is a global table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED_METADATA"', NATIVE_TYPE 'VARCHAR'),
    SESSION_TYPE string(7) NOT NULL OPTIONS (ANNOTATION 'Session type: ''NONE''/''SIMPLE''/''HISTORY''. For ''HISTORY'', time travel is possible', NAMEINSOURCE '"SESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_TEMPORARY string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the table is a temporary table: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TEMPORARY"', NATIVE_TYPE 'VARCHAR'),
    TEMPORARY_TABLE_TYPE string(10) NOT NULL OPTIONS (ANNOTATION 'Temporary table type', NAMEINSOURCE '"TEMPORARY_TABLE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    COMMIT_ACTION string(8) OPTIONS (ANNOTATION 'On commit deletion for global temporary tables', NAMEINSOURCE '"COMMIT_ACTION"', NATIVE_TYPE 'VARCHAR'),
    IS_USER_DEFINED_TYPE string(5) NOT NULL OPTIONS (ANNOTATION '''TRUE'' if user defined table type, ''FALSE'' otherwise', NAMEINSOURCE '"IS_USER_DEFINED_TYPE"', NATIVE_TYPE 'VARCHAR'),
    HAS_PRIMARY_KEY string(5) NOT NULL OPTIONS (ANNOTATION '''TRUE'' if the table has a primary key, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"HAS_PRIMARY_KEY"', NATIVE_TYPE 'VARCHAR'),
    PARTITION_SPEC clob OPTIONS (ANNOTATION 'Detail specification of table partitioning. Only valid for column store tables', NAMEINSOURCE '"PARTITION_SPEC"', NATIVE_TYPE 'NCLOB'),
    USES_EXTKEY string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses an external key, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"USES_EXTKEY"', NATIVE_TYPE 'VARCHAR'),
    AUTO_MERGE_ON string(5) OPTIONS (ANNOTATION '''TRUE'' if automatic delta table merge is activated for the table, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"AUTO_MERGE_ON"', NATIVE_TYPE 'VARCHAR'),
    USES_DIMFN_CACHE string(5) OPTIONS (ANNOTATION '''TRUE'' if DimFunctionCache feature is used by the table, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"USES_DIMFN_CACHE"', NATIVE_TYPE 'VARCHAR'),
    IS_PUBLIC string(5) OPTIONS (ANNOTATION '''TRUE'' if the table is public, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"IS_PUBLIC"', NATIVE_TYPE 'VARCHAR'),
    AUTO_OPTIMIZE_COMPRESSION_ON string(5) OPTIONS (ANNOTATION '''TRUE'' if automatic optimize compression is activated for the table, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"AUTO_OPTIMIZE_COMPRESSION_ON"', NATIVE_TYPE 'VARCHAR'),
    COMPRESSED_EXTKEY string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses a compressed external key, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"COMPRESSED_EXTKEY"', NATIVE_TYPE 'VARCHAR'),
    HAS_TEXT_FIELDS string(5) OPTIONS (ANNOTATION '''TRUE'' if the table has at least one column of type TEXT, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"HAS_TEXT_FIELDS"', NATIVE_TYPE 'VARCHAR'),
    USES_QUEUE_TABLE string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses a queue table, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"USES_QUEUE_TABLE"', NATIVE_TYPE 'VARCHAR'),
    IS_PRELOAD string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses preloading, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"IS_PRELOAD"', NATIVE_TYPE 'VARCHAR'),
    IS_PARTIAL_PRELOAD string(5) OPTIONS (ANNOTATION '''TRUE'' if the table uses partial preloading, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"IS_PARTIAL_PRELOAD"', NATIVE_TYPE 'VARCHAR'),
    UNLOAD_PRIORITY byte OPTIONS (ANNOTATION 'Specifies unload priority of the table: 0 - 9. 0 means not unloadable, 1 means latest unload, and 9 means earliest unload', NAMEINSOURCE '"UNLOAD_PRIORITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    HAS_SCHEMA_FLEXIBILITY string(5) OPTIONS (ANNOTATION '''TRUE'' if the table has schema flexibility, else ''FALSE''. Only valid for column store tables', NAMEINSOURCE '"HAS_SCHEMA_FLEXIBILITY"', NATIVE_TYPE 'VARCHAR'),
    IS_REPLICA string(5) NOT NULL OPTIONS (ANNOTATION '''TRUE'' if the table is a replica, else ''FALSE''', NAMEINSOURCE '"IS_REPLICA"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Available tables', NAMEINSOURCE '"SYS"."TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TEMP_P_AUTHDEPENDENCIES_" (
    DEP_RESERVED integer OPTIONS (NAMEINSOURCE '"DEP_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEP_TYPEID short OPTIONS (NAMEINSOURCE '"DEP_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEP_SUBTYPEID short OPTIONS (NAMEINSOURCE '"DEP_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEP_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"DEP_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    UND_RESERVED integer OPTIONS (NAMEINSOURCE '"UND_RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    UND_TYPEID short OPTIONS (NAMEINSOURCE '"UND_TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    UND_SUBTYPEID short OPTIONS (NAMEINSOURCE '"UND_SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    UND_EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"UND_EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEP_USER long OPTIONS (NAMEINSOURCE '"DEP_USER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    DEP_TYPE short OPTIONS (NAMEINSOURCE '"DEP_TYPE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    PRIVILEGEID long OPTIONS (NAMEINSOURCE '"PRIVILEGEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VALIDITY byte OPTIONS (NAMEINSOURCE '"VALIDITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."TEMP_P_AUTHDEPENDENCIES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TEMP_P_EXTERNALOBJS_" (
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OBJNAME string(256) OPTIONS (NAMEINSOURCE '"OBJNAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."TEMP_P_EXTERNALOBJS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TEMP_P_EXTERNALOWNERSHIPS_" (
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USERID long OPTIONS (NAMEINSOURCE '"USERID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT')
) OPTIONS (NAMEINSOURCE '"SYS"."TEMP_P_EXTERNALOWNERSHIPS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TEMP_P_GRANTEDPRIVS_" (
    PRINCIPALID long OPTIONS (NAMEINSOURCE '"PRINCIPALID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GRANTER long OPTIONS (NAMEINSOURCE '"GRANTER"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRIVILEGEID long OPTIONS (NAMEINSOURCE '"PRIVILEGEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    GRANTABLE byte OPTIONS (NAMEINSOURCE '"GRANTABLE"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    VALIDITY byte OPTIONS (NAMEINSOURCE '"VALIDITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."TEMP_P_GRANTEDPRIVS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TEMP_P_PRIVAVAILABILITY_" (
    PRIVILEGEID long OPTIONS (NAMEINSOURCE '"PRIVILEGEID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    RESERVED integer OPTIONS (NAMEINSOURCE '"RESERVED"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    TYPEID short OPTIONS (NAMEINSOURCE '"TYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    SUBTYPEID short OPTIONS (NAMEINSOURCE '"SUBTYPEID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    EXTERNALOBJID long OPTIONS (NAMEINSOURCE '"EXTERNALOBJID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    VALIDITY byte OPTIONS (NAMEINSOURCE '"VALIDITY"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."TEMP_P_PRIVAVAILABILITY_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TRANS_TOKEN_HISTORY" (
    SYSTEM_TIME timestamp NOT NULL OPTIONS (NAMEINSOURCE '"SYSTEM_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    CID long NOT NULL OPTIONS (NAMEINSOURCE '"CID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    APP_USER_ID integer OPTIONS (NAMEINSOURCE '"APP_USER_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (NAMEINSOURCE '"SYS"."TRANS_TOKEN_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TRANS_TOKEN_HISTORY_USER_" (
    APP_USER_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"APP_USER_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    APP_USER_NAME string(256) OPTIONS (NAMEINSOURCE '"APP_USER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."TRANS_TOKEN_HISTORY_USER_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TRANSACTION_HISTORY" (
    COMMIT_TIME timestamp NOT NULL OPTIONS (ANNOTATION 'Timestamp', NAMEINSOURCE '"COMMIT_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    COMMIT_ID long NOT NULL OPTIONS (ANNOTATION 'ID of the committed transaction', NAMEINSOURCE '"COMMIT_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    APP_USER string(256) OPTIONS (ANNOTATION 'User that used the transaction', NAMEINSOURCE '"APP_USER"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Committed transactions and their users', NAMEINSOURCE '"SYS"."TRANSACTION_HISTORY"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TRIGGERS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name of the trigger', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRIGGER_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Trigger name', NAMEINSOURCE '"TRIGGER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRIGGER_OID long OPTIONS (ANNOTATION 'Object ID of the trigger', NAMEINSOURCE '"TRIGGER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_NAME string(256) OPTIONS (ANNOTATION 'Name of the trigger owner', NAMEINSOURCE '"OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    OWNER_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the trigger owner', NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SUBJECT_TABLE_SCHEMA string(256) OPTIONS (ANNOTATION 'Schema name of the table, the trigger is defined for', NAMEINSOURCE '"SUBJECT_TABLE_SCHEMA"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name of the table, the trigger is defined for', NAMEINSOURCE '"SUBJECT_TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRIGGER_ACTION_TIME string(10) NOT NULL OPTIONS (ANNOTATION 'Time the trigger is executed: ''BEFORE''/''AFTER''/''INSTEAD OF'' the specified event', NAMEINSOURCE '"TRIGGER_ACTION_TIME"', NATIVE_TYPE 'VARCHAR'),
    TRIGGER_EVENT string(20) NOT NULL OPTIONS (ANNOTATION 'Event, the trigger is defined for: combination of ''DELETE''/''INSERT''/''UPDATE''', NAMEINSOURCE '"TRIGGER_EVENT"', NATIVE_TYPE 'VARCHAR'),
    TRIGGERED_ACTION_LEVEL string(9) NOT NULL OPTIONS (ANNOTATION 'Level of the event, where the triggered action will happen: ''ROW''/''STATEMENT''', NAMEINSOURCE '"TRIGGERED_ACTION_LEVEL"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION clob OPTIONS (ANNOTATION 'Query string of the trigger', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NCLOB'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the trigger is valid or not. This becomes ''FALSE'' when its base objects are changed or dropped: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR'),
    IS_ENABLED string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the trigger is enabled or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_ENABLED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Triggers defined for tables', NAMEINSOURCE '"SYS"."TRIGGERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TRUST_STORE_" (
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR'),
    DATA blob(16) NOT NULL OPTIONS (NAMEINSOURCE '"DATA"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'BLOB')
) OPTIONS (NAMEINSOURCE '"SYS"."TRUST_STORE_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.TRUST_STORE_DESTINATION_MAPPING_" (
    DESTINATION_PACKAGE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DESTINATION_PACKAGE"', NATIVE_TYPE 'NVARCHAR'),
    DESTINATION_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"DESTINATION_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TRUST_STORE string(256) OPTIONS (NAMEINSOURCE '"TRUST_STORE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."TRUST_STORE_DESTINATION_MAPPING_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.USER_PARAMETERS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    "PARAMETER" string(256) NOT NULL OPTIONS (ANNOTATION 'Parameter name: CLIENT', NAMEINSOURCE '"PARAMETER"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(256) OPTIONS (ANNOTATION 'Parameter value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'All parameters and their values, which have been assigned to users in the system (using CREATE USER ... SET PARAMETER or ALTER USER ... SET PARAMETER)', NAMEINSOURCE '"SYS"."USER_PARAMETERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.USERS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'Name of the user', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    USER_ID long NOT NULL OPTIONS (ANNOTATION 'ID of the user', NAMEINSOURCE '"USER_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    USER_MODE string(8) NOT NULL OPTIONS (ANNOTATION 'Mode of the user: ''LOCAL''/''GLOBAL''/''EXTERNAL''', NAMEINSOURCE '"USER_MODE"', NATIVE_TYPE 'VARCHAR'),
    EXTERNAL_IDENTITY string(256) OPTIONS (ANNOTATION 'External identity of the user', NAMEINSOURCE '"EXTERNAL_IDENTITY"', NATIVE_TYPE 'NVARCHAR'),
    CREATOR string(256) OPTIONS (ANNOTATION 'Creator of the user', NAMEINSOURCE '"CREATOR"', NATIVE_TYPE 'NVARCHAR'),
    CREATE_TIME timestamp OPTIONS (ANNOTATION 'Creation time', NAMEINSOURCE '"CREATE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    VALID_FROM timestamp OPTIONS (ANNOTATION 'Start time of user''s validity', NAMEINSOURCE '"VALID_FROM"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    VALID_UNTIL timestamp OPTIONS (ANNOTATION 'End time of user''s validity', NAMEINSOURCE '"VALID_UNTIL"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_SUCCESSFUL_CONNECT timestamp OPTIONS (ANNOTATION 'Time of the last successful connect of the user', NAMEINSOURCE '"LAST_SUCCESSFUL_CONNECT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    LAST_INVALID_CONNECT_ATTEMPT timestamp OPTIONS (ANNOTATION 'Time of the last invalid connect attempt', NAMEINSOURCE '"LAST_INVALID_CONNECT_ATTEMPT"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    INVALID_CONNECT_ATTEMPTS integer OPTIONS (ANNOTATION 'Number of invalid connect attempts since last successful connect', NAMEINSOURCE '"INVALID_CONNECT_ATTEMPTS"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ADMIN_GIVEN_PASSWORD string(5) OPTIONS (ANNOTATION 'Specifies if the password was given by administrator or by the user himself: ''TRUE''/''FALSE''', NAMEINSOURCE '"ADMIN_GIVEN_PASSWORD"', NATIVE_TYPE 'VARCHAR'),
    PASSWORD_CHANGE_TIME timestamp OPTIONS (ANNOTATION 'Time of last password change, NULL, if password-lifetime will not be checked for this user', NAMEINSOURCE '"PASSWORD_CHANGE_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PASSWORD_CHANGE_NEEDED string(5) OPTIONS (ANNOTATION 'Specifies if user is forced to change his password himself: ''TRUE''/''FALSE''', NAMEINSOURCE '"PASSWORD_CHANGE_NEEDED"', NATIVE_TYPE 'VARCHAR'),
    USER_DEACTIVATED string(5) OPTIONS (ANNOTATION 'Specifies if user is dectivated: ''TRUE''/''FALSE''', NAMEINSOURCE '"USER_DEACTIVATED"', NATIVE_TYPE 'VARCHAR'),
    DEACTIVATION_TIME timestamp OPTIONS (ANNOTATION 'Time given with explicit deactivation command for this user', NAMEINSOURCE '"DEACTIVATION_TIME"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    IS_PASSWORD_ENABLED string(5) OPTIONS (ANNOTATION 'Authentication using password is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_PASSWORD_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_KERBEROS_ENABLED string(5) OPTIONS (ANNOTATION 'Authentication using KERBEROS is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_KERBEROS_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_SAML_ENABLED string(5) OPTIONS (ANNOTATION 'Authentication using SAML is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_SAML_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_X509_ENABLED string(5) OPTIONS (ANNOTATION 'Authentication using an X.509 certificate is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_X509_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_SAP_LOGON_TICKET_ENABLED string(5) NOT NULL OPTIONS (ANNOTATION 'Authentication using a SAP logon ticket is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_SAP_LOGON_TICKET_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_SAP_ASSERTION_TICKET_ENABLED string(5) NOT NULL OPTIONS (ANNOTATION 'Authentication using a SAP assertion ticket is enabled: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_SAP_ASSERTION_TICKET_ENABLED"', NATIVE_TYPE 'VARCHAR'),
    IS_RESTRICTED string(5) OPTIONS (ANNOTATION 'User was created with option RESTRICTED: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_RESTRICTED"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'All users', NAMEINSOURCE '"SYS"."USERS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.VIEW_COLUMNS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'View name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_OID long NOT NULL OPTIONS (ANNOTATION 'Object ID of the view', NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'View column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    POSITION integer OPTIONS (ANNOTATION 'Ordinal position of the view column', NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DATA_TYPE_ID short OPTIONS (ANNOTATION 'Data type ID', NAMEINSOURCE '"DATA_TYPE_ID"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Data type name', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    "OFFSET" short OPTIONS (ANNOTATION 'Offset of the column in a record', NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    LENGTH integer OPTIONS (ANNOTATION 'Number of chars for character types; max number of digits for numeric types; number of chars for datetime types; number of bytes for LOB types', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Numeric types: the maximum number of digits to the right of the decimal point; time, timestamp: the decimal digits are defined as the number of digits to the right of the decimal point in the second''s component of the data', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    IS_NULLABLE string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the column is allowed to accept null value: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_NULLABLE"', NATIVE_TYPE 'VARCHAR'),
    DEFAULT_VALUE string(5000) OPTIONS (ANNOTATION 'Default value', NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    COLLATION string(256) OPTIONS (ANNOTATION 'Collation', NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'Description for this column', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    MAX_VALUE string(1) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MAX_VALUE"', NATIVE_TYPE 'VARCHAR'),
    MIN_VALUE string(1) OPTIONS (ANNOTATION 'Deprecated: will not be set any more', NAMEINSOURCE '"MIN_VALUE"', NATIVE_TYPE 'VARCHAR'),
    CS_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'Column store data type ID', NAMEINSOURCE '"CS_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    CS_DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'Column store data type name', NAMEINSOURCE '"CS_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    DDIC_DATA_TYPE_ID integer OPTIONS (ANNOTATION 'DDIC data type ID', NAMEINSOURCE '"DDIC_DATA_TYPE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DDIC_DATA_TYPE_NAME string(7) OPTIONS (ANNOTATION 'DDIC data type name', NAMEINSOURCE '"DDIC_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    COMPRESSION_TYPE string(9) NOT NULL OPTIONS (ANNOTATION 'Type of compression: ''DEFAULT''/''PREFIXED''/''SPARSE''/''CLUSTERED''/''INDIRECT''/''RLE''', NAMEINSOURCE '"COMPRESSION_TYPE"', NATIVE_TYPE 'VARCHAR'),
    INDEX_TYPE string(4) NOT NULL OPTIONS (ANNOTATION 'Type of index: ''NONE''/''FULL''', NAMEINSOURCE '"INDEX_TYPE"', NATIVE_TYPE 'VARCHAR'),
    COLUMN_ID long OPTIONS (ANNOTATION 'ID of the column', NAMEINSOURCE '"COLUMN_ID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    PRELOAD string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column is preloaded: ''TRUE''/''FALSE''', NAMEINSOURCE '"PRELOAD"', NATIVE_TYPE 'VARCHAR'),
    GENERATED_ALWAYS_AS string(1000) OPTIONS (ANNOTATION 'Specifies the expression of the column created by GENERATED ... AS', NAMEINSOURCE '"GENERATED_ALWAYS_AS"', NATIVE_TYPE 'NVARCHAR'),
    HAS_SCHEMA_FLEXIBILITY string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column has schema flexibility: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_SCHEMA_FLEXIBILITY"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_INDEX string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies if column has fuzzy search index: ''TRUE''/''FALSE''', NAMEINSOURCE '"FUZZY_SEARCH_INDEX"', NATIVE_TYPE 'VARCHAR'),
    FUZZY_SEARCH_MODE string(16) OPTIONS (ANNOTATION 'Specifies fuzzy search mode', NAMEINSOURCE '"FUZZY_SEARCH_MODE"', NATIVE_TYPE 'VARCHAR'),
    MEMORY_THRESHOLD integer OPTIONS (ANNOTATION 'Specifies memory threshold in bytes for LOB types', NAMEINSOURCE '"MEMORY_THRESHOLD"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LOAD_UNIT string(1) OPTIONS (ANNOTATION 'Specifies unit of column data loading: ''TABLE''/''COLUMN''/''PAGE''', NAMEINSOURCE '"LOAD_UNIT"', NATIVE_TYPE 'VARCHAR'),
    GENERATION_TYPE string(1) OPTIONS (ANNOTATION '''ALWAYS AS'' if the column is generation column, ''ALWAYS AS IDENTITY''/''BY DEFAULT AS IDENTITY'' if the column is an identity column whose values are always generated or generated by default, NULL otherwise', NAMEINSOURCE '"GENERATION_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Available view columns', NAMEINSOURCE '"SYS"."VIEW_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.VIEWS" (
    SCHEMA_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'View name', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'NVARCHAR'),
    VIEW_OID long OPTIONS (ANNOTATION 'Object ID of the view', NAMEINSOURCE '"VIEW_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    IS_UNICODE string(5) OPTIONS (ANNOTATION 'Specifies whether the query string contains Unicode: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_UNICODE"', NATIVE_TYPE 'VARCHAR'),
    IS_READ_ONLY string(5) OPTIONS (ANNOTATION 'Specifies whether this view is read-only or updatable: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_READ_ONLY"', NATIVE_TYPE 'VARCHAR'),
    HAS_CHECK_OPTION string(5) OPTIONS (ANNOTATION 'Specifies whether this view has an updatable view condition: ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_CHECK_OPTION"', NATIVE_TYPE 'VARCHAR'),
    HAS_COLUMN_ALIASES string(5) OPTIONS (ANNOTATION 'Specifies whether the view has a columns alias : ''TRUE''/''FALSE''', NAMEINSOURCE '"HAS_COLUMN_ALIASES"', NATIVE_TYPE 'VARCHAR'),
    DEFINITION clob OPTIONS (ANNOTATION 'View definition', NAMEINSOURCE '"DEFINITION"', NATIVE_TYPE 'NCLOB'),
    COMMENTS string(5000) OPTIONS (ANNOTATION 'View description', NAMEINSOURCE '"COMMENTS"', NATIVE_TYPE 'NVARCHAR'),
    IS_COLUMN_VIEW string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether this view is a column view or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_COLUMN_VIEW"', NATIVE_TYPE 'VARCHAR'),
    VIEW_TYPE string(16) OPTIONS (ANNOTATION 'Type of view : ''ROW''/''OLAP''/''JOIN''/''HIERARCHY''/''CALC''', NAMEINSOURCE '"VIEW_TYPE"', NATIVE_TYPE 'VARCHAR'),
    IS_TENANT_SHARED_METADATA string(5) OPTIONS (ANNOTATION 'Specifies whether the table is a global table or not: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_TENANT_SHARED_METADATA"', NATIVE_TYPE 'VARCHAR'),
    IS_VALID string(5) NOT NULL OPTIONS (ANNOTATION 'Specifies whether the view is valid or not. This becomes ''FALSE'' when its base objects are changed or dropped: ''TRUE''/''FALSE''', NAMEINSOURCE '"IS_VALID"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (ANNOTATION 'Available views', NAMEINSOURCE '"SYS"."VIEWS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.VIRTUAL_COLUMNS" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Column name', NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DATA_TYPE_NAME string(16) OPTIONS (ANNOTATION 'SQL data type name of the column', NAMEINSOURCE '"DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    LENGTH integer OPTIONS (ANNOTATION 'Number of chars for char types, number of max digits for numeric types; number of chars for datetime types, number of bytes for LOB types', NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (ANNOTATION 'Numeric types: the maximum number of digits to the right of the decimal point; time, timestamp: the decimal digits are defined as the number of digits to the right of the decimal point in the second''s component of the data', NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOTE_DATA_TYPE_NAME string(32) OPTIONS (ANNOTATION 'Remote data type name', NAMEINSOURCE '"REMOTE_DATA_TYPE_NAME"', NATIVE_TYPE 'VARCHAR'),
    REMOTE_LENGTH integer OPTIONS (ANNOTATION 'Remote column length', NAMEINSOURCE '"REMOTE_LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    REMOTE_SCALE integer OPTIONS (ANNOTATION 'Remote scale', NAMEINSOURCE '"REMOTE_SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER')
) OPTIONS (ANNOTATION 'Virtual columns', NAMEINSOURCE '"SYS"."VIRTUAL_COLUMNS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.VIRTUAL_COLUMNS_" (
    TABLE_OID long OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_OID long NOT NULL OPTIONS (NAMEINSOURCE '"COLUMN_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    COLUMN_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"COLUMN_NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    POSITION short OPTIONS (NAMEINSOURCE '"POSITION"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    TYPE_ID byte OPTIONS (NAMEINSOURCE '"TYPE_ID"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CS_TYPE integer OPTIONS (NAMEINSOURCE '"CS_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    ABAP_TYPE integer OPTIONS (NAMEINSOURCE '"ABAP_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    LENGTH integer OPTIONS (NAMEINSOURCE '"LENGTH"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SCALE integer OPTIONS (NAMEINSOURCE '"SCALE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    COLLATION string(256) OPTIONS (NAMEINSOURCE '"COLLATION"', NATIVE_TYPE 'NVARCHAR'),
    "OFFSET" short OPTIONS (NAMEINSOURCE '"OFFSET"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DEFAULT_VALUE string(256) OPTIONS (NAMEINSOURCE '"DEFAULT_VALUE"', NATIVE_TYPE 'NVARCHAR'),
    "CONSTRAINT" byte OPTIONS (NAMEINSOURCE '"CONSTRAINT"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    DERIVED byte OPTIONS (NAMEINSOURCE '"DERIVED"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT')
) OPTIONS (NAMEINSOURCE '"SYS"."VIRTUAL_COLUMNS_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.VIRTUAL_TABLES" (
    SCHEMA_NAME string(256) OPTIONS (ANNOTATION 'Schema name', NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (ANNOTATION 'Table name', NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_SOURCE_NAME string(256) OPTIONS (ANNOTATION 'Remote source name', NAMEINSOURCE '"REMOTE_SOURCE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_DB_NAME string(256) OPTIONS (ANNOTATION 'Remote database name', NAMEINSOURCE '"REMOTE_DB_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_OWNER_NAME string(256) OPTIONS (ANNOTATION 'Remote owner name', NAMEINSOURCE '"REMOTE_OWNER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    REMOTE_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Remote object name', NAMEINSOURCE '"REMOTE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Virtual tables', NAMEINSOURCE '"SYS"."VIRTUAL_TABLES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.VIRTUAL_TABLES_" (
    TABLE_OID long NOT NULL OPTIONS (NAMEINSOURCE '"TABLE_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    OWNER_OID long OPTIONS (NAMEINSOURCE '"OWNER_OID"', CHAR_OCTET_LENGTH 20, NATIVE_TYPE 'BIGINT'),
    SCHEMA_NAME string(256) OPTIONS (NAMEINSOURCE '"SCHEMA_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TABLE_NAME string(256) OPTIONS (NAMEINSOURCE '"TABLE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    LOGGING byte OPTIONS (NAMEINSOURCE '"LOGGING"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    TABLE_TYPE integer OPTIONS (NAMEINSOURCE '"TABLE_TYPE"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    FIXED_PART_SIZE short OPTIONS (NAMEINSOURCE '"FIXED_PART_SIZE"', CHAR_OCTET_LENGTH 2, NATIVE_TYPE 'SMALLINT'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"SYS"."VIRTUAL_TABLES_"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYS.X509_USER_MAPPINGS" (
    USER_NAME string(256) OPTIONS (ANNOTATION 'User name', NAMEINSOURCE '"USER_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SUBJECT_NAME string(512) OPTIONS (ANNOTATION 'Subject of the X.509 certificate of the user', NAMEINSOURCE '"SUBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    ISSUER_NAME string(512) OPTIONS (ANNOTATION 'Issuer of the X.509 certificate of the user', NAMEINSOURCE '"ISSUER_NAME"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (ANNOTATION 'Shows the X.509 certificates known for each user', NAMEINSOURCE '"SYS"."X509_USER_MAPPINGS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYSTEM.BOOKS" (
    ISBN string(20) NOT NULL OPTIONS (NAMEINSOURCE '"ISBN"', NATIVE_TYPE 'VARCHAR'),
    TITLE string(30) OPTIONS (NAMEINSOURCE '"TITLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SYSTEM"."BOOKS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYSTEM.HANA_FLIGHT_DATA" (
    COUNTRYFROM string(3) OPTIONS (NAMEINSOURCE '"COUNTRYFROM"', NATIVE_TYPE 'VARCHAR'),
    CITYFROM string(20) NOT NULL OPTIONS (NAMEINSOURCE '"CITYFROM"', NATIVE_TYPE 'VARCHAR'),
    AIRPORTFROM string(3) NOT NULL OPTIONS (NAMEINSOURCE '"AIRPORTFROM"', NATIVE_TYPE 'VARCHAR'),
    COUNTRYTO string(3) NOT NULL OPTIONS (NAMEINSOURCE '"COUNTRYTO"', NATIVE_TYPE 'VARCHAR'),
    CITYTO string(20) NOT NULL OPTIONS (NAMEINSOURCE '"CITYTO"', NATIVE_TYPE 'VARCHAR'),
    AIRPORTTO string(3) NOT NULL OPTIONS (NAMEINSOURCE '"AIRPORTTO"', NATIVE_TYPE 'VARCHAR'),
    FLIGHTTIME integer NOT NULL OPTIONS (NAMEINSOURCE '"FLIGHTTIME"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    DEPARTURETIME time NOT NULL OPTIONS (NAMEINSOURCE '"DEPARTURETIME"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'TIME'),
    ARRIVALTIME time NOT NULL OPTIONS (NAMEINSOURCE '"ARRIVALTIME"', CHAR_OCTET_LENGTH 6, NATIVE_TYPE 'TIME'),
    DISTANCE bigdecimal(1,2147483647) NOT NULL OPTIONS (NAMEINSOURCE '"DISTANCE"', NATIVE_TYPE 'DECIMAL'),
    DISTANCEUNIT string(3) NOT NULL OPTIONS (NAMEINSOURCE '"DISTANCEUNIT"', NATIVE_TYPE 'VARCHAR'),
    FLIGHTTYPE string(1) NOT NULL OPTIONS (NAMEINSOURCE '"FLIGHTTYPE"', NATIVE_TYPE 'VARCHAR'),
    PERIOD byte NOT NULL OPTIONS (NAMEINSOURCE '"PERIOD"', CHAR_OCTET_LENGTH 1, NATIVE_TYPE 'TINYINT'),
    CARRID string(3) NOT NULL OPTIONS (NAMEINSOURCE '"CARRID"', NATIVE_TYPE 'VARCHAR'),
    CONNID string(4) NOT NULL OPTIONS (NAMEINSOURCE '"CONNID"', NATIVE_TYPE 'VARCHAR'),
    FLDATE timestamp NOT NULL OPTIONS (NAMEINSOURCE '"FLDATE"', CHAR_OCTET_LENGTH 16, NATIVE_TYPE 'TIMESTAMP'),
    PRICE bigdecimal(1,2147483647) NOT NULL OPTIONS (NAMEINSOURCE '"PRICE"', NATIVE_TYPE 'DECIMAL'),
    CURRENCY string(5) NOT NULL OPTIONS (NAMEINSOURCE '"CURRENCY"', NATIVE_TYPE 'VARCHAR'),
    PLANETYPE string(10) NOT NULL OPTIONS (NAMEINSOURCE '"PLANETYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SYSTEM"."HANA_FLIGHT_DATA"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "SYSTEM.TEST" (
    ISBN string(20) NOT NULL OPTIONS (NAMEINSOURCE '"ISBN"', NATIVE_TYPE 'VARCHAR'),
    TITLE string(30) OPTIONS (NAMEINSOURCE '"TITLE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"SYSTEM"."TEST"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db.personalization/ADD_UPDATE_USER_WIDGET/tabletype/GET_APPSITE_WIDGET_TEMPLATES" (
    TILE_ID string(50) OPTIONS (NAMEINSOURCE '"TILE_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    PACKAGE_ID string(256) OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_NAME string(256) OPTIONS (NAMEINSOURCE '"TILE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_URL string(5000) OPTIONS (NAMEINSOURCE '"TILE_URL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_THUMBNAIL string(5000) OPTIONS (NAMEINSOURCE '"TILE_THUMBNAIL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_TYPE string(10) OPTIONS (NAMEINSOURCE '"TILE_TYPE"', NATIVE_TYPE 'VARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db.personalization/ADD_UPDATE_USER_WIDGET/tabletype/GET_APPSITE_WIDGET_TEMPLATES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db.personalization::TEMP_USER_PAGES" (
    PG_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Page ID', NAMEINSOURCE '"PG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    PG_NAME string(256) OPTIONS (ANNOTATION 'Page Name', NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob(16) OPTIONS (ANNOTATION 'Page Layout', NAMEINSOURCE '"PG_LAYOUT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) OPTIONS (ANNOTATION 'ID of the page in the site layout', NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (ANNOTATION 'Parent page in case of sub page', NAMEINSOURCE '"PARENT_PAGE_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    TEMP_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Unique ID for the current transaction', NAMEINSOURCE '"TEMP_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db.personalization::TEMP_USER_PAGES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db.personalization::TEMP_USER_PROPERTIES" (
    ENTITY_TYPE string(10) NOT NULL OPTIONS (ANNOTATION 'Type of entity (page/widget/site)', NAMEINSOURCE '"ENTITY_TYPE"', NATIVE_TYPE 'VARCHAR'),
    ENTITY_ID string(50) NOT NULL OPTIONS (ANNOTATION 'ID of the entity', NAMEINSOURCE '"ENTITY_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    KEY string(256) NOT NULL OPTIONS (ANNOTATION 'Key of the property', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Value of the property', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    TEMP_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Unique ID for the current transaction', NAMEINSOURCE '"TEMP_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db.personalization::TEMP_USER_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db.personalization::TEMP_USER_WIDGET_PROPERTIES" (
    WG_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Widget ID', NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    KEY string(256) NOT NULL OPTIONS (ANNOTATION 'Prop Key', NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (ANNOTATION 'Prop Value', NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    TEMP_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Unique ID for the current transaction', NAMEINSOURCE '"TEMP_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db.personalization::TEMP_USER_WIDGET_PROPERTIES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db.personalization::TEMP_USER_WIDGETS" (
    WG_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Widget ID', NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_NAME string(256) OPTIONS (ANNOTATION 'Widget Name', NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WG_DESC string(5000) OPTIONS (ANNOTATION 'Widget Description', NAMEINSOURCE '"WG_DESC"', NATIVE_TYPE 'NVARCHAR'),
    WG_LAYOUT_ID string(50) OPTIONS (ANNOTATION 'ID of the widget in the page layout', NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    SPEC_URL string(5000) OPTIONS (ANNOTATION 'Location of spec xml file', NAMEINSOURCE '"SPEC_URL"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (ANNOTATION 'Location of spec xml file', NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    PG_ID string(50) OPTIONS (ANNOTATION 'Widget''s page ID', NAMEINSOURCE '"PG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_TEMPLATE_ID string(5000) OPTIONS (ANNOTATION 'Widget''s template ID', NAMEINSOURCE '"WG_TEMPLATE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_PACKAGE_ID string(256) OPTIONS (ANNOTATION 'Widget''s template package', NAMEINSOURCE '"WG_TEMPLATE_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_OBJECT_NAME string(256) OPTIONS (ANNOTATION 'Widget''s template object name', NAMEINSOURCE '"WG_TEMPLATE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TEMP_ID string(50) NOT NULL OPTIONS (ANNOTATION 'Unique ID for the current transaction', NAMEINSOURCE '"TEMP_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db.personalization::TEMP_USER_WIDGETS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db.tabletypes::GET_SITE_TABLE_TYPE" (
    SITE_NAME string(256) OPTIONS (NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_LAYOUT clob(16) OPTIONS (NAMEINSOURCE '"SITE_LAYOUT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'NVARCHAR'),
    PG_ID string(50) OPTIONS (NAMEINSOURCE '"PG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    PG_NAME string(256) OPTIONS (NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob(16) OPTIONS (NAMEINSOURCE '"PG_LAYOUT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'CLOB'),
    WG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    WG_TYPE string(256) OPTIONS (NAMEINSOURCE '"WG_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (NAMEINSOURCE '"PARENT_PAGE_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_TEMPLATE_ID string(50) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_TEMPLATE_PACKAGE_ID string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(256) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db.tabletypes::GET_SITE_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db/GET_APPSITE/tabletype/GET_APPSITE_TABLE_TYPE" (
    SITE_NAME string(256) OPTIONS (NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_LAYOUT clob(16) OPTIONS (NAMEINSOURCE '"SITE_LAYOUT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    PG_ID string(50) OPTIONS (NAMEINSOURCE '"PG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    PG_NAME string(256) OPTIONS (NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob(16) OPTIONS (NAMEINSOURCE '"PG_LAYOUT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'CLOB'),
    WG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    WG_TYPE string(256) OPTIONS (NAMEINSOURCE '"WG_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (NAMEINSOURCE '"PARENT_PAGE_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    RECORD_TYPE string(256) OPTIONS (NAMEINSOURCE '"RECORD_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db/GET_APPSITE/tabletype/GET_APPSITE_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db/GET_APPSITE_V3/tabletype/GET_APPSITE_TABLE_TYPE" (
    SITE_NAME string(256) OPTIONS (NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_LAYOUT clob(16) OPTIONS (NAMEINSOURCE '"SITE_LAYOUT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    PG_ID string(50) OPTIONS (NAMEINSOURCE '"PG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    PG_NAME string(256) OPTIONS (NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob(16) OPTIONS (NAMEINSOURCE '"PG_LAYOUT"', CHAR_OCTET_LENGTH 2147483647, NATIVE_TYPE 'CLOB'),
    WG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    WG_TYPE string(256) OPTIONS (NAMEINSOURCE '"WG_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (NAMEINSOURCE '"PARENT_PAGE_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    RECORD_TYPE string(256) OPTIONS (NAMEINSOURCE '"RECORD_TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db/GET_APPSITE_V3/tabletype/GET_APPSITE_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db/GET_NAVIGATION_URL/tabletype/NAV_TARGETS_DATA_TABLE_TYPE" (
    id string(1024) OPTIONS (NAMEINSOURCE '"id"', NATIVE_TYPE 'VARCHAR'),
    applicationType string(64) OPTIONS (NAMEINSOURCE '"applicationType"', NATIVE_TYPE 'VARCHAR'),
    applicationData string(512) OPTIONS (NAMEINSOURCE '"applicationData"', NATIVE_TYPE 'VARCHAR'),
    postParameters string(2048) OPTIONS (NAMEINSOURCE '"postParameters"', NATIVE_TYPE 'VARCHAR'),
    text string(512) OPTIONS (NAMEINSOURCE '"text"', NATIVE_TYPE 'VARCHAR'),
    applicationAlias string(512) OPTIONS (NAMEINSOURCE '"applicationAlias"', NATIVE_TYPE 'VARCHAR'),
    url string(2048) OPTIONS (NAMEINSOURCE '"url"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db/GET_NAVIGATION_URL/tabletype/NAV_TARGETS_DATA_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db/GET_WIDGET_DATA/tabletype/WIDGET_DATA_TABLE_TYPE" (
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db/GET_WIDGET_DATA/tabletype/WIDGET_DATA_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db/GET_WIDGET_DATA/tabletype/WIDGET_USER_PROPERTIES_TABLE_TYPE" (
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', CHAR_OCTET_LENGTH 52, NATIVE_TYPE 'CHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db/GET_WIDGET_DATA/tabletype/WIDGET_USER_PROPERTIES_TABLE_TYPE"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::INTENT_ALIAS_MAPPING_V2" (
    ID string(64) NOT NULL OPTIONS (ANNOTATION 'The Intent ID', NAMEINSOURCE '"ID"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_OBJECT string(64) NOT NULL OPTIONS (ANNOTATION 'The Semantic Object part of the Intent', NAMEINSOURCE '"SEMANTIC_OBJECT"', NATIVE_TYPE 'VARCHAR'),
    ACTION string(64) NOT NULL OPTIONS (ANNOTATION 'The Action part of the Intent', NAMEINSOURCE '"ACTION"', NATIVE_TYPE 'VARCHAR'),
    AREA string(64) NOT NULL OPTIONS (ANNOTATION 'The Area part of the Alias', NAMEINSOURCE '"AREA"', NATIVE_TYPE 'VARCHAR'),
    ALIAS string(256) NOT NULL OPTIONS (ANNOTATION 'Alias', NAMEINSOURCE '"ALIAS"', NATIVE_TYPE 'VARCHAR'),
    CONTEXT string(256) DEFAULT 'None' OPTIONS (ANNOTATION 'Optional. Used to link this mapping with specific Widget List Catalog', NAMEINSOURCE '"CONTEXT"', NATIVE_TYPE 'VARCHAR'),
    INFO string(4096) DEFAULT 'None' OPTIONS (ANNOTATION 'Optional. Intent Information', NAMEINSOURCE '"INFO"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::INTENT_ALIAS_MAPPING_V2"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::NAVIGATION_TARGET" (
    URI string(2048) NOT NULL OPTIONS (ANNOTATION 'Navigation target URI', NAMEINSOURCE '"URI"', NATIVE_TYPE 'VARCHAR'),
    TYPE string(64) NOT NULL OPTIONS (ANNOTATION 'Navigation object type', NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) OPTIONS (ANNOTATION 'Navigation target description', NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR'),
    AREA string(64) NOT NULL OPTIONS (ANNOTATION 'The Area part of the Alias', NAMEINSOURCE '"AREA"', NATIVE_TYPE 'VARCHAR'),
    ALIAS string(256) NOT NULL OPTIONS (ANNOTATION 'Alias', NAMEINSOURCE '"ALIAS"', NATIVE_TYPE 'VARCHAR'),
    TITLE string(256) OPTIONS (ANNOTATION 'Navigation target title', NAMEINSOURCE '"TITLE"', NATIVE_TYPE 'VARCHAR'),
    VIEW_NAME string(512) OPTIONS (ANNOTATION 'UI5 View name for displaying objects of this type', NAMEINSOURCE '"VIEW_NAME"', NATIVE_TYPE 'VARCHAR'),
    APPLICATION_PARAMETERS string(2048) OPTIONS (ANNOTATION 'Parameters passed to the target application', NAMEINSOURCE '"APPLICATION_PARAMETERS"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::NAVIGATION_TARGET"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::NAVIGATION_VIEW" (
    id string(129) NOT NULL OPTIONS (NAMEINSOURCE '"id"', NATIVE_TYPE 'VARCHAR'),
    applicationType string(64) NOT NULL OPTIONS (NAMEINSOURCE '"applicationType"', NATIVE_TYPE 'VARCHAR'),
    applicationData string(512) OPTIONS (NAMEINSOURCE '"applicationData"', NATIVE_TYPE 'VARCHAR'),
    postParameters string(2048) OPTIONS (NAMEINSOURCE '"postParameters"', NATIVE_TYPE 'VARCHAR'),
    text string(256) OPTIONS (NAMEINSOURCE '"text"', NATIVE_TYPE 'VARCHAR'),
    applicationAlias string(256) NOT NULL OPTIONS (NAMEINSOURCE '"applicationAlias"', NATIVE_TYPE 'VARCHAR'),
    semanticObject string(64) NOT NULL OPTIONS (NAMEINSOURCE '"semanticObject"', NATIVE_TYPE 'VARCHAR'),
    action string(64) NOT NULL OPTIONS (NAMEINSOURCE '"action"', NATIVE_TYPE 'VARCHAR'),
    url string(5000) OPTIONS (NAMEINSOURCE '"url"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::NAVIGATION_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::SEMANTIC_OBJECT_VIEW" (
    SEMANTIC_OBJECT string(64) NOT NULL OPTIONS (NAMEINSOURCE '"SEMANTIC_OBJECT"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SEMANTIC_OBJECT_NAME"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_OBJECT_DESC string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"SEMANTIC_OBJECT_DESC"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::SEMANTIC_OBJECT_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::SEMANTIC_OBJECTS" (
    SEMANTIC_OBJECT string(64) NOT NULL OPTIONS (ANNOTATION 'Semantic Object', NAMEINSOURCE '"SEMANTIC_OBJECT"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_OBJECT_NAME string(256) NOT NULL OPTIONS (ANNOTATION 'Semantic Object Name', NAMEINSOURCE '"SEMANTIC_OBJECT_NAME"', NATIVE_TYPE 'VARCHAR'),
    SEMANTIC_OBJECT_DESC string(5000) NOT NULL OPTIONS (ANNOTATION 'Semantic Object Description', NAMEINSOURCE '"SEMANTIC_OBJECT_DESC"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::SEMANTIC_OBJECTS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::THEMES" (
    ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"ID"', NATIVE_TYPE 'NVARCHAR'),
    NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    ROOT_PATH string(5000) OPTIONS (NAMEINSOURCE '"ROOT_PATH"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::THEMES"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::UIS_APPSITES_DATA_VIEW" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    INTERNAL_SITE_ID integer NOT NULL OPTIONS (NAMEINSOURCE '"INTERNAL_SITE_ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    SITE_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"SITE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SITE_LAYOUT clob OPTIONS (NAMEINSOURCE '"SITE_LAYOUT"', NATIVE_TYPE 'CLOB'),
    PG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"PG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    PG_ID string(50) OPTIONS (NAMEINSOURCE '"PG_ID"', NATIVE_TYPE 'CHAR'),
    PG_NAME string(256) OPTIONS (NAMEINSOURCE '"PG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    PG_LAYOUT clob OPTIONS (NAMEINSOURCE '"PG_LAYOUT"', NATIVE_TYPE 'CLOB'),
    WG_LAYOUT_ID string(50) OPTIONS (NAMEINSOURCE '"WG_LAYOUT_ID"', NATIVE_TYPE 'VARCHAR'),
    WG_ID string(50) OPTIONS (NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'CHAR'),
    WG_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    SRC string(5000) OPTIONS (NAMEINSOURCE '"SRC"', NATIVE_TYPE 'VARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(4096) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR'),
    PARENT_PAGE_ID string(50) OPTIONS (NAMEINSOURCE '"PARENT_PAGE_ID"', NATIVE_TYPE 'CHAR'),
    WG_TEMPLATE_ID string(5000) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_PACKAGE_ID string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    WG_TEMPLATE_OBJECT_NAME string(256) OPTIONS (NAMEINSOURCE '"WG_TEMPLATE_OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(256) OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::UIS_APPSITES_DATA_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::UIS_APPSITES_VIEW" (
    ID integer NOT NULL OPTIONS (NAMEINSOURCE '"ID"', CHAR_OCTET_LENGTH 4, NATIVE_TYPE 'INTEGER'),
    name string(256) NOT NULL OPTIONS (NAMEINSOURCE '"name"', NATIVE_TYPE 'NVARCHAR'),
    description string(5000) OPTIONS (NAMEINSOURCE '"description"', NATIVE_TYPE 'NVARCHAR'),
    package_id string(256) NOT NULL OPTIONS (NAMEINSOURCE '"package_id"', NATIVE_TYPE 'NVARCHAR'),
    object_name string(256) NOT NULL OPTIONS (NAMEINSOURCE '"object_name"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::UIS_APPSITES_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::UIS_CATALOGS" (
    ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"ID"', NATIVE_TYPE 'VARCHAR'),
    NAME string(1000) NOT NULL OPTIONS (NAMEINSOURCE '"NAME"', NATIVE_TYPE 'NVARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    CATALOG_PROPERTIES string(5000) OPTIONS (NAMEINSOURCE '"CATALOG_PROPERTIES"', NATIVE_TYPE 'NVARCHAR'),
    ITEMS_SOURCE_SYSTEM string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ITEMS_SOURCE_SYSTEM"', NATIVE_TYPE 'NVARCHAR'),
    ITEM_TYPES string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ITEM_TYPES"', NATIVE_TYPE 'NVARCHAR'),
    ITEM_PROPERTIES string(5000) OPTIONS (NAMEINSOURCE '"ITEM_PROPERTIES"', NATIVE_TYPE 'NVARCHAR'),
    ITEM_ACTIONS string(5000) OPTIONS (NAMEINSOURCE '"ITEM_ACTIONS"', NATIVE_TYPE 'NVARCHAR'),
    URI string(5000) OPTIONS (NAMEINSOURCE '"URI"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(1000) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::UIS_CATALOGS"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::UIS_CATALOGS_VIEW" (
    ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"ID"', NATIVE_TYPE 'VARCHAR'),
    name string(1000) NOT NULL OPTIONS (NAMEINSOURCE '"name"', NATIVE_TYPE 'NVARCHAR'),
    TYPE string(1000) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    URI string(5000) OPTIONS (NAMEINSOURCE '"URI"', NATIVE_TYPE 'NVARCHAR'),
    properties string(5000) OPTIONS (NAMEINSOURCE '"properties"', NATIVE_TYPE 'NVARCHAR'),
    itemTypes string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"itemTypes"', NATIVE_TYPE 'NVARCHAR'),
    itemProperties string(5000) OPTIONS (NAMEINSOURCE '"itemProperties"', NATIVE_TYPE 'NVARCHAR'),
    itemActions string(5000) OPTIONS (NAMEINSOURCE '"itemActions"', NATIVE_TYPE 'NVARCHAR'),
    remoteAlias string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"remoteAlias"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::UIS_CATALOGS_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::UIS_FIORI_CATALOGS_VIEW" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_ID string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"TILE_ID"', NATIVE_TYPE 'NVARCHAR'),
    CATALOG_NAME string(256) OPTIONS (NAMEINSOURCE '"CATALOG_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_NAME string(256) OPTIONS (NAMEINSOURCE '"TILE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_URL string(5000) OPTIONS (NAMEINSOURCE '"TILE_URL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_THUMBNAIL string(5000) OPTIONS (NAMEINSOURCE '"TILE_THUMBNAIL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_TYPE string(256) NOT NULL OPTIONS (NAMEINSOURCE '"TILE_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    TILE_DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"TILE_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::UIS_FIORI_CATALOGS_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::UIS_PAGES_NAV_VIEW" (
    TYPE string(4) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    REAL_PATH string(615) OPTIONS (NAMEINSOURCE '"REAL_PATH"', NATIVE_TYPE 'NVARCHAR'),
    READABLE_PATH string(1027) OPTIONS (NAMEINSOURCE '"READABLE_PATH"', NATIVE_TYPE 'NVARCHAR'),
    ICON string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::UIS_PAGES_NAV_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::UIS_SITES_NAV_VIEW" (
    TYPE string(4) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    REAL_PATH string(513) NOT NULL OPTIONS (NAMEINSOURCE '"REAL_PATH"', NATIVE_TYPE 'NVARCHAR'),
    READABLE_PATH string(513) NOT NULL OPTIONS (NAMEINSOURCE '"READABLE_PATH"', NATIVE_TYPE 'NVARCHAR'),
    ICON string(1) NOT NULL OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(1) NOT NULL OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::UIS_SITES_NAV_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::UIS_WIDGET_TEMPLATES_PROPERTIES_VIEW" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    WG_ID string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"WG_ID"', NATIVE_TYPE 'NVARCHAR'),
    KEY string(256) NOT NULL OPTIONS (NAMEINSOURCE '"KEY"', NATIVE_TYPE 'NVARCHAR'),
    "VALUE" string(5000) OPTIONS (NAMEINSOURCE '"VALUE"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::UIS_WIDGET_TEMPLATES_PROPERTIES_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::UIS_WIDGET_TEMPLATES_VIEW" (
    PACKAGE_ID string(256) NOT NULL OPTIONS (NAMEINSOURCE '"PACKAGE_ID"', NATIVE_TYPE 'NVARCHAR'),
    OBJECT_NAME string(256) NOT NULL OPTIONS (NAMEINSOURCE '"OBJECT_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_ID string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"TILE_ID"', NATIVE_TYPE 'NVARCHAR'),
    TILE_NAME string(256) OPTIONS (NAMEINSOURCE '"TILE_NAME"', NATIVE_TYPE 'NVARCHAR'),
    TILE_URL string(5000) OPTIONS (NAMEINSOURCE '"TILE_URL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_THUMBNAIL string(5000) OPTIONS (NAMEINSOURCE '"TILE_THUMBNAIL"', NATIVE_TYPE 'NVARCHAR'),
    TILE_TYPE string(256) OPTIONS (NAMEINSOURCE '"TILE_TYPE"', NATIVE_TYPE 'NVARCHAR'),
    TILE_DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"TILE_DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::UIS_WIDGET_TEMPLATES_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::UIS_WIDGETS_NAV_VIEW" (
    TYPE string(6) NOT NULL OPTIONS (NAMEINSOURCE '"TYPE"', NATIVE_TYPE 'VARCHAR'),
    REAL_PATH string(666) OPTIONS (NAMEINSOURCE '"REAL_PATH"', NATIVE_TYPE 'NVARCHAR'),
    READABLE_PATH string(1284) OPTIONS (NAMEINSOURCE '"READABLE_PATH"', NATIVE_TYPE 'NVARCHAR'),
    ICON string(5000) OPTIONS (NAMEINSOURCE '"ICON"', NATIVE_TYPE 'VARCHAR'),
    DESCRIPTION string(5000) OPTIONS (NAMEINSOURCE '"DESCRIPTION"', NATIVE_TYPE 'NVARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::UIS_WIDGETS_NAV_VIEW"', UPDATABLE TRUE);

CREATE FOREIGN TABLE "UIS.sap.hana.uis.db::UIS_WIDGETS_VIEW" (
    ID string(5000) NOT NULL OPTIONS (NAMEINSOURCE '"ID"', NATIVE_TYPE 'NVARCHAR'),
    name string(256) OPTIONS (NAMEINSOURCE '"name"', NATIVE_TYPE 'NVARCHAR'),
    description string(5000) OPTIONS (NAMEINSOURCE '"description"', NATIVE_TYPE 'NVARCHAR'),
    URI string(5000) OPTIONS (NAMEINSOURCE '"URI"', NATIVE_TYPE 'NVARCHAR'),
    type string(6) NOT NULL OPTIONS (NAMEINSOURCE '"type"', NATIVE_TYPE 'VARCHAR')
) OPTIONS (NAMEINSOURCE '"UIS"."sap.hana.uis.db::UIS_WIDGETS_VIEW"', UPDATABLE TRUE);
*/