-
1. Re: Is model property importer.includeSynonyms supported?
shawkins Mar 27, 2015 11:44 AM (in response to renat000)> Is importer.includeSynonyms supported?
No that is not a supported property. Oracle has a SYNONYM table type. So the primary mechanism for this would be to set the table types - importer.tableTypes which expects a comma separated list.
-
2. Re: Is model property importer.includeSynonyms supported?
renat000 Mar 27, 2015 1:23 PM (in response to shawkins)Adding props.setProperty("importer.tableTypes", "TABLE,VIEW,SYNONYM") didn't help.
WARNING: TEIID31071 Invalid table; Table testmodel.SYNONYMS.S1 has no columns defined Exception in thread "main" org.teiid.deployers.VirtualDatabaseException: TEIID40095 TEIID31071 Invalid table; Table testmodel.SYNONYMS.S1 has no columns defined at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:714) at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:624)
Looks like it's null by default which makes java.sql.DatabaseMetaData.getTables(String, String, String, String[]) return tables all types).
I have SYNONYMS schema with S1 as a synonym for a table from other schema. The user has all required permissions to query the synonym. Oracle requires includeSynonyms to be set for java.sql.DatabaseMetaData.getColumns(String, String, String, String) to return columns for synonyms.
Is there any other way I can make this work other than setting the property on oracle datasource (oracle.jdbc.pool.OracleDataSource.setConnectionProperties(Properties))?
Edit: reordered sentences.
-
3. Re: Is model property importer.includeSynonyms supported?
shawkins Mar 27, 2015 1:27 PM (in response to renat000)> Is there any other way I can make this work other than setting the property on oracle datasource (oracle.jdbc.pool.OracleDataSource.setConnectionProperties(Properties))?
I don't believe so. The importer doesn't have special handling for synonyms and expects all metadata to be available via the usual DatabaseMetaData calls. If there a reason why you can't set the connection property?