Professional Documents
Culture Documents
Download Qlikview Advanced Data Visualization Discover Deeper Insights With Qlikview By Building Your Own Rich Analytical Applications From Scratch 1St Edition Miguel Angel Garcia online ebook texxtbook full chapter pdf
Download Qlikview Advanced Data Visualization Discover Deeper Insights With Qlikview By Building Your Own Rich Analytical Applications From Scratch 1St Edition Miguel Angel Garcia online ebook texxtbook full chapter pdf
https://ebookmeta.com/product/english-grammar-exercises-with-
answers-part-4-your-quest-towards-c2-1st-edition-daniel-b-smith/
https://ebookmeta.com/product/chess-explained-
the-c3-sicilian-1st-edition-sam-collins/
https://ebookmeta.com/product/starting-out-the-c3-sicilian-1st-
edition-john-emms/
https://ebookmeta.com/product/the-paper-issue-83-1st-edition-
origamiusa/
Beyond Advanced Excel Building Analytical Applications
Using Excel 1st Edition Geoffrey Collins
https://ebookmeta.com/product/beyond-advanced-excel-building-
analytical-applications-using-excel-1st-edition-geoffrey-collins/
https://ebookmeta.com/product/the-american-
revolution-1774-83-2nd-edition-daniel-marston/
https://ebookmeta.com/product/bnf-83-british-national-formulary-
march-2022-joint-formulary-committee/
https://ebookmeta.com/product/patriot-vs-loyalist-american-
revolution-1775-83-combat-1st-edition-si-sheppard/
https://ebookmeta.com/product/british-light-infantryman-vs-
patriot-rifleman-american-revolution-1775-83-1st-edition-robbie-
macniven/
Table of Contents
QlikView: Advanced Data Visualization
Why subscribe?
PacktPub.com
Contributors
About the authors
Packt is Searching for Authors Like You
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
1. Performance Tuning and Scalability
Reviewing basic performance tuning techniques
Removing unneeded data
Reducing the number of rows
Reducing the number of columns
Replacing text keys with numbers
Resolving synthetic keys
Reviewing the basics
Generating test data
Generating dimension values
Generating fact table rows
Understanding how QlikView stores its data
A great primer
Looking at things from a simple level
Exporting the memory statistics for a document
Strategies to reduce the data size and improve performance
Optimizing field values and keys
Optimizing data by removing keys using ApplyMap
Optimizing performance by removing keys by joining tables
Optimizing memory by removing low cardinality fields
Testing chart performance for different load options
Turning the cache off
Examining the chart calculation time for different scenarios
Optimizing performance by creating counter fields
Optimizing performance by combining fact tables?
Optimizing your numbers
Optimizing chart calculation times
The QlikView calculation engine
Creating flags for well-known conditions
Sorting for well-known conditions
Using Direct Discovery
Direct Discovery restrictions
Direct Discovery syntax
Looking at an example Direct Query
Testing scalability with JMeter
Obtaining the scalability tools
Installing JMeter
Installing the scalability tools
About the scalability tools
Running an example execution
Summary
2. QlikView Data Modeling
Reviewing basic data modeling
Associating data
Automatically associating tables
Understanding synthetic keys
Creating composite keys
Using string concatenation
Using one of the Hash functions
Using the AutoNumber function
Realizing that facts are calculated at the level of their table
Joining data
Understanding Join and Keep
Inner joins
Left and right joins
Outer joins
Cartesian joins
Understanding the effect of duplicate key values on joins
Understanding Keep
Concatenating rows
Reviewing Concatenate
Differentiating Concatenate and Join
Mapping data with ApplyMap
Reviewing the basic functionality of ApplyMap
Mapping numbers
Using ApplyMap instead of Join with duplicate rows
Dimensional data modeling
Differentiating between facts and dimensions
Understanding the grain
Understanding star schemas
Summing with facts
Discovering more about facts
Transaction fact tables
Periodic snapshot fact tables
Factless fact tables
Dealing with nulls in fact tables in QlikView
Designing dimension tables
Denormalizing dimensions and conformed dimensions
Understanding surrogate keys
Dealing with missing or late arriving dimension values
Defining Kimball's four-step dimensional design process
Selecting the business process
Declaring the grain
Identifying the dimensions
Identifying the facts
Learning some useful reusable dimension methods
Creating a calendar dimension
Unwrapping hierarchies
Creating leaves with Hierarchy
Creating parent associations with HierarchyBelongsTo
Creating dimensional facts
Handling slowly changing dimensions
Taking the most recently changed record using FirstSortedValue
Using IntervalMatch with SCDs
Using hash to manage from/to dates
Dealing with multiple fact tables in one model
Joining the fact tables together
Concatenating fact tables
Changing the grain of a fact table
Linking fact tables of different grains
Drilling across with document chaining
Summary
3. Best Practices for Loading Data
Reviewing data loading concepts
Getting data from anywhere
Loading data from QlikView
Loading similar files with concatenation
Loading dissimilar files with Concatenate and For Each
Understanding QlikView Data files
Storing tables to QVD
Using QVD files
Understanding why you should use an ETL approach
Speeding up overall data loading
Reusing extracted data in multiple documents
Applying common business rules across multiple documents
Creating conformed dimensions
Provisioning a self-service data layer
Using an ETL approach to create QVD data layers
Creating a StoreAndDrop subroutine
Extracting data
Creating an extractor folder structure
Differentiating types of scripts
Executing the extractors
Transforming data
Creating a transformer and model folder structure
Executing transformers
Loading data
Creating a UserApp folder structure
Executing the load step
Mastering loading techniques
Loading data incrementally
Establishing the script for the basic process
Running an incremental load when data is only added
Loading incrementally when data might be modified
Handling deletions from the source system
Handling situations where there is no modify date
Partially reloading only one part of the data model
Replacing a table
Adding new rows to a table
Managing script execution in partial reloads
Loading the content of another QVW
Using QlikView Expressor for ETL
Introducing Expressor
Understanding why to use Expressor for ETL
Understanding workspaces, libraries, projects, and artifacts
Creating a workspace
Managing extensions
Working with libraries and projects
Understanding artifacts
Configuring connections
Configuring a File connection
Connecting to a database
Creating a QVX Connector Connection
Configuring types and schemas
Adding additional Atomic types
Creating Composite types
Configuring a schema
Creating and packaging a basic dataflow
Understanding the dataflow toolbox
Inputs
Outputs
Transformers
Utility
Creating the dataflow
Configuring a Read File operator
Adding a Transformation operation
Creating a QVX output
Packaging the dataflow
Summary
4. Advanced Expressions
Reviewing basic concepts
Searching in QlikView
Searching for text
Wildcard search
Normal search
Fuzzy search
Associative search
Advanced search
Searching numeric fields
Numeric search
Automatic interpretation of searches
Multiple values search
Searching in multiple listboxes
Understanding bookmarks
Saving a bookmark
Managing bookmarks
Using variables in QlikView
SET versus LET
Using variables to hold common expressions
Using variables with Dollar-sign Expansion
Limiting calculations
Sum of If
Flag arithmetic
Calculations using variables
Data islands
Set Analysis
Explaining what we mean by a set
Set identifiers
Set modifiers
Understanding Dollar-sign Expansion
Following the two-step process
Following the steps in the script debugger
Following the steps in a chart expression
Understanding when the steps happen in chart expressions
Using parameters with variables and Dollar-sign Expansion
Using variables in expressions
Using advanced Set Analysis
Identifying the identifiers
Understanding that modifiers are sets
Set arithmetic
Using searches in Set Analysis
Using Dollar-sign Expansion with Set Analysis
Comparing to other fields
Direct field comparison
Using Concat with Dollar-sign Expansion
Using the P and E element functions
Set Analysis with Alternate States
Using Alternate States as identifiers
Comparing fields between states
Calculating vertically
Using inter-record and range functions
Applying the Total qualifier
Creating advanced aggregations with Aggr
Using Aggr to calculate a control chart
Calculated dimensions
No to nodistinct
Summary
5. Advanced Scripting
Reviewing the basic concepts
Using Table Files Wizard
Using relative paths
Delimited files
Fixed width files
XML files
HTML files
QVD/QVX files
Connecting to databases
Using the Connect button
Understanding the Connect To statement
Explaining the Force 32 Bit option
The Select wizard
Counting records
RecNo
RowNo
FieldValueCount
NoOfRows
NoOfColumns
Loading data quickly
Understanding compression settings
Optimal loading from QVD
Using an Exists clause
Preloading fields into QVDs
Applying variables and the Dollar-sign Expansion in the script
Examining common usage
Holding dates
Holding paths
Examining variable values during reloads
Nesting Dollar-sign Expansions
Passing parameters to variables – macro functions
Subroutines
Using control structures
Branching with conditional statements
If … Then … ElseIf
A note about conditional functions
Switch … Case
When and Unless
Looping in the script
AutoGenerate
For … Next loops
For Each … Next loops
FileList
DirList
Do … Loop
Exiting
Exiting the script
Exiting other constructs
Using variables for error handling
ErrorMode
ScriptError
ScriptErrorCount and ScriptErrorList
Examining advanced Table File Wizard options
Enabling a transformation step
Garbage
Fill
Column
Context
Unwrap
Rotate
Using the Crosstable wizard
Looking at data from different directions
Putting things first
First
FirstSortedValue
Looking backwards
Previous
Peek
Reusing code
Summary
6. What's New in QlikView 12?
Common QIX Engine
64-bit only
Online documentation
Security improvements
Mobile touch improvements
Improved clustering and scaling
Clustering improvements in QlikView 12.1
What is new in the Qlik product portfolio?
Qlik Sense Enterprise and the Qlik Analytics Platform
In what way are QlikView and Qlik Sense similar?
In what way do QlikView and Qlik Sense differ?
What does this mean for users?
What is the Qlik Analytics Platform?
Qlik NPrinting
Qlik Web Connectors
Qlik GeoAnalytics
Qlik DataMarket
How do the products in the Qlik product portfolio fit together?
Summary
7. Styling Up
Design requirements
The Document Properties window
The Sheet Properties dialog
Setting the object properties
Caption colors and style
Changing the caption colors
The Color Area and Color dialog windows
Setting the caption font
Setting the content font
Setting the global font
Propagating the object appearance
Setting the default Sheet Object Style
Hiding captions
Working with listboxes
Adding listboxes
The List Box Properties dialog
The General tab
The Expressions tab
The Sort tab
The Presentation tab
The Number tab
The Font tab
The Layout tab
The Caption tab
The Multi Box
The Current Selections Box
Making selections from the Current Selections Box
Adding a Bookmark Object
Aligning and resizing sheet objects
Selecting objects
Moving objects
Resizing objects
Resizing a Multi Box
Aligning sheet objects
Do a little house keeping
Creating and applying a default color map
Defining chart colors
Setting the default color map
Summary
8. Building Dashboards
User types
Dashboard users
Analysts
Report users
Applying the DAR principle to Airline Operations
Document requirements
Creating the Analysis sheet
Adding a new chart
Bar Chart
Additional bar chart properties
Style
Presentation
Expressions and the Edit Expression window
Expressions
The Edit Expression window
Fields
Functions
Variables
Images
The Expression Overview window
Line Chart
Additional line chart properties
Expressions
Style
Presentation
Combo Chart
Container
Scatter Chart
Button
Statistics box
Creating the new Dashboard sheet
Linked Objects
Gauges
Cloning the object for re-use
Adding Air Time %
More Gauge styles
Adding a Text object
Using a Text Object to display an image
Adding actions to a Text object
Adding a Pie chart
Dimension Limits
Adding the dimension value to the data point values
Creating the Reports sheet
Variables
The Expression Overview window in action
Copying sheets
KPIs per airline, origin, and destination country
Cyclic and Drill-down groups
Straight table
Not all expressions are numbers
Pivot tables
Auto minimize
The Report Editor window
Other charts
Radar Chart
Mekko Chart
Grid Chart
Funnel Chart
Block Chart
Trellis Chart
Summary
9. Advanced Data Transformation
Data architecture
Two-stage architecture
Three-stage architecture
Setting up our environment
Loading data already stored in QlikView
Cloning a QlikView data model
Loading from RAM
Resident load
Aggregating data
Aggregating the Flight Data table
The Transformation output
Aggregation functions
Sorting tables
Ordering the Order-By fields
The Peek function
Merging forces
A refresher
The objective
Getting it done
Loading the table
Sorting the table
Peeking previous records
A solo exercise
Dealing with slowly changing dimensions
The Carrier Decode table
IntervalMatch magic
Expanding the intervals
Some considerations
Applying IntervalMatch to the Carrier Decode table
Ordering, peeking, and matching all at once
The use case
Incremental loads
Summary
10. Security
Hidden script
Section access
Section access fields
Reduction fields
Initial data reduction
Omitting fields
Document-level security
Sheet-level security
Summary
11. Data Visualization Strategy
Data exploration, visualization, and discovery
Data teams and roles
Data research and development
Data governance team
Agile development
User story
Minimum Viable Product
QlikView Deployment Framework
Exercise 11.1
Summary
12. Sales Perspective
Sales perspective data model
Exercise 12.1
Data quality issues
Missing dimension values
Missing fact values
Data formatting and standardization
Case
Unwanted characters
Dates and time
Master calendar
Customer stratification.
Pareto analysis
Exercise 12.2
Exercise 12.3
Customer churn
Exercise 12.4
Exercise 12.5
QlikView extensions and the cycle plot
Exercise 12.6
Governance – design template
Summary
13. Financial Perspective
Financial perspective data model
Exercise 13.1
Financial report metadata
AsOfCalendar
Income statement
Exercise 13.2
Custom format cell
Exercise 13.3
Balance sheet
Exercise 13.4
Exercise 13.5
Cash flow statement
Exercise 13.6
Summary
14. Marketing Perspective
Marketing data model
Customer profiling
Parallel coordinates
Exercise 14.1
Exercise 14.2
Sankey
Exercise 14.3
Exercise 14.4
Market size analysis
Exercise 14.5
Exercise 14.6
Exercise 14.7
Social media analysis
Exercise 14.8
Exercise 14.9
Exercise 14.10
Sales opportunity analysis
Exercise 14.11
Summary
15. Working Capital Perspective
Working capital data model
Rotation and average days
Days Sales of Inventory
Exercise 15.1
Days Sales Outstanding
Exercise 15.2
Days Payable Outstanding
Exercise 15.3
Exercise 15.4
Working capital breakdown
Exercise 15.5
Inventory stock levels
Exercise 15.6
Aging report
Exercise 15.7
Customer stratification
Stratification by distribution
Exercise 15.8
Exercise 15.9
Visualizing stratification
Exercise 15.10
Summary
16. Operations Perspective
Operations data model
Handling multiple date fields
On-Time and In-Full
Exercise 16.1
OTIF breakdown
Exercise 16.2
Exercise 16.3
Predicting lead time
Exercise 16.4
Exercise 16.5
Supplier and On-Time delivery correlation
Exercise 16.5
Planning in QlikView with KliqPlan
Planning tool extensions
Sales forecasts and purchase planning
Other applications
Summary
17. Human Resources
Human resources data model
Slowing changing dimensions attributes
Personnel productivity
Exercise 17.1
Exercise 17.2
Personnel productivity breakdown
Age distribution
Exercise 17.3
Salary distribution
Exercise 17.4
Employee retention rate
Exercise 17.5
Employee vacation and sick days
Exercise 17.6
Employee training and performance
Exercise 17.7
Personal behavior analysis
Exercise 17.8
Summary
18. Fact Sheets
Customer fact sheet consolidated data model
Customer Fact sheet Agile design
Creating user stories
User story flow
Converting user stories into visualizations
Going beyond the first visualization
Customer Fact sheet advanced components
Bullet graph
Exercise 18.1
Exercise 18.2
Sparklines
Exercise 18.3
Customizing the QlikView User Experience
Quick access to supplementary information
Exercise 18.4
Dynamic data visualization
Exercise 18.5
Regional settings
Currency
Language
Date and number formats
Customer Fact sheet n QlikView
Summary
19. Balanced Scorecard
The Balanced Scorecard method
The financial perspective
The customer perspective
The internal business process perspective
The learning and growth perspective
The Balanced Scorecard consolidated data model
The Balanced Scorecard information dashboard design
The Gestalt principles of perceptual organization
Proximity
Enclosure
Closure
Connection
Continuity
Similarity
Creating the filter pane bubble
Exercise 19.1
Creating an interactive tutorial
Exercise 19.2
Measuring success with XmR charts
Exercise 19.3
Summary
20. Troubleshooting Analysis
Troubleshooting preparation and resources
Positive mindset
General debugging skills
Reproduce
Diagnose
Fix
Reflect
Resources
QlikView Help
Local knowledge base
Qlik Community
Qlik Support
Reporting issues
Common QlikView application issues
Common QlikView data model issues
All expression values are exactly the same
The expression total is not equal to the sum of the rows
Duplicate values in a list box
Data doesn't match user expectation
Common QlikView expression issues
The expression does not calculate every row
The amounts in the table are not accumulating
Summary
21. Mastering Qlik Sense Data Visualization
Qlik Sense and QlikView developers
Visualization extension examples for cross-selling
Plan to master Qlik Sense data visualization
Summary
Index
QlikView: Advanced Data
Visualization
QlikView: Advanced Data
Visualization
Copyright © 2018 Packt Publishing
Every effort has been made in the preparation of this book to ensure
the accuracy of the information presented. However, the information
contained in this book is sold without warranty, either express or
implied. Neither the author(s), nor Packt Publishing or its dealers
and distributors, will be held liable for any damages caused or
alleged to have been caused directly or indirectly by this book.
Livery Place
35 Livery Street
ISBN 978-1-78995-599-6
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over
5,000 books and videos, as well as industry leading tools to help you
plan your personal development and advance your career. For more
information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical
eBooks and Videos from over 4,000 industry professionals
Learn better with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
PacktPub.com
Did you know that Packt offers eBook versions of every book
published, with PDF and ePub files available? You can upgrade to the
eBook version at www.PacktPub.com and as a print book customer,
you are entitled to a discount on the eBook copy. Get in touch with
us at service@packtpub.com for more details.
Barry is one of the four Qlik experts teaching at the Masters Summit
for Qlik, an advanced 3-day training for experienced Qlik
professionals. He also runs the Amsterdam chapter of the Qlik Dev
Group, an open and informal gathering where Qlik professionals can
share knowledge and experiences.
With all the knowledge that you gain from this Learning Path, you
will have all the experience you need to implement your next
QlikView project like a pro.
Who this book is for
This Learning Path is designed for developers who want to go
beyond their technical knowledge of QlikView and understand how
to create analysis and data visualizations that solve real business
needs. To grasp the concepts explained in this Learning Path, you
should have a basic understanding of the common QlikView
functions and some hands-on experience with the tool.
What this book covers
Chapter 1, Performance Tuning and Scalability, is where we look at
understanding how QlikView stores its data so that we can optimize
that storage in our applications. We will also look at topics such as
Direct Discovery and testing implementations using JMeter.
Chapter 7, Styling Up, will help us learn how to style our QlikView
documents. We will learn about the various document and sheet
properties and will use them to manage the visual style of our
document. We will also take a closer look at some of the most
fundamental objects and learn how we can change their
appearance.
Once the file is downloaded, please make sure that you unzip or
extract the folder using the latest version of:
Sales:
Load * INLINE [
Country, Sales
USA, 1000
UK, 940
Japan, 543
];
Sales:
Load * INLINE [
Country, Sales
USA, 1000
UK, 940
Japan, 543
];
C:\Program Files\QlikView\qv.exe
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: "Click on the Execution tab."
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Get in touch
Feedback from our readers is always welcome.
Piracy: If you come across any illegal copies of our works in any
form on the Internet, we would be grateful if you would provide us
with the location address or website name. Please contact us at
copyright@packtpub.com with a link to the material.
Reviews
Please leave a review. Once you have read and used this book, why
not leave a review on the site that you purchased it from? Potential
readers can then see and use your unbiased opinion to make
purchase decisions, we at Packt can understand what you think
about our products, and our authors can see your feedback on their
book. Thank you!
One of QlikView's design features that benefitted from this was that
their calculation engine is multithreaded. That means that many of
QlikView's calculations will execute across all available processor
cores. Unlike many other applications, if you add more cores to your
QlikView server, you will, in general, add more performance.
We can also choose to rethink the grain of the data—to what level of
detail we hold the information. By aggregating the data to a higher
level, we will often vastly reduce the number of rows.
Of course, the best practice would be to take the pain and remove
the fields from the script by either commenting them out or
removing them completely from their load statements. This is more
work, because you may break things and have to do additional
debugging, but it will result in a better performing script.
Replacing text keys with numbers
Often, you will have a text value in a key field, for example,
something like an account number that has alphanumeric characters.
These are actually quite poor for performance compared to an
integer value and should be replaced with numeric keys.
Note
There is some debate here about whether this makes a
difference at all, but the effect is to do with the way the data is
stored under the hood, which we will explore later. Generated
numeric keys are stored slightly differently than text keys, which
makes things work better.
Account:
Load
AccountId,
AccountName,
…
From Account.qvd (QVD);
Transaction:
Load
TransactionId,
AccountId,
TransactionDate,
…
From Transaction.qvd (QVD);
Transaction:
Load
TransactionId,
AutoNumber(AccountId) As Join_Account,
TransactionDate,
…
From Transaction.qvd (QVD);
The AccountId field still exists in the Account table for display
purposes, but the association is on the new numeric field,
Join_Account.
We will see later that there is some more subtlety to this that we
need to be aware of.
Resolving synthetic keys
A synthetic key, caused when tables are associated on two or more
fields, actually results in a whole new data table of keys within the
QlikView data model.
Load
AutoNumber(CountryID & '-' & CityID) As
ClientID,
Date,
Sales
From Fact.qvd (qvd);
The following screenshot shows the same model with the synthetic
key resolved using the AutoNumber method:
Another random document with
no related content on Scribd:
The Project Gutenberg eBook of Frankie's
dog Tony
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.
Language: English
AUNT HATTIE
[MADELINE LESLIE]
CHICAGO:
HENRY A. SUMNER & COMPANY.
1880.
SERIES II.
SERIES I.
To
Shepherd of Israel.
CONTENTS.
CHAPTER I.
THE SOLDIER'S DOG.
DID you ever see a dog with a coat on? I am going to tell
you about one who was a great traveller. I think you will say
it was a remarkable dog, and will not be surprised that
Frank was very proud of her.
But first I must tell you who Frank was, and where he lived.
"Well, sir. It was one day, just after a terrible battle; I was
making my way over the bloody field to see whether I could
find any of my comrades, when I heard a low moan, coming
from a tent. I went in and found a poor fellow with his arm
shot off. Some injury he had received on his head had made
him quite delirious. I tried to bathe the wound, but a little
puppy lying close to his side would not let me touch him."
"To make a long story short, the brave boy died a few days
later; but not until he had sent messages by me to his
widowed mother and sister at home, and had given me his
only treasure, his faithful friend Tony."
"I took her to my tent, and she has been true to me ever
since. In all the battles in which I afterwards engaged, Tony
was in my pocket. When I was wounded, she moaned until
she grew sick."
"She knows I have been talking about her. See how intently
she watches my every movement. Here, Tony, stand up and
shake hands with me."
But Tony knew she was right; and she continued holding out
her paw, till he said, laughing,—
Then the dog jumped on her master, and wagged her tail as
if she were very much pleased.
I don't think Tony liked the linen collar, which was starched
very stiff; for she kept turning her head from one side to
another, and uttering a low kind of a growl. I think she
wanted to say,—
By and by, Mrs. Colvin basted into the neck of the coat a
white frill, which had no starch in it. Tony was so much
pleased at this, that she began at once to lick the lady's
hand, and ever after considered her a good friend.
CHAPTER II.
FRANK AND TONY.
Mrs. Colvin told her husband she would try and find a dog
for Frank, he took so much comfort with Tony.
Every one could see that the love was not all on Frankie's
side, for Tony seemed almost out of her wits with joy. She
jumped up and down, giving short, joyful barks, and then
stopping a moment to lick his hands and kiss his face.
"O sir! I should like it very much, indeed. I would take nice
care of her, and let her go to school with me every day."
You may be sure that Mrs. Colvin did not like the officer any
the less because she saw a tear in his eye when he was
caressing the dog. She knew that he was thinking of all the
dangers they had encountered together, and also, how
desolate he should feel on going to his room at night, to
have no little friend there to welcome him.
At last, the lady where they were visiting proposed that the
Colonel should take advantage of the time when Frankie
was playing with the dog, and slip into another room, when
she would go with the boy more readily.
This he did; but Tony barked and ran to the door, scratching
with all her might to get it open. But when she found she
could not, she allowed her next loved friend to take her in
his arms and carry her away.
When they reached the cottage, she was delighted. She
would jump up into a chair by Frankie, or down again, just
as he bid her; but whenever the door opened, or she heard
a step on the walk, her ears would be cocked up, and she
would listen with all her might for her old master.
Frankie was very proud of his power over the dog, and was
continually showing his father, mother, and Edward how
quickly she understood and obeyed him.
"I know just how it will be," he said; "Tony will bark and
wake us, and Frankie is such a sleepy head that he will not
get up to attend to her, and I shall have all the trouble with
her."
The next day, when Frankie was getting ready for school, he
told his mother he was going to take Tony into the seat with
him.
But the boy pleaded very earnestly that he might take her
once. "I want to show Willie Miles and George Holmes how
she obeys me," he exclaimed.
CHAPTER III.
FRANKIE'S MUSIC LESSON.
"Ma, the boys are going to the woods for nuts,—may I go?"
"But, ma, I didn't know then that the boys were going to
the woods. I'll carry the yarn some other day."
"'Oh, you never need fear for me! I had rather learn music
than to play. I will promise to practise the lessons as much
as you wish me to.'"
"I didn't know then how hateful music was. I wish now I
need never see a piano again."
Mrs. Colvin was displeased to hear her son talk in this way,
and to see him look so angry. She raised her heart in prayer
to God that she might rightly train this darling child.
"Your aunt is there sewing, and she will help you count the
time."
"But I've been here five minutes. I looked when I came in."
"Come, now, Frankie," urged the lady, "be a good boy, and
I'll help you. If you give your whole attention to it, you will
learn the lesson well in an hour."
Frankie's lingers Cell upon the keys; but his eyes had a
vacant look, and Aunt Sarah knew then, just as well as she
did at the end of the hour, that the time would be wasted.
She took up her book again, and the boy began to play over
and over one of his first lessons, which he could do without
any effort.
"Do you call that practising your lesson?" asked his aunt,
laughing.
"I'll keep the time for you. Five minutes lost already."
A merry laugh from behind the door made them both turn
in a hurry.
"Yes, Frankie, that's just it. You do nothing but diddle over
that one strain. I should think you would be ashamed of
yourself when pa's paying so much money for your
lessons."
She drew a chair close to his side, and, pointing out the
notes, said, firmly, "Begin there!"
He did so, and for a short time picked out the notes quite
correctly, his aunt counting the time for him; but a slight
movement of Tony from the floor to the sofa, which she
thought would be an easier resting-place, upset him again.
After this, it was quite in vain that Aunt Sarah tried to fix
his attention. He did indeed touch a few chords; but nothing
was accomplished. He complained continually that his head
ached.