tMondrianInput
Executes a multi-dimensional expression (MDX) query corresponding to the dataset
structure and schema definition.
tMondrianInput reads data from
relational databases and produces multidimensional data sets based on an MDX query. Then it
passes on the multidimensional dataset to the next component via a Main row link.
tMondrianInput Standard properties
These properties are used to configure tMondrianInput running in the Standard Job framework.
The Standard
tMondrianInput component belongs to the Business Intelligence family.
The component in this framework is available in all Talend
products.
Basic settings
Mondrian Version |
Select the Mondrian version you are using. |
DB type |
Select the relevant type of relational database |
Property type |
Either Built-in or Repository. |
 |
Built-in: No property data stored |
 |
Repository: Select the Repository |
Datasource |
Name and path of the file containing the data. |
Username and |
DB user authentication data. To enter the password, click the […] button next to the |
Schema and Edit |
A schema is a row description. It defines the number of fields Click Edit
|
 |
Built-in: The schema is created |
 |
Repository: The schema already |
Catalog |
Path to the catalog (structure of the data warehouse). |
MDX Query |
Type in the MDX query paying particularly attention to properly |
Encoding |
Select the encoding from the list or select Custom and define it |
Advanced settings
tStat |
Select this check box to collect log data at the component |
Global Variables
Global Variables |
NB_LINE: the number of rows read by an input component or
QUERY: the query statement being processed. This is a Flow
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see |
Usage
Usage rule |
This component covers MDX queries for multi-dimensional |
Limitation |
This component requires installation of its related jar files. |
Extracting multi-dimenstional datasets from a MySQL database (Cross-join tables)
This Job extracts multi-dimensional datasets from relational database tables stored in
a MySQL base. The data are retrieved using a multidimensional expression (MDX query).
Obviously you need to have to know the structure of your data, or at least have a
structure description (catalog) as a reference for the dataset to be retrieved in the
various dimensions.
Setting up the Job
- Drop tMondrianInput and tLogRow from the Palette to the design workspace.
- Connect the Mondrian connector to the output component using a Row Main connection.
Setting up the DB connection
-
Double-click the tMondrianInput component
to display its Basic settingsview. -
In DB type field, select the relational
database you are using with Mondrian. -
Select the relevant Repository entry as Property
type, if you store your DB connection details centrally. In
this example the properties are built-in. -
Fill out the details of connection to your DB: Host, Port, Database name, User Name
and Password. -
Select the relevant Schema in the
Repository if you store it centrally. In this example, the schema is to be
set (built-in).
Configuring the DB query
-
The relational database we want to query contains five columns:
media, drink,
unit_sales, store_cost and
store_sales. -
The query aims at retrieving the unit_sales,
store_cost and store_sales
figures for various media / drink
using an MDX query such as in the example below: -
Back on the Basic settings tab of the
tMondrianInput component, set the
Catalog path to the data warehouse.
This catalog describes the structure of the warehouse. -
Then type in the MDX query such as:
1234567891011"select{[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[StoreSales]} on columns,CrossJoin({ [Promotion Media].[All Media].[Radio],[Promotion Media].[All Media].[TV],[Promotion Media].[All Media].[Sunday Paper],[Promotion Media].[All Media].[Street Handout] },[Product].[All Products].[Drink].children) on rowsfrom Saleswhere ([Time].[1997])"
-
Eventually, select the Encoding type on
the list.
Job execution
-
Select the tLogRow component and select
the Print header check box to display the
column names on the console. -
Then press F6 to run the Job.
The console shows the result of the unit_sales,
store_cost and store_sales for each
type of Drink (Beverages,
Dairy, Alcoholic beverages) crossed
with each media (TV, Sunday Paper,
Street handout) as shown previously in a table form.