Using a transformation as a data service

This recipe guides you through the process of turning an existing Kettle transformation into a data service for the Thin Kettle JDBC Driver. A data service is a configuration that allows the user to query a transformation as if it were a table in a database.

Getting ready

To get ready for this recipe, you first need to start Spoon and the MongoDB server with the same database from the previous chapter.

How to do it…

We are assuming that you have MongoDB with the data generated in the previous chapters and Spoon open from the Pentaho EE version. Perform the following steps to create a data service:

  1. Open the chapter1-using-mongodb-aggregation-framework.ktr file and save it as chapter2-using-mongodb-aggregation-framework-kettle-thin.ktr. Change the transformation name to MongoDB Aggregation Kettle Thin.
  2. Define a Data Service for this new transformation.
    1. Open the Transformation settings dialog. There are two ways of doing this. One is to press Ctrl + T, right-click on the right-hand side working area, and select Transformation settings. The other is as follows: on the menu bar, select the Settings... item entry from Edit menu.
    2. Select the Data Service tab.
    3. Click on the Create new Data Service button.
    4. Set the new virtual table to AggregationTable.
    5. Click on the OK button.
    6. Select the OUTPUT option of the Service step dropdown menu.
  3. Click on the OK button of the Transformation properties dialog and save the transformation.
    How to do it…

How it works…

As we explained in the previous chapter, this transformation will query data from a MongoDB instance using the MongoDB Aggregation Framework.

However, in this recipe, we configured the output of this transformation to serve as a Kettle Data Service. The configuration for this Kettle Data Service will be saved in the <user home folder>/.pentaho/metastore/pentaho/Kettle Data Service/ folder with the name as AggregationTable.xml in Unix/Linux operating systems and C:Users<user home folder>.pentahometastorepentahoKettle Data ServiceAggregationTable.xml. This XML contains the metadata that describes the data service.

In the next recipes, we will guide you through running Carte and Pentaho Data Integration Server (DI Server) in a single instance/server. You can run these platforms in a cluster, but that isn't the goal of this book. With Carte or DI Server up and running, you will be able to list all details of all Data Services from these documents.

See also

In the next recipe, we will guide you through making the Carte server run, with the data services of Thin Kettle available.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset