[teiid-issues] [JBoss JIRA] (TEIID-5850) DDL server and foreign data wrapper handling is unclear

Steven Hawkins (Jira) issues at jboss.org
Mon Nov 18 13:23:00 EST 2019


    [ https://issues.jboss.org/browse/TEIID-5850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814474#comment-13814474 ] 

Steven Hawkins commented on TEIID-5850:
---------------------------------------

> CREATE FOREIGN DATA WRAPPER salesforce ...

The options clause is currently not used.  This statement is mostly for compliance with the spec as we use a set of well-known names and/or the name is defined by the custom translator.

However the options clause should mean "apply these properties to all such instances of salesforce in this vdb" - but currently does not as that does not line up to our old design.  We should probably make that change as ddl deployment docs suggests it already works this way.

> CREATE FOREIGN DATA WRAPPER mysalesforce TYPE salesforce ... 

This is specific to Teiid and is effectively the same as a translator override in our old terminology.  Here the options are applied as execution properties.  This is documented on our Translator Properties page.  However ideally it should be combined most of the time with the first statement.

> CREATE SERVER salesforce FOREIGN DATA WRAPPER salesforce OPTIONS ("resource-name" 'salesforce' ...

Here as well the options are currently not applied as execution properties.  In fact the only property that is used is resource-name.  By the spec this could include resource adapter / source config properties if/when we allow for direct configuration in the vdb.  Need to document that execution properties do not apply here.

Import properties can be specified either on the import statement or on the schema (which seems clear enough).


> DDL server and foreign data wrapper handling is unclear
> -------------------------------------------------------
>
>                 Key: TEIID-5850
>                 URL: https://issues.jboss.org/browse/TEIID-5850
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>            Reporter: Steven Hawkins
>            Assignee: Steven Hawkins
>            Priority: Critical
>             Fix For: 13.0, 12.2.2, 12.3.1
>
>   Original Estimate: 6 hours
>  Remaining Estimate: 6 hours
>
> CREATE server statements in DDL are effectively ignored in the conversion to runtime state - they are simply validated.  Similarly a CREATE foreign data wrapper statement that does not specify a type is ignored.
> Attempting to do something like:
> {code}
> CREATE FOREIGN DATA WRAPPER salesforce;
> CREATE SERVER salesforce FOREIGN DATA WRAPPER salesforce OPTIONS ("resource-name" 'salesforce', supportsOrderBy true);
> {code}
> or
> {code}
> CREATE FOREIGN DATA WRAPPER salesforce OPTIONS (supportsOrderBy true);
> CREATE SERVER salesforce FOREIGN DATA WRAPPER salesforce OPTIONS ("resource-name" 'salesforce');
> {code}
> will not result in supportsOrderBy being set on the translator.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the teiid-issues mailing list