July 30, 2023

tPaloDimension – Docs for ESB 7.x

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
reuse the connection details you already defined.

Note that when a Job contains the parent Job and the child Job,
Component List presents only the
connection components in the same Job level.

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
Password

Enter the Palo user authentication data.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

Database

Type in the name of the database in which the dimensions are
managed.

Dimension

Type in the name of the dimension on which the given operation
should take place.

Action on dimension

Select the operation you want to perform on the dimension of
interest:

None: no action is taken on
this dimension.

Create dimension: the
dimension does not exist and will be created.

Create dimension if not
exists
: this dimension is created only when it does not
exist.

Delete dimension if exists and
create
: this dimension is deleted if exist and then a
new one will be created.

Delete dimension: this
dimension is removed from the database.

Create dimension elements

Select this check box to activate the dimension management fields
and create dimension elements along with the creation of this
dimension.

Advanced settings

tStat
Catcher Statistics

Select this check box to collect log data at the component
level.

Global Variables

Global Variables

DIMENSIONNAME: the name of the dimension. This is an
After variable and it returns a string.

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see
Talend Studio

User Guide.

Usage

Usage rule

This component can be used in standalone or as end component of a
process.

Note:

The below fields are available only when the Create dimension elements check box
is selected

Dimension type

Note:

Available only when the action on dimension is None.

 

Commit size

 

Schema and Edit
Schema

 

 

 

 

 

Consolidation type – None

Note:

With this option, you activate the corresponding parameter
fields to be completed.

 

 

 

 

 

 

 

Consolidation type – Normal

Note:

With this option, you activate the corresponding parameter
fields to be completed.

 

 

 

 

 

 

 

Consolidation type – Self-referenced

Note:

With this option, you activate the corresponding parameter
fields to be completed.

 

Element’s type

 

Creation mode

 

 

 

 

Connections

Outgoing links (from this component to another):

Trigger: Run if; On Subjob Ok; On
Subjob Error; On Component Ok; On Component Error.

Incoming links (from one component to this one):

Row: Main; Iterate

Trigger: Run if; On Subjob Ok; On
Subjob Error; On Component Ok; On Component Error.

For further information regarding connections, see

Talend Studio User
Guide
.

Limitation

Deletion of dimension elements is only possible with the
consolidation type None. Only
consolidation type Self-Referenced
allows the placing of an factor on this consolidation.

Due to license incompatibility, one or more JARs required to use
this component are not provided. You can install the missing JARs for this particular
component by clicking the Install button
on the Component tab view. You can also
find out and add all missing JARs easily on the Modules tab in the
Integration
perspective of your studio. You can find more details about how to install external modules in
Talend Help Center (https://help.talend.com)
.

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.

tPaloDimension_1.png

To replicate this scenario, proceed as follows:

Setting up the Job

  1. Drop tPaloConnection, tRowGenerator, tMap, tPaloDimension from
    the component Palette onto the design
    workspace.
  2. Right-click tPaloConnection to open the
    contextual menu and select Trigger >
    On Subjob Ok to link it to tRowGenerator.
  3. 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.

  4. 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

  1. Double-click the tPaloConnection
    component to open its Component
    view.

    tPaloDimension_2.png

  2. In the Host name field, type in the host
    name or the IP address of the host server, localhost
    for this example.
  3. In the Server Port field, type in the
    listening port number of the Palo server. In this scenario, it is
    7777.
  4. 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

  1. Double-click tRowGenerator to open its
    editor.

    tPaloDimension_3.png

  2. 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.
  3. In the newly added row, select Date in the Type column and getRandomDate in the Functions column.
  4. 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.
  5. Click OK to validate your modifications
    and close the editor.
  6. On the dialog box that pops up, click OK
    to propagate your changes.

Configuration in the tMap editor

  1. Double-click tMap to open its
    editor.

    tPaloDimension_4.png

  2. 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.
  3. 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.
  4. In the out1 table on the upper part of
    the tMap editor, click the Expression column in the
    Year row to locate the cursor.
  5. Press Ctrl+space to open the drop-down
    variable list.
  6. 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).
  7. Replace the default expression with
    TalendDate.formatDate("yyyy",row1.random_date) .
  8. Do the same for the Month row and the
    Date row to add this default expression and to
    replace it with TalendDate.formatDate("MM",row1.random_date)
    for the Month row and with
    TalendDate.formatDate("dd-MM-yyyy", row1.random_date) for
    the Date row.
  9. Click OK to validate this modification
    and accept the propagation by clicking OK
    in the dialog box that pops up.

Configuring the tPaloDimension component

  1. On the workspace, double-click tPaloDimension to open its Component view.

    tPaloDimension_5.png

  2. Select the Use an existing connection
    check box. Then tPaloConnection_1 displays
    automatically in the Connection
    configuration
    field.
  3. In the Database field, type in the
    database in which the new dimension is created,
    talendDatabase for this scenario.
  4. In the Dimension field, type in the name
    you want to use for the dimension to be created, for example,
    Date.
  5. In the Action on dimension field, select
    the action to be performed. In this scenario, select Create dimension if not exist.
  6. Select the Create dimension elements
    check box.
  7. In the Consolidation Type area, select
    the Normal check box.
  8. Under the element hierarchy table in the Consolidation Type area, click the plus button to add three
    rows into the table.
  9. 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.

tPaloDimension_6.png


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x