You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remote logging allows reading log messages from the virtual schema. This however only works for the adapter, not the loader class GenericUdfCallHandler (called byUdfEntryPoint in IMPORT_FROM_S3_DOCUMENT_FILES for the S3 VS).
Root cause is that GenericUdfCallHandler does not configure logging similar to RequestDispatcher in virtual-schema-common-java.
To make this work we need to pass the logging configuration (i.e. host, port and log level) to the importer via UDF parameters.
Note: UDF parameters are hard coded in the SCRIPT definitions of the virtual schemas, e.g.
CREATE OR REPLACE JAVA SET SCRIPT ADAPTER.IMPORT_FROM_S3_DOCUMENT_FILES(
DATA_LOADER VARCHAR(2000000),
SCHEMA_MAPPING_REQUEST VARCHAR(2000000),
CONNECTION_NAME VARCHAR(500))
EMITS(...) AS
%scriptclass com.exasol.adapter.document.UdfEntryPoint;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.7-s3-2.8.4.jar;
/
While we could add an additional parameter for the logging config, this is not a future proof solution. It would be better to use a single generic parameter that contains all necessary values serialized as JSON or Java objects. This is a breaking change because users need to update their SCRIPT definitions.
Proposal for new SCRIPT definitions:
CREATE OR REPLACE JAVA SET SCRIPT ADAPTER.IMPORT_FROM_S3_DOCUMENT_FILES(
SERIALIZED_PARAMETERS VARCHAR(2000000))
EMITS(...) AS
%scriptclass com.exasol.adapter.document.UdfEntryPoint;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.7-s3-2.8.4.jar;
/
Advantage: we can add additional parameter values at any time without breaking the interface.
Disadvantage: breaking change for VS users, because the parameters in the SET SCRIPT adapter definition change.
Required changes:
Update GenericUdfCallHandler to expect a single parameter and extract values from it
Update UdfCallBuilder to serialize all parameters into a single string and add it to the pushdown query
Update SCRIPT definitions in all user guides of all document based virtual schemas to use the new parameter
Increment major version of all affected projects as this is a breaking change.
The text was updated successfully, but these errors were encountered:
Remote logging allows reading log messages from the virtual schema. This however only works for the adapter, not the loader class
GenericUdfCallHandler
(called byUdfEntryPoint
inIMPORT_FROM_S3_DOCUMENT_FILES
for the S3 VS).Root cause is that
GenericUdfCallHandler
does not configure logging similar to RequestDispatcher in virtual-schema-common-java.To make this work we need to pass the logging configuration (i.e. host, port and log level) to the importer via UDF parameters.
Note: UDF parameters are hard coded in the
SCRIPT
definitions of the virtual schemas, e.g.While we could add an additional parameter for the logging config, this is not a future proof solution. It would be better to use a single generic parameter that contains all necessary values serialized as JSON or Java objects. This is a breaking change because users need to update their
SCRIPT
definitions.Proposal for new SCRIPT definitions:
Advantage: we can add additional parameter values at any time without breaking the interface.
Disadvantage: breaking change for VS users, because the parameters in the
SET SCRIPT
adapter definition change.Required changes:
GenericUdfCallHandler
to expect a single parameter and extract values from itUdfCallBuilder
to serialize all parameters into a single string and add it to the pushdown querySCRIPT
definitions in all user guides of all document based virtual schemas to use the new parameterThe text was updated successfully, but these errors were encountered: