[
https://jira.jboss.org/browse/TEIID-1326?page=com.atlassian.jira.plugin.s...
]
Mark Addleman commented on TEIID-1326:
--------------------------------------
I've never gotten multi-source models to work using dynamic VDBs but assuming it does,
I still see a problem. Our data sources fall into two categories: a set of app specific
metadata tables and then data tables.
The app specific metadata tables have a homogeneous structure although we currently allow
the names of the tables to vary across data source. These app specific metadata tables
are then unioned together in a corresponding set of app specific metadata views from which
the application reads its metadata. We currently implement this as a recursive translator
which dynamically rewrites queries (similar to the example above) and unions the
appropriate tables. If we used multi-source models, how would Teiid union together the
data source specific metadata tables? Would we require that all of the metadata tables
have the same names?
A further complication: We use Teiid to access these app specific metadata tables which
allow us to keep the physical storage of the metadata separate from the logical
presentation. Some of our metadata is physically stored in CSV files and we create Teiid
views (again using this recursive translator) based on TEXTTABLE to create the appropriate
logical Teiid view of the data. If we went went the multi-source model approach, could
the source be another view? I see a problem trying to dynamically read the Teiid
metadata. Currently, to define a view using our recursive translator, you have to
statically supply the Teiid metadata.
The data tables for our application have heterogeneous schemas and I think that static
views on top of those to define security requirements (we probably can't use hasRole,
instead we would write a custom security function) would work just fine.
API request: rewrite query/command before it reaches the teiid
planner
-----------------------------------------------------------------------
Key: TEIID-1326
URL:
https://jira.jboss.org/browse/TEIID-1326
Project: Teiid
Issue Type: Feature Request
Components: Query Engine
Affects Versions: 7.1
Reporter: Mark Addleman
Assignee: Steven Hawkins
I'd like an API to inspect and rewrite a user query/command before it reaches the
Teiid planner. The use case is to rewrite the query/command to implement view-like
capabilities. For example:
SELECT a,b,c FROM table1 AS t WHERE t.a='xyz' would be rewritten as:
SELECT a,b,c FROM (SELECT a,b,c FROM table2 UNION SELECT a,b,c FROM table3) AS t
I imagine this API would be similar to the translator API: it would receive a data
structure representing the query/command and use a visitor to rewrite the query. As a
convenience, it would be nice to have something similar to the SQLConversionVisitor.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira