-
1. Re: Teiid embedded - Oracle Datasource - repeated column names - case sensitive
shawkins Apr 28, 2016 8:54 AM (in response to hend.amin)> Is there a way to by pass that check in TEIID embedded ?
For the default importer there is no resolution strategy for this collision. You would need to exclude the table altogether or exclude it from import and then define it directly in DDL to give different Teiid names to the columns.
-
2. Re: Teiid embedded - Oracle Datasource - repeated column names - case sensitive
rareddy Apr 28, 2016 9:37 AM (in response to hend.amin)An example VDB look like
<vdb name="Accounts" version="1"> <model visible="true" name="PM1"> <property name="importer.excludeTables" value="OriginalTable"/> <source name="dev" translator-name="oracle" connection-jndi-name="java:/oracleDS"/> <metadata type = "NATIVE"/> <metadata type = "DDL"><![CDATA[ CREATE FOREIGN TABLE OriginalTable ( columnONE integer PRIMARY KEY OPTIONS(NAMEINSOURCE 'columnONE'), columnTWO varchar(25) OPTIONS(NAMEINSOURCE 'ColumnOne') ); ]]> </metadata> </model> </vdb>
Note the "NAMEINSOURCE" property in ColumnTWO. Now any access to this table needs to use the modified name of the column. Essentially what we are doing is chaining the metadata loaders, the second one can add, modify metadata created from previous ones.
Ramesh..
-
3. Re: Teiid embedded - Oracle Datasource - repeated column names - case sensitive
hend.amin Apr 29, 2016 5:04 AM (in response to hend.amin)Thanks for your reply and help
I have added the property:
<property name="importer.excludeTables" value="tableName"/>
I have other properties too:
<property name="importer.importKeys" value="false"/>
<property name="importer.useFullSchemaName" value="false"/>
<property name="importer.includeSynonyms" value="false"/>
<property name="importer.tableTypes" value="TABLE,VIEW"/>
<property name="importer.schemaPattern" value="schemaName"/>
But i can still query from the table "tableName" eventhough it is excluded. Note: i have tried upper and lower case table name.
I am using TEIID embedded jars version: 9.0.0.Alpha2
What could be wrong ?
-
4. Re: Teiid embedded - Oracle Datasource - repeated column names - case sensitive
hend.amin Apr 29, 2016 5:02 AM (in response to rareddy)I have added the property:
<property name="importer.excludeTables" value="tableName"/>
I have other properties too:
<property name="importer.importKeys" value="false"/>
<property name="importer.useFullSchemaName" value="false"/>
<property name="importer.includeSynonyms" value="false"/>
<property name="importer.tableTypes" value="TABLE,VIEW"/>
<property name="importer.schemaPattern" value="schemaName"/>
But i can still query from the table "tableName" eventhough it is excluded. Note: i have tried upper and lower case table name.
I am using TEIID embedded jars version: 9.0.0.Alpha2
What could be wrong ?
-
5. Re: Teiid embedded - Oracle Datasource - repeated column names - case sensitive
rareddy Apr 29, 2016 8:25 AM (in response to hend.amin)The property is a regex expression, so see if need to make any adjustments for that.
-
6. Re: Teiid embedded - Oracle Datasource - repeated column names - case sensitive
shawkins May 2, 2016 12:04 PM (in response to rareddy)And it's a regular expression that will match the prospective Teiid fully qualified name. See JDBC Translators | Teiid Documentation