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

Teiid designer doesn't generate materialization staging table correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 10.0.2
    • 10.0.2
    • None

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

              blafond Barry LaFond
              mkralik@redhat.com Matej Kralik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: