[
https://issues.jboss.org/browse/TEIIDDES-1995?page=com.atlassian.jira.plu...
]
Barry LaFond edited comment on TEIIDDES-1995 at 8/21/15 5:04 PM:
-----------------------------------------------------------------
Office discussions have led to more questions about this feature and how it should be
implemented.
The nature of SQL definition in Designer really begs for providing a more robust/full set
of SQL fragments to handle the special Language objects supported by the Teiid runtime and
query parser framework.
* TEXTTABLE:
https://docs.jboss.org/author/display/TEIID/TEXTTABLE
* XMLTABLE:
https://docs.jboss.org/author/display/TEIID/FROM+Clause#FROMClause-XMLTABLE
* OBJECTTABLE:
https://docs.jboss.org/author/display/TEIID/OBJECTTABLE
* ARRAYTABLE:
https://docs.jboss.org/author/display/TEIID/ARRAYTABLE
We could provide a small set of templates for each of these with variables/placeholders
for the user to replace. Ultimately this begs for enhancing the code-completion framework.
So all the formatting/BNF rules for these objects would have to be captured and
implemented.... and that's not a small effort.
{code}
TEXTTABLE(expression [SELECTOR string] COLUMNS <COLUMN>, ... [NO ROW DELIMITER]
[DELIMITER char] [(QUOTE|ESCAPE) char] [HEADER [integer]] [SKIP integer]) AS name
> COLUMN := name (FOR ORDINALITY | datatype [WIDTH integer [NO
TRIM]] [SELECTOR string integer])
> see:
https://docs.jboss.org/author/display/TEIID/FROM+Clause#FROMClause-TEXTTABLE
OBJECTTABLE([LANGUAGE lang] rowScript [PASSING val AS name ...] COLUMNS colName colType
colScript [DEFAULT defaultExpr] ...) AS id
ARRAYTABLE(expression COLUMNS <COLUMN>, ...) AS name
> COLUMN := name datatype
XMLTABLE([<NSP>,] xquery-expression [<PASSING>] [COLUMNS <COLUMN>, ...
)] AS name
> COLUMN := name (FOR ORDINALITY | (datatype [DEFAULT expression]
[PATH string]))
{code}
Pushing to 8.7
was (Author: blafond):
Office discussions have led to more questions about this feature and how it should be
implemented.
The nature of SQL definition in Designer really begs for providing a more robust/full set
of SQL fragments to handle the special Language objects supported by the Teiid runtime and
query parser framework.
TEXTTABLE, XMLTABLE, OBJECTTABLE, ARRAYTABLE would be a primary focus.
We could provide a small set of templates for each of these with variables/placeholders
for the user to replace. Ultimately this begs for enhancing the code-completion framework.
So all the formatting/BNF rules for these objects would have to be captured and
implemented.... and that's not a small effort.
{code}
TEXTTABLE(expression [SELECTOR string] COLUMNS <COLUMN>, ... [NO ROW DELIMITER]
[DELIMITER char] [(QUOTE|ESCAPE) char] [HEADER [integer]] [SKIP integer]) AS name
> COLUMN := name (FOR ORDINALITY | datatype [WIDTH integer [NO
TRIM]] [SELECTOR string integer])
> see:
https://docs.jboss.org/author/display/TEIID/FROM+Clause#FROMClause-TEXTTABLE
OBJECTTABLE([LANGUAGE lang] rowScript [PASSING val AS name ...] COLUMNS colName colType
colScript [DEFAULT defaultExpr] ...) AS id
ARRAYTABLE(expression COLUMNS <COLUMN>, ...) AS name
> COLUMN := name datatype
XMLTABLE([<NSP>,] xquery-expression [<PASSING>] [COLUMNS <COLUMN>, ...
)] AS name
> COLUMN := name (FOR ORDINALITY | (datatype [DEFAULT expression]
[PATH string]))
{code}
Pushing to 8.7
Add templates for OBJECTTABLE, TEXTABLE, etc
--------------------------------------------
Key: TEIIDDES-1995
URL:
https://issues.jboss.org/browse/TEIIDDES-1995
Project: Teiid Designer
Issue Type: Enhancement
Components: Transformations
Affects Versions: 8.4
Reporter: Van Halbert
Assignee: Barry LaFond
Fix For: 9.2, 9.0.4
Add templates for using OBJECTTABLE, TEXTTABLE, etc. to the the list of templates to
apply to the transformation. Example:
SELECT
o.{colname}, o.{colname}
FROM
{ObjectTableName} as T,
OBJECTTABLE('x' PASSING T.{ObjectColumnName}Object as x COLUMNS
{colname} type 'teiid_row.{colname}', ….) as o
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)