Component family |
Business Intelligence/OLAP Cube |
|
Function |
tMondrianInput reads data from |
|
Purpose |
tMondrianInput executes a |
|
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 to be processed and passed on Since version 5.6, both the Built-In mode and the Repository mode are Click Edit schema to make changes to the schema. If the
|
|
|
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 |
NB_LINE: the number of rows read by an input component or
QUERY: the SQL query statement being processed. This is a 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 Talend Studio |
|
Usage |
This component covers MDX queries for multi-dimensional |
|
Limitation |
This component requires installation of its related jar files. For more information about the |
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.
-
Drop tMondrianInput and tLogRow from the Palette to the design workspace.
-
Connect the Mondrian connector to the output component using a Row Main 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).
-
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<span></span>{[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[StoreSales]} on columns,<span></span>CrossJoin(<span></span>{ [Promotion Media].[All Media].[Radio],<span></span>[Promotion Media].[All Media].[TV],<span></span>[Promotion Media].[All Media].[Sunday Paper],<span></span>[Promotion Media].[All Media].[Street Handout] },<span></span>[Product].[All Products].[Drink].children) on rows<span></span>from Sales<span></span>where ([Time].[1997])" -
Eventually, select the Encoding type on
the list.
-
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.