Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4728

Views are not multi-source aware - only source tables

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 8.12.6.6_3
    • None
    • None

    Description

      Views are not multi-source aware - only source tables. You have to explicitly have a source_name column on the view that maps to the respective source name columns in Dynamic VDB.

      I'm not using Designer just a very basic dynamic VDB[1], if I "select
      id, SOURCE_NAME from emp" I get results, this is the physical table. If
      I query the empview, select id, SOURCE_NAME from empview I get the teiid
      processor error "TEIID30020 Processing exception for request
      MwpyLkSYMked.14 'TEIID31118 Element "SOURCE_NAME" is not defined by any
      relevant group.' unless I add the SOURCE_NAME column to the view, so it
      doesn't even make it to a source query.

      [1]

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <vdb name="multi_basic" version="1">
      <description/>
      <property name="validationDateTime" value="Mon Oct 31 08:01:36 CDT 2016"/>
      <property name="validationVersion" value="8.12.6"/>
      <model name="multi_phy" type="PHYSICAL" visible="true">
      <property name="multisource" value="true"/>
      <source connection-jndi-name="java:/deb" name="deb"
      translator-name="postgresql"/>
      <source connection-jndi-name="java:/dv63" name="dv63"
      translator-name="postgresql"/>
      <metadata type="DDL"><![CDATA[
      CREATE FOREIGN TABLE emp (
      id integer NOT NULL OPTIONS(NAMEINSOURCE '"id"', NATIVE_TYPE
      'int4', CASE_SENSITIVE 'FALSE', FIXED_LENGTH 'TRUE', SEARCHABLE
      'ALL_EXCEPT_LIKE'),
      name string(2147483647) OPTIONS(NAMEINSOURCE '"name"', NATIVE_TYPE
      'text'),
      SOURCE_NAME string(50),
      CONSTRAINT pk_emp PRIMARY KEY(id)
      ) OPTIONS(UPDATABLE 'true',NAMEINSOURCE '"public"."emp"')
      ]]></metadata>
      </model>

      <model name="multiv" type="VIRTUAL" visible="true">
      <property name="imports" value="multi"/>
      <metadata type="DDL"><![CDATA[
      CREATE VIEW empview (
      id integer,
      name string(100)
      )
      AS
      SELECT id,name FROM multi_phy.emp
      ]]></metadata>
      </model>
      </vdb>

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            rhn-support-dsteigner Deborah Steigner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: