3 Replies Latest reply on Feb 24, 2015 7:58 AM by shawkins

    Mapping stored procedures from SQL Data Source

    anantk

      Hi,

      When I try to import stored procedures from an SQL Database, the Name in source of the stored procedures are automatically changed from "originalProcName" to "originalProcName;1" in the source model and the stored procedure in the VDB is renamed as "originalProcName_1". Also, the output is not mapped automatically.
      It all works fine when each stored procedure is edited in the designer ( ";1" is removed from source name and Procedure Result is manually added as Procedure child, along with the appropriate columns as Procedure Result children ).
      Manually doing this may not be a feasible solution while adding a data source with several stored procedures to the VDBs.

       

      The target version of Teiid I'm using is 8.4.1 with Jbdevstudio 7.1.1.GA.

       

      Is this a known bug?
      If so, has it been resolved via some update or in later versions?

      If not, am I missing something?
      Is there some settings file I may edit to resolve this?
      Any other solution?


      Thank you for your time.

        • 1. Re: Mapping stored procedures from SQL Data Source
          shawkins

          > Is this a known bug?

           

          Not that I know of. This should be import logic that is solely on the Designer side as Teiid's will not be used unless you are using a dynamic vdb or the Teiid connection importer.  What database and driver specifically are you using and can you check in a third party tool what the procedure name is reported as and if result set columns are shown?  I know that there have been several situations we have seen before when the JDBC DatabaseMetaData may not contain all of the resultset columns.

          • 2. Re: Mapping stored procedures from SQL Data Source
            anantk

            As you suspected, I was using the sqljdbc driver. Tried using the jtds driver instead and the semi colon issue was resolved.
            However, the result set is still not being mapped automatically. I guess it expects a table type as return (something that is not needed in the sql stored procedures). I could be wrong, so do let me know what you think.
            And thanks for your reply!

            • 3. Re: Mapping stored procedures from SQL Data Source
              shawkins

              > However, the result set is still not being mapped automatically. I guess it expects a table type as return (something that is not needed in the sql stored procedures). I could be wrong, so do let me know what you think.

               

              We are expecting the DatabaseMetaData.getProcedureColumns COLUMN_TYPE to be reported as procedureColumnResult.  Until recently we did expect the resultset to also be the return - "? = call ...", but with [TEIID-2644] Support retrieving result sets from any out parameter - JBoss Issue Tracker we can support other out parameters at least for Oracle.