-
1. Re: Issue with materialized views
rareddy Aug 7, 2012 9:56 AM (in response to manoj.m.agarwal)1 of 1 people found this helpfulManoj,
Only "PHYSICAL" models can be backed by a Translator based metadata. i.e. Custom translators can only define the metadata for the PHYSICAL models, not VIRTUAL models. If your model is PHYSICAL then setting below will work
{code:lang=JAVA}
modelMetaData.setSchemaSourceType("NATIVE");
{code}
Now some background
Teiid defines two different types of in-built Metadata Repositories,
* NATIVE - Load from Translator works for PHYSICAL models
* DDL - Metadata is presented in the DDL form, works for both PHYSICAL and VIRTUAL models
Alternatively, User also has flexibility to define their own custom MetadataRepository for metadata loading purposes. See https://docs.jboss.org/author/display/TEIID/Custom+Metadata+Repository
So, if you want to provide metadata for for your VIRTUAL model, then you have two choices.
# Provide the metadata in the form of DDL
# Write a custom metadata repository as defined in the above link.
Ramesh..
-
2. Re: Issue with materialized views
shawkins Aug 7, 2012 1:53 PM (in response to rareddy)Manoj,
This is somewhat related to https://community.jboss.org/message/752276. https://issues.jboss.org/browse/TEIID-2136 will allow virtual entries on a physical model, which can be backed by your translator. That is in trunk and will be in 8.1 CR1.
Steve