Home Data Talend Open Studio Cookbook

Talend Open Studio Cookbook

By Rick Barton
books-svg-icon Book
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    Introduction and General Principles
About this book
Data integration is a key component of an organization's technical strategy, yet historically the tools have been very expensive. Talend Open Studio is the world's leading open source data integration product and has played a huge part in making open source data integration a popular choice for businesses worldwide.This book is a welcome addition to the small but growing library of Talend Open Studio resources. From working with schemas to creating and validating test data, to scheduling your Talend code, you will get acquainted with the various Talend database handling techniques. Each recipe is designed to provide the key learning point in a short, simple and effective manner.This comprehensive guide provides practical exercises that cover all areas of the Talend development lifecycle including development, testing, debugging and deployment. The book delivers design patterns, hints, tips, and advice in a series of short and focused exercises that can be approached as a reference for more seasoned developers or as a series of useful learning tutorials for the beginner.The book covers the basics in terms of schema usage and mappings, along with dedicated sections that will allow you to get more from tMap, files, databases and XML. Geared towards the whole lifecycle, the Talend Open Studio Cookbook shows readers great ways to handle everyday tasks, and provides an insight into all areas of a development cycle including coding, testing, and debugging of code to provide start-to-finish coverage of the product.
Publication date:
October 2013
Publisher
Packt
Pages
270
ISBN
9781782167266

 

Chapter 1. Introduction and General Principles

The aim of this book is to provide you, the Talend developer, with a set of common (and sometimes not so common) tasks and examples that, we hope, will help you in:

  • Developing Talend jobs more rapidly

  • Solving Talend issues more quickly

  • Gaining a wider knowledge of the Talend product

  • Gaining a better understanding of the capabilities of Talend

This cookbook is primarily intended as a reference guide, however, the chapters have been organized in such a way that it can also be used as a means of rapidly developing your Talend skills by working through the exercises in sequence from front to back.

For the more experienced developers, some of the recipes in this book may seem very simple, because they describe a feature of Talend that you may already know, but we are hoping that this isn't the case for everyone, and that there will be something in the book for developers of all levels of experience.

Many of the recipes in the book require you to complete sections of a partially built job, so it is assumed that in the real world you would be able to get to the starting point independently. Our thinking behind this is that we wanted to squeeze in as many recipes in the book as possible, so only the relevant steps that need to be performed and understood for a particular point to be made, are described in detail within each recipe.

Many any of the examples will write their output to the Talend log/console window when we could easily have written the data out to files or tables. However, the decision was made to provide an easy means (in most cases) of viewing the results of an exercise without having to leave the studio.

 

Before you begin


Before you begin the exercises in the book, it is worth becoming familiar with some of the key concepts and best practices.

Keep code changes small and test often

When developing using Talend, as with any other development tool, it is recommended to code in short bursts and test (run) frequently.

By keeping each change small, it is much easier to find where and what has caused problems during compilation and execution.

Chapter 10, Debugging, Logging, and Testing, is dedicated to debugging and logging; however, observing the preceding method will save time having to perform debugging steps that can sometimes take a long time.

Document your code

Talend sub-jobs have the ability to add titles, and every component in Talend has the option to add documentation for the component. Where you use Java, you should use the Java comment structures to document the code. Remember to use all these methods as you go along to ensure that your code is well documented.

Contexts and globalMap

context and globalMap are global areas used to store data that can be used by all components within a Talend job.

context variables are predefined prior to job execution in a context group, whereas globalMap variables are created on the fly at any point within a job.

Context variables

Context variables are used by Talend to store parameter information, and can be used:

  • To pass information into a job from the command line and/or a parent job

  • To manage values of parameters between environments

  • To store values within a job or set of jobs

Chapter 6, Managing Context Variables, is dedicated to the use and management of context variables within Talend

globalMap

globalMap is a very important construct within Talend, in that:

  • Almost every component will write information to globalMap once it completes execution (for example NB_LINE is the number of rows processed in a component).

  • Certain components, such as tFlowToIterate or tFileList, will store data in globalMap variables for use by downstream components.

  • Developers can read and write to globalMap to create global variables in an ad hoc fashion. The use of global variables can often be the best way to ensure code is simple and efficient.

Java

Talend is a Java code generator, so having a little Java knowledge can help when using Talend. There are many Java tutorials for beginners online, and a little time spent learning the basics will help speed up your understanding of Talend.

Other background knowledge

As a data integrator, you will be expected to understand many technologies and how to interface with them, and this book assumes a basic knowledge of many of the most frequent data sources and targets.

Chapter 7, Working with Databases, relates to using Talend with databases. We have chosen to use MySQL, because it is quick to install, simple to use, and readily available. Basic knowledge of SQL and MySQL will therefore be required to perform the exercises in this chapter.

Other chapters will also assume knowledge of csv files, MS Excel, XML, and web services.

 

Installing the software


This cookbook comes with a package of jobs and scripts that you will need to complete the recipes. The instructions for installing the code and scripts are detailed in the following section:

How to do it…

  1. All templates, completed code, and data are in the cookbook.zip file.

  2. Unzip cookbook.zip into a folder on your machine.

  3. Copy the directory cookbookData to a directory on your machine (we recommend C:\cookbookData or the linux/MacOS equivalent)

  4. Download and install the latest version of Talend Open Studio for enterprise service bus (ESB) from www.talend.com.

  5. Open Talend Open Studio, and you will be prompted to create a new project.

  6. Name the new project cookbook.

  7. Open the project.

  8. Right mouse click on the Job Designs folder in the Repository panel, and select the option Import Items.

  9. This opens the import wizard. Click the Select archive file option, and then navigate to your unzipped cookbook directory and select the zip file named cookbookTalendJobs.zip.

  10. Click on Finish to import all the Talend artifacts.

  11. If you copied your data to C:\cookbookData, then you can ignore the next steps, and you have completed the installation of the cookbook software.

  12. Open the cookbook context, as shown in the following screenshot, and click Next at the first window.

  13. Open the Values as a table panel and change the value of cookbookData to your chosen directory, as shown in the following screenshot:

  14. Click Finish to complete the installation process.

 

Enabling tHashInput and tHashOutput


Many of the exercises rely on the use of tHashInput and tHashOutput components. Talend 5.2.3 does not automatically enable these components for use in jobs. To enable these components perform the instructions in the following section:

How to do it…

  1. On the main menu bar navigate to File | Edit Project properties to open the properties dialogue.

  2. Select Designer then Palette Settings.

  3. Click on the Technical folder and then click on the button shown in the following screenshot to add this folder to the Show panel.

  4. Click on OK to exit the project settings.

About the Author
  • Rick Barton

    Rick Barton is a freelance consultant who has specialized in data integration and ETL for the last 13 years as part of an IT career spanning over 25 years. After gaining a degree in Computer Systems from Cardiff University, he began his career as a firmware programmer before moving into Mainframe data processing and then into ETL tools in 1999. He has provided technical consultancy to some of the UKs largest companies, including banks and telecommunications companies, and was a founding partner of a Big Data integration consultancy. Four years ago he moved back into freelance development and has been working almost exclusively with Talend Open Studio and Talend Integration Suite, on multiple projects, of various sizes, in UK. It is on these projects that he has learned many of the lessons that can be found in this, his first book.

    Browse publications by this author
Latest Reviews (8 reviews total)
Ideal for someone who wants to start using Talend Studio. Examples are easy to follow even if they refer to an old version.
Wir haben unser Cookbook nie erhalten und das Geld zurück gefordert
Packt keeps the most useful books in stock. I've relied on them for years and expect to continue to do so.
Talend Open Studio Cookbook
Unlock this book and the full library FREE for 7 days
Start now