August 17, 2023

tSPSSInput – Docs for ESB 5.x

tSPSSInput

tSPSSInput_icon32_white.png

tSPSSInput properties

Component family

Business Intelligence

 

Function

tSPSSInput reads data from an
SPSS .sav file.

Purpose

tSPSSInput addresses SPSS .sav
data to write it for example in another file.

Basic settings

Sync schema

Click this button to synchronize with the columns of the input
SPSS .sav file.

 

Schema and Edit
Schema

A schema is a row description. It defines the number of fields to be processed and passed on
to the next component. The schema is either Built-In or
stored remotely in the Repository.

Since version 5.6, both the Built-In mode and the Repository mode are
available in any of the Talend solutions.

The schema metadata in this component is retrieved directly from
the input SPSS .sav file and thus is read-only.

You can click Edit schema to
view the retrieved metadata.

 

Filename

Name or path of the SPSS .sav file to be read.

 

Translate labels

Select this check box to translate the labels of the stored
values.

Note

If you select this check box, you need to retrieve the
metadata again.

Advanced settings

tStatCatcher
Statistics

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

Global Variables

NB_LINE: the number of rows read by an input component or
transferred to an output component. This is an After variable and it returns an
integer.

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

This component is used as a start component. It requires an output
flow.

Warning

Before being able to benefit from all functional objectives of
the SPSS components, make sure to do the following: -If you have
already installed SPSS, add the path to the SPSS directory as
the following: SET
PATH=%PATH%;<DR>:programSPSS
, or -If you
have not installed SPSS, you must copy the SPSS IO
“spssio32.dll” lib from the SPSS installation CD and paste it in
Talend root
directory.

Log4j

The activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User
Guide
.

For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html.

Limitation

Oracle provides two kinds of JVM platforms (32-bit and 64-bit). By
default, the JVM used in a 64-bit operating system is the 64-bit
version of the JVM. Since the JSPSS.dll file used by this component
is compiled in the 32-bit JVM, it is needed to configure the 32-bit
JVM for Job execution in Talend Studio installed on a 64-bit operating
system.

To do so, perform the following:

  1. Open the relevant Job in the workspace.

  2. Click the Run tab and
    enter the Advanced settings
    view.

  3. Select the Use specific JVM
    arguments
    check box and click the New… button.

  4. In the Set the VM
    argument
    box, enter -d32 and
    click Ok for validation.

Scenario: Displaying the content of an SPSS .sav file

The following scenario creates a two-component Job, which aims at reading each row of
a .sav file and displaying the output on the log console.

Setting up the Job

  1. Drop a tSPSSInput component and a
    tLogRow component from the Palette onto the design workspace.

    Use_Case_tSPSSInput.png
  2. Right-click on tPSSInput and connect it
    to tLogRow using a Main Row link.

Configuring the input component

  1. Click tSPSSInput to display its Basic settings view and define the component
    properties.

    Use_Case_tSPSSInput1.png
  2. Click the three-dot button next to the Filename field and browse to the SPSS .sav file you want to
    read.

  3. Click the three-dot button next to Sync
    schema
    . A message opens up prompting you to accept retrieving
    the schema from the defined SPSS file.

    Use_Case_tSPSSInput2.png
  4. Click Yes to close the message and
    proceed to the next step.

  5. If required, click the three-dot button next to Edit
    schema
    to view the pre-defined data structure of the source
    SPSS file.

    Use_Case_tSPSSInput4.png
  6. Click OK to close the dialog box.

Job execution

Save the Job and press F6 to execute it.

The SPSS file is read row by row and the extracted fields are displayed on the log
console.

Use_Case_tSPSSInput5.png

Translating the stored values

To translate the stored values, complete the following:

  1. In the Basic settings view, select the
    Translate label check box.

  2. Click Sync Schema a second time to
    retrieve the schema after translation.

    A message opens up prompting you to accept retrieving the schema from the
    defined SPSS file.

  3. Click Yes to close the message and
    proceed to the next step.

    A second message opens up prompting you to accept propagating the
    changes.

  4. Click Yes to close the message and
    proceed to the next step.

  5. Save the Job and press F6 to execute
    it.

The SPSS file is read row by row and the extracted fields are displayed on the log
console after translating the stored values.

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