tPaloDimension
Manages Palo dimensions, even elements inside a database.
The tPaloDimension creates, drops or recreates
dimensions with or without dimension elements inside a Palo database.
tPaloDimension Standard properties
These properties are used to configure tPaloDimension running in the Standard Job framework.
The Standard
tPaloDimension component belongs to the Business Intelligence family.
The component in this framework is available in all Talend
products.
Basic settings
Use an existing connection |
Select this check box and in the Component List click the relevant connection component to Note that when a Job contains the parent Job and the child Job, |
Host Name |
Enter the host name or the IP address of the host server. |
Server Port |
Type in the listening port number of the Palo server. |
Username and |
Enter the Palo user authentication data. To enter the password, click the […] button next to the |
Database |
Type in the name of the database in which the dimensions are |
Dimension |
Type in the name of the dimension on which the given operation |
Action on dimension |
Select the operation you want to perform on the dimension of – None: no action is taken on – Create dimension: the – Create dimension if not – Delete dimension if exists and – Delete dimension: this |
Create dimension elements |
Select this check box to activate the dimension management fields |
Advanced settings
tStat |
Select this check box to collect log data at the component |
Global Variables
Global Variables |
DIMENSIONNAME: the name of the dimension. This is an
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 can be used in standalone or as end component of a |
Note:
The below fields are available only when the Create dimension elements check box |
Dimension type Note:
Available only when the action on dimension is None. |
 |
Commit size |
 |
Schema and Edit |
 |
 |
 |
 |
 |
Consolidation type – None Note:
With this option, you activate the corresponding parameter |
 |
 |
 |
 |
 |
 |
 |
Consolidation type – Normal Note:
With this option, you activate the corresponding parameter |
 |
 |
 |
 |
 |
 |
 |
Consolidation type – Self-referenced Note:
With this option, you activate the corresponding parameter |
 |
Element’s type |
 |
Creation mode |
 |
 |
 |
 |
Connections |
Outgoing links (from this component to another):
Trigger: Run if; On Subjob Ok; On Incoming links (from one component to this one): Row: Main; Iterate
Trigger: Run if; On Subjob Ok; On For further information regarding connections, see |
Limitation |
Deletion of dimension elements is only possible with the Due to license incompatibility, one or more JARs required to use |
Creating a dimension with elements
The Job in this scenario creates a date dimension with simple element
hierarchy composed of three levels: Year, Month, Date.
To replicate this scenario, proceed as follows:
Setting up the Job
-
Drop tPaloConnection, tRowGenerator, tMap, tPaloDimension from
the component Palette onto the design
workspace. -
Right-click tPaloConnection to open the
contextual menu and select Trigger >
On Subjob Ok to link it to tRowGenerator. -
Right-click tRowGenerator to open the
contextual menu and select Row >
Main to link it to tMap.Note:tRowGenerator is used to generate
rows at random in order to simplify this process. In the real case, you
can use one of the other input components to load your actual
data. -
Right-click tMap to open the contextual
menu and select Row > New output to link to tPaloDimension, then name it as out1 in
the dialog box that pops up.
Setting up the DB connection
-
Double-click the tPaloConnection
component to open its Component
view. -
In the Host name field, type in the host
name or the IP address of the host server, localhost
for this example. -
In the Server Port field, type in the
listening port number of the Palo server. In this scenario, it is
7777. -
In the Username field and the Password field, type in the authentication
information. In this example, both of them are
admin.
Configuring the input component
-
Double-click tRowGenerator to open its
editor. -
On the upper part of the editor, click the plus button to add one column
and rename it as random_date in the Column column. - In the newly added row, select Date in the Type column and getRandomDate in the Functions column.
-
In the Function parameters view on the
lower part of this editor, type in the new minimum date and maximum date
values in the Value column. In this
example, the minimum is 2010-01-01, the maximum is
2010-12-31. -
Click OK to validate your modifications
and close the editor. -
On the dialog box that pops up, click OK
to propagate your changes.
Configuration in the tMap editor
-
Double-click tMap to open its
editor. -
On the Schema editor view on the lower
part of the tMap editor, under the
out1 table, click the plus button to
add three rows. -
In the Column column of the out1 table, type in the new names for the three
newly added rows. They are Year,
Month, and Date. These rows
are then added automatically into the out1
table on the upper part of the tMap
editor. -
In the out1 table on the upper part of
the tMap editor, click the Expression column in the
Year row to locate the cursor. -
Press Ctrl+space to open the drop-down
variable list. -
Double-click TalendDate.formatDate to
select it from the list. The expression to get the date displays in the
Year row under the Expression column. The expression is
TalendDate.formatDate("yyyy-MM-dd HH:mm:ss",myDate)
. -
Replace the default expression with
TalendDate.formatDate("yyyy",row1.random_date)
. -
Do the same for the Month row and the
Date row to add this default expression and to
replace it withTalendDate.formatDate("MM",row1.random_date)
for the Month row and with
TalendDate.formatDate("dd-MM-yyyy", row1.random_date)
for
the Date row. -
Click OK to validate this modification
and accept the propagation by clicking OK
in the dialog box that pops up.
Configuring the tPaloDimension component
-
On the workspace, double-click tPaloDimension to open its Component view.
-
Select the Use an existing connection
check box. Then tPaloConnection_1 displays
automatically in the Connection
configuration field. -
In the Database field, type in the
database in which the new dimension is created,
talendDatabase for this scenario. -
In the Dimension field, type in the name
you want to use for the dimension to be created, for example,
Date. -
In the Action on dimension field, select
the action to be performed. In this scenario, select Create dimension if not exist. -
Select the Create dimension elements
check box. -
In the Consolidation Type area, select
the Normal check box. -
Under the element hierarchy table in the Consolidation Type area, click the plus button to add three
rows into the table. -
In the Input column column of the element
hierarchy table, select Year from the drop-down list
for the first row, Month for the second and
Date for the third. This determinates levels of
elements from different columns of the input schema.
Job execution
Press F6 to run the Job.
A new dimension is then created in your Palo database
talendDatabase.