-
1. Re: How Create Relational Native Query Procedure
rareddy May 24, 2017 3:09 PM (in response to cristopher.torres)Where are you seeing this option, maybe a link to that to provide some context?
Whenever JDV says "native" or "foreign" means the schema artifact is representing something in the physical database. For example, you have Oracle stored procedure, you want to represent that in JDV it is represented in a Native Query Procedure. This type of item exists on source schema. If you are looking at DDL for this, it will look something like
CREATE FOREIGN PROCEDURE myProcedure(IN key STRING) RETURNS LONG;
if the above was in Oracle Source Model, then when a user executes this procedure on JDV, it will, in turn, execute the procedure called "myProcedure" in Oracle.
Ramesh..
-
2. Re: How Create Relational Native Query Procedure
cristopher.torres May 24, 2017 5:35 PM (in response to rareddy)On Teiid Designer "Source Section" - How could We use the option: Native Query Procedure?.
https://issues.jboss.org/secure/attachment/12383404/select-procedure-type-dialog.png
Could you share an example of a SQL script?. We tried with differents simple scritps on Native Query tab; but it doesn't work, appears error message when We tried to retrieve the data. For example:
1) select * from customers;
OR
2) CREATE PROCEDURE SP_sample()
BEGIN
select * from customers;END
Thanks in advanced.
-
3. Re: How Create Relational Native Query Procedure
cristopher.torres May 24, 2017 5:39 PM (in response to cristopher.torres)I want to create a stored procedure to a mysql database from teiid, I want to know if this option allows me to create it using the native syntax of mysql.
-
4. Re: How Create Relational Native Query Procedure
rareddy May 24, 2017 5:42 PM (in response to cristopher.torres)it does not create a stored procedure, it represents your existing stored procedure in mysql, in JDV's metadata with this definition of the procedure. That is the reason why there is no body to it.
If you wanting a stored procedure in JDV, look for VIRTUAL PROCEDURE.
-
5. Re: How Create Relational Native Query Procedure
cristopher.torres May 24, 2017 6:22 PM (in response to rareddy)Thanks Ramesh, what happens is that I want to create a native query to the source databases since a virtual procedure only allows me to create a syntax in transact sql satandard can be said so I saw this option in teiid and I wanted to know if this Allow me to achieve it and if so, what would be the syntax to create it?
-
6. Re: How Create Relational Native Query Procedure
rareddy May 24, 2017 10:16 PM (in response to cristopher.torres)If you write a VIRTUAL PROCEDURE then you will be using the Procedure language from here [1] and [2]. If you want to write the Native procedure, then do it in the Oracle using Transact SQL and here you only need to define the signature of the procedure, not the body contents.