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

Arrow left icon
Profile Icon Carina Roldán
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1 (10 Ratings)
Paperback Oct 2013 502 pages 2nd Edition
eBook
Can$12.99 Can$55.99
Paperback
Can$69.99
Subscription
Free Trial
Arrow left icon
Profile Icon Carina Roldán
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1 (10 Ratings)
Paperback Oct 2013 502 pages 2nd Edition
eBook
Can$12.99 Can$55.99
Paperback
Can$69.99
Subscription
Free Trial
eBook
Can$12.99 Can$55.99
Paperback
Can$69.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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

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 a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

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
$19.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
$199.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 Can$6 each
Feature tick icon Exclusive print discounts
$279.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 Can$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Can$ 209.97
Pentaho Data Integration Cookbook - Second Edition
Can$69.99
Pentaho 5.0 Reporting by Example: Beginner's Guide
Can$69.99
Pentaho Data Integration Beginner's Guide - Second Edition
Can$69.99
Total Can$ 209.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 included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.