-
1. Re: Cannot find materialized table when importing a VDB
shawkins Dec 17, 2012 2:17 PM (in response to snadji)> I don't think I need to add anything to vdb-b to resolve the materialized views in vdb-a, do I?
No, you should not. I don't see a good reason why vdb-a would work and vdb-b would not either. What version are you using? What schemas are in vdb-a and vdb-b?
Steve
-
2. Re: Cannot find materialized table when importing a VDB
snadji Dec 17, 2012 7:04 PM (in response to shawkins)We are using Teiid 8.2.
I was able reproduce the problem with very basic VDBs/schemas.
The details:
- Datasources (source and cache) are on MSSQL 2008 R2
- The source DB (DB1) has a simple table (dbo.Table1) that has 2 columns
- The cache table is on the same system but a different database (TeiidCacheDb).
These are my VDBs:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vdb name="vdb-a" version="1">
<property name="UseConnectorMetadata" value="cached" />
<model visible="false" type="PHYSICAL" name="DS1">
<property name="importer.useFullSchemaName" value="true"/>
<source name="DS1" translator-name="sqlserver" connection-jndi-name="java:/DS1"/>
</model>
<model visible="false" type="PHYSICAL" name="TeiidCacheDb">
<property name="importer.useFullSchemaName" value="true"/>
<source name="TeiidCacheDb" translator-name="sqlserver" connection-jndi-name="java:/TeiidCacheDb"/>
</model>
<model visible="true" type="VIRTUAL" name="view1">
<metadata type="DDL"><![CDATA[
CREATE VIEW v1 (
col1 string,
col2 integer
)
OPTIONS (MATERIALIZED true, MATERIALIZED_TABLE 'TeiidCacheDb.TeiidCacheDb.dbo.MV_v1')
AS select
t1.Column1 AS col1,
t1.Column2 AS col2
FROM
DS1.DB1.dbo.Table1 t1
]]> </metadata>
</model>
</vdb>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vdb name="vdb-b" version="1">
<property name="UseConnectorMetadata" value="cached" />
<import-vdb name="vdb-a" version="1" import-data-policies="false"/>
<model visible="false" type="VIRTUAL" name="hidden">
<metadata type="DDL"><![CDATA[
CREATE VIEW v2 (
col1 string
)
AS select
t1.Column1 AS col1
FROM
DS1.DB1.dbo.Table1 t1
]]> </metadata>
</model>
</vdb>
One interesting observation: when I create the "cache" datasource with a name different than the DB (i.e. called datasouce CacheDS instead of TeiidCacheDb), I got a different error:
15:22:52,426 WARN [org.teiid.PLANNER.RESOLVER] (teiid-async-threads - 2) TEIID31089 Invalid Schema qualifier TeiidCacheDb is specified on materialization table TeiidCacheDb.dbo.MV_v1 for view v1
When the cache datasouce name matches the DB, i get this error:
15:43:42,788 WARN [org.teiid.PLANNER.RESOLVER] (teiid-async-threads - 4) TEIID31090 Materialization table dbo.MV_v1 not found in Schema TeiidCacheDb for view v1
-
3. Re: Cannot find materialized table when importing a VDB
rareddy Dec 18, 2012 9:31 AM (in response to snadji)Samier,
I replicated the issue, looks like Teiid is not geting fully qualifying name for materialized table validation. You can log JIRA for this bug.
Thanks
Ramesh..
-
4. Re: Cannot find materialized table when importing a VDB
shawkins Dec 18, 2012 9:32 AM (in response to rareddy)