-
1. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
blafond Jun 24, 2013 5:05 PM (in response to jane_lj)It should work and have a separate "8.3.x" Teiid runtime client installed.
Teiid Designer 8.2 is targeting the Teiid 8.4 Final which includes a number of added runtime features which are being summarized here: https://community.jboss.org/wiki/TeiidDesigner82WhatsNew
Barry - Teiid Designer Team
-
2. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
jane_lj Jun 25, 2013 2:23 PM (in response to blafond)Thanks for the reply.
Can you check if JIRA - TEIIDDES-1667 fixes are in this alpha release?
And to make this fix works, does it require to upgrade Teiid to 8.4? (Right now we are using 8.3 final).
Thanks.
-
3. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
blafond Jun 25, 2013 3:22 PM (in response to jane_lj)TEIIDDES-1667 was fixed and is included in Teiid Designer 8.2 Alpha 1 release. As far as I know, it should work with Teiid 8.3 or greater
Barry - Teiid Designer Team
-
4. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
jane_lj Jun 27, 2013 5:03 PM (in response to blafond)Thanks for the reply, Barry.
We upgaded our Teiid Designer to 8.2 alpha 1, we expects there is a new type added for variable arguments to work in the type list for input parameter, but we couldn't see it (no change with 8.1):
So can you explain how Teiid Designer fixed this ticket and how we should configure for variable arguments function?
For more information, please refer to this post:
https://community.jboss.org/thread/223823
Thanks a lot.
-
5. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
blafond Jun 28, 2013 9:55 AM (in response to jane_lj)From your screen-cap it appears that your function model was created awhile ago. Current Teiid Designer has property extensions that provide the VARARG capabilities.
In the example below, the Variable Arguments property should be set to TRUE. In addition, you can select and set the UDF jar path in your workspace (relative to project and this is "optional"). (See TEIIDDES-1667 for details and discussion)
You can update your function model by creating a new model, then copy/pasting your functions into it. The new model should have the extension properties available.
Note also that the Function metamodel is deprecated. The Relational metamodel now supports procedures as UDFs (See 8.1 doc Create Relational Procedure Wizard) and exposes the same Variable Arguments property. Part of the new functionality will automatically add your UDF jar to your VDB if the "UDF Jar Path" property is set.
Barry
-
6. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
jane_lj Jun 28, 2013 10:47 AM (in response to blafond)Barry, thank you very much for your response.
But in our function model, we already set that property to "true" and link UDF jar path to correct one, please see the screenshot:
When we deploy the VDB with variable arguments function, we got the following error:
ERROR [org.jboss.threads.executor] (teiid-async-threads - 3) Task execution failed for task org.teiid.jboss.VDBService$6@162a237a: org.teiid.metadata.MetadataException: TEIID30388 UDF "makeList(object items) : object result" could not be loaded, since no method on class "com.lgc.petrel.teiiddesigner.udf.BulkManipulation" with name "makeList" has a matching type signature.
at org.teiid.query.function.FunctionTree.createFunctionDescriptor(FunctionTree.java:326) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]
at org.teiid.query.function.FunctionTree.addFunction(FunctionTree.java:225) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]
at org.teiid.query.function.FunctionTree.<init>(FunctionTree.java:99) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]
at org.teiid.deployers.CompositeVDB.buildTransformationMetaData(CompositeVDB.java:86) [teiid-runtime-8.3.0.Final.jar:8.3.0.Final]
at org.teiid.deployers.CompositeVDB.metadataLoadFinished(CompositeVDB.java:254) [teiid-runtime-8.3.0.Final.jar:8.3.0.Final]
at org.teiid.deployers.VDBRepository.finishDeployment(VDBRepository.java:289) [teiid-runtime-8.3.0.Final.jar:8.3.0.Final]
at org.teiid.runtime.AbstractVDBDeployer.metadataLoaded(AbstractVDBDeployer.java:180) [teiid-runtime-8.3.0.Final.jar:8.3.0.Final]
at org.teiid.jboss.VDBService.access$900(VDBService.java:93) [teiid-jboss-integration-8.3.0.Final.jar:8.3.0.Final]
at org.teiid.jboss.VDBService$6.run(VDBService.java:398) [teiid-jboss-integration-8.3.0.Final.jar:8.3.0.Final]
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821)
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.NoSuchMethodException: makeList Args: [class org.teiid.query.util.CommandContext, class java.lang.Object]
at org.teiid.core.util.ReflectionHelper.findBestMethodWithSignature(ReflectionHelper.java:191) [teiid-common-core-8.3.0.Final.jar:8.3.0.Final]
at org.teiid.query.function.FunctionTree.createFunctionDescriptor(FunctionTree.java:320) [teiid-engine-8.3.0.Final.jar:8.3.0.Final]
... 14 more
Please advise.
-
7. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
blafond Jun 28, 2013 11:42 AM (in response to jane_lj)One of the comments in TEIIDDES-1667 from Teiid states:
"...Teiid runtime does not load Function Model Indexes so any extension data (aka VARARGS="TRUE") will not get picked up. For this release a user will need to be use a source model procedure as a function instead...."
So for this particular function, you'l need to model it as a UDF (procedure in a relational model).
Barry
-
8. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
jane_lj Jun 28, 2013 5:04 PM (in response to blafond) -
9. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
blafond Jun 29, 2013 9:23 AM (in response to jane_lj)You'll need to set the "Function" property value to "true" in order to enable the additional extension properties you are looking for.
The latest "New Child > Procedure" wizard provides for creating Procedure, Source Function and User Defined Function objects. For the latter objects, we auto-set the Function == TRUE.
Barry
-
10. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
jane_lj Jul 2, 2013 10:20 AM (in response to blafond)Thank you, Barry. I got what your meant, and created my procedure.
So in this case, my translator needs to support precedure call, register and implement this procedure logic, is that right? Or still I can implement the logic in my UDF java jar?
Thanks.
-
11. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
blafond Jul 2, 2013 11:20 AM (in response to jane_lj)The relational UDF (procedure with varargs) just needs to be modeled in your UDF jar. The jar name, class path, function name/category are all defined on your UDF object and available to Teiid engine which finds the jar, loads the class, registers the function and resolves/validates your queries containing the function call.
Barry
-
12. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
jane_lj Jul 2, 2013 4:33 PM (in response to blafond)Barry,
I have configured everything you mentioned for my relational UDF, now I can deploy my VDB, no errors.
But when I run INSERT statement which will invoke my relational UDF, it gave me error:
Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 petrel-connector: Function Not Supported : org.teiid.language.Function
SQLState: 50000
ErrorCode: 30504
From server.log, looks like the function call is pushed down to my translator level, not to my UDF jar. This is not what I expect, and I couldn't find the property to set "push-down" to "not allowed" as before.
-
13. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
shawkins Jul 2, 2013 11:52 PM (in response to jane_lj)Is your udf on a source or a view model? A udf on a source model is assumed to be "can pushdown" and is automatically pushable to the source it's associated with. A udf on a virtual model is also assumed to be "can pushdown", but it must be specifically enabled for pushdown in the supported functions list of sources.
-
14. Re: Teiid Designer 8.2 alpha works with Teiid 8.3?
jane_lj Jul 3, 2013 12:34 PM (in response to shawkins)You are right, Barry, my udf is on source model.
Now I created udf procedure on my view model, but still can't find the property to set "push-down", and I deployed the vdb, the udf call is still pushed down to my translator. Looks like the default of push-down is enabled:
1. When you says, "specifically enabled for pushdown in the supported functions list of sources", do you mean somewhere else to configure?
2.Right now the way I call udf procedure in my INSERT procedure is same as function call, such as:
FOR EACH ROW
BEGIN ATOMIC
INSERT INTO table1 (Name, Type) VALUES (NEW.fault_name, MAKELIST(NEW.type));
END
Is this right way to call?
3. "Function Category" property, any rules to name this one?
4. Should I put this relational procedure in a seperate java class? Right now I put it with other UDF functions in same java class?
Thanks a lot.