[teiid-issues] [JBoss JIRA] (TEIID-2578) add/remove schema elements

Ramesh Reddy (JIRA) issues at jboss.org
Tue Aug 2 12:17:00 EDT 2016


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

Ramesh Reddy commented on TEIID-2578:
-------------------------------------

The idea behind this JIRA is to provide new capabilities to Teiid, where the runtime VDB metadata can be created/altered with out redeploying the VDB. This will be a large effort in language support and runtime stitching support.

The basic idea is, one can issue following commands against a Teiid runtime using a console (CLI) to create and alter a virtual database. The mandate we will be working towards is "Everything that teiid does in -vdb.xml *should* to be able to represent in DDL". Advanced features like <vdb-import>, <multi-source> need to be further discussed how they will fit in this model. The goal is to provide a clean migration path. This does NOT mean -vdb.xml support is going away, this is providing a more natural RDBMS way to define metadata.

Creating database
{code}
CREATE DATABASE <name> OPTIONS (...);
DROP DATABASE <name>;
USE DATABASE <name>
{code}

creating a schema aka (model in vdb.xml)
{code}
CREATE SCHEMA <name> OPTIONS (VISIBLE xx, VIRTUAL xx)
DROP SCHEMA <name>;
USE SCHEMA <name>
{code}

The <USE> statements to switch the context of conversation in the console where user may be executing these statements.

For creating a translator in database scope, this could be just a translator, or override translator. All the translator properties in OPTIONS
{code}
CREATE FOREIGN [<DATA> <WRAPPER>|<TRANSLATOR>] <name> OPTIONS (...)
DROP FOREIGN [<DATA> <WRAPPER>|<TRANSLATOR>] <name>
{code}

For defining a data source, of to just create "source" data as in (-vdb.xml)
{code}
CREATE SERVER <name> TYPE <type> [VERSION <version>] FOREIGN DATA WRAPPER <wrapper-name> OPTIONS (...)
DROP SERVER  <name>
{code}

TYPE: will define the "datasource-template" from Admin API.
OPTIONS: will contain any/all properties of the defined "datasource-template"
<wrapper-name>: will be translator assigned to this datasource.

NOTE: It has been discussed that, creation of data source itself is not mandatory, but defining the "source" information under a physical model as in "-vdb.xml" is minimally required.

To import a schema from foreign server
{code}
IMPORT FOREIGN SCHEMA <schema-name> [ <import qualifications> ] FROM SERVER <server-name> INTO <schema-name>
<import qualifications> ::=
LIMIT TO (<table name list>) | EXCEPT (<table name list>)
{code}

Then include all the current DDL Metadata support. Then this feature will be expanded with full ALTER command syntax where needed (this may be phase 2)

> add/remove schema elements
> --------------------------
>
>                 Key: TEIID-2578
>                 URL: https://issues.jboss.org/browse/TEIID-2578
>             Project: Teiid
>          Issue Type: Feature Request
>          Components: Query Engine
>            Reporter: Ramesh Reddy
>            Assignee: Ramesh Reddy
>             Fix For: 9.1
>
>
> Schemas are currently static after load.  Modifications can only happen with restarts or new versions.  We should allow add/drop at runtime.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the teiid-issues mailing list