[
https://issues.jboss.org/browse/TEIID-3725?page=com.atlassian.jira.plugin...
]
Van Halbert commented on TEIID-3725:
------------------------------------
Looking at an example of dynamic vdb and materialization:
...
MATERIALIZED_TABLE 'Accounts.h2_stock_mat',
"teiid_rel:MATVIEW_TTL" 60000,
"teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute
accounts.native(''truncate table mat_stock_staging'');',
"teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute
accounts.native(''ALTER TABLE h2_stock_mat RENAME TO
h2_stock_mat_temp'');execute accounts.native(''ALTER TABLE
mat_stock_staging RENAME TO h2_stock_mat'');execute
accounts.native(''ALTER TABLE h2_stock_mat_temp RENAME TO
mat_stock_staging'');',
"teiid_rel:ON_VDB_DROP_SCRIPT" 'DELETE FROM Accounts.status
WHERE Name=''stockPricesMatView'' AND schemaname =
''StocksMatModel''',
"teiid_rel:MATERIALIZED_STAGE_TABLE"
'Accounts.mat_stock_staging',
"teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
"teiid_rel:MATVIEW_STATUS_TABLE" 'status',
"teiid_rel:MATVIEW_SHARE_SCOPE" 'NONE',
"teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION')
...
What about supporting native calls to be caught by the translator to swap the names? Or
maybe a pushed down function call that the translator caught to swap the cache?
By using similar options that are used for relational sources would keep it consistent,
regardless type of data source used.
In the JDG translators, enable named cache swapping so that
materialization can be supported
--------------------------------------------------------------------------------------------
Key: TEIID-3725
URL:
https://issues.jboss.org/browse/TEIID-3725
Project: Teiid
Issue Type: Feature Request
Components: Misc. Connectors
Affects Versions: 8.12
Reporter: Van Halbert
Assignee: Van Halbert
The JDG translators, that in order to support materialization, will need to enable the
named cache that's referenced by the connection, to be swapped. This is due to JDG
doesn't currently support renaming a cache (i.e., like table rename in JDBC). And
because of that, it limits how the cache can be refreshed (don't want to clear it
before re-loading).
Ideas are:
1. configure translator with the 2 cache names to use (a) initial cache to read from and
(b) the staging cache to use
perform materialize load
call SYSADMIN.setProperty to trigger the swapping of the cache names
2 ???
Note: because there's no persistence in Teiid so that any cache name changes will
outlive a server restart, when a restart occurs, the translator will read from the cache
identified as the initial cache to read from.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)