-
1. Re: Functions cascaded through multiple Teiid instances
shawkins May 18, 2016 11:18 AM (in response to andreas.krueck)> I established the connection between the two Teiid instances with other data from the Oracle datasource, but I don*t know what setup is needed for creating the function.
Since this is treating the intermediate vdb as a source, you would need to have the function declared in My_Teiid2_VDB
<vdb name="My_Teiid2_VDB" version="1">
<model visible="true" name="MyOracleModel">
<source name="MySource" translator-name="oracle" connection-jndi-name="java:/My_Database_DS"/>
<metadata type="NATIVE"/>
<metadata type="DDL"><![CDATA[
create foreign function my_function(field clob, pattern string) returns integer options (NAMEINSOURCE 'xxx');
]]>
</model>
</vdb>
You will still need the declaration in Teiid 1 VDB as the import logic does not yet import all functions.
-
2. Re: Functions cascaded through multiple Teiid instances
andreas.krueck May 19, 2016 6:38 AM (in response to shawkins)Thanks,
I defined the Teiid 2 VDB as described and got an error message (TEIID50036: Invalid arguments in call) when starting teiid.
If I leave out the <metadata type="NATIVE"/>, it works.
FYI, my Teiid 1 VDB looks like this now:
<model visible="true" name="MyModel">
<source name="MySource" translator-name="teiid" connection-jndi-name="java:/My_Teiid2_VDB_DS"/>
<metadata type="DDL"><![CDATA[
create foreign function my_function(field clob, pattern string) returns integer options (NAMEINSOURCE 'my_function');
]]>
</metadata>
</model>
-
3. Re: Functions cascaded through multiple Teiid instances
shawkins May 19, 2016 8:24 AM (in response to andreas.krueck)> If I leave out the <metadata type="NATIVE"/>, it works.
I was assuming that you wanted to import the source metadata, so I added that tag - but it looks like some of the import settings need set to narrow the import. If you don't need the source metadata imported, then just removing the element is fine.
-
4. Re: Functions cascaded through multiple Teiid instances
rareddy May 19, 2016 9:36 AM (in response to shawkins)Steve,
Do you think we need to further tune default import properties, may be based on particular translator being used? Seems like we are running into this more often.
Ramesh..
-
5. Re: Functions cascaded through multiple Teiid instances
shawkins May 19, 2016 9:47 AM (in response to rareddy)They generally have been tuned as issues are found. A new issue along with all of the specifics would need to be captured here.