Getting Started with Stored Procedures
Databases Stored Procedures can be designed in a specific Metadata and invoked in Mappings as a common datastore, allowing to send input parameters data and retrieving output results.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.
The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…
Databases Stored Procedures can be designed in a specific Metadata and invoked in Mappings as a common datastore, allowing to send input parameters data and retrieving output results.
This article demonstrates how to define SQL Queries which will be executed when initializing a connection.
Those user defined queries can be useful when you need to execute automatically the same list of queries each time a connection is initialized, such as defining options, changing current working databases, ...
Read more: Executing SQL Queries at Connection initialization
This article explains how to work with ODBC datasources within Stambia DI.
You'll learn how to install, configure, and create your first Metadata with examples.
This article is dedicated to Stambia DI S17, S18 and S19.
If you are using Stambia DI 2020 (S20.x.x) or higher, please refer to this article instead.
This article is a Work In Progress. We might also change its structure and category soon.
Please feel free to suggest improvements at the bottom of the page.
Stambia DI is made with Java. Most database vendors provide JDBC drivers, so the most natural choice is to use these JDBC drivers instead of ODBC.
However, some technologies have no JDBC drivers.
Stambia DI comes with native drivers for some of these technologies:
Other technologies (no Jdbc driver, no Stambia DI driver) may require to use an ODBC datasource. For example Microsoft Access Databases, Excel "xls" files, Dbase, Hyperfile, etc.
This article illustrates how to setup Stambia for working with ODBC datasources.
Stambia DI can work with ODBC datasources, using Java's "JDBC-ODBC Bridge". This is a Java component available in Oracle Java 7, which interacts with the operating system's native ODBC drivers.
With Java 7, the JDBC-ODBC Bridge is included and will work instantly in Stambia DI.
Since Java 8, Oracle removed the "JDBC-ODBC Bridge" component from their Java distributions. In this case, Stambia DI's "JDBC-ODBC Bridge Wrapper" enables using Java 7's JDBC-ODBC Bridge with Java 8.
This step is necessary only when using Java distributions which do not include the JDBC-ODBC Bridge.
For example, it is necessary with Oracle Java 8 and above.
To check if the JDBC-ODBC Bridge is already installed in the Runtime's JVM, you can follow the steps below:
If the JDBC-ODBC Bridge is not installed, the first step is to get the following files from a Java 7 distribution:
Then copy them to a location that the Designer and Runtime can access.
Do not put them inside the Runtime directory, because this could cause conflicts with the Runtime's JVM classes.
Do not put them inside your Java installation directory, it would break your Java installation.
Now that you have the two required files, you can configure the Runtime to use them.
<javaConfiguration> <property name="jdbc.odbc.wrapped.lib.path" value="F:/Apps/Java/1.7.0_45_jdk_32/jre/bin/JdbcOdbc.dll"/> <property name="jdbc.odbc.wrapped.jar.path" value="F:/Apps/Java/1.7.0_45_jdk_32/jre/lib/rt.jar"/> </javaConfiguration>
Refer to this article for more information about adding Java Options at the Runtime's startup.
That's it! The Runtime is now configured to access ODBC datasources.
This procedure is valid for Runtime versions S17.4.0 or higher.
For prior versions, the options must be added manually in the startup scripts of the Runtime.
If you need help to do that, contact the support team.
Similarly, the Designer need to be configured to use these files if you want to make Reverse / SQL operations on the ODBC datasource from the Designer.
For this, append the following lines to your stambia.ini (or stambia32.ini) file:
-Djdbc.odbc.wrapped.lib.path=F:/Apps/Java/1.7.0_45_jdk_32/jre/bin/JdbcOdbc.dll -Djdbc.odbc.wrapped.jar.path=F:/Apps/Java/1.7.0_45_jdk_32/jre/lib/rt.jar
Then restart the Designer and open Window/Preferences/SQL Editor/JDBC Drivers
Name: JDBC ODBC Bridge Wrapper
Example URL: jdbc:odbc:<alias>
In the "Extra class path" tab, Add Jar "stambiaRuntime\lib\jdbc\stambia.jdbc.driver.odbc.jar" and click "List drivers"
The Driver class name should be automatically set to "com.stambia.jdbc.odbc.JdbcOdbcDriverWrapper"
In this example, we will use a Microsoft Access and a Microsoft Excel "xls" file.
Here is their corresponding ODBC datasources:
Create a new "Microsoft Access" metadata file
Create a new "Microsoft Excel" metadata file
This article explains how to work with ODBC datasources within Stambia DI.
You'll learn how to install, configure, and create your first Metadata with examples.
This article is dedicated to Stambia DI 2020 (S20.x.x) or higher.
If you are using Stambia DI S17, S18 or S19, please refer to this article instead.
This article is a Work In Progress. We might also change its structure and category soon.
Please feel free to suggest improvements at the bottom of the page.
Stambia DI is made with Java.
Communicating with databases in Java World is most of the time performed through JDBC Drivers.
Most database vendors provide JDBC drivers, so the most natural choice is to use those JDBC drivers when possible instead of ODBC.
However, some technologies have no JDBC drivers available.
Stambia DI comes with native drivers for some of these technologies.
We therefore advise to use those Stambia drivers for the following technologies:
Other technologies (no JDBC driver available, no Stambia DI driver available yet) may require to use an ODBC datasource.
For example Microsoft Access Databases, Excel "xls" files, Dbase, Hyperfile, etc.
This article illustrates how to setup Stambia for working with ODBC datasources.
Stambia DI can work with ODBC datasources, using Java's "JDBC-ODBC Bridge".
This is a Java component which interacts with the operating system's native ODBC drivers.
You can below the complete installation procedure for being able to work with ODBC datasources under Stambia DI 2020 and higher.
JDBC-ODBC Java Component has been removed from Java 8 and higher versions, which therefore require some additional configuration to be able to use it.
We propose a solution to still be able to use JDBC-ODBC Bridge under Java 8 and higher, which requires some installation steps presented below.
First step is to get the following files from a Java 7 distribution:
Those files are the files which contains the necessary to use JDBC-ODBC Bridge.
Simply download a Java 7 version and copy those files somewhere on your file system, we will use them in next step.
As a reminder, this workaround is required as JDBC-ODBC bridge does not exist anymore under Java 8 and higher versions.
Next step is to create an ODBC Module in which we'll add everything required to work with ODBC, which means libraries retrieved in previous step.
Open Stambia DI Designer, create an ODBC Module and add inside the two files retrieved previously.
For further information about Modules creation and usage, you can consult "Getting started with modules" article.
Here is an example of ODBC Module:
That's it, you can now use this ODBC Module in your Metadata when you want to connect through ODBC.
In this example, we will use a Microsoft Access and a Microsoft Excel "xls" file.
Here is their corresponding ODBC datasources:
Create a new "Microsoft Access" Metadata file.
Select the previously created ODBC Module, or create a new one if you have not created it yet.
Finally, define connection properties as below:
For instance, with the Access datasource example:
Create a new "Microsoft Excel" Metadata file.
Select the previously created ODBC Module, or create a new one if you have not created it yet.
Finally, define connection properties as below:
For instance, with the Excel datasource example: