exasol / exasol-virtual-schema

Virtual Schema from Exasol to Exasol
MIT License
1 stars 2 forks source link

Confusing semantic of IMPORT_FROM_EXA parameter #89

Closed exaSR closed 1 year ago

exaSR commented 1 year ago

Original Report

Adapter Version: virtual-schema-dist-10.1.0-exasol-7.0.2

Given the example usage of

IMPORT_FROM_EXA = 'true'

One would assume that an explicit negation should work; alas, it does not:

CREATE VIRTUAL SCHEMA CDP3_CDP
USING VSA.EXASOL_ADAPTER WITH
    CONNECTION_NAME = 'CDP_JDBC'
    SCHEMA_NAME     = 'CDP'
    IMPORT_FROM_EXA = 'false'
;
-- takes a few seconds to read metadata

select count(*) from cdp3_cdp.account_sf;
-- results in error:
[Code: 0, SQL State: 22002]  VM error: F-UDF-CL-LIB-1126: F-UDF-CL-SL-JAVA-1006: F-UDF-CL-SL-JAVA-1026: 
com.exasol.ExaUDFException: F-UDF-CL-SL-JAVA-1068: Exception during singleCall adapterCall 
java.lang.IllegalArgumentException: E-VSEXA-1: Incomplete remote connection information Please specify a named EXA connection 'EXA_CONNECTION' for the ExaLoader and a named JDBC connection with 'CONNECTION_NAME' for the Virtual Schema adapter.
com.exasol.adapter.dialects.exasol.ExasolConnectionDefinitionBuilder.buildImportFromExaConnectionDefinition(ExasolConnectionDefinitionBuilder.java:40)
com.exasol.adapter.dialects.exasol.ExasolConnectionDefinitionBuilder.buildConnectionDefinition(ExasolConnectionDefinitionBuilder.java:23)
com.exasol.adapter.dialects.rewriting.AbstractQueryRewriter.rewrite(AbstractQueryRewriter.java:49)
com.exasol.adapter.dialects.AbstractSqlDialect.rewriteQuery(AbstractSqlDialect.java:141)
com.exasol.adapter.jdbc.JDBCAdapter.pushdown(JDBCAdapter.java:243)
com.exasol.adapter.AdapterCallExecutor.executePushDownRequest(AdapterCallExecutor.java:117)
com.exasol.adapter.request.PushDownRequest.executeWith(PushDownRequest.java:66)
com.exasol.adapter.AdapterCallExecutor.executeAdapterCall(AdapterCallExecutor.java:34)
com.exasol.adapter.RequestDispatcher.processAdapterCall(RequestDispatcher.java:55)
com.exasol.adapter.RequestDispatcher.adapterCall(RequestDispatcher.java:33)
com.exasol.ExaWrapper.runSingleCall(ExaWrapper.java:101)
 (Session: 1758344366162313216)
exaSR commented 1 year ago

Update:

ALTER VIRTUAL SCHEMA CDP3_CDP SET IMPORT_FROM_EXA = Null;

seems to work.

ckunki commented 1 year ago

Root cause seems to be that

I propose to change implementation to the following behavior

Icon ✅ signals functionality already implemented by VSEXA version 7.1.1 Icon ⚠️ signals changed planned in the scope of the current ticket

exaSR commented 1 year ago

Sounds great!

ckunki commented 1 year ago

Thanks for immediate feedback - sorry, for the issue waiting some weeks.