Connect to SQream Using Pentaho Data Integration

Overview

This document is a Quick Start Guide that describes how to install Pentaho, create a transformation, and define your output.

The Connecting to SQream Using Pentaho page describes the following:

Installing Pentaho

To install PDI, see the Pentaho Community Edition (CE) Installation Guide.

The Pentaho Community Edition (CE) Installation Guide describes how to do the following:

  • Downloading the PDI software.
  • Installing the JRE (Java Runtime Environment) and JDK (Java Development Kit).
  • Setting up the JRE and JDK environment variables for PDI.

Back to Overview

Installing and Setting Up the JDBC Driver

After installing Pentaho you must install and set up the JDBC driver. This section explains how to set up the JDBC driver using Pentaho. These instructions use Spoon, the graphical transformation and job designer associated with the PDI suite.

You can install the driver by copying and pasting the SQream JDBC .jar file into your <directory>/design-tools/data-integration/lib directory.

NOTE: Contact your SQream license account manager for the JDBC .jar file.

Back to Overview

Creating a Transformation

After installing Pentaho you can create a transformation.

To create a transformation:

  1. Use the CLI to open the PDI client for your operating system (Windows):

    $ spoon.bat
    
  2. Open the spoon.bat file from its folder location.

../../_images/spoon_bat_file.png
  1. In the View tab, right-click Transformations and click New.
../../_images/pentaho_1.png

A new transformation tab is created.

../../_images/pentaho_2.png
  1. In the Design tab, click Input to show its file contents.
../../_images/pentaho_3.png
  1. Drag and drop the CSV file input item to the new transformation tab that you created.
../../_images/pentaho_4.png
  1. Double-click CSV file input. The CSV file input panel is displayed.
../../_images/pentaho_5.png
  1. In the Step name field, type a name.
../../_images/pentaho_6.png
  1. To the right of the Filename field, click Browse.
../../_images/pentaho_select_file.png
  1. Select the file that you want to read from and click OK.
../../_images/add_csv_file.png
  1. In the CSV file input window, click Get Fields.
../../_images/get_fields.png
  1. In the Sample data window, enter the number of lines you want to sample and click OK. The default setting is 100.
../../_images/number_of_lines_to_sample.png

The tool reads the file and suggests the field name and type.

../../_images/suggested_field_name_and_type.png
  1. In the CSV file input window, click Preview.
../../_images/preview.png
  1. In the Preview size window, enter the number of rows you want to preview and click OK. The default setting is 1000.
../../_images/number_of_rows_to_preview.png
  1. Verify that the preview data is correct and click Close.
../../_images/examine.png
  1. Click OK in the CSV file input window.

Back to Overview

Defining Your Output

After creating your transformation you must define your output.

To define your output:

  1. In the Design tab, click Output.
  1. Drag and drop Table output item to the Transformation window.
../../_images/table_output.png
  1. Double-click Table output to open the Table output dialog box.
  1. From the Table output dialog box, type a Step name and click New to create a new connection. Your steps are the building blocks of a transformation, such as file input or a table output.
../../_images/rename_table_output.png

The Database Connection window is displayed with the General tab selected by default.

../../_images/database_connection_window.png
  1. Enter or select the following information in the Database Connection window and click Test.
../../_images/pentaho_fillout_database_connection_window.png

The following table shows and describes the information that you need to fill out in the Database Connection window:

No. Element Name Description
1 Connection name Enter a name that uniquely describes your connection, such as sampledata.
2 Connection type Select Generic database.
3 Access Select Native (JDBC).
4 Custom connection URL Insert jdbc:Sqream://<host:port>/<database name>;user=<username>;password=<password>;[<optional parameters>; …];. The IP is a node in your SQream cluster and is the name or schema of the database you want to connect to. Verify that you have not used any leading or trailing spaces.
5 Custom driver class name Insert com.sqream.jdbc.SQDriver. Verify that you have not used any leading or trailing spaces.
6 Username Your SQreamdb username. If you leave this blank, you will be prompted to provide it when you connect.
7 Password Your password. If you leave this blank, you will be prompted to provide it when you connect.

The following message is displayed:

../../_images/connection_tested_successfully_2.png
  1. Click OK in the window above, in the Database Connection window, and Table Output window.

Back to Overview

Importing Data

After defining your output you can begin importing your data.

For more information about backing up users, permissions, or schedules, see Backup and Restore Pentaho Repositories

To import data:

  1. Double-click the Table output connection that you just created.
../../_images/table_output.png
  1. To the right of the Target schema field, click Browse and select a schema name.
../../_images/select_schema_name.png
  1. Click OK. The selected schema name is displayed in the Target schema field.
../../_images/selected_target_schema.png
  1. Create a new hop connection between the CSV file input and Table output steps:

    1. On the CSV file input step item, click the new hop connection icon.
    ../../_images/csv_file_input_options.png
    1. Drag an arrow from the CSV file input step item to the Table output step item.
    ../../_images/csv_file_input_options_2.png
    1. Release the mouse button. The following options are displayed.
    2. Select Main output of step.
../../_images/main_output_of_step.png
  1. Double-click Table output to open the Table output dialog box.
  1. In the Target table field, define a target table name.

    ../../_images/target_table_name.png
  1. Click SQL to open the Simple SQL editor.

    ../../_images/sql_editor.png
  1. In the Simple SQL editor, click Execute.

    ../../_images/execute_sql_statements.png

    The system processes and displays the results of the SQL statements.

    ../../_images/sql_statement_results_2.png
  1. Close all open dialog boxes.
  1. Click the play button to execute the transformation.
../../_images/execute_transformation.png

The Run Options dialog box is displayed.

../../_images/run_options_dialog_box.png
  1. Click Run. The Execution Results are displayed.
../../_images/execution_results_2.png

Back to Overview