0% found this document useful (0 votes)
79 views66 pages

BigQuery For Data Warehousing: Managed Data Analysis in The Google Cloud Mark Mucchetti - Download The Ebook Today and Own The Complete Version

The document promotes various ebooks related to data warehousing and analysis on the Google Cloud Platform, including titles such as 'BigQuery for Data Warehousing' by Mark Mucchetti and 'Data Science on the Google Cloud Platform' by Valliappa Lakshmanan. It provides links for instant downloads in multiple formats and highlights the benefits of reading on any device. Additionally, it includes information about the authors and technical reviewers, along with a detailed table of contents for the featured books.

Uploaded by

berkssacul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views66 pages

BigQuery For Data Warehousing: Managed Data Analysis in The Google Cloud Mark Mucchetti - Download The Ebook Today and Own The Complete Version

The document promotes various ebooks related to data warehousing and analysis on the Google Cloud Platform, including titles such as 'BigQuery for Data Warehousing' by Mark Mucchetti and 'Data Science on the Google Cloud Platform' by Valliappa Lakshmanan. It provides links for instant downloads in multiple formats and highlights the benefits of reading on any device. Additionally, it includes information about the authors and technical reviewers, along with a detailed table of contents for the featured books.

Uploaded by

berkssacul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

Explore the full ebook collection and download it now at textbookfull.

com

BigQuery for Data Warehousing: Managed Data


Analysis in the Google Cloud Mark Mucchetti

https://textbookfull.com/product/bigquery-for-data-
warehousing-managed-data-analysis-in-the-google-cloud-mark-
mucchetti/

OR CLICK HERE

DOWLOAD EBOOK

Browse and Get More Ebook Downloads Instantly at https://textbookfull.com


Click here to visit textbookfull.com and download textbook now
Your digital treasures (PDF, ePub, MOBI) await
Download instantly and pick your perfect format...

Read anywhere, anytime, on any device!

Data Science on the Google Cloud Platform 1st Edition


Valliappa Lakshmanan

https://textbookfull.com/product/data-science-on-the-google-cloud-
platform-1st-edition-valliappa-lakshmanan/

textbookfull.com

Data Analysis in the Cloud : Models, Techniques and


Applications 1st Edition Marozzo

https://textbookfull.com/product/data-analysis-in-the-cloud-models-
techniques-and-applications-1st-edition-marozzo/

textbookfull.com

Google Data Studio for Beginners: Start Making Your Data


Actionable Grant Kemp

https://textbookfull.com/product/google-data-studio-for-beginners-
start-making-your-data-actionable-grant-kemp/

textbookfull.com

Data Mining and Data Warehousing: Principles and Practical


Techniques 1st Edition Parteek Bhatia

https://textbookfull.com/product/data-mining-and-data-warehousing-
principles-and-practical-techniques-1st-edition-parteek-bhatia/

textbookfull.com
Google Data Studio for Beginners: Start Making Your Data
Actionable 1st Edition Grant Kemp

https://textbookfull.com/product/google-data-studio-for-beginners-
start-making-your-data-actionable-1st-edition-grant-kemp/

textbookfull.com

Beginning Data Science in R: Data Analysis, Visualization,


and Modelling for the Data Scientist 1st Edition Thomas
Mailund
https://textbookfull.com/product/beginning-data-science-in-r-data-
analysis-visualization-and-modelling-for-the-data-scientist-1st-
edition-thomas-mailund/
textbookfull.com

Learning Informatica PowerCenter 10 x enterprise data


warehousing and intelligent data centers Second Edition.
Edition Rahul Malewar
https://textbookfull.com/product/learning-informatica-
powercenter-10-x-enterprise-data-warehousing-and-intelligent-data-
centers-second-edition-edition-rahul-malewar/
textbookfull.com

The Kimball Group reader relentlessly practical tools for


data warehousing and business intelligence remastered
collection Ralph Kimball
https://textbookfull.com/product/the-kimball-group-reader-
relentlessly-practical-tools-for-data-warehousing-and-business-
intelligence-remastered-collection-ralph-kimball/
textbookfull.com

Software Architecture for Big Data and the Cloud 1st


Edition Ivan Mistrik

https://textbookfull.com/product/software-architecture-for-big-data-
and-the-cloud-1st-edition-ivan-mistrik/

textbookfull.com
BigQuery
for Data
Warehousing
Managed Data Analysis in the Google Cloud

Mark Mucchetti
BigQuery for Data
Warehousing
Managed Data Analysis in the
Google Cloud

Mark Mucchetti
BigQuery for Data Warehousing

Mark Mucchetti
Santa Monica, CA, USA

ISBN-13 (pbk): 978-1-4842-6185-9 ISBN-13 (electronic): 978-1-4842-6186-6


https://doi.org/10.1007/978-1-4842-6186-6

Copyright © 2020 by Mark Mucchetti


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Jonathan Gennick
Development Editor: Laura Berendson
Coordinating Editor: Jill Balzano
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street,
6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-
sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member
(owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a
Delaware corporation.
For information on translations, please e-mail [email protected]; for reprint,
paperback, or audio rights, please e-mail [email protected].
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book’s product page, located at www.apress.com/9781484261859. For more
detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
To my parents, John and Dr. Roseanne, who have always been an
inspiration, especially when they didn’t know it.
Table of Contents
About the Author��������������������������������������������������������������������������������������������������xxiii

About the Technical Reviewer�������������������������������������������������������������������������������xxv


Acknowledgments�����������������������������������������������������������������������������������������������xxvii

Introduction����������������������������������������������������������������������������������������������������������xxix

Part I: Building a Warehouse����������������������������������������������������������������� 1


Chapter 1: Settling into BigQuery����������������������������������������������������������������������������� 3
Getting Started with GCP�������������������������������������������������������������������������������������������������������������� 3
Beginning with GCP���������������������������������������������������������������������������������������������������������������������� 4
Using Google Cloud Platform�������������������������������������������������������������������������������������������������������� 5
The Cloud Console������������������������������������������������������������������������������������������������������������������� 5
The Command-Line Interface�������������������������������������������������������������������������������������������������� 5
Programmatic Access�������������������������������������������������������������������������������������������������������������� 6
BigQuery in the Cloud Console������������������������������������������������������������������������������������������������������ 7
Querying���������������������������������������������������������������������������������������������������������������������������������� 7
Additional Things to Try��������������������������������������������������������������������������������������������������������� 11
Designing Your Warehouse���������������������������������������������������������������������������������������������������������� 13
Google BigQuery As a Data Store������������������������������������������������������������������������������������������������ 13
Row-Oriented Approach�������������������������������������������������������������������������������������������������������� 14
Column-Oriented Approach��������������������������������������������������������������������������������������������������� 15
Google BigQuery As a Data Warehouse��������������������������������������������������������������������������������������� 16
Key Questions����������������������������������������������������������������������������������������������������������������������������� 16
Fundamentals������������������������������������������������������������������������������������������������������������������������ 17

v
Table of Contents

Thinking About Scale������������������������������������������������������������������������������������������������������������������ 18


How Much Data Do I Have Today?����������������������������������������������������������������������������������������� 19
How Quickly Will My Data Increase in Size?�������������������������������������������������������������������������� 19
How Many Readers Am I Going to Have?������������������������������������������������������������������������������ 19
How Many Analysts Am I Going to Have?������������������������������������������������������������������������������ 19
What Is My Budget?�������������������������������������������������������������������������������������������������������������� 20
Do I Need to Account for Real-Time Data?���������������������������������������������������������������������������� 20
Data Normalization��������������������������������������������������������������������������������������������������������������������� 20
Summary������������������������������������������������������������������������������������������������������������������������������������ 21

Chapter 2: Starting Your Warehouse Project���������������������������������������������������������� 23


Where to Start����������������������������������������������������������������������������������������������������������������������������� 23
Key Questions����������������������������������������������������������������������������������������������������������������������������� 24
What Are My Finite Resources?��������������������������������������������������������������������������������������������� 24
What Is My Business Domain?���������������������������������������������������������������������������������������������� 24
What Differentiates My Business from Others in Its Domain?����������������������������������������������� 25
Who Knows What Data I Need?��������������������������������������������������������������������������������������������� 25
Who Already Knows What Data They Need?�������������������������������������������������������������������������� 25
What Are My Key Entities?����������������������������������������������������������������������������������������������������� 26
What Are My Key Relationships?������������������������������������������������������������������������������������������� 26
What Role Does Time Play in My Model?������������������������������������������������������������������������������ 27
What Role Does Cost Play in My Model?������������������������������������������������������������������������������� 27
General Considerations��������������������������������������������������������������������������������������������������������������� 27
Making the Case������������������������������������������������������������������������������������������������������������������������� 28
Interviewing Stakeholders����������������������������������������������������������������������������������������������������� 29
Resolving Conflicts���������������������������������������������������������������������������������������������������������������� 29
Compiling Documentation����������������������������������������������������������������������������������������������������� 30
Understanding Business Acceptance������������������������������������������������������������������������������������ 32
Recording Decisions�������������������������������������������������������������������������������������������������������������� 34
Choosing a Design���������������������������������������������������������������������������������������������������������������������� 34
Transactional Store���������������������������������������������������������������������������������������������������������������� 35
Star/Snowflake Schemas������������������������������������������������������������������������������������������������������ 35

vi
Table of Contents

NoSQL������������������������������������������������������������������������������������������������������������������������������������ 36
BigQuery�������������������������������������������������������������������������������������������������������������������������������� 36
Understanding the BigQuery Model�������������������������������������������������������������������������������������������� 37
Projects��������������������������������������������������������������������������������������������������������������������������������� 37
Datasets�������������������������������������������������������������������������������������������������������������������������������� 38
Tables������������������������������������������������������������������������������������������������������������������������������������ 39
Summary������������������������������������������������������������������������������������������������������������������������������������ 43

Chapter 3: All My Data�������������������������������������������������������������������������������������������� 45


The Data Model��������������������������������������������������������������������������������������������������������������������������� 45
Intake Rates�������������������������������������������������������������������������������������������������������������������������������� 46
Value of Historical Data��������������������������������������������������������������������������������������������������������������� 46
Creating the Data Model������������������������������������������������������������������������������������������������������������� 46
Making a Dataset������������������������������������������������������������������������������������������������������������������������ 47
Creating Tables��������������������������������������������������������������������������������������������������������������������������� 48
Source����������������������������������������������������������������������������������������������������������������������������������� 48
Format����������������������������������������������������������������������������������������������������������������������������������� 49
Destination���������������������������������������������������������������������������������������������������������������������������� 51
Schema��������������������������������������������������������������������������������������������������������������������������������� 52
Mode�������������������������������������������������������������������������������������������������������������������������������������� 55
Partition and Cluster Settings������������������������������������������������������������������������������������������������ 56
Advanced Options������������������������������������������������������������������������������������������������������������������ 56
Partitioning���������������������������������������������������������������������������������������������������������������������������������� 56
Partitioning by Integer����������������������������������������������������������������������������������������������������������� 57
Clustering������������������������������������������������������������������������������������������������������������������������������������ 58
Reading from BigQuery��������������������������������������������������������������������������������������������������������������� 59
BigQuery UI��������������������������������������������������������������������������������������������������������������������������������� 59
bq Command Line����������������������������������������������������������������������������������������������������������������������� 59
BigQuery API������������������������������������������������������������������������������������������������������������������������������� 59
BigQuery Storage API������������������������������������������������������������������������������������������������������������������ 59
Summary������������������������������������������������������������������������������������������������������������������������������������ 60

vii
Table of Contents

Chapter 4: Managing BigQuery Costs��������������������������������������������������������������������� 61


The BigQuery Model�������������������������������������������������������������������������������������������������������������������� 62
BigQuery Cost Models����������������������������������������������������������������������������������������������������������������� 63
Storage Pricing���������������������������������������������������������������������������������������������������������������������� 63
On-Demand Pricing��������������������������������������������������������������������������������������������������������������� 64
Flat-Rate Pricing�������������������������������������������������������������������������������������������������������������������� 64
BigQuery Reservations���������������������������������������������������������������������������������������������������������� 65
Cost Optimization������������������������������������������������������������������������������������������������������������������������ 66
Annualization������������������������������������������������������������������������������������������������������������������������� 66
Partitioned Tables������������������������������������������������������������������������������������������������������������������ 66
Loading vs. Streaming����������������������������������������������������������������������������������������������������������� 66
Query Writing������������������������������������������������������������������������������������������������������������������������� 67
Check Query Cost������������������������������������������������������������������������������������������������������������������ 67
Google Cloud Platform Budget Tools������������������������������������������������������������������������������������������� 68
Google Cloud Platform Pricing Calculator������������������������������������������������������������������������������ 68
Setting On-Demand Limits���������������������������������������������������������������������������������������������������� 69
Setting a Reservations Quota������������������������������������������������������������������������������������������������ 70
Loading Billing Information to BigQuery�������������������������������������������������������������������������������� 70
Summary������������������������������������������������������������������������������������������������������������������������������������ 71

Part II: Filling the Warehouse�������������������������������������������������������������� 73


Chapter 5: Loading Data into the Warehouse��������������������������������������������������������� 75
Loading and Migration���������������������������������������������������������������������������������������������������������������� 76
From a File����������������������������������������������������������������������������������������������������������������������������� 76
From a Live Database������������������������������������������������������������������������������������������������������������ 89
From Google Cloud Storage��������������������������������������������������������������������������������������������������� 97
Third-Party Transfers������������������������������������������������������������������������������������������������������������� 98
Java Database Connectivity (JDBC)��������������������������������������������������������������������������������������� 99
Document-Based Storage/NoSQL���������������������������������������������������������������������������������������� 100
External Data Sources��������������������������������������������������������������������������������������������������������� 101
Summary���������������������������������������������������������������������������������������������������������������������������������� 103

viii
Table of Contents

Chapter 6: Streaming Data into the Warehouse��������������������������������������������������� 105


Benefits and Drawbacks����������������������������������������������������������������������������������������������������������� 106
Data Consistency����������������������������������������������������������������������������������������������������������������� 107
Data Availability������������������������������������������������������������������������������������������������������������������� 107
When to Stream������������������������������������������������������������������������������������������������������������������� 108
Writing a Streaming Insert�������������������������������������������������������������������������������������������������������� 108
Google App Engine��������������������������������������������������������������������������������������������������������������� 109
Common Problems�������������������������������������������������������������������������������������������������������������� 115
Advanced Streaming Capabilities��������������������������������������������������������������������������������������������� 119
Partitioning by Timestamp��������������������������������������������������������������������������������������������������� 119
Partitioning by Ingestion������������������������������������������������������������������������������������������������������ 120
Template Tables������������������������������������������������������������������������������������������������������������������� 120
Summary���������������������������������������������������������������������������������������������������������������������������������� 121

Chapter 7: Dataflow���������������������������������������������������������������������������������������������� 123


Key Concepts���������������������������������������������������������������������������������������������������������������������������� 125
Driver Program�������������������������������������������������������������������������������������������������������������������� 125
Pipeline�������������������������������������������������������������������������������������������������������������������������������� 125
Directed-Acyclic Graphs������������������������������������������������������������������������������������������������������ 126
PCollection��������������������������������������������������������������������������������������������������������������������������� 130
PTransform�������������������������������������������������������������������������������������������������������������������������� 131
Building a Pipeline�������������������������������������������������������������������������������������������������������������������� 134
Getting Started�������������������������������������������������������������������������������������������������������������������� 136
Tutorial Annotation��������������������������������������������������������������������������������������������������������������� 138
Google Dataflow Runner������������������������������������������������������������������������������������������������������ 140
Dataflow Templates������������������������������������������������������������������������������������������������������������������� 142
Dataflow SQL���������������������������������������������������������������������������������������������������������������������������� 142
Key Concept Extensions������������������������������������������������������������������������������������������������������ 143
Dataflow SQL Extensions����������������������������������������������������������������������������������������������������� 144
Creating a Dataflow SQL Pipeline���������������������������������������������������������������������������������������� 147
Deploying Your Dataflow SQL Job��������������������������������������������������������������������������������������� 149
Summary���������������������������������������������������������������������������������������������������������������������������������� 152

ix
Table of Contents

Part III: Using the Warehouse������������������������������������������������������������ 153


Chapter 8: Care and Feeding of Your Warehouse�������������������������������������������������� 155
Looking Back and Looking Forward������������������������������������������������������������������������������������������ 156
The Retrospective��������������������������������������������������������������������������������������������������������������������� 158
A Story About Productionalization��������������������������������������������������������������������������������������� 159
The Roadmap���������������������������������������������������������������������������������������������������������������������������� 161
Production Defects�������������������������������������������������������������������������������������������������������������� 162
Technical/Architectural Debt����������������������������������������������������������������������������������������������� 162
Maintenance������������������������������������������������������������������������������������������������������������������������ 163
Scope That Was Cut������������������������������������������������������������������������������������������������������������� 163
Systemization���������������������������������������������������������������������������������������������������������������������� 164
Optimistic Extensibility�������������������������������������������������������������������������������������������������������� 164
Prioritization������������������������������������������������������������������������������������������������������������������������ 165
Push-Pull Strategy�������������������������������������������������������������������������������������������������������������������� 166
Data Customers������������������������������������������������������������������������������������������������������������������������ 168
Data Analysts����������������������������������������������������������������������������������������������������������������������� 170
Engineers����������������������������������������������������������������������������������������������������������������������������� 170
Leadership��������������������������������������������������������������������������������������������������������������������������� 171
Salespeople������������������������������������������������������������������������������������������������������������������������� 171
Summary���������������������������������������������������������������������������������������������������������������������������������� 172

Chapter 9: Querying the Warehouse��������������������������������������������������������������������� 173


BigQuery SQL���������������������������������������������������������������������������������������������������������������������������� 174
Querying Basics������������������������������������������������������������������������������������������������������������������� 174
Additional Options��������������������������������������������������������������������������������������������������������������� 177
Querying the Past���������������������������������������������������������������������������������������������������������������� 179
Unions and Intersections���������������������������������������������������������������������������������������������������������� 180
UNION ALL/DISTINCT����������������������������������������������������������������������������������������������������������� 181
INTERSECT (DISTINCT)��������������������������������������������������������������������������������������������������������� 181
EXCEPT (DISTINCT)�������������������������������������������������������������������������������������������������������������� 182

x
Table of Contents

Joining�������������������������������������������������������������������������������������������������������������������������������������� 183
CROSS JOIN������������������������������������������������������������������������������������������������������������������������� 183
INNER JOIN�������������������������������������������������������������������������������������������������������������������������� 184
OUTER JOIN������������������������������������������������������������������������������������������������������������������������� 185
USING���������������������������������������������������������������������������������������������������������������������������������� 186
Self-Joins���������������������������������������������������������������������������������������������������������������������������� 187
Subqueries�������������������������������������������������������������������������������������������������������������������������������� 187
WITH Clauses����������������������������������������������������������������������������������������������������������������������� 188
Nested Data������������������������������������������������������������������������������������������������������������������������������ 189
UNNEST������������������������������������������������������������������������������������������������������������������������������� 189
Working with Partitions������������������������������������������������������������������������������������������������������������� 191
Ingestion-Time Partitioned Tables��������������������������������������������������������������������������������������� 191
Date/Timestamp Partitioned Tables������������������������������������������������������������������������������������� 192
Integer Partitioned Tables���������������������������������������������������������������������������������������������������� 192
Date, Time, and Timestamp Functions�������������������������������������������������������������������������������������� 193
Coordinated Universal Time (UTC)��������������������������������������������������������������������������������������� 194
Common Use Cases������������������������������������������������������������������������������������������������������������� 194
Grouping Operations����������������������������������������������������������������������������������������������������������������� 197
ROLLUP�������������������������������������������������������������������������������������������������������������������������������� 198
HAVING�������������������������������������������������������������������������������������������������������������������������������� 199
Aggregation������������������������������������������������������������������������������������������������������������������������������� 200
ANY_VALUE�������������������������������������������������������������������������������������������������������������������������� 200
ARRAY_AGG������������������������������������������������������������������������������������������������������������������������� 200
ARRAY_CONCAT_AGG���������������������������������������������������������������������������������������������������������� 200
AVG�������������������������������������������������������������������������������������������������������������������������������������� 200
COUNT��������������������������������������������������������������������������������������������������������������������������������� 201
COUNTIF������������������������������������������������������������������������������������������������������������������������������� 201
MAX/MIN������������������������������������������������������������������������������������������������������������������������������ 201
STRING_AGG������������������������������������������������������������������������������������������������������������������������ 201
SUM������������������������������������������������������������������������������������������������������������������������������������� 201
Bitwise Aggregation������������������������������������������������������������������������������������������������������������ 202

xi
Table of Contents

BigQuery GIS����������������������������������������������������������������������������������������������������������������������������� 202


GEOGRAPHY Concepts��������������������������������������������������������������������������������������������������������� 203
GIS Functions����������������������������������������������������������������������������������������������������������������������� 204
Visualization������������������������������������������������������������������������������������������������������������������������ 206
Other Functions������������������������������������������������������������������������������������������������������������������������� 207
Summary���������������������������������������������������������������������������������������������������������������������������������� 207

Chapter 10: Scheduling Jobs�������������������������������������������������������������������������������� 209


BigQuery Scheduled Queries���������������������������������������������������������������������������������������������������� 210
Scheduling Queries������������������������������������������������������������������������������������������������������������� 210
Reviewing Queries��������������������������������������������������������������������������������������������������������������� 215
Cloud Scheduler������������������������������������������������������������������������������������������������������������������������ 215
Name����������������������������������������������������������������������������������������������������������������������������������� 216
Frequency���������������������������������������������������������������������������������������������������������������������������� 216
Timezone����������������������������������������������������������������������������������������������������������������������������� 219
Target���������������������������������������������������������������������������������������������������������������������������������� 219
Status���������������������������������������������������������������������������������������������������������������������������������� 223
Command-Line Scheduling������������������������������������������������������������������������������������������������� 223
Good Scheduling Practices�������������������������������������������������������������������������������������������������� 225
Other Scheduling Methods�������������������������������������������������������������������������������������������������������� 228
Cloud Tasks�������������������������������������������������������������������������������������������������������������������������� 228
Cloud Composer������������������������������������������������������������������������������������������������������������������ 229
BigQuery Transfer Service��������������������������������������������������������������������������������������������������� 230
Summary���������������������������������������������������������������������������������������������������������������������������������� 230

Chapter 11: Serverless Functions with GCP��������������������������������������������������������� 231


Benefits������������������������������������������������������������������������������������������������������������������������������������� 231
Management����������������������������������������������������������������������������������������������������������������������� 232
Scalability���������������������������������������������������������������������������������������������������������������������������� 232
Cost������������������������������������������������������������������������������������������������������������������������������������� 232
Reliability����������������������������������������������������������������������������������������������������������������������������� 232

xii
Table of Contents

Drawbacks�������������������������������������������������������������������������������������������������������������������������������� 233
Latency�������������������������������������������������������������������������������������������������������������������������������� 233
Resource Limits������������������������������������������������������������������������������������������������������������������� 233
Portability���������������������������������������������������������������������������������������������������������������������������� 233
Cloud Functions and BigQuery�������������������������������������������������������������������������������������������������� 235
Creating a Cloud Function��������������������������������������������������������������������������������������������������������� 236
Name����������������������������������������������������������������������������������������������������������������������������������� 237
Memory Allocated���������������������������������������������������������������������������������������������������������������� 237
Trigger��������������������������������������������������������������������������������������������������������������������������������� 237
Authentication��������������������������������������������������������������������������������������������������������������������� 238
Source Code������������������������������������������������������������������������������������������������������������������������ 238
Runtime������������������������������������������������������������������������������������������������������������������������������� 239
Deploying the Cloud Function���������������������������������������������������������������������������������������������� 241
Invoking Cloud Functions���������������������������������������������������������������������������������������������������������� 242
HTTP Trigger������������������������������������������������������������������������������������������������������������������������ 242
Cloud Pub/Sub Triggers������������������������������������������������������������������������������������������������������� 242
Cloud Storage Triggers�������������������������������������������������������������������������������������������������������� 243
Cloud Firestore�������������������������������������������������������������������������������������������������������������������� 243
Direct Triggers��������������������������������������������������������������������������������������������������������������������� 244
Firebase Triggers����������������������������������������������������������������������������������������������������������������� 244
Cloud Scheduler������������������������������������������������������������������������������������������������������������������������ 244
Real-World Application�������������������������������������������������������������������������������������������������������������� 245
Proposed Design����������������������������������������������������������������������������������������������������������������� 246
Summary���������������������������������������������������������������������������������������������������������������������������������� 251

Chapter 12: Cloud Logging����������������������������������������������������������������������������������� 253


How This Is Related������������������������������������������������������������������������������������������������������������������� 253
An Example: Abigail’s Flowers��������������������������������������������������������������������������������������������� 254
The Cloud Logging Console������������������������������������������������������������������������������������������������������� 258
Looking at Logs������������������������������������������������������������������������������������������������������������������� 259
Querying via Cloud Logging������������������������������������������������������������������������������������������������� 260

xiii
Table of Contents

Log Sinks to BigQuery��������������������������������������������������������������������������������������������������������������� 261


What Is a Sink?�������������������������������������������������������������������������������������������������������������������� 263
Creating a Sink�������������������������������������������������������������������������������������������������������������������� 263
Metrics and Alerting������������������������������������������������������������������������������������������������������������������ 265
Creating Metrics������������������������������������������������������������������������������������������������������������������ 265
Logs-Based Metrics������������������������������������������������������������������������������������������������������������� 266
A Note About Metrics Export������������������������������������������������������������������������������������������������ 266
Alerting�������������������������������������������������������������������������������������������������������������������������������� 267
Feedback Loops������������������������������������������������������������������������������������������������������������������������ 268
Summary���������������������������������������������������������������������������������������������������������������������������������� 269

Part IV: Maintaining the Warehouse�������������������������������������������������� 271


Chapter 13: Advanced BigQuery��������������������������������������������������������������������������� 273
Analytic Functions��������������������������������������������������������������������������������������������������������������������� 273
Definition����������������������������������������������������������������������������������������������������������������������������� 274
Window Frames������������������������������������������������������������������������������������������������������������������� 275
Partitions����������������������������������������������������������������������������������������������������������������������������� 275
Order of Operations������������������������������������������������������������������������������������������������������������� 275
Numeric Functions�������������������������������������������������������������������������������������������������������������� 276
Window Frame Syntax��������������������������������������������������������������������������������������������������������� 279
Navigation Functions����������������������������������������������������������������������������������������������������������� 284
Aggregate Analytic Functions���������������������������������������������������������������������������������������������� 286
BigQuery Scripting�������������������������������������������������������������������������������������������������������������������� 289
Blocks���������������������������������������������������������������������������������������������������������������������������������� 289
Variables������������������������������������������������������������������������������������������������������������������������������ 289
Comments��������������������������������������������������������������������������������������������������������������������������� 290
IF/THEN/ELSEIF/ELSE/END IF����������������������������������������������������������������������������������������������� 290
Control Flow������������������������������������������������������������������������������������������������������������������������ 291
Stored Procedures, UDFs, and Views���������������������������������������������������������������������������������������� 294
Stored Procedures��������������������������������������������������������������������������������������������������������������� 294
User-Defined Functions������������������������������������������������������������������������������������������������������� 296
JavaScript User-Defined Functions������������������������������������������������������������������������������������� 298
xiv
Table of Contents

Views����������������������������������������������������������������������������������������������������������������������������������� 300
Materialized Views�������������������������������������������������������������������������������������������������������������� 301
Summary���������������������������������������������������������������������������������������������������������������������������������� 302

Chapter 14: Data Governance������������������������������������������������������������������������������� 305


What Is Data Governance?�������������������������������������������������������������������������������������������������������� 306
Availability��������������������������������������������������������������������������������������������������������������������������� 307
Compliance�������������������������������������������������������������������������������������������������������������������������� 307
Consistency������������������������������������������������������������������������������������������������������������������������� 307
Cost Management��������������������������������������������������������������������������������������������������������������� 307
Decision Making������������������������������������������������������������������������������������������������������������������ 308
Performance������������������������������������������������������������������������������������������������������������������������ 308
Quality��������������������������������������������������������������������������������������������������������������������������������� 308
Security������������������������������������������������������������������������������������������������������������������������������� 308
Usability������������������������������������������������������������������������������������������������������������������������������� 309
Anatomy of a Governance Strategy������������������������������������������������������������������������������������������� 309
Roles and Responsibilities�������������������������������������������������������������������������������������������������������� 309
Senior Leadership��������������������������������������������������������������������������������������������������������������� 310
Governance Council������������������������������������������������������������������������������������������������������������� 311
Subject Matter Experts�������������������������������������������������������������������������������������������������������� 312
Data Analysts����������������������������������������������������������������������������������������������������������������������� 313
Data Engineering Team�������������������������������������������������������������������������������������������������������� 314
The “System of Record”������������������������������������������������������������������������������������������������������������ 315
Golden Records������������������������������������������������������������������������������������������������������������������� 316
Single-Direction Data Flow�������������������������������������������������������������������������������������������������� 317
Security������������������������������������������������������������������������������������������������������������������������������������� 318
Authentication��������������������������������������������������������������������������������������������������������������������� 318
Permissions������������������������������������������������������������������������������������������������������������������������� 319
Encryption��������������������������������������������������������������������������������������������������������������������������� 320
Classification����������������������������������������������������������������������������������������������������������������������� 321
Data Loss Prevention����������������������������������������������������������������������������������������������������������� 322
Auditing������������������������������������������������������������������������������������������������������������������������������� 324

xv
Table of Contents

Data Lifecycle��������������������������������������������������������������������������������������������������������������������������� 324


Ingestion/Time to Availability����������������������������������������������������������������������������������������������� 325
Active Data and Quality Metrics������������������������������������������������������������������������������������������ 326
Decommissioning���������������������������������������������������������������������������������������������������������������� 327
Governance Modification���������������������������������������������������������������������������������������������������������� 328
Road Map���������������������������������������������������������������������������������������������������������������������������������� 328
Approval������������������������������������������������������������������������������������������������������������������������������������ 329
Google Cloud Data Catalog�������������������������������������������������������������������������������������������������������� 329
Overview������������������������������������������������������������������������������������������������������������������������������ 330
BigQuery������������������������������������������������������������������������������������������������������������������������������ 330
External Connectors������������������������������������������������������������������������������������������������������������ 331
Personally Identifying Information��������������������������������������������������������������������������������������� 331
Summary���������������������������������������������������������������������������������������������������������������������������������� 332

Chapter 15: Adapting to Long-Term Change��������������������������������������������������������� 333


Business Change���������������������������������������������������������������������������������������������������������������������� 335
Major Business Events�������������������������������������������������������������������������������������������������������� 336
Key Performance Indicators������������������������������������������������������������������������������������������������ 337
Timeline������������������������������������������������������������������������������������������������������������������������������� 338
Approach����������������������������������������������������������������������������������������������������������������������������� 338
Data Program Charter���������������������������������������������������������������������������������������������������������� 338
Organic Growth Over Time�������������������������������������������������������������������������������������������������������� 339
Change Control�������������������������������������������������������������������������������������������������������������������� 340
Source Control Management����������������������������������������������������������������������������������������������� 343
Data Retention Considerations�������������������������������������������������������������������������������������������������� 344
Privacy Legislation��������������������������������������������������������������������������������������������������������������� 345
Cost Management��������������������������������������������������������������������������������������������������������������� 345
Expiration���������������������������������������������������������������������������������������������������������������������������� 347
Colder Storage��������������������������������������������������������������������������������������������������������������������� 347
DML Statements����������������������������������������������������������������������������������������������������������������������� 349

xvi
Table of Contents

Downtime���������������������������������������������������������������������������������������������������������������������������������� 349
Code Freeze������������������������������������������������������������������������������������������������������������������������� 350
Graceful Degradation����������������������������������������������������������������������������������������������������������� 350
The BigQuery Ecosystem���������������������������������������������������������������������������������������������������������� 350
Summary���������������������������������������������������������������������������������������������������������������������������������� 351

Part V: Reporting On and Visualizing Your Data�������������������������������� 353


Chapter 16: Reporting������������������������������������������������������������������������������������������ 355
What Is Reporting Now?����������������������������������������������������������������������������������������������������������� 356
Do We Still Need Reporting?����������������������������������������������������������������������������������������������������� 357
Reporting and Data Democratization���������������������������������������������������������������������������������������� 358
Historical Context���������������������������������������������������������������������������������������������������������������� 358
Integration as a Service������������������������������������������������������������������������������������������������������� 359
Gray Market Data����������������������������������������������������������������������������������������������������������������� 360
Reporting as Democratization��������������������������������������������������������������������������������������������� 361
History Repeats Itself���������������������������������������������������������������������������������������������������������� 362
Reporting as a Product������������������������������������������������������������������������������������������������������������� 362
Through the B2B Lens��������������������������������������������������������������������������������������������������������� 363
Chartering a Reporting Product������������������������������������������������������������������������������������������� 364
Product Management���������������������������������������������������������������������������������������������������������� 366
Defining Requirements������������������������������������������������������������������������������������������������������������� 367
The Platforms���������������������������������������������������������������������������������������������������������������������� 368
The Reports������������������������������������������������������������������������������������������������������������������������� 368
Road Map���������������������������������������������������������������������������������������������������������������������������� 370
The Solution Spectrum������������������������������������������������������������������������������������������������������������� 370
Google Cloud Platform��������������������������������������������������������������������������������������������������������� 370
Other Third-Party Providers������������������������������������������������������������������������������������������������� 372
Other Solutions�������������������������������������������������������������������������������������������������������������������� 375
Summary���������������������������������������������������������������������������������������������������������������������������������� 378

xvii
Table of Contents

Chapter 17: Dashboards and Visualization����������������������������������������������������������� 379


Visualizations���������������������������������������������������������������������������������������������������������������������������� 381
A Bad Example�������������������������������������������������������������������������������������������������������������������� 381
Visualization Features��������������������������������������������������������������������������������������������������������� 382
Dashboards������������������������������������������������������������������������������������������������������������������������������� 387
Visualizations vs. Dashboards��������������������������������������������������������������������������������������������� 389
Dashboard Hierarchy����������������������������������������������������������������������������������������������������������� 390
Use Cases���������������������������������������������������������������������������������������������������������������������������� 391
Ubiquity������������������������������������������������������������������������������������������������������������������������������� 391
Surprise������������������������������������������������������������������������������������������������������������������������������� 391
Related Metrics������������������������������������������������������������������������������������������������������������������� 392
Major Business Events�������������������������������������������������������������������������������������������������������� 393
Community�������������������������������������������������������������������������������������������������������������������������� 393
How to Build Dashboards���������������������������������������������������������������������������������������������������������� 394
Hardware����������������������������������������������������������������������������������������������������������������������������� 394
Software������������������������������������������������������������������������������������������������������������������������������ 397
Maintenance������������������������������������������������������������������������������������������������������������������������ 398
Summary���������������������������������������������������������������������������������������������������������������������������������� 400

Chapter 18: Google Data Studio���������������������������������������������������������������������������� 401


Data Studio Reports with BigQuery������������������������������������������������������������������������������������������� 402
Data Sources����������������������������������������������������������������������������������������������������������������������� 402
BigQuery������������������������������������������������������������������������������������������������������������������������������ 402
Preparing a Report�������������������������������������������������������������������������������������������������������������� 403
Building a Report����������������������������������������������������������������������������������������������������������������� 405
Creating Charts�������������������������������������������������������������������������������������������������������������������� 406
Report Viewing Options������������������������������������������������������������������������������������������������������� 408
Additional Data Studio Concepts����������������������������������������������������������������������������������������������� 410
Data Studio Explorer������������������������������������������������������������������������������������������������������������ 410
Blending Data���������������������������������������������������������������������������������������������������������������������� 412
Calculated Fields����������������������������������������������������������������������������������������������������������������� 412

xviii
Table of Contents

Community Add-Ons������������������������������������������������������������������������������������������������������������ 414


Google Analytics������������������������������������������������������������������������������������������������������������������ 414
BigQuery BI Engine������������������������������������������������������������������������������������������������������������������� 415
Summary���������������������������������������������������������������������������������������������������������������������������������� 416

Part VI: Enhancing Your Data’s Potential������������������������������������������� 417


Chapter 19: BigQuery ML�������������������������������������������������������������������������������������� 419
Background������������������������������������������������������������������������������������������������������������������������������� 420
Artificial Intelligence������������������������������������������������������������������������������������������������������������ 420
Machine Learning���������������������������������������������������������������������������������������������������������������� 422
Statistics������������������������������������������������������������������������������������������������������������������������������ 423
Ethics����������������������������������������������������������������������������������������������������������������������������������� 424
BigQuery ML Concepts�������������������������������������������������������������������������������������������������������������� 426
Cost������������������������������������������������������������������������������������������������������������������������������������� 426
Supervised vs. Unsupervised Learning������������������������������������������������������������������������������� 428
Model Types������������������������������������������������������������������������������������������������������������������������� 429
Procedure���������������������������������������������������������������������������������������������������������������������������� 442
Examples���������������������������������������������������������������������������������������������������������������������������������� 449
K-Means Clustering������������������������������������������������������������������������������������������������������������� 450
Data Classification��������������������������������������������������������������������������������������������������������������� 454
Summary���������������������������������������������������������������������������������������������������������������������������������� 468

Chapter 20: Jupyter Notebooks and Public Datasets������������������������������������������� 469


The Edge of the Abyss��������������������������������������������������������������������������������������������������������������� 470
Jupyter Notebooks�������������������������������������������������������������������������������������������������������������������� 471
Setting Up Your Notebook���������������������������������������������������������������������������������������������������� 472
The Notebook Interface������������������������������������������������������������������������������������������������������� 473
Data Analysis in Python������������������������������������������������������������������������������������������������������� 475
Setting Up BigQuery������������������������������������������������������������������������������������������������������������������ 476
Adding Data to the Kernel��������������������������������������������������������������������������������������������������� 477
Loading Data from BigQuery����������������������������������������������������������������������������������������������� 477

xix
Table of Contents

Exploring a DataFrame�������������������������������������������������������������������������������������������������������������� 480


Finding Bearings����������������������������������������������������������������������������������������������������������������� 481
Exploring Individual Values�������������������������������������������������������������������������������������������������� 482
Exploring Multiple Values���������������������������������������������������������������������������������������������������� 484
Next Steps��������������������������������������������������������������������������������������������������������������������������� 485
Jupyter Magics�������������������������������������������������������������������������������������������������������������������� 486
AutoML Tables��������������������������������������������������������������������������������������������������������������������������� 487
Importing a Dataset������������������������������������������������������������������������������������������������������������� 488
Configuring the Training������������������������������������������������������������������������������������������������������ 489
Training the Model��������������������������������������������������������������������������������������������������������������� 491
Evaluating the Model����������������������������������������������������������������������������������������������������������� 491
Making Predictions�������������������������������������������������������������������������������������������������������������� 493
Bonus Analysis�������������������������������������������������������������������������������������������������������������������� 494
The Data ➤ Insight Funnel������������������������������������������������������������������������������������������������������� 495
Summary���������������������������������������������������������������������������������������������������������������������������������� 496

Chapter 21: Conclusion����������������������������������������������������������������������������������������� 497

Appendix A: Cloud Shell and Cloud SDK�������������������������������������������������������������� 499


From the Console���������������������������������������������������������������������������������������������������������������������� 499
Cloud VM Capabilities���������������������������������������������������������������������������������������������������������� 499
Console Options������������������������������������������������������������������������������������������������������������������� 501
From a Local Machine��������������������������������������������������������������������������������������������������������������� 503
Installation��������������������������������������������������������������������������������������������������������������������������� 503
Accessing Cloud Shell from Local Machine������������������������������������������������������������������������� 504
Creating New Projects�������������������������������������������������������������������������������������������������������������� 504
Creating New Service Accounts������������������������������������������������������������������������������������������������ 504
The bq Command-Line Tool������������������������������������������������������������������������������������������������������ 505
Querying������������������������������������������������������������������������������������������������������������������������������ 506
Loading�������������������������������������������������������������������������������������������������������������������������������� 506
Shell������������������������������������������������������������������������������������������������������������������������������������ 507
Creating������������������������������������������������������������������������������������������������������������������������������� 507

xx
Table of Contents

Copying�������������������������������������������������������������������������������������������������������������������������������� 507
Deleting������������������������������������������������������������������������������������������������������������������������������� 508
Undeleting��������������������������������������������������������������������������������������������������������������������������� 508

Appendix B: Sample Project Charter�������������������������������������������������������������������� 509


DataCorp, Inc. Project Charter Request������������������������������������������������������������������������������������� 510
Purpose������������������������������������������������������������������������������������������������������������������������������� 510
Justification������������������������������������������������������������������������������������������������������������������������� 510
Scope����������������������������������������������������������������������������������������������������������������������������������� 510
Success Criteria������������������������������������������������������������������������������������������������������������������ 510
Budget��������������������������������������������������������������������������������������������������������������������������������� 511
Timeline������������������������������������������������������������������������������������������������������������������������������� 511
Project Assumptions������������������������������������������������������������������������������������������������������������ 511
Project Risks������������������������������������������������������������������������������������������������������������������������ 511
Reporting���������������������������������������������������������������������������������������������������������������������������������� 512
Summary����������������������������������������������������������������������������������������������������������������������������� 512
Existing Reports to be Ported Over�������������������������������������������������������������������������������������� 512
Improved Versions of Existing Reports�������������������������������������������������������������������������������� 512
New Reports������������������������������������������������������������������������������������������������������������������������ 512
Out of Scope������������������������������������������������������������������������������������������������������������������������ 512
Additional Constraints��������������������������������������������������������������������������������������������������������� 513
Key Stakeholders����������������������������������������������������������������������������������������������������������������� 513
Project Sign-Off������������������������������������������������������������������������������������������������������������������������� 513

Index��������������������������������������������������������������������������������������������������������������������� 515

xxi
About the Author
Mark Mucchetti is an industry technology leader in
healthcare and ecommerce. He has been working with
computers and writing software for over 30 years, starting
with BASIC and Turbo C on an Intel 8088 and now using
Node.js in the cloud. For much of that time, he has been
building and growing engineering groups, combining his
deep love of technical topics with his management skills
to create world-­class platforms. Mark has also worked in
databases, release engineering, front- and back-end coding,
and project management. He works as a technology executive in the Los Angeles area,
coaching and empowering people to achieve their peak potential as individuals of bold,
forward-momentum, and efficient technology teams.

xxiii
About the Technical Reviewer
Björn Rost is a customer engineer at Google Canada with a
focus on data management and analytics. He has previously
architected, implemented, and tuned many data warehouses
and relational transaction systems as a consultant. His
passion for sharing with and learning from others has led
him to present on data, DevOps, and cloud at over 100
conferences and meetups around the world. He is an Oracle
ACE Alumnus and a member of the OakTable Network​.

xxv
Acknowledgments
Firstly, my thanks to the staff at Apress, who made the process so easy that all I had to do
was write: Jonathan Gennick, Jill Balzano, and Laura Berendson.
Thanks to my technical reviewer, Björn Rost, for providing thoughtful direction
under a deadline and whose suggestions consequently improved this book substantially.
Special thanks to my cadre of engineering stars, who reviewed excerpts, suggested
use cases, and provided encouragement: Abby Cloft, Sasha Jordan, Clint Kumabe, Nick
McKinnon, Andrew Melchor, and others whom I most certainly forgot. Equal thanks to
the 606 crew (Derek Lieu, Abel Martin, and Geoff Stebbins), who have supported me
since the previous millennium.
To Brit Tucker, who somehow remained a source of preternatural calmness and
pragmatism, despite the unreasonableness that defines product management, thank you
for the collaboration, insight, and triangle breathing.
Extra special thanks to Nick Campbell for his affable and insightful support across
all topics. Undoubtedly he is the only engineer I know who would take my intentional
omission of an Oxford comma as the personal affront I intended. Please reach him for
advice on phenomena both Cloud-related and cloud-related. My friend, you are already
both writer and technologist.
To Shari Laster, head of Open Stack Collections at Arizona State University, thank
you for helping me interpret and visualize public data in a discipline-appropriate way
and for exemplifying virtuous library science, and for everything else.
Thanks to my dear friend and adventitious counselor, Juan Ball, who taught me
that physical strength and mental strength are mostly the same thing. Her unwavering
confidence and faith have guided me through dark days.
To my sister Emily, who listened patiently and kept a very good secret.
To my children, John Luke and Amelia, who bring joy beyond measure. Finally, my
deepest gratitude to my wife, Heather, who kept the children safe and the household
humming while managing a demanding career of her own. I wouldn’t have done it
without you. Honey, if you’re reading this, the book is done.
—Mark Mucchetti
Santa Monica, California

xxvii
Introduction
The Organization of Data
The modern world is ruled by data. Even as I write this, dozens of my data points are
being sent out over the Internet. Where I’m located, which websites I’m consulting for
reference, my heart rate, and the lighting level in my office are all streaming continuously
to servers worldwide. Even my keystrokes into this document are being streamed and
recorded as I type, each generating its own event. Were I to look at the raw data collected
on me alone in any given 24-hour period, I would likely be unable to make any sense of
it without some in-depth review. Estimates suggest the world as a whole may be creating
as much as 2.5 quintillion bytes of data every single day.1 I’d take a large grain of salt with
any such statistic—what does it even mean to “create data”?
As builders and architects, we can forget that data doesn’t do anything on its own.
Dealing with it in an abstract state, we are aware that it’s something we have to get from
source to destination without losing any and with a good idea of its provenance. We
generally want to know that it’s authentic too and comes from an authorized person.
In its potential form, we move it around, extract, transform, and load it. However, it only
becomes a tool for decision making when we synthesize it into information. Literally, to
grow in understanding as a species, we must think both about how we collect and store
data and how we turn it into information.
I don’t think the emphasis on the word “data” in modern society is incidental; it’s
much easier for us to move boxes of books around from shelf to shelf than to open each
book and read it. And there is certainly a time for that—we’ll cover it in Part 2 as we build
up the data warehouse. But this is all really about a journey. To continue with the book
analogy, it’s a process starting from the author to the commercial buyer, to the stocking
and organization, to the reading and understanding, and finally to the librarians and
archivists who work with the information. For the kinds of massive datasets we deal with
now, it’s too much for any single person to do. We use technology to fill the gaps and let
us focus on the final step of information interpretation: knowledge.

1
https://researcher.watson.ibm.com/researcher/view_group.php?id=4933

xxix
Introduction

It’s hardly a hop, skip, and a jump from raw data to knowledge. These problems have
been fundamental to human society since the dawn of reading and writing. Technology
adds a tremendous amount of power, but it also adds incomprehensible complexity.
We’ve begun applying increasingly erudite labels to capture the technical work done by
professionals in support of this: data engineer, architect, and, more recently, scientist.
(I used to work with a person who styled herself a “data janitor”, and in fact dressed as
one for Halloween.)
We’ve reached a point where most business organizations understand the value of
collecting as much data as possible. However, many don’t excel at turning that data into
information. There are undoubtedly large troves of raw data lying around in data centers
and the cloud everywhere, with enormous potential but no plan. Some organizations are
coalescing their data into information, but stakeholders don’t know how to find it or use
it. Sometimes stakeholders are adept at using it, but the feedback loop is too long and the
data has been rendered obsolete by changing business conditions. Solely by optimizing
that feedback loop in your organization, you can gain an edge over your competitors. But
this advantage isn’t going to last for long. One of the reasons for this is Google BigQuery
and technologies like it.
BigQuery takes all the best parts of data warehouses—SQL compatibility, petabyte
scale, and high availability—and puts them all in the same place. Even better, as a user,
there is almost no difficulty in getting up and running. Whether you’re migrating from
an existing warehouse, a live operational store, or just a bunch of Google Sheets, we’ll be
able to extract key insights almost immediately. You can then get those insights to your
non-technical stakeholders, decision makers, and senior leadership. Once you have
everyone on board, you’ve created a culture of data, and the sky’s the limit. I’ve seen it
happen several times. I’ve never seen it happen as quickly as it does with BigQuery.

Google BigQuery
Data warehousing isn’t a new concept, and in fact, its origins date back to the 1970s.
The need for up-to-the-minute, global business data has been present for a long time.
In the past, setting up the infrastructure to begin was a daunting and tedious
undertaking. There would be multiple decision points around determining your scale
and availability requirements, how to communicate system downtime to users, setting
up disaster recovery plans… The list goes on. The nuts and bolts of this process could

xxx
Introduction

easily consume weeks and would be beyond the expertise of a business-focused analyst.
Then, you could pretty easily consume two or more full-time roles solely with the
responsibility of keeping the thing running and patched. You would have to do all of this
before you could even dig into your business problems.
Gradually, as the concept of infrastructure-as-a-service emerged, we got increasing
power for less work and limited maintenance. Virtualization in data centers gave way to
managed SQL instances (Google Cloud Platform [GCP] SQL, Amazon RDS [Relational
Database Service]) which in turn created cloud solutions for managing data. However,
it is only with the advent of BigQuery that we have the best of both worlds: a fully SQL-­
compliant managed data warehouse.
If you’re already a database administrator, this should all sound familiar. And in that
case, good news for you: the next few chapters are going to be a breeze. You can use the
extra time to reminisce about the bad old days. If you’re just starting out, however,
I strongly encourage you to focus on the concepts and strategies associated with building
a data warehouse. They will serve you well far beyond the technologies we’ll cover in this
book.
This book is about BigQuery, yes; but this book is really about your data. Even if you
don’t know where your data is (or you’re not even collecting it yet!), we’ll cover all sorts
of methods to work with data in BigQuery and take your practice up a couple of notches.
As you prove the value to others in your organization, they will support you in taking it
up a few more.
The best part about BigQuery is that you get to jump directly to solving your
problems. Minimally, the benefit of managed infrastructure is that you don’t need to
retain resources in-house who can perform maintenance and upgrades. Beyond that,
with a service such as BigQuery, you won’t need to install any software on your computer
or in a data center either. Your data will be fully available and equally accessible from
everywhere, as you choose.
The most important thing this offers you is a lighter cognitive load to acquire
your data and present it to others. You can spend your time working on improving
your business and not remembering how to keep your machines running, build a
maintenance schedule, and so forth. Furthermore, this means that delivering key, real-­
time insight to your business is now available to much smaller organizations. Even in a
small business, you can harness BigQuery without needing to make a huge budget ask of
your leadership.

xxxi
Introduction

Characteristics of BigQuery
Let’s review some of the key characteristics of BigQuery. These may be more or less
exciting for your specific use case, but you will most likely find one or two to convince
you, your team, or your stakeholders.

Ease of Use
BigQuery runs in the cloud and is fully managed. You don’t need to build an operating
system or install a database. You don’t even need to reserve a machine. BigQuery runs
transparently without requiring you to understand anything about where or how it is
deployed.

Availability and Reliability


As of this writing, BigQuery offers a ≥ 99.99% uptime service-level agreement (SLA).
To save you the trouble of doing the math, this works out to only about 44 minutes a
month. In practice, I have not seen any significant outages or performance impairment
on a production workload.

Security
Configuring role-based permissions and user-level access can be a nightmare in
traditional data warehouse applications. BigQuery configures basic permissions by
default and allows you to get more granular as necessary. At all times, its permissions
model is governed by Cloud IAM (formally, Google Cloud Identity and Access
Management), meaning that you can keep permissions consistent among the rest of your
Google Cloud Platform services, even out to G Suite.

Price
In the world of “Big Iron,” fast, available database technology was traditionally the most
expensive class of enterprise computing. Add in license costs for proprietary database
software, and you are looking at an extremely expensive operation just to get under
way. BigQuery does away with all of that: its default pricing model is pay-as-you-go,
based on how much data your queries process. While it can be difficult to estimate costs
xxxii
Introduction

sometimes, especially when comparing to a standard relational database, this approach


means that when your users are dormant, the cost of your data warehouse is negligible.
If you are running a global operation and consume a tremendous amount of data,
Google also offers a flat rate based on the number of “slots” you consume. (We’ll talk more
about the concept of slots in Chapter 4.)

S
 peed
BigQuery performs very quickly and is consistent in response times. It also caches
responses so that they are returned immediately after the first time (the query is also
free). While it may not be the best choice for an edge-facing transactional database, you
should find it more than sufficient for analytics workloads, or even the back end of a
reporting system.

B
 usiness Value
It’s hard to overemphasize this. Due to all of the other advantages mentioned earlier,
you’ll spend only a fraction of the time doing any of the routine tasks that may have
previously consumed your day. Instead, you’ll be able to focus on the overarching
theme: turning your raw data into information and, ultimately, into knowledge.

The Structure of This Book


As with any journey, you may find yourself personally at various points along the
path. The goal for you is to get your data into a managed state as quickly and easily as
possible. This will probably tie to underlying goals for you as well. Your focus may be on
proliferating information to more stakeholders, or it may be on visualizing it in a more
compelling way. You may even just want to be able to sleep more soundly at night, not
worrying about where all this data is and if it’s being taken in properly. You should be able
to find the right place along your journey for BigQuery to be helpful to you. I’ll be starting
with the basics and moving into more complex and innovative concepts as we go.
Part 1 will start from scratch. We’ll discuss generally how to evaluate your data
storage needs and ways of structuring it. Then we’ll implement a few examples directly
using BigQuery, again starting from the beginning, as if you aren’t currently using any
form of data warehouse or SQL. After that, assuming you do in fact have some form of

xxxiii
Exploring the Variety of Random
Documents with Different Content
rye or Blackheath—where the guy was burned amid the most
boisterous applauses.
Cardinal Wiseman and the Pope reappeared for several years in
succession, till at length the Russian war breaking out, the Guy-
Fawkes constructors had a fresh model to work upon. The Emperor
of Russia accordingly “came out” in the streets, in all forms and
shapes; sometimes as the veritable Nicholas, in jack-boots and
leather breeches, with his unmistakable moustache; and often as
Old Nick, with a pair of horns and a lengthy appendage in the form
of a tail, with an arrow-headed termination; and not unfrequently he
was represented as a huge bear crouching beneath some rude
symbol of the English and French alliance.
On the 5th of November (1856) the guys were more of a political
than a religious character. The unfortunate Pope of Rome had in
some instances been changed for Bomba, though the Czar, His
Holiness, and his British representative the Cardinal, were not
altogether neglected. The want of any political agitation was the
cause why the guys were of so uninteresting a character.
I must not, however, forget to mention a singular innovation that
was then made in the recognised fashion of guy building—one of the
groups of figures exhibited being (strange to say) of a
complimentary nature. It consisted of Miss Nightingale, standing
between an English Grenadier and a French foot-soldier, while at her
feet lay the guy between two barrels marked “Gunpowder,” and so
equivocally attired that he might be taken for either the Emperor of
Russia or the Pope of Rome.
At Billingsgate, a guy was promenaded round the market as early as
five o’clock in the morning, by a party of charity-boys, who appeared
by their looks to have been sitting up all night. It is well known to
the boys in the neighbourhood of the great fish-market, that the guy
which is first in the field reaps the richest harvest of halfpence from
the salesmen; and indeed, till within the last three or four years, one
fish-factor was in the habit of giving the bearers of the first effigy he
saw a half-crown piece. Hence there were usually two or three
different guy parties in attendance soon after four o’clock, awaiting
his coming into the market.
For manufacturing a cheap guy, such as that seen at Billingsgate, a
pair of old trousers and Wellington boots form the most expensive
item. The shoulders of the guys are generally decorated with a
paper cape, adorned with different coloured rosettes and gilt stars. A
fourpenny mask makes the face, and a proper cocked hat,
embellished in the same style as the cape, surrounds the rag head.
The general characteristics of all guys consists in a limpness and
roundness of limb, which give the form a puddingy appearance. All
the extremities have a kind of paralytic feebleness, so that the head
leans on one side like that of a dead bird, and the feet have an
unnatural propensity for placing themselves in every position but the
right one; sometimes turning their toes in, as if their legs had been
put on the wrong way, or keeping their toes turned out, as if they
had been “struck so” while taking their first dancing-lesson. Their
fingers radiate like a bunch of carrots, and the arms are as shapeless
and bowed as the monster sausage in a cook-shop window. The face
is always composed of a mask painted in the state of the most florid
health, and singularly disagreeing with the frightful debility of the
body. Through the holes for the eyes bits of rag and straw generally
protrude, as though birds had built in the sockets. A pipe is mostly
forced into the mouth, where it remains with the bowl downwards;
and in the hands it is customary to tie a lantern and matches. Whilst
the guy is carried along, you can hear the straw in his interior
rustling and crackling, like moving a workhouse mattrass. As a
general rule, it may be added, that guys have a helpless, drunken
look.
When, however, the monster Guy Fawkeses came into fashion,
considerably greater expense was gone to in “getting up” the
figures. Then the feet were always fastened in their proper position,
and although the arrangement of the hands was never perfectly
mastered, yet the fingers were brought a little more closely together,
and approached the digital dexterity of the dummies at the cheap
clothes marts.
For carrying the guys about, chairs, wheelbarrows, trucks, carts, and
vans are employed. Chairs and wheelbarrows are patronised by the
juvenile population, but the other vehicles belong to the gigantic
speculations.
On the Surrey side a guy was exhibited in 1856 whose straw body
was encased in a coachman’s old great coat, covered with different
colours, as various as the waistcoat patterns on a tailor’s show-book.
He was wheeled about on a truck by three or four young men,
whose hoarse voices, when shouting “Please to remember the Guy,”
showed their regular occupation to be street-selling, for they had the
same husky sound as the “Eight a-groat fresh herrens,” in the
Saturday night street-markets.
In the neighbourhood of Walworth, men dressed up as guys were
dragged about on trucks. One of them was seated upon a barrel
marked “Gunpowder,” his face being painted green, and ornamented
with an immense false nose of a bright scarlet colour. I could not
understand what this guy was meant to represent, for he wore a
sugarloaf hat with an ostrich feather in it, and had on a soldier’s red
coat, decorated with paper rosettes as big as cabbages. His legs,
too, were covered with his own corduroy trowsers, but adorned with
paper streamers and bows. In front of him marched a couple of men
carrying broomsticks, and musicians playing upon a tambourine and
a penny tin whistle.
The most remarkable of the stuffed figures of 1856 was one dressed
in a sheet, intended to represent the Rev. Mr. Spurgeon in a surplice!
It was carried about on a wooden stage by boys, and took very well
with the mob, for no sooner did the lads cry out,—

“Remember, remember,
The fifth of November,
Old Spurgeon’s treason and plot!”
than a shout of laughter burst from the crowd, and the halfpence
began to pour in. Without this alteration in the November rhyme,
nobody would have been able to have traced the slightest
resemblance between the guy and the reverend gentleman whose
effigy it was stated to be.
Further, it should be added, that the guy exhibitors have of late
introduced a new system, of composing special rhymes for the
occasion, which are delivered after the well-known “Remember,
remember.” Those with the figures of the Pope, for instance, sing,—

“A penn’orth of cheese to feed the pope,


A twopenny loaf to choke him,
A pint of beer to wash it down,
And a good large fagot to smoke him!”

I heard a party of costermongers, who had the image of His Imperial


Majesty the Emperor of all the Russias wabbling on their truck, sing
in chorus this home-manufactured verse,—

“Poke an ingun in his eye—


A squib shove up his nose, sirs;
Then roast him till he’s done quite brown,
And Nick to old Nick goes, sirs.”

With the larger guys little is usually said or done beyond exhibiting
them. In the crowded thoroughfares, the proprietors mostly occupy
themselves only with collecting the money, and never let the
procession stop for a moment. On coming to the squares, however,
a different course is pursued, for then they stop before every
window where a head is visible and sing the usual “Remember,
remember,” winding up with a vociferous hurrah! as they hold out
their hats for the halfpence.
At the West-end, one of the largest guys of 1856 was drawn by a
horse in a cart. This could not have been less than fourteen feet
high. Its face, which was as big as a shield, was so flat and good-
humoured in expression that I at once recognised it as a pantomime
mask, or one used to hang outside some masquerade costumier’s
shop door. The coat was of the Charles the Second’s cut, and
composed of a lightish coloured paper, ornamented with a profusion
of Dutch metal. There was a sash across the right shoulder, and the
legs were almost as long as the funnel to a penny steamer, and
ended in brown paper cavalier boots. As the costermongers led it
along, it shook like a load of straw. If it had not been for the bull’s-
eye lantern and lath matches, nobody would have recognised in the
dandy figure the effigy of the wretched Fawkes.
By far the handsomest turn-out of the day, at this time, was a group
of three figures, which promenaded Whitechapel and Bethnal-green.
They stood erect in a van drawn by a blind horse, and accompanied
by a “band” of one performer on the drum and pandean pipes. Four
clowns in full costume made faces while they jumped about among
the spectators, and collected donations. All the guys were about ten
feet high. The centre one, intended for Fawkes himself, was attired
in a flowing cloak of crimson glazed calico, and his black hat was a
broad-brimmed sugarloaf, the pointed crown of which was like a
model of Langham-place church steeple, and it had a profusion of
black hair streaming about the face. The figures on either side of
this were intended for Lords Suffolk and Monteagle, in the act of
arresting the traitor, and accordingly appeared to be gently tapping
Mr. Fawkes on either shoulder. The bodies of their lordships were
encased in gold scale-armour, and their legs in silver ditto, whilst
their heads were covered with three-cornered cocked hats,
surmounted by white feathers. In the front of the van were two
white banners, with the following inscriptions in letters of gold:—
“Apprehension of Guy Fawkes on the 5th of November, in the
year 1605.”
And,—
“The Discovery of the Gunpowder Plot on the 5th of November,
1605.”
At the back of the van flaunted two flags of all nations. In addition
to the four clowns, there were several other attendants; one in
particular had the appearance of half a man and half a beast, his
body being clad in a green frock-coat, whilst his legs and feet were
shaggy, and made to imitate a bear’s.
The most remarkable part of this exhibition was the expression upon
the countenances of the figures. They were ordinary masks, and
consequently greatly out of proportion for the height of the figures.
There was a strong family resemblance between the traitor and his
arrestors; neither did Fawkes’s countenance exhibit any look of rage,
astonishment, or disappointment at finding his designs frustrated.
Nor did their lordships appear to be angry, disgusted, or
thunderstruck at the conspirator’s bold attempt.
In the neighbourhood of Bond-street the guys partook of a political
character, as if to please the various Members of Parliament who
might be strolling to their Clubs. In one barrow was the effigy of the
Emperor of the French, holding in his hands, instead of the lantern
and matches, a copy of the Times newspaper, torn in half. I was
informed that another figure I saw was intended to represent the
form of Bomba.
In the neighbourhood of Lambeth Palace the guys were of an
ecclesiastical kind, and such as it was imagined would be likely to
flatter the Archbishop of Canterbury into giving at least a half-crown.
One of these was drawn by two donkeys, and accompanied by
drums and pipes. It represented Cardinal Wiseman in the company
of four members of “the Holy Inquisition.” The Cardinal was dressed
in the usual scarlet costume, while the Inquisitors were robed in
black with green veils over their faces. In front of the cart was a
bottle, labelled “Holy Water,” which was continually turned round, so
that the people might discover that on the other side was printed
“Whisky.”
The practice of burning guys, and lighting bonfires, and letting off
fireworks, is now generally discontinued, and particularly as regards
the public exhibitions at Blackheath and Peckham Rye. The greatest
display of fireworks, we are inclined to believe, took place in the
public streets of the metropolis, for up to twelve o’clock at night, one
might occasionally hear reports of penny cannons, and the jerky
explosions of crackers.

Guy Fawkes (Man).


“I’m in the crock’ry line, going about with a basket and changing
jugs, and glass, and things, for clothes and that; but for the last
eight years I have, every Fifth of November, gone out with a guy. It’s
a good job for the time, for what little we lay out on the guy we
don’t miss, and the money comes in all of a lump at the last. While it
lasts there’s money to be made by it. I used always to take the guy
about for two days; but this last year I took him about for three.
“I was nineteen year old when I first went out with a guy. It was
seeing others about with ’em, and being out of work at the time,
and having nothing to sell, I and another chap we knocked up one
between us, and we found it go on pretty well, so we kept on at it.
The first one I took out was a very first-rater, for we’d got it up as
well as we could to draw people’s attention. I said, ‘It ain’t no good
doing as the others do, we must have a tip-topper.’ It represented
Guy Fawkes in black velvet. It was about nine feet high, and he was
standing upright, with matches in one hand and lantern in the other.
I show’d this one round Clerkenwell and Islington. It was the first
big ’un as was ever brought out. There had been paper ones as big,
but ne’er a one dressed up in the style mine was. I had a donkey
and cart, and we placed it against some cross-rails and some bits of
wood to keep him steady. He stood firm because he had two poles
up his legs, and being lashed round the body holding him firm to the
posts—like a rock. We done better the first time we went out than
we do lately. The guy must have cost a sovereign. He had a trunk-
hose and white legs, which we made out of a pair of white drawers,
for fleshings and yellow boots, which I bought in Petticoat-lane. We
took over 3l. with him, which was pretty fair, and just put us on
again, for November is a bad time for most street trades, and
getting a few shillings all at once makes it all right till Christmas.
“A pal of mine, of the name of Smith, was the first as ever brought
out a big one. His wasn’t a regular dressed-up one, but only with a
paper apron to hang down the front and bows, and such-like. He put
it on a chair, and had four boys to carry it on their shoulders. He was
the first, too, as introduced clowns to dance about. I see him do
well, and that’s why I took mine in hand.
“The year they was chalking ‘No Popery’ all about the walls I had
one, dressed up in a long black garment, with a red cross on his
bosom. I’m sure I don’t know what it meant, but they told me it
would be popular. I had only one figure, with nine bows, and that
tidiwated all about him. As we went along everybody shouted out
‘No Popery!’ Everybody did. He had a large brimmed hat with a low
crown in, and a wax mask. I always had wax ones. I’ve got one at
home now I’ve had for five year. It cost two-and-sixpence. It’s a very
good-looking face but rather sly, with a great horse-hair beard. Most
of the boys make their’n devils, and as ugly as they can, but that
wouldn’t do for Christians like as I represent mine to be.
“One year I had Nicholas and his adviser. That was the Emperor of
Russia in big top-boots and white breeches, and a green coat on. I
gave him a good bit of mustachios—a little extra. He had a Russian
helmet hat on, with a pair of eagles on the top. It was one I bought.
I bought it cheap, for I only gave a shilling for it. I was offered five
or six for it afterwards, but I found it answer my purpose to keep. I
had it dressed up this year. The other figure was the devil. I made
him of green tinsel paper cut out like scale armour, and pasted on to
his legs to make it stick tight. He had a devil’s mask on, and I made
him a pair of horns out of his head. Over them was a banner. I was
told what to do to make the banner, for I had the letters writ out
first, and then I cut ’em out of tinsel paper and stuck them on to
glazed calico. On this banner was these words:—

‘What shall I do next?’


‘Why, blow your brains out!’

That took immensely, for the people said ‘That is wery well.’ It was
the time the war was on. I dare say I took between 3l. and 4l. that
time. There was three of us rowed in with it, so we got a few
shillings a-piece.
“The best one I ever had was the trial of Guy Fawkes. There was
four figures, and they was drawn about in a horse and cart. There
was Guy Fawkes, and two soldiers had hold of him, and there was
the king sitting in a chair in front. The king was in a scarlet velvet
cloak, sitting in an old arm-chair, papered over to make it look
decent. There was green and blue paper hanging over the arms to
hide the ragged parts of it. The king’s cloak cost sevenpence a-yard,
and there was seven of these yards. He had a gilt paper crown and a
long black wig made out of some rope. His trunks was black and
crimson, and he had blue stockings and red boots. I made him up
out of my own head, and not from pictures. It was just as I thought
would be the best way to get it up, out of my own head. I’ve seed
the picture of Guy Fawkes, because I’ve got a book of it at home. I
never was no scholar, not in the least. The soldiers had a breastplate
of white steel paper, and baggy knee-breeches, and top boots. They
had a big pipe each, with a top cut out of tin. Their helmets was the
same as in the pictures, of steel paper, and a kind of a dish-cover
shape, with a peak in front and behind. Guy was dressed the same
kind as he was this year, with a black velvet dress and red cloak, and
red boots turning over at top, with lace sewed on. I never made any
of my figures frightful. I get ’em as near as I can to the life like.
“I reckon that show was the best as I ever had about. I done very
well with it. They said it was a very good sight, and well got up. I
dare say it cost me, with one thing and another, pretty nigh 4l. to
get up. There was two of us to shove, me and my brother. I know I
had a sovereign to myself when it was over, besides a little bit of
merry-making.
“This year I had the apprehension of Guy Fawkes by Lord Suffolk
and Monteagle. I’ve followed up the hist’ry as close as I can. Next
year I shall have him being burnt, with a lot of faggits and things
about him. This year the figures cost about 3l. getting up. Fawkes
was dressed in his old costume of black velvet and red boots. I
bought some black velvet breeches in Petticoat-lane, and I gave 1s.
9d. for the two pair. They was old theatrical breeches. Their
lordships was dressed in gold scale-armour like, of cut-out paper
pasted on, and their legs imitated steel. They had three-corner
cock’d hats, with white feathers in. I always buy fierce-looking
masks with frowns, but one of them this year was a smiling—Lord
Monteagle, I think. I took the figures as near as I can form from a
picture I saw of Guy Fawkes being apprehended. I placed them
figures in a horse and cart, and piled them up on apple-chests to the
level of the cart, so they showed all, their feet and all. I bind the
chests with a piece of table-cover cloth. The first day we went out
we took 2l. 7s., and the second we took 1l. 17s., and the last day we
took 2l. 1s. We did so well the third day because we went into the
country, about Tottenham and Edmonton. They never witnessed
such a thing down them parts. The drummer what I had with me
was a blind man, and well known down there. They call him Friday,
because he goes there every Friday, so what they usually gave him
we had. Our horse was blind, so we was obliged to have one to lead
him in front and another to lead the blind drummer behind. We paid
the drummer 16s. for the three days. We paid for two days 10s., and
the third one most of it came in, and we all went shares. It was a
pony more than a horse. I think we got about a 1l. a-piece clear,
when we was done on the Friday night. It took me six weeks getting
up in my leisure time. There was the Russian bear in front. He wore
a monkey dress, the same as in the pantomimes, and that did just
as well for a bear. I painted his face as near as I could get it, to
make it look frightful.
“When I’m building up a guy we first gits some bags and things, and
cut ’em out to the shape of the legs and things, and then sew it up.
We sew the body and arms and all round together in one. We puts
two poles down for the legs and then a cross-piece at the belly and
another cross-piece at the shoulder, and that holds ’em firm. We fill
the legs with sawdust, and stuff it down with our hands to make it
tight. It takes two sacks of sawdust for three figures, but I generally
have it give to me, for I know a young feller as works at the wood-
chopping. We stand ’em up in the room against the wall, whilst we
are dressing them. We have lots of chaps come to see us working at
the guys. Some will sit there for many hours looking at us. We stuff
the body with shavings and paper and any sort of rubbish. I sew
whatever is wanted myself, and in fact my fingers is sore now with
the thimble, for I don’t know how to use a thimble, and I feel
awkward with it. I design everything and cut out all the clothes and
the painting and all. They allow me 5s. for the building. This last
group took me six weeks,—not constant, you know, but only lazy
time of a night. I lost one or two days over it, that’s all.
“I think there was more Guy Fawkeses out this year than ever was
out before. There was one had Guy Fawkes and Punch and a Clown
in a cart, and another was Miss Nightingale and two soldiers. It was
meant to be complimentary to that lady, but for myself I think it
insulting to bring out a lady like that as a guy, when she’s done good
to all.
“They always reckon me to be about the first hand in London at
building a guy. I never see none like them, nor no one else I don’t
think. It took us two quire of gold paper and one quire of silver
paper to do the armour and the banner and other things. The gold
paper is 6d. a-sheet, and the silver is 1d. a sheet. It wouldn’t look so
noble if we didn’t use the gold paper.
“This year we had three clowns with us, and we paid them 3s. a-day
each. I was dressed up as a clown, too. We had to dance about, and
joke, and say what we thought would be funny to the people. I had
a child in my arms made of a doll stuffed with shavings, and made
to represent a little boy. It was just to make a laugh. Every one I
went up to I told the doll to ask their uncle or their aunt for a
copper. I had another move, too, of calling for ‘Bill Bowers’ in the
crowd, and if I got into any row, or anything, I used to call to him to
protect me. We had no time to say much, for we kept on moving,
and it loses time to talk.
“We took the guy round Goswell-road and Pentonville the first day,
and on the second we was round Bethnal-green way, among the
weavers. We went that way for safety the second day, for the police
won’t interrupt you there. The private houses give the most. They
very seldom give more than a penny. I don’t suppose we got more
than 3s. or 4s. in silver all the three days.
“Sometimes we have rough work with the Irish going about with
guys. The ‘No Popery’ year there was several rows. I was up at
Islington-gate, there, in the Lower-road, and there’s loads of Irish
live up there, and a rough lot they are. They came out with sticks
and bricks, and cut after us. We bolted with the guy. If our guy
hadn’t been very firm, it would have been jolted to bits. We always
nailed straps round the feet, and support it on rails at the waist, and
lashed to the sides. We bolted from this Irish mob over Islington-
green, and down John-street into Clerkenwell. My mate got a nick
with a stone just on the head. It just give him a slight hurt, and
drawed the blood from him. We jumped up in the donkey-cart and
drove off.
“There was one guy was pulled out of the cart this year, down by
Old Gravel lane, in the Ratcliff-highway. They pulled Miss Nightingale
out of the cart and ran away with her, and regular destroyed the two
soldiers that was on each side of her. Sometimes the cabmen lash at
the guys with their whips. We never say anything to them, for fear
we might get stopped by the police for making a row. You stand a
chance of having a feather knocked off, or such-like, as is attached
to them.
“There’s a lot of boys goes about on the 5th with sticks, and make a
regular business of knocking guys to pieces. They’re called guy-
smashers. They don’t come to us, we’re too strong for that, but they
only manage the little ones, as they can take advantage of. They do
this some of them to take the money the boys have collected. I have
had regular prigs following my show, to pick the pockets of those
looking on, but as sure as I see them I start them off by putting a
policeman on to them.
“When we’re showing, I don’t take no trouble to invent new rhymes,
but stick to the old poetry. There’s some do new songs. I usually
sing out,—
‘Gentlefolks, pray
Remember this day;
’Tis with kind notice we bring
The figure of sly
And villanous Guy,
Who wanted to murder the king.
By powder and store,
He bitterly swore,
As he skulk’d in the walls to repair,
The parliament, too,
By him and his crew,
Should all be blowed up in the air.

But James, very wise,


Did the Papists surprise,
As they plotted the cruelty great;
He know’d their intent,
So Suffolk he sent
To save both kingdom and state.
Guy Fawkes he was found
With a lantern underground,
And soon was the traitor bound fast:
And they swore he should die,
So they hung him up high,
And burnt him to ashes at last.
So we, once a-year,
Come round without fear,
To keep up remembrance of this day;
While assistance from you
May bring a review
Of Guy Fawkes a-blazing away.

So hollo, boys! hollo, boys!


Shout and huzza;
So hollo, boys! hollo, boys!
Keep up this day!
Keep up this day!
So hollo, boys! hollo, boys!
And make the bells ring!
Down with the Pope, and God save the Queen!’

“It used to be King, but we say Queen now, and though it don’t
rhyme, it’s more correct.
“It’s very seldom that the police say anything to us, so long as we
don’t stop too long in the gangway not to create any mob. They join
in the fun and laugh like the rest. Wherever we go there is a great
crowd from morning to night.
“We have dinner on Guy Fawkes’ days between one and two. We go
to any place where it’s convenient for us to stop at, generally at
some public-house. We go inside, and leave some of the lads to look
after the guy outside. We always keep near the window, where we
can look out into the street, and we keep ourselves ready to pop out
in a minute if anybody should attack the guy. We generally go into
some by-way, where there ain’t much traffic. We never was
interrupted much whilst we was at dinner, only by boys chucking
stones and flinging things at it; and they run off as soon as we come
out.
“There’s one party that goes out with a guy that sells it afterwards.
They stop in London for the first two days, and then they work their
way into the country as far as Sheerness, and then they sells the
guy to form part of the procession on Lord-mayor’s day. It’s the
watermen and ferrymen mostly buy it, and they carry it about in a
kind of merriment among themselves, and at night they burn it and
let off fireworks. They don’t make no charge for coming to see it
burnt, but it’s open to the air and free to the public.
“None of the good guys taken about on the 5th are burnt at night,
unless some gentlemen buy them. I used to sell mine at one time to
the Albert Saloon. Sometimes they’d give me 15s. for it, and
sometimes less, according to what kind of a one I had. Three years,
I think, I sold it to them. They used to burn it at first in the gardens
at the back, but after they found the gardens fill very well without it,
so they wouldn’t have any more.
“I always take the sawdust and shavings out of my guys, and save
the clothes for another year. The clothes are left in my possession to
be taken care of. I make a kind of private bonfire in our yard with
the sawdust and shavings, and the neighbours come there and have
a kind of a spree, and shove one another into the fire, and kick it
about the yard, and one thing and another.
“When I am building the guy, I begin about six weeks before 5th of
November comes, and then we subscribe a shilling or two each and
buy such things as we wants. Then, when we wants more, I goes to
my pals, who live close by, and we subscribe another shilling or
sixpence each, according to how we gets on in the day. Nearly all
those that take out guys are mostly street traders.
“The heaviest expense for any guy I’ve built was 4l. for one of four
figures.”

Guy Fawkes (Boy).


“I always go out with a Guy Fawkes every year. I’m seventeen years
old, and I’ve been out with a guy ever since I can remember, except
last year; I didn’t then, because I was in Middlesex Hospital with an
abscess, brought on by the rheumatic fever. I was in the hospital a
month. My father was an undertaker; he’s been dead four months:
mother carries on the trade. He didn’t like my going out with guys,
but I always would. He didn’t like it at all, he used to say it was a
disgrace. Mother didn’t much fancy my doing it this year. When I
was a very little un, I was carried about for a guy. I couldn’t a been
more than seven years old when I first begun. They put paper-
hangings round my legs—they got it from Baldwin’s, in the
Tottenham Court-road; sometimes they bought, and sometimes got
it give ’em; but they give a rare lot for a penny or twopence. After
that they put me on a apron made of the same sort of paper—
showy, you know—then they put a lot of tinsel bows, and at the
corners they cut a sort of tail like there is to farriers’ aprons, and it
look stunnin’; then they put on my chest a tinsel heart and rosettes;
they was green and red, because it shows off. All up my arms I had
bows and things to make a show-off. Then I put on a black mask
with a little red on the cheek, to make me look like a devil: it had
horns, too. Always pick out a devil’s mask with horns: it looks fine,
and frightens the people a’most. The boy that dressed me was a
very clever chap, and made a guy to rights. Why, he made me a
little guy about a foot high, to carry in my lap—it was piecings of
quilting like, a sort of patch-work all sewn together,—and then he
filled it with saw-dust, and made a head of shavings. He picked the
shavings small, and then sewed ’em up in a little bag; and then he
painted a face, and it looked wery well; and he made it a little tinsel
bob-tail coat, and a tinsel cap with two feathers on the top. It was
made to sit in a chair; and there was a piece of string tied to each of
the legs and the arms, and a string come behind; and I used to pull
it, and the legs and arms jumped up. I was put in a chair, and two
old broom-handles was put through the rails, and then a boy got in
front, and another behind, and carried me off round Holborn way in
the streets and squares. Every now and then they put me down
before a window; then one of ’em used to say the speech, and I
used all the time to keep pulling the string of my little guy, and it
amused the children at the winders. After they’d said the speech we
all shouted hurrah! and then some of them went and knocked at the
door and asked ‘Please to remember the guy;’ and the little children
brought us ha’pence and pence; and sometimes the ladies and
gentlemen chucked us some money out of the winder. At last they
carried me into Russell-square. They put me down before a
gentleman’s house and begun saying the speech: while they was
saying it, up comes a lot o’ boys with sticks in their hands. One of
our chaps knowed what they was after, and took the little guy out of
my hand, and went on saying the speech. I kept all on sitting still.
After a bit one of these ’ere boys says, ‘Oh, it’s a dead guy; let’s
have a lark with it!’ and then one of ’em gives me a punch in the eye
with his fist, and then snatched the mask off my face, and when
he’d pulled it off he says, ‘Oh, Bill, it’s a live un!’ We was afraid we
should get the worst of it, so we run away round the square. The
biggest one of our lot carried the chair. After we’d run a little way
they caught us again, and says, ‘Now then, give us all your money;’
with that, some ladies and gentlemen that see it all came up to ’em
and says, ‘If you don’t go we’ll lock you up;’ and so they let us go
away. And so we went to another place where they sold masks; and
we bought another. Then they asked me to be guy again, but I
wouldn’t, for I’d got a black-eye through it already. So they got
another to finish out the day. When we got home at night we shared
2s. a-piece. There was five of us altogether; but I think they
chisselled me. I know they got a deal more than that, for they’d had
a good many sixpences and shillings. People usen’t to think much of
a shilling that time a-day, because there wasn’t any but little guys
about then; but I don’t know but what the people now encourage
little guys most, because they say that the chaps with the big ones
ought to go to work.
“Next year I was out with a stuffed guy. They wanted me to be guy
again, because I wasn’t frightened easy, and I was lightish; but I
told ’em ‘No, I’ve had enough of being guy; I don’t be guy any
more: besides, I had such fine money for getting a whack in the
eye!’ We got on pretty well that year; but it gets wus and wus every
year. We got hardly anything this year; and next I don’t suppose we
shall get anything at all. These chaps that go about pitchin’ into guys
we call ‘guy smashers;’ but they don’t do it only for the lark of
smashing the guys: they do it for the purpose of taking the boys’
money away, and sometimes the clothes. If one of ’em has a hole in
his boots, and he sees a guy with a good pair on, he pretty soon
pulls ’em of the guy and hooks it off with ’em.
“After I’d been out with guys for three or four years, I got big
enough to go to work, and I used to go along with my brother and
help him at a coal-shed, carrying out coals. I was there ten months,
and then one night—a bitter cold night, it was freezing hard—we had
a naphtha lamp to light in the shop; and as me and my brother was
doing it, either a piece of the match dropped in or else he poured it
over, I can’t say which, but all at once it exploded and blowed me
across the road and knocked him in the shop all a-fire; and I was all
a-fire, too—see how it’s burnt my face and the hand I held the
lucifer in. A woman run out of the next shop with some wet sacks,
and throw’d ’em upon me, but it flared up higher then: water don’t
put it out, unless it’s a mass of water like a engine. Then a milkman
run up and pulled off his cape and throwed it over me, and that put
it out; then he set me up, and I run home, though I don’t know how
I got there, and for two days after I didn’t know anybody. Another
man ran into the shop and pulled out my brother, and we was both
taken to the University Hospital. Two or three people touched me,
and the skin came off on their hands, and at nine o’clock the next
morning my brother died. When they took me to the hospital they
had no bed for me, and so they sent me home again, and I was
seven months before I got well. But I’ve never been to say well
since, and I shall never be fit for hard work any more.
“The next year I went out with a guy again, and I got on pretty well;
and so I’ve done every year since, except last. I’ve had several little
places since I got burnt, but they haven’t lasted long.
“This year I made a stunning guy. First of all I got a pair of my own
breeches—black uns—and stuffed ’em full of shavings. I tied the
bottoms with a bit of string. Then I got a black coat—that belonged
to another boy—and sewed it all round to the trousers; then we
filled that with shavings, and give him a good corporation. Then we
got a block, sich as the milliners have, and shoved that right in the
neck of the coat, and then we shoved some more shavings all round,
to make it stick in tight; and when that was done it looked just like a
dead man. I know something about dead men, because my father
was always in that line. Then we got some horsehair and some glue,
and plastered the head all round with glue, and stuck the horse-hair
on to imitate the hair of a man; then we put the mask on: it was a
twopenny one—they’re a great deal cheaper than they used to be,
you can get a very good one now for a penny—it had a great big
nose, and it had two red horns, black eyebrows, and red cheeks. I
like devils, they’re so ugly. I bought a good-looking un two or three
years ago, and we didn’t get hardly anything, the people said, ‘Ah!
it’s too good-looking; it don’t frighten us at all.’ Well, then, after we
put on his mask we got two gloves, one was a woollen un, and the
other a kid un, and stuffed them full of shavings, and tied ’em down
to the chair. We didn’t have no lantern, ’cos it keeps on falling out of
his hands. After that we put on an old pair of lace-up boots. We tied
’em on to the legs of the breeches. The feet mostly twistes round,
but we stopped that; we shoved a stick up the leg of his breeches,
and the other end into the boot, and tied it, and then it couldn’t
twist round very easy. After that we put a paper hanging-cap on his
head; it was silk-velvet kind of paper, and decorated all over with
tinsel bows. His coat we pasted all over with blue and green tinsel
bows and pictures. They was painted theatrical characters, what we
buy at the shop a ha’penny a sheet plain, and penny a sheet
coloured: we bought ’em plain, and coloured them ourselves. A-top
of his hat we put a hornament. We got some red paper, and cut it
into narrow strips, and curled it with the blade of the scissors, and
stuck it on like a feather. We made him a fine apron of hanging-
paper, and cut that in slips up to his knees, and curled it with the
scissors, the same as his feather, and decorated it with stars, and
bows, and things, made out of paper, all manner of colours, and
pieces of tinsel. After we’d finished the guy we made ourselves
cock’d hats, all alike, and then we tied him in a chair, and wrote on
his breast, ‘Villanous Guy.’ Then we put two broomsticks under the
chair and carried him out. There was four of us, and the two that
wasn’t carrying, they had a large bough of a tree each, with a knob
at the top to protect the guy. We started off at once, and got into
the squares, and put him in front of the gentlemen’s houses, and
said this speech:—
‘Pray, gentlefolks, pray
Remember this day,
At which kind notice we bring
This figure of sly,
Old, villanous Guy,
He wanted to murder the king.

With powder in store,


He bitterly swore
By him in the vaults to compare,
By him and his crew,
And parliament, too,
Should all be blow’d up in the air.

So please to remember
The fifth of November,
The gunpowder treason and plot,
I see no reason
Why gunpowder treason
Should ever be forgot.

So hollo, boys! hollo, boys!


Shout out the day!
Hollo, boys! hollo, boys!
Hollo, Hurrah!’

“After we’d finished our speech in one of the squares, and hollowed
Hurrah! the beadle come out, and said he’d give us the stick about
our backs, and the guy too, if we didn’t go away. So we went away,
and got into Russell-square and Bedford-square; but there was such
a lot of small guys out, that we did worse than ever we’d done
before. When we was in Southampton-street, Holborn, I finished the
speech with ‘Down with the Pope, and God save the Queen;’ so four
shoe-black boys come up, and says, says they, ‘What do you say,
Down with the Pope and God save the Queen for?’ And I says, ‘I
didn’t mean no harm of it.’ With that they makes use of some bad
language, and told me they’d smash my head and the guy’s too; and
they was going to do it, when up comes a boy that I knew, and I
says to him, ‘They’re going to knock me about;’ so he says, ‘No they
won’t;’ so then the boys made their reply, and said they would. So I
told ’em they was very fast about fighting, I’d fight one of them; so
with that they all got ready to pitch upon me: but when they see
this other boy stuck to me, they went off, and never struck a blow.
When we got home I opened the money-box and shared the money;
one had 5d., and two had 4½d. each, and I had 7d. because I said
the speech. At night we pulled him all to pieces, and burnt his
stuffing, and let off some squibs and crackers. I always used to
spend the money I got guying on myself. I used to buy sometimes
fowls, because I could sell the eggs. There is some boys that take
out guys as do it for the sake of getting a bit of bread and butter,
but not many as I knows of.
“It don’t cost much to make a guy. The clothes we never burns—
they’re generally too good: they’re our own clothes, what we wears
at other times; and when people burn a guy they always pull off any
of the things that’s of use fust; but mostly the guy gets pulled all to
pieces, and only the shavings gets burnt.”

An Old Street Showman.


A short, thick-set man, with small, puckered-up eyes, and dressed in
an old brown velveteen shooting-jacket, gave me an account of
some bygone exhibitions of the galantee show.
“My father was a soldier,” he said, “and was away in foreign parts,
and I and a sister lived with my mother in St. Martin’s workhouse. I
was fifty-five last New-year’s-day. My uncle, a bootmaker in St.
Martin’s-lane, took my mother out of the workhouse, that she might
do a little washing, and pick up a living for herself; and we children
went to live with my grandfather, a tailor. After his death, and after
many changes, we had a lodging in the Dials, and there ——, the
sweep, coaxed me with pudding one day, and encouraged me so
well, that I didn’t like to go back to my mother; and at last I was
’prenticed to him from Hatton-Garden on a month’s trial, and I liked
chimley-sweeping for that month; but it was quite different when I
was regularly indentured. I was cruelly-treated then, and poorly fed,
and had to turn out barefooted between three and four many a
morning in frost and snow. In first climbing the chimleys, a man
stood beneath me, and pushed me up, telling me how to use my
elbows and knees, and if I slipped, he was beneath me and ketched
me, and shoved me up again. The skin came off my knees and
elbows; here’s the marks now, you see. I suffered a great deal, as
well as Dan Duff, a fellow-sweep, a boy that died. I’ve been to Mrs.
Montague’s dinner in the Square on the 1st of May, when I was a
boy-sweep. It was a dinner in honour of her son having been stolen
away by a sweep.” (The man’s own words.) “I suppose there were
more than three hundred of us sweeps there, in a large green, at
the back of her house. I run away from my master once, but was
carried back, and was rather better used. My master then got me
knee and ankle-pads, and bathed my limbs in salt and water, and I
managed to drag on seven sorrowful years with him. I was glad to
be my own man at last, and I cut the sweep-trade, bought pandean
pipes, and started with an organ-man, as his mate. I saved money
with the organ-man and then bought a drum. He gave me five
shillings a-week, and my wittles and drink, washing and lodging; but
there wasn’t so much music afloat then. I left the music-man and
went out with ‘Michael,’ the Italy bear. Michael was the man’s name
that brought over the bear from somewhere abroad. He was a Italy
man; and he used to beat the bear, and manage her; they called her
Jenny; but Michael was not to say roughish to her, unless she was
obstropelous. If she were, he showed her the large mop-stick, and
beat her with it—hard sometimes—specially when she wouldn’t let
the monkey get a top on her head; for that was a part of the
performance. The monkey was dressed the same as a soldier, but
the bear had no dress but her muzzle and chain. The monkey (a
clever fellow he was, and could jump over sticks like a Christian) was
called Billy. He jumped up and down the bear, too, and on his
master’s shoulders, where he set as Michael walked up and down
the streets. The bear had been taught to roll and tumble. She rolled
right over her head, all round a stick, and then she danced round
about it. She did it at the word of command. Michael said to her,
‘Round and round again.’ We fed her on bread, a quartern-loaf every
night after her work in half-a-pail of water, the same every morning;
never any meat—nothing but bread, boiled ’tatoes, or raw carrots:
meat would have made her savage. The monkey was fed upon nuts,
apples, gingerbread, or anything. Besides them we had two dancing-
dogs. The bear didn’t like them, and they were kept on one side in
performing. The dogs jumped through hoops, and danced on their
hind legs; they’re easyish enough trained. Sometimes the butchers
set bull-dogs, two or three at a time, at Jenny; and Michael and me
had to beat them off as well as the two other men that we had with
us. Those two men collected the money, and I played the pipes and
drum, and Michael minded the bear and the dogs and monkey. In
London we did very well. The West-end was the best. Whitechapel
was crowded for us, but only with ha’pence. I don’t know what
Michael made, but I had seven shillings a-week, with my wittles and
lodging. Michael done well. We generally had twenty to thirty
shillings every night in ha’pence, and used to give twenty-one
shillings of it for a one-pound note; for they was in then. When
we’ve travelled in the country, we’ve sometimes had trouble to get
lodgings for the bear. We’ve had to sleep in outhouses with her, and
have sometimes frightened people that didn’t know as we was there,
but nothing serious. Bears is well-behaved enough if they ain’t
aggravated. Perhaps no one but me is left in England now what
properly understands a dancing-bear.
“Jenny wasn’t ever baited, but offers was made for it by sporting
characters.
“The country was better than London, when the weather allowed;
but in Gloucester, Cheltenham, and a good many places, we weren’t
let in the high streets.
“The gentlefolk in the balconies, both in town and country, where
they had a good sight, were our best friends.
“It’s more than thirty years ago—yes, a good bit more now; at
Chester races, one year, we were all taken, and put into prison: bear,
and dogs, and musicianer, and all—every one—because we played a
day after the races; that was Saturday.
“We were all in quod until Monday morning. I don’t know how the
authorities fed the bear. We were each in a separate cell, and I had
bread and cheese, and gruel.
“On Monday morning we were discharged, and the bear was shot by
the magistrate’s orders. They wanted to hang poor Jenny at first, but
she was shot, and sold to the hairdressers.
“I couldn’t stay to see her shot, and had to go into an alehouse on
the road. I don’t know what her carcase sold for. It wasn’t very fat.
“Michael and me then parted at Chester, and he went home rich to
Italy, taking his monkey and dogs with him, I believe.
“He lived very careful, chiefly on rice and cabbage, and a very little
meat with it, which he called ‘manesta.’ He was a very old man. I
had ‘manesta’ sometimes, but I didn’t like it much. I drummed and
piped my way from Chester to London, and there took up with
another foreigner, named Green, in the clock-work-figure line.
“The figures were a Turk called Bluebeard, a sailor, a lady called
Lady Catarina, and Neptune’s car, which we called Nelson’s car as
well; but it was Neptune’s car by rights.
“These figures danced on a table, when taken out of a box. Each
had its own dance when wound up.
“First came my Lady Catarina. She, and the others of them, were full
two feet high. She had a cork body, and a very handsome silk dress,
or muslin, according to the fashion, or the season. Black in Lent,
according to what the nobility wore.
“Lady Catarina, when wound up, danced a reel for seven minutes,
the sailor a hornpipe, and Bluebeard shook his head, rolled his eyes,
and moved his sword, just as natural as life. Neptune’s car went
either straight or round the table, as it was set.
“We often showed our performances in the houses of the nobility,
and would get ten or twelve shillings at a good house, where there
were children.
“I had a third share, and in town and country we cleared fifty
shillings a week, at least, every week, among the three of us, after
all our keep and expenses were paid.
“At Doncaster races we have taken three pounds in a-day, and four
pounds at Lincoln races.
“Country, in summer, is better than town. There’s now no such
exhibition, barring the one I have; but that’s pledged. It cost twenty
pounds at Mr. ——’s for the four figures without dress. I saved
money, which went in an illness of rheumatic gout. There’s no bears
at all allowed now. Times are changed, and all for the worser. I stuck
to the clock-work concern sixteen years, and knows all parts of the
country—Ireland, Scotland, Guernsey, Jersey, and the Isle of Wight.
“A month before Christmas we used to put the figures by, for the
weather didn’t suit; and then we went with a galantee show of a
magic lantern. We showed it on a white sheet, or on the ceiling, big
or little, in the houses of the gentlefolk, and the schools where there
was a breaking-up. It was shown by way of a treat to the scholars.
There was Harlequin, and Billy Button, and such-like. We had ten
and sixpence and fifteen shillings for each performance, and did very
well indeed. I have that galantee show now, but it brings in very
little.
“Green’s dead, and all in the line’s dead, but me. The galantee show
don’t answer, because magic lanterns are so cheap in the shops.
When we started, magic lanterns wasn’t so common; but we can’t
keep hold of a good thing in these times. It was a reg’lar thing for
Christmas once—the galantee shows.
“I can make, in a holiday time, twenty shillings a-week; but that’s
only at holiday times, and is just a mere casualty a few times a year.
“I do other jobs, when I can get ’em—at other times, I delivers bills,
carries boards, and helps at funerals.”

The Chinese Shades.


“The proper name of my exhibition,” said a showman of this class to
me, “is Lez Hombres, or the shades; that’s the proper name for it,
for Baron Rothschild told me so when I performed before him. We
calls it the Chinese galantee show. It was invented over there with
the Chinese, and some travellers went over there and see them
doing it, and they come over here and tell us about it. They didn’t
do it as we do, you know. As for doing pieces, we lick them out of
the field. Them only did the shadows, we do a piece with ’em.
“I should say, sir,—let me calculate—it is about twenty-six years
since the ombres first come out. Reduce it if you like, but that’s the
time. Thomas Paris was the first as come out with them. Then Jim
Macklin, and Paul Herring the celebrated clown, and the best
showman of Punch in the world for pantomime tricks—comic
business, you know, but not for showing in a gentleman’s house—
was the next that ever come out in the streets with the Chinese
galantee show. I think it was his own ingenuity that first gave him
the notion. It was thoughts of mind, you know,—you form the
opinion in your own mind, you know, by taking it from the Chinese.
They met a friend of theirs who had come from China, and he told
him of the shadows. One word is as good as fifty, if it’s a little
grammatical—sound judgment. When it first come out, he began
with the scene called ‘Mr. Jobson the Cobbler,’ and that scene has
continued to be popular to the present day, and the best scene out.
He did it just equally the same as they do it now, in a Punch-and-
Judy frame, with a piece of calico stretched in front, and a light
behind to throw the shadows on the sheet.
“Paul Herring did excellent well with it—nothing less than 30s. or 2l.
a-night. He didn’t stop long at it, because he is a stage clown, and
had other business to attend to. I saw him the first time he
performed. It was in the Waterloo-road, and the next night I were
out with one of my own. I only require to see a thing once to be
able to do it; but you must have ingenuity, or it’s no use
whatsumdiver. Every one who had a Punch-and-Judy frame took to
it; doing the regular business in the day and at night turning to the
shadows. In less than a week there were two others out, and then
Paul Herring cut it. He only done it for a lark. He was hard up for
money and got it.
“I was the first that ever had a regular piece acted in his show. I
believe there’s nobody else as did, but only them that’s copied me.
They come and follow me, you understand, and copied me. I am the
author of ‘Cobbler Jobson,’ and ‘Kitty biling the Pot, or the
Woodchopper’s Frolic.’ There’s ‘Billy Button’s journey to Brentford on
horseback, and his favorite servant, Jeremiah Stitchem, in want of a
situation.’ I’m the author of that, too. It’s adapted from the
equestrian piece brought out at Astley’s. I don’t know who
composed ‘the Broken Bridge.’ It’s too far gone by to trace who the
first author is, but it was adapted from the piece brought out
formerly at Drury-lane Theatre. Old ancient gentlemen has told me
so who saw it, when it was first brought out, and they’re old enough
to be my grandfather. I’ve new revised it.
“We in general goes out about 7 o’clock, because we gets away from
the noisy children—they place them to bed, and we gets respectable
audiences. We choose our places for pitching: Leicester-square is a
very good place, and so is Islington, but Regent-street is about the
principal. There’s only two of us about now, for it’s dying away.
When I’ve a mind to show I can show, and no mistake, for I’m
better now than I was twenty years ago.
“‘Kitty biling the Pot, or the Woodchopper’s Frolic,’ is this. The
shadow of the fireplace is seen with the fire alight, and the smoke is
made to go up by mechanism. The woodchopper comes in very
hungry and wants his supper. He calls his wife to ask if the leg of
mutton is done. He speaks in a gruff voice. He says, ‘My wife is very
lazy, and I don’t think my supper’s done. I’ve been chopping wood
all the days of my life, and I want a bullock’s head and a sack of
potatoes.’ The wife comes to him and speaks in a squeaking voice,
and she tells him to go and chop some more wood, and in half-an-
hour it will be ready. Exaunt. Then the wife calls the daughter Kitty,
and tells her to see that the pot don’t boil over; and above all to be
sure and see that the cat don’t steal the mutton out of the pot. Kitty
says, ‘Yes, mother, I’ll take particular care that the mutton don’t steal
the cat out of the pot.’ Cross-questions, you see—comic business.
Then mother says, ‘Kitty, bring up the broom to sweep up the room,’
and Kitty replies, ‘Yes, mummy, I’ll bring up the room to sweep up
the broom.’ Exaunt again. It’s regular stage business and cross-
questions. She brings up the broom, and the cat’s introduced whilst
she is sweeping. The cat goes Meaw! meaw! meaw! and Kitty gives
it a crack with the broom. Then Kitty gets the bellows and blows up
the fire. It’s a beautiful representation, for you see her working the
bellows, and the fire get up, and the sparks fly up the chimney. She
says, ‘If I don’t make haste the mutton will be sure to steal the cat
out of the pot.’ She blows the fire right out, and says, ‘Why, the fire’s
blowed the bellows out! but I don’t mind, I shall go and play at
shuttlecock.’ Child like, you see. Then the cat comes in again, and
says, Meaw! meaw! and then gets up and steals the mutton. You see
her drag it out by the claw, and she burns herself and goes, spit!
spit! Then the mother comes in and sees the fire out, and says,
‘Where my daughter? Here’s the fire out, and my husband’s coming
home, and there isn’t a bit of mutton to eat!’ She calls ‘Kitty, Kitty!’
and when she comes, asks where she’s been. ‘I’ve been playing at
shuttlecock.’ The mother asks, ‘Are you sure the cat hasn’t stolen the
mutton.’ ‘Oh, no, no, mother,’ and exaunt again. Then the mother
goes to the pot. She’s represented with a squint, so she has one eye
up the chimney and another in the pot. She calls out, ‘Where’s the
mutton? It must be down at the bottom, or it has boiled away.’ Then
the child comes in and says, ‘Oh! mother, mother, here’s a great he-
she-tom cat been and gone off with the mutton.’ Then the mother
falls down, and calls out, ‘I shall faint, I shall faint! Oh! bring me a
pail of gin.’ Then she revives, and goes and looks in the pot again.
It’s regular stage business, and if it was only done on a large scale
would be wonderful. Then comes the correction scene. Kitty comes
to her, and her mother says, ‘Where have you been?’ and Kitty says,
‘Playing at shuttlecock, mummy;’ and then the mother says, ‘I’ll give
you some shuttlecock with the gridiron,’ and exaunt, and comes back
with the gridiron; and then you see her with the child on her knee
correcting of her. Then the woodchopper comes in and wants his
supper, after chopping wood all the days of his life. ‘Where’s
supper?’ ‘Oh, a nasty big he-she-tom cat has been and stole the
mutton out of the pot.’ ‘What?’ passionate directly, you see. Then
she says, ‘You must put up with bread and cheese.’ He answers,
‘That don’t suit some people,’ and then comes a fight. Then Spring-
heeled Jack is introduced, and he carries off the fireplace and pot
and all. Exaunt. That’s the end of the piece, and a very good one it
was. I took it from Paris, and improved on it. Paris had no workable
figures. It was very inferior. He had no fire. It’s a dangerous concern
the fire is, for it’s done with a little bit of the snuff of a candle, and if
you don’t mind you go alight. It’s a beautiful performance.
“Our exhibition generally begins with a sailor doing a hornpipe, and
then the tight-rope dancing, and after that the Scotch hornpipe
dancing. The little figures regularly move their legs as if dancing, the
same as on the stage, only it’s more cleverer, for they’re made to do
it by ingenuity. Then comes the piece called ‘Cobbler Jobson.’ We call
it ‘the laughable, comic, and interesting scene of old Father Jobson,
the London cobbler; or, the old Lady disappointed of her Slipper.’ I
am in front, doing the speaking and playing the music on the
pandanean pipe. That’s the real word for the pipe, from the Romans,
when they first invaded England. That’s the first music ever
introduced into England, when the Romans first invaded it. I have to
do the dialogue in four different voices. There is the child, the
woman, the countryman, and myself, and there’s not many as can
do it besides me and another.
“The piece called Cobbler Jobson is this. It opens with the shadow of
a cottage on one side of the sheet, and a cobbler’s stall on the other.
There are boots and shoes hanging up in the windows of the
cobbler’s stall. Cobbler Jobson is supposed at work inside, and heard
singing:

‘An old cobbler I am,


And live in my stall;
It serves me for house,
Parlour, kitchen, and all.
No coin in my pocket,
No care in my pate,
I sit down at my ease,
And get drunk when I please.
Hi down, hi derry down.’

“Then he sings again:

‘Last night I took a wife,


And when I first did woo her,
I vowed I’d stick through life
Like cobblers’ wax unto her.
Hi down, derry down down down.’

“Then the figure of a little girl comes in and raps at the door: ‘Mr.
Jobson, is my mamma’s slipper done?’ ‘No, miss, it’s not done; but if
you’ll call in half-an-hour it shall be well done, for I’ve taken the
soles off and put the upper leathers in a pail to soak.’ ‘What, in a
pail?’ ‘Yes, my dear, without fail.’ ‘Then you won’t disappint.’ ‘No, my
dear, I’d sooner a pot than a pint.’ ‘Then I may depend?’ ‘Yes, and
you won’t have it.’ He says this aside, so the girl don’t hear him.
Then Jobson begins to sing again. He comes in front and works. You
see his lapstone and the hammer going. He begins to sing:
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like