Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-2935

Teiid designer doesn't generate materialization staging table correctly

    Details

      Description

      I have generated JDG module and materialization table. When I created dynamic vdb and deploy to server, server shows me warning that:

      TEIID21005 Registered Class not found for table ST_Book1, check table name matches a registered class
      

      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:

      <![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')
      ]]>
      

      Expected ddl:

      <![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')
      ]]>
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                blafond Barry LaFond
                Reporter:
                mkralik Matej Kralik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: