1 of 1 people found this helpful
select * from leftmodel.employees
is right way to do it. The model name becomes schema name over the VDB. However, this all depends on how you imported the metadata of of "employees" from mysql database. See this JDBC Translator - Teiid 8.9 (draft) - Project Documentation Editor for available importer properties to fine tune how to import the metadata. Try "useFullSchemaName" to "false"
In your case "left-ds" is the name of the data source, which isn't used in way. "left" is the source name - which is more typically the same as the model name. It really only needs to be different than the model name in multi-source scenarios where there are more than 1 source under a model that need unique names to identify. The naming rules are roughly:
catalog name = vdb name
schema name = model name
table name = depends upon import options
As Ramesh is saying the table name can be controlled by properties including useFullSchemaName. So the same queries you show above it's perfectly fine to use the Teiid model/schema qualification - as long as the table name that you have imported is just employees. If the table name includes the source catalog/schema name, then it won't resolve. Setting useFullSchemaName to false allows you to just use the imported table name as the Teiid table name without adding the source catalog/schema.
Stevens, Ramesh ...,
sincere thanks for the detailed explanations. I am heading the multi source way, and so your responses actually helps me figure out the correct mappings without breaking my head... helps me not just with my immediate problem , also helps me get my future stuff right.
It worked fine once I understood the relationships and naming conventions, thanks again