Available options
In this microlearning, we will explore the various options available for connecting eMagiz to external databases. By the end, you'll understand how to establish connections, retrieve and write data, and utilize key components to ensure seamless integration.
Should you have any questions, please get in touch with academy@emagiz.com.
1. Prerequisites
- Basic knowledge of the eMagiz platform
2. Key concepts
Via eMagiz you can set up a connection to an external database with the help of several components in eMagiz. The workings of the H2 database in relation to eMagiz is described in other microlearnings and therefore will not be adressed in this microlearning. The support object called JDBC BoneCP data source is needed to set up the initial connection with the external database. Once you have established the connection, you can retrieve data from the database and/or write data to the database.
3. Available options
In this microlearning, we will introduce database connectivity and look at the various options available to connect the eMagiz platform to multiple databases. In a previous microlearning, we learned about how the H2 database is used in an entry to act as bridge between the client calling eMagiz and the first queue of eMagiz. Later on we will learn how you could use the H2 database for other applications.
To determine the available options we have in eMagiz to connect to databases we start our journey in the Create phase of the platform. As you know, in this phase you will construct a set of components in such a way that they provide you with a functional result. In this case the functional result is the connection with the database. As the underlying framework has its roots in Java we want to search for components that reference JDBC. JDBC stands for Java Database Connectivity. When we execute that search on the components in Create we get the following results:
As you can see from the list there are inbound and outbound components. The inbound components are relevant when you want to retrieve data from the database. The outbound components for when you want to write to the database. Furthermore, there is a transformation component and support objects. The transformation component can be used to transform the result of your retrieve action into an XML message. The support objects are needed for setting up the connectivity with the database and for other purposes (such as the creation of a H2 database).
When we zoom in on the support objects, we see six different support objects. Of those six there is one support object, the JDBC BoneCP data source object, that you should use if you want to set up a connection with an external database. If we zoom in on this component we see that we need to have a reference to the Driver (more on that later), the database itself and to a set of credentials.
Note that you should get this information from the external party, ideally while capturing the integration in the Capture phase.
4. Key takeaways
- eMagiz allows you to establish connections with external databases using various components within the platform.
- The JDBC BoneCP data source is the essential support object for setting up an initial connection to an external database.
- Once the connection is established, you can efficiently retrieve data from the database or write data to it.
- Both inbound and outbound components are available for handling data flow, along with transformation components to convert data into the required format.
5. Suggested additional readings
If you are interested in this topic and want more information on it, please read the help text provided by eMagiz and see the following links: