forked from teiid/teiid-embedded-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mat-inter-h2-vdb.xml
50 lines (38 loc) · 1.45 KB
/
mat-inter-h2-vdb.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vdb name="MatVDB" version="1">
<description>The Portfolio Dynamic VDB</description>
<model name="Accounts">
<!--
JDBC Import settings
importer.useFullSchemaName directs the importer to drop the source
schema from the Teiid object name, so that the Teiid fully qualified name
will be in the form of <model name>.<table name>
-->
<property name="importer.useFullSchemaName" value="false"/>
<!--
This connector is defined to reference the H2 localDS"
-->
<source name="h2-connector" translator-name="translator-h2" connection-jndi-name="java:/accounts-ds"/>
</model>
<model name="Stocks" type="VIRTUAL">
<metadata type="DDL"><![CDATA[
CREATE VIEW MatView (
product_id integer,
symbol string
)OPTIONS (
"teiid_rel:MATVIEW_TTL" 3600000,
"teiid_rel:MATVIEW_PREFER_MEMORY" 'true',
"teiid_rel:MATVIEW_UPDATABLE" 'true',
"teiid_rel:MATVIEW_SCOPE" 'vdb'
)
AS
SELECT A.ID, A.symbol FROM Accounts.PRODUCT AS A;
]]> </metadata>
</model>
<!--
enable this while deploy to JBoss Server
<translator name="translator-h2" type="h2">
<property name="SupportsNativeQueries" value="true"/>
</translator>
-->
</vdb>