Azure Data Factory Cookbook: Data Engineers Guide To Build and Manage ETL and ELT Pipelines With Data Integration, 2nd Edition Dmitry Foshin
Azure Data Factory Cookbook: Data Engineers Guide To Build and Manage ETL and ELT Pipelines With Data Integration, 2nd Edition Dmitry Foshin
com
https://textbookfull.com/product/azure-data-factory-cookbook-second-
edition-dmitry-foshin/
textbookfull.com
https://textbookfull.com/product/quick-start-guide-to-azure-data-
factory-azure-data-lake-server-and-azure-data-warehouse-1st-edition-
mark-beckner/
textbookfull.com
https://textbookfull.com/product/azure-data-factory-by-example-
practical-implementation-for-data-engineers-2nd-edition-richard-
swinbank/
textbookfull.com
https://textbookfull.com/product/advanced-environmental-exercise-
physiology-2nd-edition-stephen-s-cheung/
textbookfull.com
Routledge Handbook of Korean Politics and Public
Administration 1st Edition Chung-In Moon (Editor)
https://textbookfull.com/product/routledge-handbook-of-korean-
politics-and-public-administration-1st-edition-chung-in-moon-editor/
textbookfull.com
https://textbookfull.com/product/programming-kotlin-applications-
building-mobile-and-server-side-applications-with-kotlin-1st-edition-
brett-mclaughlin/
textbookfull.com
https://textbookfull.com/product/a-people-s-history-of-the-world-
chris-harman/
textbookfull.com
https://textbookfull.com/product/american-house-styles-a-concise-
guide-second-edition-john-milnes-baker/
textbookfull.com
Build ETL, Hybrid ETL, and ELT pipelines using ADF, Synapse Analytics,
Fabric and Databricks
Dmitry Foshin
Tonya Chernyshova
Dmitry Anoshin
Xenia Ireton
BIRMINGHAM—MUMBAI
Azure Data Factory Cookbook
Second Edition
Copyright © 2024 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in
any form or by any means, without the prior written permission of the publisher, except in the case of brief
quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information
presented. However, the information contained in this book is sold without warranty, either express or
implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any
damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products
mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee
the accuracy of this information.
ISBN 978-1-80324-659-8
www.packt.com
Contributors
I would like to express my heartfelt gratitude to my wife, Mariia, my parents, my brother, Ilya, and all my
family and friends who supported me and provided encouragement throughout the journey of producing this
book. Your unwavering support has been invaluable, and I am deeply grateful for your presence in my life.
Tonya Chernyshova is an experienced Data Engineer with over 10 years in the field, includ-
ing time at Amazon. Specializing in Data Modeling, Automation, Cloud Computing (AWS and
Azure), and Data Visualization, she has a strong track record of delivering scalable, maintainable
data products. Her expertise drives data-driven insights and business growth, showcasing her
proficiency in leveraging cloud technologies to enhance data capabilities.
Dmitry Anoshin is a data engineering leader with 15 years of experience working in business
intelligence, data warehousing, data integration, big data, cloud, and machine learning space
across North America and Europe.
He leads data engineering initiatives on a petabyte-scale data platform that was built using
cloud and big data technologies to support machine learning experiments, data science models,
business intelligence reporting, and data exchange with internal and external partners. He is also
responsible for handling privacy compliance and security-critical datasets.
Besides that work, he teaches a cloud computing course at the University of Victoria, Canada,
wherein he mentors high-school students in the CS faculty, and he also teaches people how to
land data jobs at Surfalytics.com. In addition, he is an author of analytics books and a speaker at
data-related conferences and user groups.
I want to thank my beautiful wife, Lana, and my kids, Vasily, Anna, and Michael, who give me the energy to
work, grow, and contribute to the data industry.
Xenia Ireton is a Senior Software Engineer at Microsoft. She has extensive knowledge in building
distributed services, data pipelines and data warehouses.
About the reviewers
Deepak Goyal is a certified Azure Cloud Solution Architect, and he posseses over fifteen years
of expertise in Designing, Developing and Managing Enterprise Cloud solutions. He is also a Big
Data Certified professional and a passionate Cloud advocate.
Saikat Dutta is an Azure Data Engineer with over 13 years of experience. He has worked ex-
tensively with Microsoft Data products, from SQL Server 2000 to ADF, Synapse Pipelines, and
MS Fabric. His career is shaped by various employers. The highlights of his career have been
adaptability and a commitment to staying at the forefront of technology.
This is his first book review, wherein he has tried to provide practical insights into Microsoft Data
products and tried to help the book become more than a cookbook. He has also contributed to a
popular Data Newsletter and blog to share knowledge in the tech community.
Excited about the book’s impact, I look forward to continuing my journey in the evolving field
of Data Engineering.
I express gratitude to my family for their unwavering support during the review process. Balancing work and
family, especially with a younger kid, wouldn’t have been possible without their cooperation.
Join our community on Discord
Join our community’s Discord space for discussions with the authors and other readers:
https://discord.gg/U229qmBmT3
Table of Contents
Preface xix
There’s more... • 18
See also • 18
Creating a data factory using PowerShell �������������������������������������������������������������������������� 19
Getting ready • 19
How to do it… • 19
How it works... • 21
There’s more... • 22
See also • 22
Using templates to create ADF pipelines ��������������������������������������������������������������������������� 22
Getting ready • 22
How to do it... • 22
How it works... • 24
See also • 24
Creating an Azure Data Factory using Azure Bicep ������������������������������������������������������������ 25
Getting ready • 25
How to do it... • 25
How it works... • 26
There’s more... • 27
See also • 27
How it works… • 49
There’s more… • 50
Using the ForEach and Filter activities ������������������������������������������������������������������������������� 51
Getting ready • 51
How to do it… • 51
How it works… • 55
Chaining and branching activities within a pipeline �������������������������������������������������������� 56
Getting ready • 56
How to do it… • 56
There’s more… • 59
Using the Lookup, Web, and Execute Pipeline activities ��������������������������������������������������� 60
Getting ready • 61
How to do it… • 65
How it works… • 69
There’s more… • 70
See also • 70
Creating event-based pipeline triggers ����������������������������������������������������������������������������� 70
Getting ready • 70
How to do it… • 71
How it works… • 75
There’s more… • 76
See also • 77
How to do it… • 88
How it works… • 94
There’s more… • 94
Loading data to Azure Synapse Analytics using Azure Data Studio ���������������������������������� 95
Getting ready • 95
How to do it… • 96
How it works… • 101
There’s more… • 102
Loading data to Azure Synapse Analytics using bulk load ����������������������������������������������� 102
Getting ready • 102
How to do it… • 103
How it works… • 108
Pausing/resuming an Azure Synapse SQL pool from Azure Data Factory ������������������������ 109
Getting ready • 109
How to do it… • 109
How it works… • 114
There’s more… • 114
Working with Azure Purview using Azure Synapse ���������������������������������������������������������� 115
Getting ready • 115
How to do it… • 116
How it works… • 123
There’s more... • 123
Copying data in Azure Synapse Integrate ������������������������������������������������������������������������� 123
Getting ready • 123
How to do it… • 123
How it works… • 126
Using a Synapse serverless SQL pool �������������������������������������������������������������������������������� 127
Getting ready • 127
How to do it… • 127
How it works… • 133
There’s more… • 133
Table of Contents xi
Processing data from Azure Data Lake with HDInsight and Hive ������������������������������������ 164
Getting ready • 165
How to do it… • 165
How it works… • 174
Building data models in Delta Lake and data pipeline jobs with Databricks �������������������� 176
Getting ready • 176
How to do it… • 177
How it works… • 186
There is more… • 188
Ingesting data into Delta Lake using Mapping Data Flows ��������������������������������������������� 188
Getting ready • 189
How to do it… • 189
How it works… • 197
There is more… • 198
External integrations with other compute engines (Snowflake) ������������������������������������� 198
Getting ready • 199
How to do it… • 199
How it works… • 208
There is more… • 208
Index 497
Preface
Azure Data Factory (ADF) is a modern data integration tool available on Microsoft Azure. This
Azure Data Cookbook, Second Edition helps you get up and running by showing you how to create
and execute your first job in ADF. You’ll learn how to branch and chain activities, create custom
activities, and schedule pipelines. This book will help you discover the benefits of cloud data
warehousing, Azure Synapse Analytics, Azure Data Lake Storage Gen2, and Databricks, which
are frequently used for Big Data Analytics. Through practical recipes, you’ll learn how to actively
engage with analytical tools from Azure Data Services and leverage your on-premises infrastruc-
ture with cloud-native tools to get relevant business insights.
As you advance, you’ll be able to integrate the most commonly used Azure services into ADF and
understand how Azure services can be useful in designing ETL pipelines. The book will take you
through the common errors that you may encounter while working with ADF and guide you in
using the Azure portal to monitor pipelines. You’ll also understand error messages and resolve
problems in connectors and data flows with the debugging capabilities of ADF.
Additionally, there is also a focus on the latest cutting-edge technology in Microsoft Fabric. You’ll
explore how this technology enhances its capabilities for data integration and orchestration.
By the end of this book, you’ll be able to use ADF as the main ETL and orchestration tool for your
data warehouse and data platform projects.
Chapter 2, Orchestration and Control Flow, will introduce you to the building blocks of data pro-
cessing in ADF. The chapter contains hands-on exercises that show you how to set up linked
services and datasets for your data sources, use various types of activities, design data-processing
workflows, and create triggers for data transfers.
Chapter 3, Setting Up Synapse Analytics, covers key features and benefits of cloud data warehousing
and Azure Synapse Analytics. You will learn how to connect and configure Azure Synapse Analytics,
load data, build transformation processes, and operate data flows.
Chapter 4, Working with Data Lake and Spark Pools, will cover the main features of the Azure Data
Lake Storage Gen2. It is a multimodal cloud storage solution that is frequently used for big data
analytics. We will load and manage the datasets that we will use for analytics in the next chapter.
Chapter 5, Working with Big Data and Databricks, will actively engage with analytical tools from
Azure’s data services. You will learn how to build data models in Delta Lake using Azure Databricks
and mapping data flows. Also, this recipe will show you how to set up HDInsights clusters and
how to work with delta tables.
Chapter 6, Data Migration – Azure Data Factory and Other Cloud Services, will walk though several
illustrative examples on migrating data from Amazon Web Services and Google Cloud providers.
In addition, you will learn how to use ADF’s custom activities to work with providers who are
not supported by Microsoft’s built-in connectors.
Chapter 7, Extending Azure Data Factory with Logic Apps and Azure Functions, will show you how to
harness the power of serverless execution by integrating some of the most commonly used Azure
services: Azure Logic Apps and Azure Functions. These recipes will help you understand how
Azure services can be useful in designing Extract, Transform, Load (ETL) pipelines.
Chapter 8, Microsoft Fabric and Power BI, Azure ML, and Cognitive Services, will teach you how to
build an ADF pipeline that operates on a pre-built Azure ML model. You will also create and run
an ADF pipeline that leverages Azure AI for text data analysis. In the last three recipes, you’ll
familiarize yourself with the primary components of Microsoft Fabric Data Factory.
Preface xxi
Chapter 9, Managing Deployment Processes with Azure DevOps, will delve into setting up CI and
CD for data analytics solutions in ADF using Azure DevOps. Throughout the process, we will
also demonstrate how to use Visual Studio Code to facilitate the deployment of changes to ADF.
Chapter 10, Monitoring and Troubleshooting Data Pipelines, will introduce tools to help you manage
and monitor your ADF pipelines. You will learn where and how to find more information about
what went wrong when a pipeline failed, how to debug a failed run, how to set up alerts that
notify you when there is a problem, and how to identify problems with your integration runtimes.
Chapter 11, Working with Azure Data Explorer, will help you to set up a data ingestion pipeline from
ADF to Azure Data Explorer: it includes a step-by-step guide to ingesting JSON data from Azure
Storage and will teach you how to transform data in Azure Data Explorer with ADF activities.
Chapter 12, The Best Practices of Working with ADF, will guide you through essential considerations,
strategies, and practical recipes that will elevate your ADF projects to new heights of efficiency,
security, and scalability.
If you are using the digital version of this book, we advise you to type the code yourself or access
the code via the GitHub repository (link available in the next section). Doing so will help you
avoid any potential errors related to the copying and pasting of code.
We also have other code bundles from our rich catalog of books and videos available at https://
github.com/PacktPublishing/. Check them out!
xxii Preface
Conventions used
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file
extensions, pathnames, dummy URLs, user input, and Twitter handles. For example: “Mount the
downloaded WebStorm-10*.dmg disk image file as another disk in your system.”
When we wish to draw your attention to a particular part of a code block, the relevant lines or
items are set in bold:
[default]
exten => s,1,Dial(Zap/1|30)
exten => s,2,Voicemail(u100)
exten => s,102,Voicemail(b100)
exten => i,1,Voicemail(s0)
Bold: Indicates a new term, an important word, or words that you see on the screen. For instance,
words in menus or dialog boxes also appear in the text like this. For example: “Select System info
from the Administration panel.”
Preface xxiii
Get in touch
Feedback from our readers is always welcome.
General feedback: Email [email protected], and mention the book’s title in the subject of
your message. If you have questions about any aspect of this book, please email us at questions@
packtpub.com.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you have found a mistake in this book we would be grateful if you would report this
to us. Please visit, http://www.packtpub.com/submit-errata, selecting your book, clicking on
the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would
be grateful if you would provide us with the location address or website name. Please contact us
at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you
are interested in either writing or contributing to a book, please visit http://authors.packtpub.
com.
xxiv Preface
Your review is important to us and the tech community and will help us make sure we’re deliv-
ering excellent quality content.
Random documents with unrelated
content Scribd suggests to you:
CHAPTER XIX.
Conclusion
It seemed to Guy Preston that the rider who held him in position on
his mustang would break his body in two before his horse had taken
many more of his frantic leaps. You will remember that the only
place he touched the horse was on the small of his back, with his
head dangling on one side of it and his feet on the other; but it
seemed to be all one to the warrior, who shook his rifle and shouted
at the soldiers as if he were in high glee. He struggled to the best of
his ability, and when at last it seemed to him that he would grow
wild over the agony he was in, everything grew blank to him, and
from that time he was as helpless as a dead boy. He knew nothing
of the efforts the cavalry had made to rescue him; and when his
captor wanted to stop to breathe his horse, he threw the boy to the
ground as if he had been a bag of corn. The motion seemed to
revive Guy. He struck on his feet, made three or four efforts to
recover himself, and then sank down, regardless of his fate.
The warriors had all stopped to rest their horses, for they believed
that the pursuit was over. The spot where they paused was in one of
the ravines that led to the "bad lands," and while one or two of their
number remained on the hills to note the movements of their
pursuers, the others gathered around their prisoners and went into
ecstasies over them.
"Hoopla!" said one who seemed to have a little smattering of
English. "Nice time the squaws have to-night. Take um scalp and
burn um."
These words aroused Guy and he sat up on the ground. He thought
of Winged Arrow's medicine, and put his hand into his pocket to see
if he could find it; but the Indians, believing that he was looking for
a weapon, rushed upon him and stretched him again upon the earth,
while one drew his scalping knife and yelled as if he were going to
use it. He seized Guy by the hair and passed his knife around it, and
when he arose to his feet he had a handful of it, which he shook in
the boy's face. Guy's heart seemed to stop beating. Were his captors
going to scalp him alive? He put his hand to his head and found,
greatly to his relief, that although his hair was gone, his skin was
there as usual. A roar of laughter was the result, and when it was
ended one of the braves said:—
"Brave boy. To-night stake him out on ground. Then take scalp sure
enough."
It was something to know that they were going to take him to the
village before they began torturing him, and Guy at once became
more at his ease and began to look around among his captors to see
if Winged Arrow was there. He did not see him, and he concluded
that he would let his letter go until he could see him or find some
means to send it to him. What was the reason he had not asked him
his name in Indian when he met him there on the plains? That
would have reached him sure, and he resolved to try it in English.
Perhaps the Indians knew enough of that tongue to recognize it. The
Sioux were sitting down in a circle and some of them were getting
out their pipes to indulge in a smoke.
"Do any of you know English?" he asked at a venture.
"Oh, yes, me know it," said one of the Indians, tapping his breast
with his hand. "Me know English a heap."
"Then perhaps you know Winged Arrow," said Guy. "He is my
friend."
Guy did not see what there was in this to excite the laughter of the
Indians, but it raised it sure enough, and his captors began passing
some remarks about him in their native tongue which made them
laugh louder than ever. Guy gave it up in despair, and settled back
on the ground again. The Indians either could not or would not
understand what he was trying to get at, and it was useless to try
them further. His mind was so busy with his own affairs that he had
not thought to see if there were other prisoners in the party, but
now he found that there were two—one a member of his own
company, who had evidently been worse treated than Guy was, for
he lay upon the ground as motionless as if he were dead. Guy got
up and went to him. He could not bear to see one of his own kind
used as bad as he was without saying something to him.
"Oh, sir, we are gone up now," said the soldier, in a faint voice. "My
back is broken."
"I guess I know about how you feel, for my back is feeling the same
way," replied Guy. "Brace up, and never say die. When we get to
their village, I will see what I can do toward effecting our release."
"Oh, if you could do that, you would win my everlasting gratitude. I
can't bear to be tied up and burned, just because I happen to wear
the blue. Have you a drink of water about you, sir?"
Water was something that Guy did not have, and he began to feel as
though he would like a drink himself. He approached the Indians,
who were now sitting on the ground engaged in the formality of
smoking, and holding his right hand as if he were grasping a cup,
carried it to his mouth and turned it up as if drinking from it. He
knew this much of the signs that Cyrus had taught him. One of the
Sioux immediately said something in his own tongue and pointed
down the gully, and then went on with his smoking.
"There is not any water here," said Guy, returning to the soldier. "We
must wait until we reach the village. Now brace up, and don't let
these people see that you are afraid of them. If you do they will
torment you in every way that they can think of."
When Guy went to speak a word of encouragement to the other
prisoner, he cast his eyes around among the horses that were
standing a little distance away, and saw that there were five of them
that belonged to the government. There were thirty of the Indian
ponies, and twenty-eight savages sitting in that circle on that
ground; and by counting the two who had been sent out as look-
outs, it proved to his satisfaction that the Sioux made that attack
upon the cavalry and came off without losing a man. No wonder that
they felt jolly over it.
Guy spoke such words to the other captive as he thought would
serve to encourage him in the ordeal which he knew was coming,
and by that time the lookouts came in from the hills and the Indians
all got up in readiness to resume their march to the village. But
before they went they determined to examine the pockets of their
captives and see what they could find that was worth stealing. In
obedience to a sign from one of his captors, Guy got up and the
Indian thrust his brawny arm into his pants. His pocketbook was the
first thing he pulled out. The small amount of money that Guy had
was looked at and thrown aside, the Indian not knowing what the
bills were. The next thing was Winged Arrow's medicine; and when
the savage unfolded that and looked at it, he uttered a grunt which
brought all his companions to his side. Guy's heart beat against his
ribs with a sound like a trip hammer, for he knew that something
was going to happen now. First one Indian examined it and then
another, all uttered grunts indicative of surprise or indignation, he
couldn't tell which, and another savage, the same one who had gone
through the motions of scalping him before and was ready to do it
again, for he held his knife in his hand, quietly put it in his belt and
made no move toward Guy. The Indians now became excited and
wanted to get to their village as soon as possible. The talking and
laughing suddenly ceased. The horses were brought up and at a sign
Guy and one prisoner mounted; and when it came to the captive
who was too weak to help himself, he was not jerked and hauled
around as he was before, but an Indian lifted him in his arms and
put him on the horse as tenderly as if he had been an infant. There
was something in Winged Arrow's medicine after all, and when he
saw how prompt the savages were to obey it, it made the chills
creep all over him.
"No one need ever tell me again that the Sioux are nothing but
savages, and have no hearts at all in them," muttered Guy, as he fell
in with the others and rode down the ravine. "But that paper is not
through yet. If it pass Red Cloud and the other big chiefs at the
village, I shall really begin to believe there is SOMETHING in Indian
medicine."
The ride now was a very intricate one, and Guy marveled greatly
when he saw the Indian who was leading turn first into one gully
and then into another, and never seem to be at a loss which way to
go. If a body of troops ever got in there with Indians all around
them, their destruction was certain. The next thing was the village
which came into view. A sudden turning of one of the gullies, when
everything seemed to be deserted, and there were the tepees
scattered along both banks of a little stream which came murmuring
down from the hills. That was too much for one of Guy's companions
in trouble. He dismounted from his horse, stretched himself out at
full length beside that stream and drank as if he had not seen any
water for a month.
Guy's fear and anxiety increased now, for he longed to see Winged
Arrow, to tell him what had been done with his medicine and to ask
him if there were the least grounds for hope for any prisoner besides
himself. Somehow he could not get it out of his mind that his men
had seen the prairie for the last time, but that was too dreadful to
think of. The Indians along the stream took but little notice of the
party as they rode through the village, with the exception of one
who gazed at them as if there were something on his mind. This one
fell in behind and walked along with them until they came to a lodge
which he entered without ceremony. It was Reuben who was
hunting for Winged Arrow. There was something about Guy's
shoulder straps which attracted his attention, and he wanted to see
his friend before it was too late. The lodge he entered was the one
Winged Arrow occupied, and he found that person just getting ready
to go out.
"He has come," said Reuben.
"So I have heard, and I am going to see about it," said Winged
Arrow. "I wonder if he has that letter with him."
Reuben shook his head. He did not know what had passed between
the Indians and their captives on the way up.
"It will be hard enough for me to help him, even if he has it with
him," continued Winged Arrow. "But if he has forgotten it, it is all up
with him."
The young braves hastily left the lodge and followed along after the
party until they came up with them standing in front of the chief's
tepee. One glance at the boy who wore the shoulder straps and
Winged Arrow saw that he was the same one he had once met on
the prairie. Guy saw and recognized him at the same moment, and
something like a smile of confidence lit up his face.
"I am sorry to see you here," said Winged Arrow; and his face
assumed a gloomy expression.
"And I am sorry to be here," said Guy. "Now we will see if your
medicine amounts to anything. There are three prisoners here——"
Winged Arrow turned his head away and raised his hand, as if
motioning for Guy to stop.
"If I can get you out safe, you must be satisfied," said he. "I had
hard work to get that other man free, and I don't know whether I
shall make it with you or not."
Guy lost all his confidence from hearing Winged Arrow talk this way,
and he began to think that his own escape, which had seemed so
bright when Winged Arrow first came there, was not so sure after
all. He watched his friend go into the chief's tepee, and from what
he had read he knew that no one had a right to do that, and in
about five minutes he came out again; but his face was still gloomy.
"Get off that horse and come with me," was what he said to Guy.
The boy lost no time in obeying him. He saw that his first object
must be to get out of sight of the Sioux, and he soon saw the
necessity for that, for savage glances were cast upon him as he
passed along, and he remained close at Winged Arrow's heels, while
he led the way toward his father's lodge. Once inside, he breathed
more freely, although he was ushered right into the midst of the
Medicine Man's family. He did not have time to see who was there,
but followed his guide to a remote corner of the tepee and seated
himself on a pile of blankets pointed out to him.
"Now whatever happens, don't open your head," said Winged Arrow.
"Don't say one word to me. If you go out of here without me, you
are gone."
The Death Angel never came so close to Guy Preston as he did then.
He felt in his hip pocket for the loaded Derringer he had taken pains
to keep about him, but remembered that it had fallen out during that
wild ride after he was captured, and now nothing remained for him
but that letter. He noticed that Winged Arrow did not go any further
than the entrance of the lodge. He took his rifle with the air of one
who would use it if he found it necessary, and seated himself just
inside the flap door and watched everybody that came in or went
out. It looked as though Winged Arrow was going to fight to retain
possession of him. He listened, but could hear no signs of what had
been done with the captives outside. They had been taken away,
and Guy told himself that he had seen them for the last time.
It was pretty nearly night when these events happened, and if the
hours were long to Guy they must have been doubly so to Winged
Arrow, who never changed his position after he seated himself. The
Sioux came in and cooked their meals as they wanted them, but
nobody offered Guy a morsel. In fact he did not want anything, for
he was so completely wrapped up in thoughts of escape. At length
the door was raised and a bundle of something was thrust into
Winged Arrow's hands. He took it immediately and came over to
Guy.
"Put these on," said he, in a hurried whisper. "Be quick."
Just then someone outside set up a rapid beating on the tom-tom,
and Guy thought that it was the signal for something of which he did
not like to think; but it was a notice that the social dances, which
were now in vogue, were about to commence. The fate of the
captives had not yet been decided upon.
With nervous haste Guy unfolded the bundle and found an Indian
blanket, a pair of leggings, and moccasins. He looked at Winged
Arrow and saw that he was standing erect and had enveloped
himself in another blanket, so that nothing but his face could be
seen. Guy was quick to follow his motions, and when the change
had been effected no one could have told which of the two was the
Indian and which the white boy. The other Sioux sitting around in
the tepee made no remark regarding the change, and, feeling
greatly encouraged, Guy walked over to his friend and followed him
outside into the darkness.
"Keep still," was what Winged Arrow whispered to him. "Do just as I
do."
The tepees were all deserted by the Indians, their owners having
gone to the further end of the village to engage in the dance, and
no one saw them as they passed. A little further on and somebody
with a horse loomed through the darkness. He kept on ahead of
them, not a word was exchanged between the two, and it was
evident that he was in the plot, if that was what Winged Arrow's
movement proved to be. For two hours they walked, and then the
prairie came into view. Then the horseman stopped and Winged
Arrow and Guy went up beside him.
"There, sir, you are free," said the young Indian. "Don't stop to talk,
but get on and do your best. Don't you be caught again."
It did not seem to Guy Preston that he could leave his friend without
making some acknowledgment. He did not "stop to talk," but he
thrust out his hand which Winged Arrow took and shook warmly.
"Which way?" said he.
"That way," replied the Indian, pointing straight over the prairie.
It occurred to Guy to ask Winged Arrow what he and his friend were
going to do when it became known among the Sioux that one of
their captives had slipped through their hands, but before he could
form the question he was standing there alone. The Indians had
vanished in the darkness.
To jump upon his horse and start him in the direction he had been
told to go was done in less time than we have taken to tell it. Have
you ever seen the prairie? If so you can have some idea of what Guy
had to go through. It was the same thing over and over again. Every
little hill he mounted when daylight came revealed nothing but a
lonely waste with not a living thing in sight. And so it was during the
whole of that day until the light faded away and darkness began to
settle down on the plain. Then Guy thought he saw a horseman on a
distant swell. He stopped and looked at him, but the horseman, if
such it were, did not move.
"Is it a Sioux or a white man?" said Guy to himself. "I can't be worse
off than I am now, and so I will go and see who it is."
For the first time he put his horse in a lope, keeping his eye on the
object and waiting to see what he was going to do. At length
another object appeared by the side of the first, and something that
hung down by his horse attracted the attention of Guy, and led him
to swing his blanket around his head. It was a cavalry saber, and
showed Guy that he was among friends.
We cannot stop to tell how Guy Preston was received by the men
who had long ago made up their minds that they had seen the last
of him. The expedition had stopped to bury their dead and had just
gone into camp. Guy said that the two prisoners who were captured
at the same time he was were in the hands of the Sioux yet, and he
could not tell what was to become of them, and neither did he know
what would be done with Winged Arrow and his friend for assisting
one captive to escape. When he reached the Fort, Colonel Carrington
listened in surprise to the story of his release, and declared his belief
that there was something in Winged Arrow's medicine after all. He
moved back to Nebraska in the early spring, after Fort Phil Kearney
had been demolished. His superiors blamed him for Colonel
Fetterman's defeat. They did him an injustice, for it was Red Cloud's
ability and strength that won the day.
THE END
*** END OF THE PROJECT GUTENBERG EBOOK WINGED ARROW'S
MEDICINE; OR, THE MASSACRE AT FORT PHIL KEARNEY ***
Updated editions will replace the previous one—the old editions will
be renamed.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.