-
1. Re: dynamic vdb deployment validation error : Group does not exist.
rareddy Jul 27, 2015 8:49 AM (in response to rupeshsingh01)1 of 1 people found this helpfulRupesh,
Group == Table in Teiid. Some old nomenclature.
If created a view, my guess would be the transformation you used for the View is invalid, as in you are referencing the tables in there that are non-existent or mis-spelled or not fully-qualified. If you are referencing a table from source model, you can fully qualify it, by using "source.tablename"
Ramesh..
-
2. Re: dynamic vdb deployment validation error : Group does not exist.
rupeshsingh01 Jul 28, 2015 4:57 AM (in response to rareddy)Hi Ramesh,
Thanks for reply. I am using fully qulaified name. I am connecting source database from java code and using connection-jndi-name="java:/stp-ds".
WARNING: TEIID31080 Stpdb.TradesA validation error: Group does not exist: dbo.Results
Exception in thread "main" org.teiid.deployers.VirtualDatabaseException: TEIID40095 TEIID31080 Stpdb.TradesA validation error: Group does not exist: dbo.Results
my vdb is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vdb name="abc" version="1">
<description>The Portfolio Dynamic VDB</description>
<!--
Setting to use connector supplied metadata. Can be "true" or "cached".
"true" will obtain metadata once for every launch of Teiid.
"cached" will save a file containing the metadata into
the deploy/<vdb name>/<vdb version/META-INF directory
-->
<property name="UseConnectorMetadata" value="true" />
<!--
Each model represents a access to one or more sources.
The name of the model will be used as a top level schema name
for all of the metadata imported from the connector.
NOTE: Multiple models, with different import settings, can be bound to
the same connector binding and will be treated as the same source at
runtime.
-->
<model name="Stpdb" >
<!--
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 mysql db"
-->
<source name="sqlserver-connector" translator-name="translator-sqlserver" connection-jndi-name="java:/stp-ds"/>
<metadata type="DDL"><![CDATA[
CREATE VIEW TradesA (
result_id integer,
transaction_id varchar(50),
source_system varchar(25)
)
AS
SELECT * from dbo.Results;
]]> </metadata>
</model>
</vdb>
When I edited the vdb as below (two models, one for physical datasource and second for virtual, I got this error:
Exception in thread "main" org.teiid.metadata.DuplicateRecordException: TEIID60013 Duplicate Table check_constraints
at org.teiid.metadata.Schema.addTable(Schema.java:49)
my vdb is as below:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vdb name="abc" version="1">
<description>The Portfolio Dynamic VDB</description>
<!--
Setting to use connector supplied metadata. Can be "true" or "cached".
"true" will obtain metadata once for every launch of Teiid.
"cached" will save a file containing the metadata into
the deploy/<vdb name>/<vdb version/META-INF directory
-->
<property name="UseConnectorMetadata" value="true" />
<!--
Each model represents a access to one or more sources.
The name of the model will be used as a top level schema name
for all of the metadata imported from the connector.
NOTE: Multiple models, with different import settings, can be bound to
the same connector binding and will be treated as the same source at
runtime.
-->
<model name="Stpdb" >
<!--
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 mysql db"
-->
<source name="sqlserver-connector" translator-name="translator-sqlserver" connection-jndi-name="java:/stp-ds"/>
</model>
<model name="Stp" type="VIRTUAL">
<metadata type="DDL"><![CDATA
CREATE VIEW TradesA (
result_id integer,
transaction_id varchar(50),
source_system varchar(25)
)
AS
SELECT * from dbo.Results;
]]> </metadata>
</model>
</vdb>
Kindly help in understanding these two cases and how model vs source works.
-
3. Re: dynamic vdb deployment validation error : Group does not exist.
rareddy Jul 28, 2015 8:10 AM (in response to rupeshsingh01)1 of 1 people found this helpfulYou need to be using separate Models for source and view. It is failing because you turned off to use "fully qualified names" for "stpdb", so when two tables with same name get imported you will see the error above. So try below
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <vdb name="abc" version="1"> <description>The Portfolio Dynamic VDB</description> <property name="UseConnectorMetadata" value="true" /> <model name="Stpdb" > <property name="importer.useFullSchemaName" value="true"/> <source name="sqlserver-connector" translator-name="translator-sqlserver" connection-jndi-name="java:/stp-ds"/> </model> <model name="Stp" type="VIRTUAL"> <metadata type="DDL"><![CDATA CREATE VIEW TradesA ( result_id integer, transaction_id varchar(50), source_system varchar(25) ) AS SELECT * from stpdb.dbo.Results; ]]> </metadata> </model> </vdb>
Also, read https://docs.jboss.org/author/display/TEIID/VDBs
Ramesh..
-
4. Re: dynamic vdb deployment validation error : Group does not exist.
rupeshsingh01 Jul 28, 2015 2:01 PM (in response to rareddy)Thanks Ramesh for explanation !!. I was able to resolve in afternoon by self.