The Embedded Datasource project is a series of architecture changes and features that will facilitate easy addition of new datasource types in the reporting engine and it's primary designer, Report Designer. This enhancement will leverage PDI transformations to provide the data access, and XUL interfaces will allow cross platform rendering of the editors for the datasource definitions. The architecture described will impact the reporting engine, Report Designer, the PDI plugin system, the XUL framework, XUL SWT, XUL GWT and XUL Swing projects. This work should provide the foundation and UI elements for a thin PDI client (thin Instaview, thin Spoon, etc.) later on down the road.
The reporting engine's extensions-kettle project is being extended to facilitate the new embedded datasource architecture. The embedded datasource relies on template Kettle transformations that can be edited (through XUL UI) by users in the Pentaho Report Designer, then sent to the Kettle engine for execution with the data results sent back to the report engine for report processing.
This differs from the current Pentaho Data Integration datasource primarily in the extended UI capabilities. The Pentaho Data Integration datasource requires the user to define the Kettle transformation in Spoon, then attach that transformation to the report. The embedded datasource provides (where implemented) a UI for editing the step that provides data input (pre-defined in the template), provides the templated transformation, and in the simplest cases, the user is not required to interact with PDI or the transformation directly.
In cases where there is no available cross-platform compatible UI, then the tradition PDI datasource UI is displayed for the user.
The templates for the embedded datasources provide the transformation logic for each datasource. For instance, a template could be designed to retrieve MongoDB data, using a MongoDB input step. The MongoDB metadata needed to run the step would be left blank, and provided at design time by the report designer, through a cross platform compatible XUL based dialog.
The template system for the embedded datasources is modeled on Pentaho Instaview, and as such Instaview's coding conventions will be followed:
The templates will reside in a folder in the Report Designer distribution. Each template's name is the display name that is used in the Report Designer UI where datasource types are available for selection.
Each template should have at least two steps defined, and can contain more:
The KettleDataFactory will interact with a new transformation producer, the EmbeddedKettleTransformationProducer. This producer handles the template approach to the datasource type. The following conventions have been agreed upon regarding this new producer:
The KettleDataFactory will be the first reporting engine extension to implement and expose more than one DataFactoryMetadata class instance. The classes implementing this interface, the DataFactoryMetadata, provide information to the engine like which dialog should launch for a given data factory, what icon should be displayed, what the display name should be, etc. We will create one instance of the implementation (EmbeddedKettleDataFactoryMetadata) per embedded datasource type, and register it in the KettleDataFactoryModule.
The EmbeddedKettleTransformationProducer producer will retrieve a templated transformation from the Report Designer distribution when asked for a new datasource query; it will retrieve the transformation from the .prpt bundle when editing an existing query. The transformation is stored in the bundle as a .ktr file specifically to support "advanced mode" scenarios, described below in the section Advanced Mode Accommodations.
Given the stories identified by PM, we will accomodate the following functionality:
These requirements have led to the agreement that the display names for listing datasource and their queries in any UI will always be derived from the template (if new) or the internal transformation (if an existing datasource).
Should an advanced user create a case where queries are of different types under the same datasource, we will modify the datasource display name to reflect this "mixed mode".
Should an advanced user introduce an input step for which we do not have a cross-platform compatible dialog implemented, the UI will fall back to the PDI datasource dialog already available in Report Designer.
The user experience that we have currently planned will re-use the PDI datasource dialog that exists today:
When a query is of a StepMetaInterface class that has a cross platform compatible dialog, the dialog will be overlayed in the PDI datasource dialog, hiding the file and step components on the right side of the dialog. The dialog shown below demonstrates a query selected of type "MongoDB".
When creating a new datasource from the menus in Report Designer, and type context is known, then the dialog will open and start with the cross platform compatible components rendered for the datasource type. The "Add Query" button in the PDI dialog (the plus above the left side query list element) will create only new queries of the known datasource type.
If we are in "advanced mode", and the queries are of different datasource types, then the "Add Query" button will give the user a list of embedded datasource types to choose from.
The PDI datasource dialog today is not XUL-ified. The proper way to handle the dialog changes we want would be to re-create this dialog with XUL, and user overlays for the datasource type changes.
At a minimum, for this first pass, this requires :
The following stories are driving much of the architecture for this feature set.
A - As a Pentaho PM and developer I want...
B - As an end user I want...
C - As a BI Architect I want...
D - As an OEM I want...