Matej Kralik created TEIIDDES-2935:
--------------------------------------
Summary: Teiid designer doesn't generate materialization staging table
correctly
Key: TEIIDDES-2935
URL:
https://issues.jboss.org/browse/TEIIDDES-2935
Project: Teiid Designer
Issue Type: Bug
Affects Versions: 10.0.2
Environment: Fedora 24
Reporter: Matej Kralik
Attachments: project.zip
I have generated JDG module and materialization table. When I created dynamic vdb and
deploy to server, server shows me warning that:
{code:java}
TEIID21005 Registered Class not found for table ST_Book1, check table name matches a
registered class
{code}
I noticed that staging table doesn't contain primary_table parameter in the options.
I think that Teiid designer should add this parameter automatically after generated this
tables.
Actual ddl:
{code:java}
<![CDATA[
CREATE FOREIGN TABLE Book (
isbn string(255) NOT NULL,
title string(255),
publisher integer OPTIONS(FIXED_LENGTH 'TRUE'),
publishyear integer OPTIONS(FIXED_LENGTH 'TRUE'),
edition integer OPTIONS(FIXED_LENGTH 'TRUE'),
type string(255),
CONSTRAINT PK_ISBN PRIMARY KEY(isbn)
)OPTIONS(UPDATABLE 'TRUE')
CREATE FOREIGN TABLE ST_Book1 (
isbn string(255) NOT NULL,
title string(255),
publisher integer OPTIONS(FIXED_LENGTH 'TRUE'),
publishyear integer OPTIONS(FIXED_LENGTH 'TRUE'),
edition integer OPTIONS(FIXED_LENGTH 'TRUE'),
type string(255),
CONSTRAINT PK_ISBN PRIMARY KEY(isbn)
)OPTIONS(UPDATABLE 'TRUE')
]]>
{code}
Expected ddl:
{code:java}
<![CDATA[
SET NAMESPACE 'http://www.teiid.org/translator/object/2016' AS tns;
CREATE FOREIGN TABLE Book (
isbn string(255) NOT NULL,
title string(255),
publisher integer OPTIONS(FIXED_LENGTH 'TRUE'),
publishyear integer OPTIONS(FIXED_LENGTH 'TRUE'),
edition integer OPTIONS(FIXED_LENGTH 'TRUE'),
type string(255),
CONSTRAINT PK_ISBN PRIMARY KEY(isbn)
)OPTIONS(UPDATABLE 'TRUE')
CREATE FOREIGN TABLE ST_Book1 (
isbn string(255) NOT NULL,
title string(255),
publisher integer OPTIONS(FIXED_LENGTH 'TRUE'),
publishyear integer OPTIONS(FIXED_LENGTH 'TRUE'),
edition integer OPTIONS(FIXED_LENGTH 'TRUE'),
type string(255),
CONSTRAINT PK_ISBN PRIMARY KEY(isbn)
)OPTIONS(UPDATABLE 'TRUE',"tns:primary_table"
'BookCacheSource.Book')
]]>
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)