Book Image

Learning Pentaho CTools

By : Miguel Gaspar
Book Image

Learning Pentaho CTools

By: Miguel Gaspar

Overview of this book

Pentaho and CTools are two of the fastest and most rapidly growing tools for practical solutions not found in any other tool available on the market. Using Pentaho allows you to build a complete analytics solution, and CTools brings an advanced flexibility to customizing them in a remarkable way. CTools provides its users with the ability to utilize Web technologies and data visualization concepts, and make the most of best practices to create a huge visual impact. The book starts with the basics of the framework and how to get data to your dashboards. We'll take you all the way through to create your custom and advanced dashboards that will create an effective visual impact and provide the best user experience. You will be given deep insights into the lifecycle of dashboards and the working of various components. Further, you will create a custom dashboard using the Community Dashboards Editor and use datasources to load data on the components. You will also create custom content using Query, the Freeform Addins Popup, and text components. Next, you will make use of widgets to create similar sections and duplicate components to reproduce other components on a dashboard. You will then learn to build a plugin without writing Java code, use Sparkl as a CPK plugin manager, and understand the application of deployment and version control to dashboard development. Finally, you will learn tips and tricks that can be very useful while embedding dashboards into other applications. This guide is an invaluable tutorial if you are planning to use custom and advanced dashboards among the solutions that you are building with Pentaho.
Table of Contents (17 chapters)
Learning Pentaho CTools
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Using Pentaho allows you to build a complete analytics solution, and CTools brings an advanced flexibility to creating custom reports and making the most out of Pentaho. You can build your analytics dashboards/reports in an advanced and remarkable way. I can not avoid saying that Pentaho and CTools are two of the fastest and most amazing tools for building a complete solution that really takes your business to another level, and you probably would not be able to do with any other tool on the market.

CTools provides a way to use web technologies to deliver astounding data visualizations that are proven to create a huge visual impact, but the the learning curve can be quite slow; the documentation can be dispersed and sometimes not easy to obtain. So, this book will help overcome the problem, getting you up to speed and giving you basic and advanced concepts so that you can acquire all the knowledge you need.

By reading the book, you can learn not only how to understand how CTools work, but also the best way to make use of them. You will learn how to create custom dashboards to build incomparable analytics solutions. Throughout the book, your knowledge will increase, and at the end, you will be capable of creating your own custom and advanced analysis.

What this book covers

Chapter 1, Getting Started with CTools, gives a brief introduction to the history of CTools. It will also introduce the reader to the purpose of the tool and teaches the user what methods are needed to install Community Tools. It is important to take some time getting an introduction to some concepts before you start building dashboards with Community Tools, so this chapter is not optional. When developing a dashboard, the first step is to interact with the client and get the requirements. There is a need to understand what is the best way to display data on the dashboard, and of course, there are some techniques that can be used to have a clean and simple dashboard that is, at the same time, very informative and intuitive. Navigation inside the dashboard should respect the requirements, but should be easy to understand. There is also a need to use standard components with a custom style so that it can be a unique dashboard while being quick to develop. Understanding this and other concepts will make the difference when developing the dashboard, so this chapter exposes some considerations that should be taken into account while creating dashboards.

Chapter 2, Acquiring Data with CDA, is focused on the use of Community Data Access (CDA). Readers will find what kinds of Pentaho data sources we can use to acquire data using CDA, and also how to do it. How we can use parameters and all the other properties to get the desired results and how to manipulate the output that will be exposed to the dashboards or to the exports will also be covered.

Chapter 3, Building the Dashboard Using CDF, will cover the two ways to build Community Dashboards. To build a dashboard, readers can avoid the use of CDF, but to achieve better results and build incredible dashboards, users should know how it works. One of the most important parts when building a CTools dashboard is the life cycle, so readers will have the chance to know how the life cycle of the dashboards and the components works. Pentaho uses the CDF framework inside the platform, so some concepts will become clear to you. Readers will also be challenged to create their first dashboard using CDF to better understand the concepts of Community Dashboards Editor.

Chapter 4, Leverage the Process with CDE, will be focused on the advantages and disadvantages of using Community Dashboards Editor (CDE) and why to use CDE to build a dashboard. Here, we will learn how to create dashboards without writing code or leveraging the work without the need to write code. The reader will also learn how to build a responsive and interactive dashboard, starting with the main concepts, and how to use the available graphical interface. Among the other concepts, you will learn how to create a layout, use components, and set some queries to be used inside the components. The chapter will also teach what needs to be changed to quickly build dashboards when using CDE. An important part is how to add more resources to the dashboard, and include them in the execution of the dashboard.

Chapter 5, Applying Filters to the Dashboard , will show how to work with the most important and commonly used components. This chapter will cover filters and selectors that can be applied to the dashboard as one way to create interaction by filtering data for the full dashboard, or just some sections of it. A dashboard is meant to be easy to use and give good insights to get results at the first look. We can filter the information being displayed. This chapter covers the components we can use so that the user can have access to all the information, keeping it simple to understand and only providing information for the selected context.

Chapter 6, Tables, Templates, Exports, and Text Components, covers add-ins for both table and template components. An important part of building a dashboard is to find the best way to represent data on the dashboard. We should not focus on only showing a table, a chart, or any other component, but how to represent the data using that same component. So, this chapter covers the most commonly used components. There is also another component such as the exports and the text component. There are some tips on how to avoid performance issues in the dashboards.

Chapter 7, Advanced Concepts Using CDF and CDE, covers the advanced concepts when building dashboards with both CDF and CDE dashboards. CDF and CDE provide some really cool components that have more flexibility and allow you to build your own visualizations. So, we will also need to cover these components. You will face some requests to internationalize/localize dashboards, so we will also be covering it. There are some tips and advanced concepts that new CTools developers may not find easy to understand at first glance, but that more advanced users will find useful. The chapter also reinforces the concepts of references to components, parameters, and layout elements.

Chapter 8, Visualizations Using CCC, may be one of the most expected chapters. A dashboard is really useful and desirable when a user looks at it and can understand what is going on with the business without the need of having to look for quite a large amount of information. This is where visualizations become very useful. This chapter will teach the reader how to make customizations on the available charts produced by the Community Charts Components (CCC). This book will show how to apply properties that can be shared between multiple charts. Readers will get a better knowledge of how to customize charts, where to look for information, and see some more advanced features useful inside dashboards. I would like to cover all the aspects, concepts, and properties, but that's almost impossible. CCC is a huge tool with infinite customizations that can be applied, so we would need to focus on giving you what you really need to keep learning about CCC by yourself.

Chapter 9, Pentaho App Builder, talks about the one new feature created for Pentaho—the ability to create plugins without the need to create Java code. I would say this is one of the most interesting plugins created for Pentaho. By this time, readers already know how to create a dashboard. So, if you already know how to create jobs and transformations using Pentaho Data Integration, you should also be able to create plugins. We will need to understand the Community Plugin Kick-starter (CPK) and its relation with the Pentaho App Builder, and this chapter will explain it.

Chapter 10, Embed, Deploy, and Debug, will explain how to embed both CDF and CDE dashboards into third-party applications. Usually, one request from customers is how to embed a dashboard into one application. Using RequireJS, this is simple and very flexible. You can build mini dashboards that you easily embed into your application without interfering with its default behavior. This chapter will provide information on how you can do debugging on the dashboard using the developer's tools of your browser.

What you need for this book

The only requirements are to have a Pentaho 5.X installed, but it's recommended to install 6.X.

When installing Pentaho, there is the option to include some sample data, so please do it. Most of the samples make use of it, so to properly make use of samples, you will need to include them. It is known as the Steelwheels sample data. This includes a database of Metadata and Mondrian schemas.

To make proper use of Pentaho Builder Application Server, you will need a browser. Even if Pentaho, in some of its versions, supports Internet Explorer 8, we just can't use this version when building responsive dashboards or making use of CSS3. You will need to have a higher version, such as Internet Explorer 9 or even better, make use of Chrome, Firefox, or Safari.

The reader should have knowledge of JavaScript, JQuery, and Cascading Style Sheets (CSS). Not that it's mandatory to know the technologies, but it's the way the user will take the most out of some CTools.

Who this book is for

If you are a CTools developer and would like to expand your knowledge and create attractive dashboards and frameworks, this book is the go-to-guide for you. A basic knowledge of JavaScript and Cascading Style Sheets (CSS) is highly recommended.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can include other contexts through the use of the include directive."

A block of code is set as follows:

<?xml version="1.0" encoding="UTF-8"?>
<CDADescriptor>
   <DataSources>
      <!—- HERE LIVES EACH ONE OF <Connection>-->
   </DataSources>
   <!—- HERE LIVES EACH ONE OF <DataAccess> -->
</CDADescriptor>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

[default]
exten => s,1,Dial(Zap/1|30)
exten => s,2,Voicemail(u100)
exten => s,102,Voicemail(b100)
exten => i,1,Voicemail(s0)

Any command-line input or output is written as follows:

# cp /usr/src/asterisk-addons/configs/cdr_mysql.conf.sample
     /etc/asterisk/cdr_mysql.conf

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Learning-Pentaho-CTools. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from http://www.packtpub.com/sites/default/files/downloads/LearningPentahoCTools_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.