Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Pentaho Data Integration Beginner's Guide - Second Edition
Pentaho Data Integration Beginner's Guide - Second Edition

Pentaho Data Integration Beginner's Guide - Second Edition: Get up and running with the Pentaho Data Integration tool using this hands-on, easy-to-read guide with this book and ebook , Second Edition

eBook
£7.99 £32.99
Paperback
£41.99
Subscription
Free Trial
Renews at £16.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Pentaho Data Integration Beginner's Guide - Second Edition

Chapter 2. Getting Started with Transformations

In the previous chapter, you used the graphical designer Spoon to create your first transformation: Hello world. Now you're ready to begin transforming data, and at the same time get familiar with the Spoon environment.

In this chapter, you will:

  • Learn the simplest ways of transforming data
  • Get familiar with the process of designing, debugging, and testing a transformation
  • Explore the available features for running transformations from Spoon
  • Learn basic PDI terminology related with data
  • Get an introduction to handling runtime errors

Designing and previewing transformations

In the first chapter, you created a Hello world transformation, previewed the data, and also ran the transformation. As you saw, the preview functionality allows you to see a sample of the data produced for selected steps and the Run option effectively runs the whole transformation. In this section, you will experiment the Preview option in detail. You will also deal with errors that may appear as you develop and test a transformation.

Time for action – creating a simple transformation and getting familiar with the design process

In this exercise, you will create a simple transformation that takes a list of projects with the start and end dates, and calculates the time that it took to complete each project.

  1. Start Spoon.
  2. From the main menu, navigate to File | New | Transformation.
  3. Expand the Input branch of the Steps tree. Remember that the Steps tree is located in the Design tab to the left of the work area.
  4. Drag-and-drop the Data Grid icon on the canvas.
  5. Double-click on the Data Grid icon and enter projects in the Step name field.
  6. Fill in the grid as shown in the following screenshot:
    Time for action – creating a simple transformation and getting familiar with the design process
  7. Click on the Data tab, and fill the grid as shown in the following screenshot:
    Time for action – creating a simple transformation and getting familiar with the design process
  8. Click on Preview and in the small window that appears, click on OK.
  9. Oops! It seems that something went wrong. The following ERROR window appears:
    Time for action – creating a simple transformation and getting familiar with the design process
  10. Great! Now you know what the error was: Kettle tried to convert the string N/A to a date. You can easily fix it: delete...

Running transformations in an interactive fashion

In the previous section, you created a transformation and learned some basics about working with Spoon during the design process. Now you will continue learning about interacting with Spoon. This time you will create a new transformation and then run it.

Time for action – generating a range of dates and inspecting the data as it is being created

In this section, you will generate a rowset with one row by date in a date range.

Tip

As you progress, feel free to preview the data that is being generated even if you're not told to do so. This will help you understand what is going on. Testing each step as you move forward makes it easier to debug and craft a functional transformation.

  1. Create a new transformation.
  2. From the Input group of steps, drag to the canvas a Generate Rows step.
  3. Double-click on the step and fill in the grid as shown in the following screenshot:
    Time for action – generating a range of dates and inspecting the data as it is being created
  4. Note that you have to change the default value for the Limit textbox. Close the window.
  5. From the Transform category of steps, add a Calculator step, and create a hop that goes from the Generate Rows step to this one.
  6. Double-click on the Calculator step and add a field named diff_dates as the difference between end_date and start_date. That is, configure it exactly the same way...

Handling errors

So far, each time you got an error you had the opportunity to discover what kind of error it was and fix it. This is quite different form real scenarios, mainly for two reasons:

  • Real data has errors—a fact that cannot be avoided. If you fail to heed it, the transformations that run with test or sample data will probably crash when running with real data.
  • In most cases, your final work is run by an automated process and not by a user from Spoon. Therefore, if a transformation crashes, there will be nobody who notices and reacts to that situation.

In the next section, you will learn the simplest way to trap errors that may occur, avoiding unexpected crashes. This is the first step in the creation of transformations ready to be run in a production environment.

Time for action – avoiding errors while converting the estimated time from string to integer

In this section, you will create a variation of the first transformation in this chapter. In this case, you will allow invalid data as source, but will take care of it:

  1. Create a transformation.
  2. Add a Data Grid step and fill in the Meta tab just like you did in the first section: add a string named project_name and two dates with the format yyyy-MM-dd, named start_date and end_date. Also add a fourth field of type String, named estimated.
  3. Now also fill in the Data tab with the same values you had in that first section. For the estimated field, type the following values: 30, 180, 180, 700, 700, ---.

    Tip

    You can avoid typing all of this in again! Instead of adding and configuring the step from scratch, open the transformation you created in the first section, select the Data Grid step, copy it by pressing Ctrl + C, and paste it into the new transformation by pressing Ctrl + V. Then enter the new...

Time for action – configuring the error handling to see the description of the errors

In this section, you will adapt the previous transformation so that you can capture more detail about the errors that occur:

  1. Open the transformation from the previous section, and save it with a different name. You can do it from the main menu by navigating to File | Save as…, or from the main toolbar.
  2. Right-click on the Select values step and select Define Error handling.... The following dialog window appears:
    Time for action – configuring the error handling to see the description of the errors
  3. In the Error descriptions fieldname textbox, type error_desc and click on OK.
  4. Double-click on the Write to log step and, after the last row, type or select error_desc.
  5. Save the transformation.
  6. Do a preview on the Write to log step. You will see a new field named error_desc with the description of the error.
  7. Run the transformation. In the Execution Window, you will see the following code:
    Write to log.0 - ------------> Linenr 1------------------------
    Write to log.0 - There was an error...

Designing and previewing transformations


In the first chapter, you created a Hello world transformation, previewed the data, and also ran the transformation. As you saw, the preview functionality allows you to see a sample of the data produced for selected steps and the Run option effectively runs the whole transformation. In this section, you will experiment the Preview option in detail. You will also deal with errors that may appear as you develop and test a transformation.

Left arrow icon Right arrow icon

Key benefits

  • Manipulate your data by exploring, transforming, validating, and integrating it
  • Learn to migrate data between applications
  • Explore several features of Pentaho Data Integration 5.0
  • Connect to any database engine, explore the databases, and perform all kind of operations on databases

Description

Capturing, manipulating, cleansing, transferring, and loading data effectively are the prime requirements in every IT organization. Achieving these tasks require people devoted to developing extensive software programs, or investing in ETL or data integration tools that can simplify this work. Pentaho Data Integration is a full-featured open source ETL solution that allows you to meet these requirements. Pentaho Data Integration has an intuitive, graphical, drag-and-drop design environment and its ETL capabilities are powerful. However, getting started with Pentaho Data Integration can be difficult or confusing. "Pentaho Data Integration Beginner's Guide - Second Edition" provides the guidance needed to overcome that difficulty, covering all the possible key features of Pentaho Data Integration. "Pentaho Data Integration Beginner's Guide - Second Edition" starts with the installation of Pentaho Data Integration software and then moves on to cover all the key Pentaho Data Integration concepts. Each chapter introduces new features, allowing you to gradually get involved with the tool. First, you will learn to do all kinds of data manipulation and work with plain files. Then, the book gives you a primer on databases and teaches you how to work with databases inside Pentaho Data Integration. Moreover, you will be introduced to data warehouse concepts and you will learn how to load data in a data warehouse. After that, you will learn to implement simple and complex processes. Finally, you will have the opportunity of applying and reinforcing all the learned concepts through the implementation of a simple datamart. With "Pentaho Data Integration Beginner's Guide - Second Edition", you will learn everything you need to know in order to meet your data manipulation requirements.

Who is this book for?

This book is a must-have for software developers, database administrators, IT students, and everyone involved or interested in developing ETL solutions, or, more generally, doing any kind of data manipulation. Those who have never used Pentaho Data Integration will benefit most from the book, but those who have, they will also find it useful. This book is also a good starting point for database administrators, data warehouse designers, architects, or anyone who is responsible for data warehouse projects and needs to load data into them.

What you will learn

  • Install and get started with Pentaho Data Integration
  • Get started with MySQL
  • Learn the ins and outs of Spoon, the graphical designer tool
  • Transform data in several ways such as performing simple and complex calculations, cleaning, counting, de-duplicating, filtering, and ordering
  • Learn to get data from all kind of data sources as plain files, Excel spreadsheets, databases, XML files and more, then preview it, and send it back to the same or different destinations
  • Discover how to read and parse unstructured files
  • Embed Java and JavaScript code in your Pentaho Data Integration transformations to enrich the treatment of data
  • Use Pentaho Data Integration to perform CRUD (create, read, update, and delete) operations on databases
  • Learn the basic concepts of data warehousing
  • Populate a data warehouse with Pentaho Data Integration including loading slowly changing dimensions, junk dimensions, time dimensions and more
  • Implement business processes by scheduling tasks, checking conditions, organizing files and folders, running daily processes, treating errors, and so on in a way that meets your requirements
Estimated delivery fee Deliver to Great Britain

Standard delivery 1 - 4 business days

£4.95

Premium delivery 1 - 4 business days

£7.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 24, 2013
Length: 502 pages
Edition : 2nd
Language : English
ISBN-13 : 9781782165040
Vendor :
Pentaho
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Great Britain

Standard delivery 1 - 4 business days

£4.95

Premium delivery 1 - 4 business days

£7.95
(Includes tracking information)

Product Details

Publication date : Oct 24, 2013
Length: 502 pages
Edition : 2nd
Language : English
ISBN-13 : 9781782165040
Vendor :
Pentaho
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£16.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
£169.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts
£234.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 125.97
Pentaho Data Integration Cookbook - Second Edition
£41.99
Pentaho 5.0 Reporting by Example: Beginner's Guide
£41.99
Pentaho Data Integration Beginner's Guide - Second Edition
£41.99
Total £ 125.97 Stars icon
Banner background image

Table of Contents

20 Chapters
1. Getting Started with Pentaho Data Integration Chevron down icon Chevron up icon
2. Getting Started with Transformations Chevron down icon Chevron up icon
3. Manipulating Real-world Data Chevron down icon Chevron up icon
4. Filtering, Searching, and Performing Other Useful Operations with Data Chevron down icon Chevron up icon
5. Controlling the Flow of Data Chevron down icon Chevron up icon
6. Transforming Your Data by Coding Chevron down icon Chevron up icon
7. Transforming the Rowset Chevron down icon Chevron up icon
8. Working with Databases Chevron down icon Chevron up icon
9. Performing Advanced Operations with Databases Chevron down icon Chevron up icon
10. Creating Basic Task Flows Chevron down icon Chevron up icon
11. Creating Advanced Transformations and Jobs Chevron down icon Chevron up icon
12. Developing and Implementing a Simple Datamart Chevron down icon Chevron up icon
A. Working with Repositories Chevron down icon Chevron up icon
B. Pan and Kitchen – Launching Transformations and Jobs from the Command Line Chevron down icon Chevron up icon
C. Quick Reference – Steps and Job Entries Chevron down icon Chevron up icon
D. Spoon Shortcuts Chevron down icon Chevron up icon
E. Introducing PDI 5 Features Chevron down icon Chevron up icon
F. Best Practices Chevron down icon Chevron up icon
G. Pop Quiz Answers Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(10 Ratings)
5 star 70%
4 star 10%
3 star 0%
2 star 0%
1 star 20%
Filter icon Filter
Top Reviews

Filter reviews by




Elkin A. Cantillo Garcia Sep 08, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excelente Libro
Amazon Verified review Amazon
Profound Reviewer Jun 13, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is really a wonderful resource. I understand both the basics of Pentaho and much more beyond that. The book is filled with example after example. All are helpful and useful. I can't imagine a better introduction to Pentaho. Highly recommended!
Amazon Verified review Amazon
Jaime A Solares Silva Jul 09, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excelente libro
Amazon Verified review Amazon
Antonio Tostes Jr. Sep 19, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Extremely helpful!
Amazon Verified review Amazon
Hugh Powers May 19, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good introduction book if you're looking to get into using Kettle. The author does a good job of presenting the subject using good examples, and doesn't get overly techie with the reader. Good book also for those who know SSIS but are looking for other ETL tools to explore.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela