SQL Server Data Automation Through Frameworks: Building Metadata-Driven Frameworks With T-SQL, SSIS, and Azure Data Factory Andy Leonard
SQL Server Data Automation Through Frameworks: Building Metadata-Driven Frameworks With T-SQL, SSIS, and Azure Data Factory Andy Leonard
com
https://textbookfull.com/product/sql-server-execution-plans-for-sql-
server-2008-through-to-2017-and-azure-sql-database-3rd-edition-grant-
fritchey/
textbookfull.com
https://textbookfull.com/product/ugc-psychology-paper-unit-10-10-1st-
edition-manah-kamalam/
textbookfull.com
New Advances in Mechanisms, Mechanical Transmissions and
Robotics : MTM & Robotics 2020 Erwin-Christian Lovasz
https://textbookfull.com/product/new-advances-in-mechanisms-
mechanical-transmissions-and-robotics-mtm-robotics-2020-erwin-
christian-lovasz/
textbookfull.com
https://textbookfull.com/product/sap-gateway-and-odata-third-edition-
sap-press-carsten-bonnen/
textbookfull.com
https://textbookfull.com/product/labov-a-guide-for-the-perplexed-
matthew-j-gordon/
textbookfull.com
https://textbookfull.com/product/improving-abiotic-stress-tolerance-
in-plants-1st-edition-m-iqbal-r-khan-editor/
textbookfull.com
https://textbookfull.com/product/effective-c-an-introduction-to-
professional-c-programming-1st-edition-robert-c-seacord/
textbookfull.com
Design and Analysis of Experiments with R Ninth Edition
John Lawson
https://textbookfull.com/product/design-and-analysis-of-experiments-
with-r-ninth-edition-john-lawson/
textbookfull.com
SQL Server Data
Automation
Through
Frameworks
Building Metadata-Driven Frameworks with
T-SQL, SSIS, and Azure Data Factory
—
Andy Leonard
Kent Bradshaw
SQL Server Data
Automation Through
Frameworks
Building Metadata-Driven
Frameworks with T-SQL, SSIS,
and Azure Data Factory
Andy Leonard
Kent Bradshaw
SQL Server Data Automation Through Frameworks: Building Metadata-Driven
Frameworks with T-SQL, SSIS, and Azure Data Factory
Andy Leonard Kent Bradshaw
Farmville, VA, USA Providence Forge, VA, USA
For Ann
—Kent
Table of Contents
About the Authors���������������������������������������������������������������������������������������������������� xi
Introduction�����������������������������������������������������������������������������������������������������������xvii
v
Table of Contents
vi
Table of Contents
vii
Table of Contents
viii
Table of Contents
Index��������������������������������������������������������������������������������������������������������������������� 385
ix
About the Authors
Andy Leonard is Chief Data Engineer at Enterprise Data
& Analytics, creator and Data Philosopher at DILM (Data
Integration Lifecycle Management) Suite, an Azure Data
Factory and SQL Server Integration Services trainer and
consultant, and a BimlHero. He is a SQL Server database and
data warehouse developer, community mentor, engineer,
and farmer. Andy is coauthor of SQL Server Integration
Services Design Patterns, Data Integration Life Cycle
Management with SSIS, and The Biml Book.
xi
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
About the Technical Reviewer
André van Meulebrouck has a keen interest in functional
programming, especially Haskell and F#.
He also likes data technologies from markup languages
to databases and F# type providers.
He lives in Southern California with his wife “Tweety”,
and is active in athletics: hiking, mountain biking, and
gravity/balance sports like freestyle skating (in-line and ice),
skateboarding, surfing, and sandboarding.
To keep his mind sharp, he does compositional origami, plays classical guitar, and
enjoys music notation software.
xiii
Acknowledgments
This book would not have been possible without the help of Kent Bradshaw, my
coauthor, friend, and brother. This book represents Kent’s first foray into authoring, and
he delivered outstanding work.
Thanks André van Meulebrouck for proofreading, working through the samples, and
providing feedback on the manuscript.
I owe my coworkers at Enterprise Data & Analytics (EntDNA.com) a debt of gratitude
for their encouragement and for covering for me when I stayed up too late trying to
figure out how to make the code work. We have an awesome team, especially my
brothers from other mothers – Nick Harris, Shannon Lowder, and Reeves Smith.
Donald Farmer inspires me every time we interact. As Principal Program Manager at
Microsoft, Donald worked extensively with SSIS and helped shape the product. Donald
continues to shape data software by providing vendors unique strategic guidance at
TreeHive Strategy (treehivestrategy.com).
I am certain there are many excellent editors in this business. Jonathan Gennick is
the best with whom I have had the privilege to work. Without Jill Balzano’s input and
project management, I would have been lost!
Finally, I thank my family for their understanding. My children Stevie Ray, Emma, and
Riley who live at home at the time of this writing, and Manda and Penny who have children
of their own. And Christy, to whom I dedicate this book, my wife, my love. Thank you.
—Andy
Writing this book never really entered my mind until my great friend and EDNA
colleague, Andy Leonard, convinced me to do it. I truly appreciate his confidence in me,
and it was a very interesting experience. I’m really glad that I could work together with
him on this project.
Many thanks to Jonathan Gennick, Jill Balzano, and André van Meulebrouck for all of
their help and suggestions. They made things so much easier.
Most important of all, I want to thank my wife, Ann. Much of where I am today is due
to her love, support, and encouragement. I couldn’t begin to do it without her. Thank you.
—Kent
xv
Introduction
Frameworks have existed for as long as people have been building things. When
people began developing solutions using computers, frameworks soon followed. Like
woodworking jigs, frameworks exist to simplify work and speed up the process of
developing a solution, whether the problem is to complete a woodworking project or
deliver an enterprise data integration solution.
1. Database developers
Database developers will learn about driving database object execution from stored
procedures and will see one example of a database framework.
Data engineers and data integration developers will learn how to use SQL Server
Integration Services (SSIS) to implement a metadata-driven data integration framework.
Biml developers will see one example of using BimlExpress and metadata to
rapidly produce several SSIS packages in selected design patterns and an example of
interrogating flat files to generate flat file formats and flat file connection managers via
Biml.
xvii
Introduction
C
hapter 1: Stored Procedures 101
Before we dive into database development, let’s cover some basics of stored procedures.
C
hapter 2: Automation with Stored Procedures
Once you have a solid grasp on stored procedures, we will use what we’ve learned about
stored procedures to automate execution using the controller pattern, which executes
one or more stored procedures.
C
hapter 3: Stored Procedure Orchestrators
In this chapter, we examine high-level execution management using the orchestrator
pattern, which executes one or more controller stored procedures.
C
hapter 4: A Stored Procedure–Based Metadata-Driven
Framework
Metadata-driven frameworks are a recurring theme in this book. In this chapter, we
store information about stored procedures, controllers, and orchestrators to execute
framework applications.
xviii
Introduction
C
hapter 5: A Simple, Custom, File-Based SSIS Framework
In this chapter, we define a data integration/engineering framework metadata database
that manages configuration and execution. We introduce a version of an SSIS framework
that manages these subject areas for SSIS executed on-premises.
C
hapter 6: Framework Execution Engine
In this chapter, we add instrumentation in the form of Information and Error events.
Built-in SSIS logging will surface these messages, which are useful when troubleshooting
SSIS framework application issues.
C
hapter 7: Framework Logging
In this chapter, we persist execution metadata to “Instance” tables. The
ApplicationInstance table stores one record for each instance of an SSIS framework
application execution. The ApplicationPackageInstance table stores one record for each
instance of an SSIS framework application package execution. Important execution
instance attributes – such as start and end times and execution status – are maintained
in the “Instance” tables.
C
hapter 8: Azure-SSIS Integration Runtime
In this chapter, we introduce Azure Data Factory (ADF) and the Azure-SSIS integration
runtime by walking through the provisioning processes.
C
hapter 9: Deploy a Simple, Custom, File-Based Azure-SSIS
Framework
In Chapters 5–7, we designed and constructed an SSIS framework aimed at on-premises
SSIS execution, configuration, and logging. In this chapter, we begin migrating the SSIS
framework designed in Chapters 5–7 by provisioning a new Azure SQL database and
then deploying the metadata database to our new Azure SQL database. We provision an
Azure File Share and migrate test SSIS packages to the Azure File Share. Finally, we begin
building the Azure Data Factory parent pipeline that serves as the execution engine for
the ADF version of the SSIS framework.
xix
Introduction
C
hapter 10: Framework Logging in ADF
In this chapter, we add logging functionality to the parent ADF pipeline, much like the
functionality we added to the on-premises version of the SSIS framework in Chapter 7.
C
hapter 11: Fault Tolerance in the ADF Framework
In this chapter, we complete ADF execution engine functionality by implementing fault
tolerance to programmatically stop (or not stop) pipeline execution based on SSISConfig
metadata configurations.
C
onclusion
This book is for people who want to dive deeper into SQL Server and SSIS automation.
We will be discussing and demonstrating database and Integration Services frameworks
and covering such topics as SQL Server, SSIS, Azure, and Azure Data Factory.
As you can see, we have a long journey filled with learning and new insight ahead of
us. Let’s get started!
xx
PART I
Stored Procedure-Based
Database Frameworks
CHAPTER 1
3
© Andy Leonard, Kent Bradshaw 2020
A. Leonard and K. Bradshaw, SQL Server Data Automation Through Frameworks,
https://doi.org/10.1007/978-1-4842-6213-9_1
Chapter 1 Stored Procedures 101
Now, consider that monolith broken up into multiple procedures, each of which
performs a unit of work. When a change is made and needs to be tested, that effort can
be isolated to just what is necessary to perform that unit of work, and the validation is
concentrated on the result of the procedure. And, with it now being multiple procedures,
modifications can usually be done simultaneously by multiple developers, and their
efforts can be mutually exclusive. Over time, that approach can prove to be much more
cost effective and efficient.
That is where a framework helps to organize and manage processes to provide
the most flexibility in development and can minimize the maintenance effort (which,
sometimes, is not considered until it becomes an obvious issue). A framework provides
a consistent methodology for assembling and executing processes. It also promotes
writing code in small units of work that can potentially be mixed, matched, and reused.
It adds complexity to the development and deployment processes but can reduce the
effort for production scheduling. The framework can also provide greater flexibility for
managing the execution of the process.
D
emonstration of a Framework
To begin the analysis of the framework concept, we need a process. Our example to
follow shows a framework built to run a daily process against an example schema. The
details of that process don’t matter to the example. Just consider that any production
system might have something that needs to be done each day, and what follows is a
framework by which to make those daily processes happen.
Also, part of the example is a monthly process. Just as a system might need certain
tasks to be done each day, it’s also common to have certain things that need to be done
once monthly. In designing such a system, one must take into account the order in
which daily and monthly processes execute when their schedules intersect on – in our
example – the first of each month.
For the purpose of this book, a simple process has been developed (NOTE: all of the
code described can be downloaded at entdna.com. You can also find a link to the code
from the book’s catalog page on Apress.com). Downloading the example code enables
you to follow along with the upcoming examples on your own machine.
4
Chapter 1 Stored Procedures 101
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
5
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Chapter 1 Stored Procedures 101
Do you have a SQL Server instance that you can use for learning purposes? Connect
to that instance as an administrator, for example, as the sa user. Then, in SQL Server
Management Studio (SSMS), open a “New Query” window, copy the code from Listing 1-1,
and execute it to create the example schema used in this and subsequent chapters.
6
Chapter 1 Stored Procedures 101
SET NOCOUNT ON
/*********************************************/
/* Log the START of the procedure to the process log */
/*********************************************/
7
Chapter 1 Stored Procedures 101
SET @RetStat = 0
/******************************************/
/* Force an ERROR CONDITION for this procedure */
/******************************************/
/****************************************************/
/* Log the COMPLETION of the procedure to the process log */
/****************************************************/
IF @RetStat = 0
BEGIN
INSERT INTO FWDemo.ProcessLog (
ProcessLogMessage,
CreateDate
)
VALUES ('Procedure FWDemo.DailyProcess1 - COMPLETED',
GETDATE()
)
8
Chapter 1 Stored Procedures 101
END
ELSE
BEGIN
INSERT INTO FWDemo.ProcessLog (
ProcessLogMessage,
CreateDate
)
VALUES ('Procedure FWDemo.DailyProcess1 - ERROR',
GETDATE()
)
END
RETURN @RetStat
GO
9
Chapter 1 Stored Procedures 101
SET NOCOUNT ON
/*********************************************/
/* Log the START of the procedure to the process log */
/*********************************************/
SET @RetStat = 0
/******************************************/
/* Force an ERROR CONDITION for this procedure */
/******************************************/
10
Random documents with unrelated
content Scribd suggests to you:
salt provisions, and using no exercise, had sometimes occasion for
art to assist nature. But these briny meals of pork and beef, Colonel
Fourgeoud insisted were much more wholesome food in a tropical
country than fresh provisions; for, by a most curious theory, he
asserted that the latter corrupted in the stomach by the heat,
whereas the others underwent a proper digestion. Unfortunately for
us, there were but few on board either the Cerberus or the Charon,
whose stomachs were in a state to digest such food. I had also
some plaisters on board the barge, but these were soon expended
by the running ulcers, with which the whole crew was covered; and
this was easily accounted for, since in this climate, [160]where the air
is impregnated with myriads of invisible animalcula, the smallest
scratch immediately becomes a running sore. The best antidote and
cure for such complaints in this country is lemon or lime acid, but
this we had not. The next best mode of treatment is never to expose
an open wound, or even the smallest scratch, to the air; but the
instant they are received, to cover them with grey paper wetted with
spirits, or any kind of moisture, so that it may stick to the skin. For
my own part, no man could enjoy a better state of health than I
continued to enjoy, wearing nothing but my long trowsers, and
checked shirt loose at the collar and turned up in the sleeves. Nay,
even when the sun was not too hot, I stripped all together, and
twice every day continued to plunge into the water: by these means
I was always cool and clean; I also daily used a cheering glass of
wine, having first hung it a few fathoms under water, which
rendered it much more cool and pleasant.
During all these hardships, I must not forget the high gratification
which was afforded us one day by a few marcusas that we found in
this place, which had been left there standing ever since the estate,
many years ago, had been destroyed. There was indeed but one
single old tree, I should rather say a shrub, for the plant which bears
them falls more properly under that description. This delicious fruit is
of an oval form, and of an orange or golden colour; the blossom
resembling the passion-flower. They are commonly larger, but some
less than [161]a hen’s egg, and are broken open as one would break
an egg; they are then found to inclose an ash-coloured succulent
jelly, full of small seeds. This is sipped out of the shell, being sweet
mixed with acid, of an exquisite flavour, and so cool that it reminds
one of ice marmalade.
On the 11th, I sent two men sick to the hospital, and the same
evening we again heard the drums. On the following day, at noon,
we were disturbed by a hurricane; the Charon broke loose from her
anchors, and was driven ashore, her upper works being terribly
damaged by the stumps of trees, &c. that hung over the river, while
the water from the clouds broke in upon us like a torrent, and I
expected no less than a shipwreck. [163]
On the 15th the other officer, Lieutenant Baron Owen, came down
sick from the Cerberus, and at his request I ventured to send him
down to Paramaribo. I now received another letter from Colonel
Fourgeoud, with a little money for the men to purchase
refreshments, where nothing was to be met with: but not a word
intimating that we were to be relieved.
On the 20th I received a report, that the Cerberus, having only four
private men left, had retired to the post at La Rochelle; and, on the
21st, I sent two of my men to her assistance, and ordered her back
to her former station.
I now was myself at last attacked with a fever, and upon the whole
felt myself in a truly distressed condition; deprived by sickness of my
two only officers, and my serjeant. My men upon the three stations
(viz. the two barges and Devil’s Harwar together) melted down to
fifteen, from the number of forty-two, without a surgeon, or
refreshment, surrounded with a black forest, and exposed to the
mercy of relentless enemies; who must be formidable indeed, should
they be informed by any means of our defenceless situation. The
remaining few were, with truth, declaring they were doomed to
destruction; insomuch, that they could with difficulty be prevented
from mutiny, and from proceeding down the river Cottica with the
Charon against my orders.
For my own part, I was not altogether free from uneasiness. In fact,
a few troops from all quarters ought [164]to have marched against
the enemy, when they crossed the Patamaca Creek; that is, from La
Rochelle, Devil’s Harwar, and the river Pirica; when, being assailed at
once from three quarters, the rebels might have been, if not entirely
routed, at least severely punished for their presumption: not to
speak of the happy effect which such a check must have had in
saving the lives and property of those victims, who, after such
incursions, are generally devoted to their rage.
On the 23d I felt myself rather better; and between the fits of the
fever shot a couple of large black monkies to make some broth, to
supply the want of fresh provisions; but as the destruction of one of
these animals was attended with such circumstances, as for ever
after had almost deterred me from going a monkey-hunting, I must
beg leave to relate them as they happened:—Seeing me on the side
of the river in the canoe, the creature made a halt from skipping
after his companions, and being perched on a branch that hung over
the water, examined me with attention, and the strongest marks of
curiosity: no doubt, taking me for a giant of his own species; while
he chattered prodigiously, and kept dancing and shaking the bough
on which he rested with incredible strength and agility. At this time I
laid my piece to my shoulder, and brought him down from the tree
into the stream;—but may I never again be a witness to such a
scene! The miserable animal was not dead, but mortally wounded. I
seized him by the tail, and taking it in both [165]my hands to end his
torment, I swung him round, and hit his head against the side of the
canoe; but the poor creature still continued alive, and looking at me
in the most affecting manner that can be conceived, I knew no other
means to end this murder, than to hold him under water till he was
drowned, while my heart felt sick on his account: for his dying little
eyes still continued to follow me with seeming reproach, till their
light gradually forsook them, and the wretched animal expired. I felt
so much on this occasion, that I could neither taste of him nor his
companion, when they were dressed, though I saw that they
afforded to some others a delicious repast.
That monkies, especially when young, are no bad food, may easily
be accounted for, since they feed on nothing but fruits, nuts, eggs,
young birds, &c.; and indeed, in my opinion, all young quadrupeds
are eatable: but when one compares those which are killed in the
woods to those filthy and disgusting creatures that disgrace the
streets, no wonder that they should disgust the least delicate
stomach. As for the wild ones, I have eaten them boiled, roasted,
and stewed, and found their flesh white, juicy, and good: the only
thing that disgusted me was, their little hands and their heads,
which when dressed, being deprived of the skin, appeared like the
hands and the skull of a young infant. I have already observed that
there are in Guiana many different species, from the [166]large
ourang-outang to the very small sarcawinkee. The former, however, I
never have seen, nor heard described, while I was in this country; as
for the latter, I shall describe him on another occasion, and shall
only, for the present, give an account of those which I met with on
this cruise. That which I shot the second instant is what is called in
Surinam micoo: it is nearly the size of a fox, and of a reddish grey
colour, with a black head and very long tail. Those I killed on the
tenth were indeed exceedingly beautiful, and much more delicate
when dressed than the former: they are called the keesee-keesee by
the inhabitants, are about the size of a rabbit, and most
astonishingly nimble. The colour of their body is reddish, and the
tail, which is long, is black at the extremity; but the fore-feet are
orange colour. The head is very round, the face milk white, with a
round black patch in the middle, in which are the mouth and the
nostrils; and this disposition of the features give it the appearance of
a mask: the eyes are black, and remarkably lively. These monkies we
saw daily pass along the sides of the river, skipping from tree to
tree, but mostly about mid-day, and in very numerous bodies,
regularly following each other like a little army, with their young
ones on their backs, not unlike little knapsacks. Their manner of
travelling is thus: the foremost walks to the extremity of a bough,
from which it bounds to the extremity of one belonging to the next
tree, often at a [167]most astonishing distance, and with such
wonderful activity and precision, that it never once misses its aim:
the others one by one, and even the females, with their little ones
on their backs, which stick fast to the mother, follow their leader, and
perform the same leap with the greatest seeming facility and safety:
they also are remarkable for climbing up the nebees or natural
ropes, with which many parts of the forest are interwoven. These
nebees grow in such a manner as to afford the appearance at first
sight of a fleet at anchor.
Blake Sculpt.
The Mecoo & Kishee Kishee Monkeys.
The other species, of the shooting of which I have just given the
horrid account, were called by my negroes monkee-monkee. The
only facts which I can relate farther of them is, that they are in size
between the two former described, and all over black. One
circumstance I ought [168]not to omit, which is very remarkable, viz.
that one morning I saw from my barge a monkey of this kind come
down to the water’s edge, rinsing his mouth, and appearing to clean
his teeth with one of his fingers: he was first discovered by one of
the slaves, who pointed him out to my great amusement.
Here I shall end the subject for the present, after adding that the
above animals are sociable, and that they are very tenacious of life,
as I have shewn. It is almost superfluous to mention, that the usual
distinction between what are called monkies and apes, consists in
this, that the first have all tails, of which the latter are divested; but
never having met with in Guiana any of the latter description, I
believe them more to be the inhabitants of Asia and Africa, than of
the part of the new world distinguished by the name of South
America, The monkies are often mischievous near the plantations,
where they commit depredations on the sugar-canes, &c. yet of this
I but one time have been a witness.
As I am speaking of the animals found in this part of the country, I
must not omit the otters here, called tavous, which in the
Cormoetibo Creek frequently attracted our attention by their
disagreeable noise: as they are amphibious, they live mostly on fish;
they are about three feet in length, grey-coloured, and all over
spotted with white; their legs are short, they are web-footed, and
armed with five claws; the head is round, the nose beset with
whiskers like a cat; the eyes are small, and [169]placed above the
ears; the tail is very short. This animal moves aukwardly upon land,
but in the rivers proceeds with great velocity. In Guiana it is said
there is another species of otters, which are much larger, but these I
never saw.
To this the negro cheerfully agreed; and having loaded my gun with
a ball-cartridge, we proceeded; David cutting a path with a bill-hook,
and a marine following, with three more loaded firelocks to keep in
readiness. We had not gone above twenty yards through mud and
water, the negro looking every way with an uncommon degree of
vivacity and attention; when starting behind me, he called out, “Me
see snakee!” and in effect there lay the animal, rolled up under the
fallen leaves and rubbish of the trees; and so well covered, that it
was some time before I distinctly perceived the head of this monster,
distant from me not above sixteen feet, moving its forked tongue,
while its eyes, from their uncommon brightness, appeared to emit
sparks of fire. I now, resting my piece [172]upon a branch, for the
purpose of taking a surer aim, fired; but missing the head, the ball
went through the body, when the animal struck round, and with
such astonishing force as to cut away all the underwood around him
with the facility of a scythe mowing grass; and by flouncing his tail,
caused the mud and dirt to fly over our heads to a considerable
distance. Of this proceeding however we were not torpid spectators,
but took to our heels, and crouded into the canoe. The negro now
intreated me to renew the charge, alluring me the snake would be
quiet in a few minutes, and at any rate persisting in the assertion
that he was neither able nor inclined to pursue us; which opinion he
supported by walking before me, till I should be ready to fire. And
thus I again undertook to make the trial, especially as he said that
his first starting backwards had only proceeded from a desire to
make room for me. I now found the snake a little removed from his
former station, but very quiet, with his head as before, lying out
among the fallen leaves, rotten bark, and old moss. I fired at it
immediately, but with no better success than the other time: and
now, being but slightly wounded, he sent up such a cloud of dust
and dirt, as I never saw but in a whirlwind, and made us once more
suddenly retreat to our canoe; where now, being heartily tired of the
exploit, I gave orders to row towards the barge: but David still
intreating me to permit him to kill the animal, I was, by his
persuasions, induced to make a third and last attempt, in company
with him. [173]Thus, having once more discovered the snake, we
discharged both our pieces at once, and with this good effect, that
he was now by one of us shot through the head. David, who was
made completely happy by this successful conclusion, ran leaping
with joy, and lost no time in bringing the boat-rope, in order to drag
him down to the canoe; but this again proved not a very easy
undertaking, since the creature, notwithstanding its being mortally
wounded, still continued to wreath and twist about, in such a
manner as rendered it dangerous for any person to approach him.
The negro, however, having made a running noose on the rope, and
after some fruitless attempts to make an approach, threw it over his
head with much dexterity; and now, all taking hold of the rope, we
dragged him to the beach, and tied him to the stern of the canoe, to
take him in tow. Being still alive, he kept swimming like an eel; and I
having no relish for such a ship-mate on board, whose length
(notwithstanding to my astonishment all the negroes declared it to
be but a young one come to about its half growth) I found upon
measuring it to be twenty-two feet and some inches; and its
thickness about that of my black boy Quaco, who might then be
about twelve years old, and round whose waist I since measured the
creature’s skin.
I shall only add, that having nailed its skin on the bottom of the
canoe, and dried it in the sun, sprinkling it over with wood-ashes to
prevent it from corruption, I [177]sent it to a friend at Paramaribo,
whence it was since sent to Holland as a curiosity.
On the 27th of August I relieved Captain Orzinga with his men, and
took the command of Devil’s Harwar, having been on board the
Charon exactly fifty-six days, in the most wretched condition that
can be described: but I hoped now to get the better of my complaint
by the help of a few refreshments, such as milk, &c. which could not
be obtained in our former situation. The Society troops (above one
hundred in number) being to set off next day with my empty barges
to La Rochelle, in Patamaca, I reviewed my marines, when I found I
had left out of five officers but two, who were both sick, the three
others being dead; I had also only one serjeant, two corporals, and
fifteen privates, out of fifty-four healthy men, who embarked with
me on the 2d day of last July. This army was not more than
sufficient to defend the hospital, (which was crouded with sick) the
ammunition and victualling magazine, &c. on a spot where lately had
been kept three hundred soldiers, particularly [179]while the enemy
were certainly lurking not far off: in consideration of which, the
Society Captain reinforced me with twenty of his men. The next
evening he entertained me and my two subalterns with a supper of
fresh meat, both roast and boiled, to our great comfort and surprize;
but which, to my unspeakable mortification, proved to be the
individual poor cow with her calf, on whom we had built all our
hopes for a little relief. It appeared that one of his sentinels, as
concerted between them, had shot it by a wilful mistake. Thus did
Captain Orzinga, for the sake of a momentary gratification, deprive
us all of that lasting comfort on which we had so much depended,
and of which we had so much need, being altogether emaciated for
want of wholesome and nutritive food.
On the 29th, having bastonaded my late pilot for stealing from the
soldiers, I dispatched the information to Colonel Fourgeoud, that I
had taken post, and acquainting him with my weak situation,
requested a proper reinforcement. In the evening two of my men
died.
All things now being regulated and settled, I thanked Heaven in the
expectation of getting some rest, being [180]still extremely weak; and
with these cheering hopes retired at ten o’clock at night to my
hammock; but this tranquillity was again of short duration, for
having scarcely closed my eyes I was awaked by my serjeant, and
the following letter put into my hand, sent by an express from the
captain of the militia, or bargers in Cottica.
“Sir,
“This is to acquaint you, that the rebels have burnt three estates by your
side, Suyingheyd, Peru, and L’Esperance, the ruins of which are still
smoking; and that they have cut the throats of all the white inhabitants
that fell in their way. As on their retreat they must pass close by where
you are posted, be on your guard.—I am in haste.
“Your’s, &c.
(Signed) “Stoeleman.”
Conscious of my defenceless situation, I immediately started up; and
the express who brought the letter having spread the news the
moment of his landing, there was no necessity for beating to arms,
since not only the few soldiers who were well, but the whole hospital
burst out; and several of them, in spite of my opposition, crawling
on their hands and feet to their arms, dropped dead upon the spot.
—May I never behold such another scene [181]of misery and distress!
Lame, blind, sick, and wounded, in the hope of preserving a
wretched existence, rushed upon certain death! They could only, in a
word, be compared to the distressed army and navy at Carthagena,
commanded by the British Admiral Vernon, whom Thomson
describes—
On the 1st of September we waited once more till morning, and then
buried another of my poor men; while I yet cannot conceive how
any one was able to survive such a series of toil, in such a
debilitated state, and in a tropical climate; yet some did, though few.
At length, being persuaded that the rebels must have past the
Cordon, without having thought proper to pay us a visit on their
retreat, I determined to let the remaining few watch no longer, but
permit them to die a natural death. At last, in the evening, when all
was too late, there came down by water from the post La Rochelle
to our assistance, one officer and ten men.—I having had but nine
left to do the duty at the time of their arrival.
A B C
Fourgeoud’s 1st. Column, 2d. Ditto, 3d. Ditto,
Sub. A. Sub. B. Sub. C.
D E F
Society’s 1st. Column, 2d. Ditto, 3d. Ditto,
Sub. D. Sub. E. Sub. F.
Every thing being ready, according to the above rules, for my small
party, which consisted of myself, an officer of the Society, Mr.
Hertsbergh, one surgeon’s mate, one guide, two serjeants, two
corporals, forty privates, and only eight negro slaves to cut open the
passage, and carry the baggage, we faced to the right at six o’clock
in the morning, and sallied forth into the woods, keeping our course
directly for the Perica river; and having marched till about eleven
o’clock on the Cordon, I discovered, as I had expected, [187]the track
of the rebels by the marks of their footsteps in the mud, by the
broken bottles, plantain-shells, &c. and found that by appearance it
bore towards Pinneburgh, already mentioned.
I had now indeed found the nest, but the birds were flown. We
continued our march till eight o’clock, when we arrived at the
Society post Soribo, in Perica, in a most shocking condition, having
waded through water and mire above our hips, climbed over heaps
of fallen trees, and crept underneath on our bellies. This, however,
was not the worst, for our flesh was terribly mangled and torn by
the thorns, and stung by the Patat lice, ants, and wassy-wassy or
wild bees. This last is an insect not larger than an English blue-bottle
fly, and is of a black colour, quite different from our bees; they are
never kept in hives, but swarm wild in the forest, where they build in
hollow trees or between the branches; their nests being sometimes
as large as an inflated cow’s bladder, to which they bear no bad
resemblance, both in colour and smoothness, except in being less
regularly oval; from these abodes (when the nest or the branches
are inadvertently touched) thousands of warriors sally forth; and this
little flying army is extremely formidable, pitching always by instinct
on the eyes, lips and hair, whence they cannot easily be dislodged;
their stings generally cause a fever, and swell the parts so very much
that they occasion blindness for several hours; their honey [188]is of
a dark-brown colour, and so is their wax, but gummy, being both of
little value.
On the following morning I felt myself better for my night’s rest; but
neither myself nor my men were able to march back, wherefore the
other captain sent a small party of his soldiers to pick up the poor
marines I had lost the day before, and of whom they brought with
them seven, carried in hammocks tied to poles, each by two
negroes, the other three having scrambled back to Devil’s Harwar.
The reader will, I trust, excuse my violence, when I [190]tell him, that
I vowed immediate destruction to the villain: and having ordered a
negro to cut twelve bamboo canes, I retired like a person deprived
of his senses, determined to punish him according to his supposed
crime.
On the 10th there arrived two subalterns, with a second barge full of
men, ammunition, medicine, and provisions, which having marched
into quarters and stowed, I sent for the hapless Fowler, whose face
being in three places wounded, I locked him up in a room, and,