Download as pdf or txt
Download as pdf or txt
You are on page 1of 67

Azure Data Factory Cookbook - Second

Edition Dmitry Foshin


Visit to download the full and correct content document:
https://ebookmass.com/product/azure-data-factory-cookbook-second-edition-dmitry-fo
shin/
Azure Data Factory Cookbook
Second Edition

A data engineer’s guide to building and


managing ETL and ELT pipelines with data
integration

Dmitry Foshin

Tonya Chernyshova

Dmitry Anoshin

Xenia Hertzenberg

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.

Senior Publishing Product Manager: Gebin George

Acquisition Editor – Peer Reviews: Tejas Mhasvekar

Project Editor: Janice Gonsalves

Content Development Editors: Soham Amburle, Elliot Dallow

Copy Editor: Safis Editing


Technical Editor: Anjitha Murali

Proofreader: Safis Editing

Indexer: Tejal Daruwale Soni

Presentation Designer: Ajay Patule

Developer Relations Marketing Executive: Vignesh Raju

First published: December 2020

Second edition: February 2024

Production reference: 1220224

Published by Packt Publishing Ltd.

Grosvenor House

11 St Paul’s Square

Birmingham

B3 1RB, UK.

ISBN 978-1-80324-659-8

www.packt.com
Contributors

About the authors


Dmitry Foshin is a lead data engineer with 12+ years of experience in IT
and Big Data. He focuses on delivering business insights through adept data
engineering, analytics, and visualization. He excels in leading and
executing full-stack big data analytics solutions, from ETL processes to
data warehouses, utilizing Azure cloud technologies and modern BI tools.
Along with being a co-author of the Azure Data Factory Cookbook, Dmitry
has also launched successful data analytics projects for FMCG corporations
across Europe.

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 a proven track


record of successfully delivering scalable, maintainable, and impactful data
products.

She is highly proficient in data modeling, automation, cloud computing, and


data visualization, consistently driving data-driven insights and business
growth.
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 Hertzenberg is a software engineer at Microsoft and has extensive


knowledge in the field of data engineering, big data pipelines, data
warehousing, and systems architecture.
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 extensively 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
Contents
Preface
Who this book is for
What this book covers
To get the most out of this book
Get in touch
1. Getting Started with ADF
Introduction to the Azure data platform
Getting ready
How to do it...
How it works...
Creating and executing our first job in ADF
Getting ready
How to do it...
How it works...
There’s more...
See also
Creating an ADF pipeline using the Copy Data tool
Getting ready
How to do it...
How it works...
There’s more...
Creating an ADF pipeline using Python
Getting ready
How to do it...
How it works...
There’s more...
See also
Creating a data factory using PowerShell
Getting ready
How to do it…
How it works...
There’s more...
See also
Using templates to create ADF pipelines
Getting ready
How to do it...
How it works...
See also
Creating an Azure Data Factory using Azure Bicep
Getting ready
How to do it...
How it works...
There’s more...
See also
2. Orchestration and Control Flow
Technical requirements
Using parameters and built-in functions
Getting ready
How to do it…
How it works…
There’s more…
See also
Using the Metadata and Stored Procedure activities
Getting ready
How to do it…
How it works…
There’s more…
Using the ForEach and Filter activities
Getting ready
How to do it…
How it works…
Chaining and branching activities within a pipeline
Getting ready
How to do it…
There’s more…
Using the Lookup, Web, and Execute Pipeline activities
Getting ready
How to do it…
How it works…
There’s more…
See also
Creating event-based pipeline triggers
Getting ready
How to do it…
How it works…
There’s more…
See also
3. Setting Up Synapse Analytics
Technical requirements
Creating an Azure Synapse workspace
Getting ready
How to do it…
There’s more…
Loading data to Azure Synapse Analytics using Azure Data
Factory
Getting ready
How to do it…
How it works…
There’s more…
Loading data to Azure Synapse Analytics using Azure Data
Studio
Getting ready
How to do it…
How it works…
There’s more…
Loading data to Azure Synapse Analytics using bulk load
Getting ready
How to do it…
How it works…
Pausing/resuming an Azure Synapse SQL pool from Azure Data
Factory
Getting ready
How to do it…
How it works…
There’s more…
Working with Azure Purview using Azure Synapse
Getting ready
How to do it…
How it works…
There’s more...
Copying data in Azure Synapse Integrate
Getting ready
How to do it…
How it works…
Using a Synapse serverless SQL pool
Getting ready
How to do it…
How it works…
There’s more…
4. Working with Data Lake and Spark Pools
Technical requirements
Setting up Azure Data Lake Storage Gen2
Getting ready
How to do it...
There’s more...
Creating a Synapse Analytics Spark pool
Getting ready
How to do it...
How it works...
There’s more...
Integrating Azure Data Lake and running Spark pool jobs
Getting ready
How to do it...
How it works...
Building and orchestrating a data pipeline for Data Lake and
Spark
Getting ready
How to do it...
How it works...
There’s more...
5. Working with Big Data and Databricks
Introduction
Technical requirements
Setting up an HDInsight cluster
Getting ready
How to do it…
How it works…
There is more…
Processing data from Azure Data Lake with HDInsight and Hive
Getting ready
How to do it…
How it works…
Building data models in Delta Lake and data pipeline jobs with
Databricks
Getting ready
How to do it…
How it works…
There is more…
Ingesting data into Delta Lake using Mapping Data Flows
Getting ready
How to do it…
How it works…
There is more…
External integrations with other compute engines (Snowflake)
Getting ready
How to do it…
How it works…
There is more…
6. Data Migration – Azure Data Factory and Other Cloud Services
Technical requirements
Copying data from Amazon S3 to Azure Blob storage
Getting ready
How to do it…
How it works…
Copying large datasets from S3 to ADLS
Getting ready
How to do it…
Creating the linked services and dataset for the pipeline
Creating the inner pipeline
Creating the outer pipeline
How it works…
See also
Copying data from Google Cloud Storage to Azure Data Lake
Getting ready
How to do it…
How it works…
See also
Copying data from Google BigQuery to Azure Data Lake Store
Getting ready
How to do it…
Migrating data from Google BigQuery to Azure Synapse
Getting ready
How to do it…
See also
7. Extending Azure Data Factory with Logic Apps and Azure Functions
Technical requirements
Triggering your data processing with Logic Apps
Getting ready
How to do it…
How it works…
There’s more…
Using the Web activity to call an Azure logic app
Getting ready
How to do it…
How it works…
There’s more…
Adding flexibility to your pipelines with Azure Functions
Getting ready…
How to do it…
How it works…
There’s more…
8. Microsoft Fabric and Power BI, Azure ML, and Cognitive Services
Technical requirements
Introducing Microsoft Fabric and Data Factory
Getting ready
How to do it...
How it works...
Microsoft Fabric Data Factory: A closer look at the pipelines
Getting ready
How to do it...
How it works...
Loading data with Microsoft Fabric Dataflows
Getting ready
How to do it...
How it works...
There’s more...
Automatically building ML models with speed and scale
Getting ready
How to do it...
How it works…
There’s more...
Analyzing and transforming data with Azure AI and prebuilt ML
models
Getting ready
How to do it...
How it works...
There’s more...
9. Managing Deployment Processes with Azure DevOps
Technical requirements
Setting up Azure DevOps
Getting ready
How to do it...
How it works...
Publishing changes to ADF
Getting ready
How to do it...
How it works...
Deploying your features into the master branch
Getting ready
How to do it...
How it works...
Getting ready for the CI/CD of ADF
Getting ready
How to do it...
How it works...
Creating an Azure pipeline for CD
Getting ready
How to do it...
How it works...
There’s more...
Install and configure Visual Studio to work with ADF deployment
Getting ready
How to do it...
How it works...
Setting up ADF as a Visual Studio project
Getting ready
How to do it...
How it works…
Running Airflow DAGs with ADF
Getting ready
How to do it...
How it works...
10. Monitoring and Troubleshooting Data Pipelines
Technical requirements
Monitoring pipeline runs and integration runtimes
Getting ready
How to do it…
How it works…
Investigating failures – running pipelines in debug mode
Getting ready
How to do it…
How it works…
There’s more…
See also
Rerunning activities
Getting ready
How to do it…
How it works…
Configuring alerts for your Azure Data Factory runs
Getting ready
How to do it…
How it works…
There’s more…
See also
11. Working with Azure Data Explorer
Introduction to ADX
See also
Creating an ADX cluster and ingesting data
Getting ready
How to do it...
How it works...
How it works…
See also
Orchestrating ADX data with Azure Data Factory
Getting ready
How to do it...
How it works...
There’s more...
See also
Ingesting data from Azure Blob storage to ADX in Azure Data
Factory using the Copy activity
Getting ready
How to do it...
How it works...
There’s more...
12. The Best Practices of Working with ADF
Technical requirements
Setting up roles and permissions with access levels in ADF
Getting ready
How to do it…
How it works…
There is more…
See also
Setting up Meta ETL with ADF
Getting ready
How to do it...
How it works…
There’s more...
Leveraging ADF scalability: Performance tuning of an ADF
pipeline
Getting ready
How to do it…
How it works…
There is more…
See also
Using ADF disaster recovery built-in features
Getting ready
How to do it...
How it works...
Change Data Capture
Getting ready
How to do it…
How it works…
There is more…
Managing Data Factory costs with FinOps
Getting ready
How to do it...
How it works...
Other Books You May Enjoy
Index
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 infrastructure 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.
Who this book is for
This book is for ETL developers, data warehouse and ETL architects,
software professionals, and anyone who wants to learn about the common
and not-so-common challenges that are faced while developing traditional
and hybrid ETL solutions using Microsoft’s ADF, Synapse Analytics, and
Fabric. You’ll also find this book useful if you are looking for recipes to
improve or enhance your existing ETL pipelines. Basic knowledge of data
warehousing is expected.
What this book covers
Chapter 1, Getting Started with ADF, will provide a general introduction to
the Azure data platform. In this chapter, you will learn about the ADF
interface and options as well as common use cases. You will perform hands-
on exercises in order to find ADF in the Azure portal and create your first
ADF job.

Chapter 2, Orchestration and Control Flow, will introduce you to the


building blocks of data processing 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.

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.

To get the most out of this book


Basic knowledge of data warehousing is expected. You’ll need an Azure
subscription to follow all the recipes given in the book. If you’re using a
paid subscription, make sure to pause or delete the services after you are
done using them, to avoid high usage costs.

Software/Hardware covered in the book OS Requirements

Azure subscription (portal.azure.com) Windows, macOS, or


Linux

SQL Server Management Studio Windows

Azure Data Studio Windows, macOS, or


Linux

Power BI or Microsoft Fabric subscription Windows, macOS, or


account Linux

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.

Download the example code files


You can download the example code files for this book from GitHub at
https://github.com/PacktPublishing/Azure-Data-
Factory-Cookbook-Second-Edition. In case there’s an update to
the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos
available at https://github.com/PacktPublishing/. Check
them out!

Download the color images


We also provide a PDF file that has color images of the
screenshots/diagrams used in this book. You can download it here:
https://packt.link/gbp/9781803246598.

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.”

A block of code is set as follows:

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

When we wish to draw your attention to a particular part of a code block,


the relevant lines or items are set in bold:

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

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

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

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.”

Warnings or important notes appear like this.


Tips and tricks appear like this.

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 [email protected] .

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.
Share your thoughts
Once you’ve read Azure Data Factory Cookbook, we’d love to hear your
thoughts! Please click here to go straight to the Amazon
review page for this book and share your feedback.

Your review is important to us and the tech community and will help us
make sure we’re delivering excellent quality content.
Download a free PDF copy of this
book
Thanks for purchasing this book!

Do you like to read on the go but are unable to carry your print books
everywhere?

Is your eBook purchase not compatible with the device of your choice?
Don’t worry, now with every Packt book you get a DRM-free PDF version
of that book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code
from your favorite technical books directly into your application.
The perks don’t stop there, you can get exclusive access to discounts,
newsletters, and great free content in your inbox daily
Follow these simple steps to get the benefits:

1. Scan the QR code or visit the link below

https://packt.link/free-ebook/9781803246598
2. Submit your proof of purchase
3. That’s it! We’ll send your free PDF and other benefits to your email
directly
1

Getting Started with ADF

Microsoft Azure is a public cloud vendor. It offers different services for modern
organizations. The Azure cloud has several key components, such as compute,
storage, databases, and networks. They serve as building blocks for any
organization that wants to reap the benefits of cloud computing. There are many
benefits to using the cloud, including utilities, metrics, elasticity, and security.
Many organizations across the world already benefit from cloud deployment and
have fully moved to the Azure cloud. They deploy business applications and run
their business on the cloud. As a result, their data is stored in cloud storage and
cloud applications.

Microsoft Azure offers a cloud analytics stack that helps us to build modern
analytics solutions, extract data from on-premises and the cloud, and use data for
decision-making progress, searching patterns in data, and deploying machine
learning applications.
In this chapter, we will meet Azure data platform services and the main cloud
data integration service – Azure Data Factory (ADF). We will log in to Azure
and navigate to the Data Factory service in order to create the first data pipeline
and run the copy activity. Then, we will do the same exercise but will use
different methods of data factory management and control by using Python,
PowerShell, and the Copy Data tool.

If you don’t have an Azure account, we will cover how you can get a free Azure
account.

In this chapter, we will cover the following recipes:


Introduction to the Azure data platform
Creating and executing our first job in ADF
Creating an ADF pipeline using the Copy Data tool
Creating an ADF pipeline using Python
Creating a data factory using PowerShell
Using templates to create ADF pipelines
Creating an Azure Data Factory using Azure Bicep

Introduction to the Azure data


platform
The Azure data platform provides us with a number of data services for
databases, data storage, and analytics. In Table 1.1, you can find a list of services
and their purpose:
Figure 1.1: Azure data platform services

Using Azure data platform services can help you build a modern analytics
solution that is secure and scalable. The following diagram shows an example of
a typical modern cloud analytics architecture:
Figure 1.2: Modern analytics solution architecture

You can find most of the Azure data platform services here. ADF is a core service
for data movement and transformation.

Let’s learn more about the reference architecture in Figure 1.1. It starts with
source systems. We can collect data from files, databases, APIs, IoT, and so on.
Then, we can use Event Hubs for streaming data and ADF for batch operations.
ADF will push data into Azure Data Lake as a staging area, and then we can
prepare data for analytics and reporting in Azure Synapse Analytics. Moreover,
we can use Databricks for big data processing and machine learning models.
Power BI is the ultimate data visualization service. Finally, we can push data into
Azure Cosmos DB if we want to use data in business applications.

Getting ready
In this recipe, we will create a free Azure account, log in to the Azure portal, and
locate ADF services. If you have an Azure account already, you can skip the
creation of the account and log straight in to the portal.
How to do it...
Open https://azure.microsoft.com/free/, then take the following
steps:

1. Click Start Free.


2. You can sign into your existing Microsoft account or create a new one. Let’s
create one as an example.
3. Enter an email address in the format [email protected] and click Next.
4. Enter a password of your choice.
5. Verify your email by entering the code and click Next.
6. Fill in the information for your profile (Country, Name, and so on). It will
also require your credit card information.
7. After you have finished the account creation, it will bring you to the
Microsoft Azure portal, as shown in the following screenshot:

Figure 1.3: Azure portal

8. Now, we can explore the Azure portal and find Azure data services. Let’s
find Azure Synapse Analytics. In the search bar, enter Azure Synapse
Analytics and choose Azure Synapse Analytics. It will open the Synapse
control panel, as shown in the following screenshot:

Figure 1.4: Azure Synapse Analytics menu

Here, we can launch a new instance of a Synapse Analytics workspace. Or


you can find the Data Factories menu and launch a new Data Factory by
using the Azure portal:

Figure 1.5: Azure Data factories menu

In the next recipe, we will create a new data factory.


Before doing anything with ADF, though, let’s review what we have covered
about an Azure account and the difference between Synapse Analytics and Data
Factories.

How it works...
Now that we have created a free Azure account, it gives us the following benefits:
12 months of free access to popular products
$250 worth of credit
25+ always-free products

The Azure account we created is free and you won’t be charged unless you
choose to upgrade.
Moreover, we discovered the Azure data platform products, which we will use
over the course of the book. The Azure portal has a friendly UI where we can
easily locate, launch, pause, or terminate the service. Aside from the UI, Azure
offers us other ways of communicating with Azure services, using the
Command-line Interface (CLI), APIs, SDKs, and so on.
Using the Microsoft Azure portal, you can choose the Analytics category and it
will show you all the analytics services, as shown in the following screenshot:
Figure 1.6: Azure analytics services

Both Azure Synapse Analytics (ASA) and ADF have overlap. ASA workspaces
are an integrated analytics service that combines big data and data warehousing.
It allows you to perform data integration, data warehousing, and big data
analytics using a single service. Moreover, it allows you to do a wide range of
data integration options, including SQL Server Integration Services (SSIS),
ADF, or Spark transformations.

So, when to use what? If you need a simple and cost-effective way to move and
transform data from various sources to various destinations, ADF is a good
choice. However, if you need a more comprehensive analytics solution that can
handle both big data and data warehousing, ASA is the way to go. In other words,
standalone ADF is good for the orchestration of your data pipelines and
workloads in general. But if you are willing to leverage Synapse Data Warehouse
or big data solutions, you should consider using ADF as a part of ASA
workspaces. Both have similar interfaces and functionality.
In this chapter, we will be using a standalone ADF.
Creating and executing our first job
in ADF
ADF allows us to create workflows for transforming and orchestrating data
movement. You may think of ADF as an Extract, Transform, Load (ETL) tool
for the Azure cloud and the Azure data platform. ADF is Software as a Service
(SaaS). This means that we don’t need to deploy any hardware or software. We
pay for what we use. Often, ADF is referred to as code-free ETL as a service or
managed service. The key operations of ADF are listed here:

Ingest: Allows us to collect data and load it into Azure data platform storage
or any other target location. ADF has 90+ data connectors.
Control flow: Allows us to design code-free extracting and loading
workflows.
Data flow: Allows us to design code-free data transformations.
Schedule: Allows us to schedule ETL jobs.
Monitor: Allows us to monitor ETL jobs.

We have learned about the key operations of ADF. Next, we should try them.

Getting ready
In this recipe, we will continue from the previous recipe, where we found ASA in
the Azure console. We will create a data factory using a straightforward method –
through the ADF User Interface (UI) via the Azure portal UI. It is important to
have the correct permissions to create a new data factory. In our example, we are
using a super admin, so we should be good to go.

During the exercise, we will create a new resource group. It


is a collection of resources that share the same life cycle,
permissions, and policies.
How to do it...
Let’s get back to our data factory:

1. If you have closed the Data Factory console, you should open it again.
Search for Data factories and click Enter.
2. Click Create data factory, or Add if you are on the Data factories screen,
and it will open the project details, where we will choose a subscription (in
our case, Free Trial).
3. We haven’t created a resource group yet. Click Create new and type the
name ADFCookbook . Choose East US for Region, give the name as
ADFcookbookJob-<YOUR NAME> (in my case, ADFcookbookJob-Dmitry ), and
leave the version as V2. Then, click Next: Git Configuration.
4. We can use GitHub or Azure DevOps. We won’t configure anything yet so
we will select Configure Git later. Then, click Next: Networking.
5. We have an option to increase the security of our pipelines using Managed
Virtual Network and Private endpoint. For this recipe, we will use the
default settings. Click Next.
6. Optionally, you can specify tags. Then, click Next: Review + Create. ADF
will validate your settings and will allow you to click Create.
7. Azure will deploy the data factory. We can choose our data factory and click
Launch Studio. This will open the ADF UI home page, where we can find
lots of useful tutorials and webinars under Help/Information in the top-right
corner.
8. From the left panel, choose the New Pipeline icon, as shown in the
following screenshot, and it will open a window where we will start the
creation of the pipeline. Choose New pipeline and it will open the pipeline1
window, where we must provide the following information: input, output,
and compute. Add the name ADF-cookbook-pipeline1 and click Validate
All:

Figure 1.7 : ADF resources

9. When executing Step 8, you will find out that you can’t save the pipeline
without the activity. For our new data pipeline, we will do a simple copy
data activity. We will copy the file from one blob folder to another. In this
chapter, we won’t spend time on spinning resources such as databases,
Synapse, or Databricks. Later in this book, you will learn about using ADF
with other data platform services. In order to copy data from Blob storage,
we should create an Azure storage account and a Blob container.
10. Let’s create the Azure storage account. Go to All Services | Storage |
Storage Accounts.
11. Click + Add.
12. Use our Free Trial subscription. For the resource group, we will use
ADFCookbook. Give a name for the storage account, such as
adfcookbookstoragev2 , then click Review and Create. The name should be
unique to you.
13. Click Go to Resource and select Containers on the left sidebar:
Figure 1.8 : Azure storage account UI

14. Click + Container and enter the name adfcookbook .

15. Now, we want to upload a data file into the SalesOrders.txt file. You can
get this file from the book’s GitHub account at
https://github.com/PacktPublishing/Azure-Data-
Factory-Cookbook-Second-Edition/Chapter01/. Go to the
adfcookbook container and click Upload. We will specify the folder name
as input . We just uploaded the file to the cloud! You can find it with the
/container/folder/file – adfcookbook/input/SalesOrders.txt path.
16. Next, we can go back to ADF. In order to finish the pipeline, we should add
an input dataset and create a new linked service.
17. In the ADF studio, click the Manage icon from the left sidebar. This will
open the linked services. Click + New and choose Azure Blob Storage, then
click Continue.
18. We can optionally change the name or leave it as the default, but we have to
specify the subscription in From Azure Subscription and choose the Azure
Subscriptions and Storage account name that we just created.
19. Click Test Connection and, if all is good, click Create.
20. Next, we will add a dataset. Go to our pipeline and click New dataset, as
shown in the following screenshot:

Figure 1.9: ADF resources

21. Choose Azure Blob Storage and click Continue. Choose the Binary format
type for our text file and click Continue.
22. Now, we can specify the AzureBlobStorage1 linked services and we will
specify the path to the adfcookbook/input/SalesOrders.txt file and click
Create.
23. We can give the name of the dataset in Properties. Type in
SalesOrdersDataset and click Validate all. We shouldn’t encounter any

issues with data.


24. We should add one more dataset as the output for our job. Let’s create a new
dataset with the name SalesOrdersDatasetOutput and path
adfcookbook/output/SalesOrders.txt .

25. Now, we can go back to our data pipeline. We couldn’t save it when we
created it without a proper activity. Now, we have all that we need in order
to finish the pipeline. Add the new pipeline and give it the name ADF-

cookbook-pipeline1 .Then, from the activity list, expand Move &


transform and drag and drop the Copy Data step to the canvas.
26. We have to specify the parameters of the step – the source and sink
information. Click the Source tab and choose our dataset,
SalesOrdersDataset.
27. Click the Sink tab and choose SalesOrdersDatasetOutput. This will be our
output folder.
28. Now, we can publish two datasets and one pipeline. Click Publish All.
29. Then, we can trigger our pipeline manually. Click Add trigger, as shown in
the following screenshot:

Figure 1.10 : ADF canvas with the Copy Data activity

30. Select Trigger Now. It will launch our job.


31. We can click on Monitor from the left sidebar and find the pipeline runs. In
the case of failure, we can pick up the logs here and find the root cause. In
our case, the ADF-cookbook-pipeline1 pipeline succeeds. In order to see the
outcome, we should go to Azure Storage and open our container. You can
find the additional Output folder and a file named SalesOrders.txt there.

We have just created our first job using the UI. Let’s learn more about ADF.

How it works...
Using the ADF UI, we created a new pipeline – an ETL job. We specified input
and output datasets and used Azure Blob storage as a linked service. The linked
service itself is a kind of connection string. ADF is using the linked service in
order to connect external resources. On the other hand, we have datasets. They
represent the data structure for the data stores. We performed the simple activity
of copying data from one folder to another. After the job ran, we reviewed the
Monitor section with the job run logs.

There’s more...
An ADF pipeline is a set of JSON config files. You can also view the JSON for
each pipeline, dataset, and so on in the portal by clicking the three dots in the top-
right corner. We are using the UI to create the configuration file and run the job.
You can review the JSON config file by clicking on Download support files to
download a JSON file, as shown in the following figure:
Another random document with
no related content on Scribd:
Schlummer, wie er erquicklicher auch bei uns im kühlen Europa nicht
gedacht werden kann; die Trogform des Safaribettes ist an sich
schon weniger bequem; kommt nun zu dem Temperaturminimum
etwa eine Stunde vor Sonnenaufgang, das den Schläfer stets
erwachen und nach einer zweiten Decke greifen läßt, auch noch das
Hustenkonzert einer größeren Karawane, dann ade süßer
Schlummer! Bei unserem Marsch von Lindi bis Massassi hatte sich
die große Schar der Polizeisoldaten stets im engen Kreis, die Köpfe
nach außen, um unsere Zelte gelagert; dann war in den schneidend
kalten Nächten von Nangoo und Chikugwe alsbald ein Gehuste und
Gespucke losgegangen, daß man wirklich nicht wußte, ob man die
unglücklichen frierenden Kerle draußen oder aber sich selbst mehr
bedauern sollte. Hier in Mwiti hätte ich meine Leibgarde wie auch
meine Träger sehr gern weit von unserem Zeltplatz untergebracht,
aber der kommandierende Gefreite hat mir erklärt, daß das nicht
gehe; die Wangoni seien im Anzuge. So hat sich mein Dutzend
Krieger, denn so viel hat mir Herr Ewerbeck als Schutztruppe
mitgegeben, wieder rings um uns herum gelagert; wieder tönt das
Gehuste ohne Unterlaß in mein warmes Zelt hinein, so daß an
Schlaf kaum zu denken ist; aber diesmal ist das Mitleid mit den
Kriegern doch größer als der Ärger über die unausgesetzte Störung.
Und es ist auch nur zu berechtigt. Die kleine Ebene vor Nakaams
Palais, auf der wir lagern, ist fast baumlos; steil von oben, durch
nichts aufgehalten, stürzt auf sie der eisigkalte Plateauwind herunter.
Zwar hat sich jeder Soldat neben der Matte, auf der er liegt, und dem
Pfahl, an dem Gewehr und Patronengürtel hängen, ein kräftiges
Feuer gemacht, doch was nützt das den Männern, deren Körper
durch das dünne Khaki trotzdem einer ungehinderten Ausstrahlung
ausgesetzt sind.
Es begreife die Negerseele wer da kann. Ich habe am nächsten
Morgen Soldaten und Träger versammelt und habe ihnen gesagt:
„Kerls, ihr friert doch wie die Schneider; gleich geht los und baut
euch Strohhütten, oder, wenn euch das zuviel ist, wenigstens
Windschirme.“ „Ndio, Bwana, jawohl, Herr!“ hat die ganze Schar
geantwortet; als ich mich aber am Nachmittag erkundigte, wo denn
ihre Bauten seien, da kam’s heraus: ich marschiere, hieß es, doch
bald weiter, da hätte es keinen Zweck, erst noch Wände zu bauen.
„Gut,“ habe ich ihnen da sehr kühl erwidert, „dann friert ihr eben.
Wer mir aber in den nächsten Tagen mit Katarrh kommt — fügte ich
für mich in Gedanken hinzu —, den werden wir zur Abwechselung
einmal nicht mit dem lieblichen Aspirin behandeln, sondern mit
Chinin, notabene ohne Wasser, und kauen sollen die Burschen
diese schöne, kräftige Daua vor meinen Augen.“ So verdirbt Afrika
den Charakter, leider nicht nur den der Schwarzen.
Mein zweiter Tag in Mwiti hat mir auch noch manches Lehrreiche
geboten. Mir mußte das Fieber, von dem ich soeben erst erstanden
bin, bereits in den Gliedern stecken; in merkwürdiger körperlicher
Erschlaffung war ich vormittags in meinem Liegestuhl unter
Nakaams Barasa sanft entschlummert. Klatsch — huuh; klatsch —
huuuh; klatsch — huuuh, tönt es dem Erwachenden ans Ohr. Ein
Blick nach links lehrt mich, daß der blonde Nils in seiner Eigenschaft
als interimistischer Unterpräfekt wie ein zweiter Salomo als Richter
waltet. Nun kenne ich zwar Gerichtssitzungen schon seit Lindi, aber
sie sind hier immer interessant, und so war ich im nächsten
Augenblick zur Stelle. Der Delinquent hatte unter bedeutendem
Wehgeheul inzwischen seine fünf wohlgezählten Hiebe erhalten; er
stand jetzt wieder aufrecht und rieb sich mit erklärlichen gemischten
Gefühlen die wunde Stelle; doch frech sah er immer noch aus. Nach
gegenwärtiger Landessitte etwas angesäuselt, hatte er sich im
Verhör erkühnt, Nils Knudsen mit einem besonderen Namen,
anscheinend dem Spitznamen des Norwegers bei den Negern, zu
belegen; dies durfte natürlich nicht ungerochen bleiben, und daher
die Exekution. Der Neger betrachtet sie übrigens als ganz
selbstverständlich; er würde sich aufs höchste wundern, wenn nicht
jede Ungebühr in dieser Weise und ohne Verzug gesühnt würde, ja
er würde uns direkt für schlapp und keineswegs als seine Herren
betrachten.
Hofinneres in Mwiti.
Einen ebenso tragikomischen Anstrich hatte auch der nächste
Fall, zu dem ich ebenfalls erst am Schluß des Verhörs der drei
Beteiligten hinzukam. Ich sehe, wie der Gefreite Saleh mit einem
derben Kokosstrick, wie er von den Trägern benutzt wird, ihre Last
durch Umschnüren mit ihm handlich zu gestalten, über den Platz eilt.
Im selben Augenblick hat er auch schon einem vor dem Richter Nils
stehenden schwarzen Jüngling die Arme stramm auf dem Rücken
gefesselt. Dieser hat die Prozedur stillschweigend über sich ergehen
lassen; nun aber erhebt sich ein unglaublich lebhaftes Gerede. Mit
einer Art Lassowurf hat Saleh einem ebendort stehenden
jugendlichen Frauenzimmer, an dem mir nichts so sehr auffällt wie
die geradezu hottentottenhaft weit ausladende Gesäßpartie, das
andere Ende des Strickes um die Hüfte geworfen; blitzschnell ist
auch sie gefesselt und gefangen. „Nanu, was ist denn hier los?“
wage ich in den merkwürdigen Auftritt hineinzuwerfen.
„Sehen Sie sich nur einmal den andern an“, sagt der moderne
Salomo. „Dieser hier und das Weibsbild sind Mann und Frau; mit
dem andern aber hat die Frau, während der Mann verreist war,
monatelang zusammengelebt. Und als der ahnungslose Ehemann
zurückkommt und das Pärchen hübsch beisammen findet, da hat ihn
dieser Halunke hier zum Überfluß auch noch in die Hand gebissen.“
„So, und zur Belohnung binden Sie das saubere Pärchen nun
auch noch zusammen?“
„Zur Belohnung gerade nicht, aber die beiden müssen nach Lindi
hinunter zu ihrer Aburteilung — ein paar Monate Kette wird er wohl
schon kriegen — und da weiß ich wirklich nicht, wie ich sie anders
transportieren soll.“
Ich habe selten ein paar so vergnügte Gesichter gesehen wie die
Visagen dieses netten Pärchens, als sie abgeführt wurden.
Schon den ganzen Tag hatte ich einen meiner Träger um mein
Zelt herumschleichen sehen. Am Nachmittag kam der Bursche
näher; er wolle Daua, sagte er. Wofür? frage ich ihn kühl. Für eine
Wunde, lautet die Antwort. Ich, in der Meinung, der Mensch habe
sich eine Verletzung auf dem Marsch zugezogen, lasse den braven
Stamburi holen, jenen Askari, dem ich die therapeutische
Behandlung aller jener Fälle anvertraut habe, die ich nicht selbst
behandeln mag. Stamburi befreit mit nicht geringer Mühe das
fragliche Bein erst von einer fingerdicken Dreckkruste; neugierig bin
auch ich näher getreten, doch was muß ich sehen! Eine uralte
Wunde vorn auf dem Schienbein, wie eine Handfläche groß,
stinkfaul und bis auf den Knochen durchgefressen. Entrüstet fahre
ich Herrn Cigaretti — so heißt der Schmierlümmel — an, er habe
mich betrogen, er sei kein Träger, sondern ein Kranker, der ins
Hospital gehöre; seine Wunde sei nicht frisch, sondern schon
Monate alt; er werde mit der nächsten Gelegenheit nach Lindi
hinuntergeschickt werden. Sehr ruhig und frech heißt es darauf:
Lindi hapana, Bwana, er sei für sechs Monate gedungen, und eher
zu gehen fiele ihm gar nicht ein. Ich bin nun in einer etwas
unangenehmen Lage, da ich die bezüglichen Bestimmungen nicht
kenne; behalte ich den Burschen bei mir, so wird er eines schönen
Tags selbst transportunfähig oder geht wohl gar ein; jage ich ihn
aber in den Busch, so fressen ihn die Löwen. In jedem Fall ist es mir
sehr interessant, zu sehen, wie einseitig das Rechtsgefühl dieses
braven Mannes ausgebildet ist; er besteht auf seinem Schein,
jedoch nur soweit er ihm zu seinem Vorteil gereicht.
Und dann dieses schreckliche Wort hapana! Man würde die
ganze schwarze Rasse am besten mit zwei kleinen Wörtern
charakterisieren können. Das eine ist „hapana“, wörtlich: es ist nicht,
es gibt nicht, verallgemeinert: nein; das andere lautet: bado, noch
nicht. Einen von den beiden Ausdrücken bekommt man unter
hundert Fragen mindestens 99mal zur Antwort. „Hast du das und
das getan?“ oder: „Ist das und das zur Stelle?“ fragt der Europäer.
„Bado“ heißt es das eine Mal, hapana zum andern. Ich habe schon
den Vorschlag gemacht, die ganzen Bantu-Idiome des Ostens unter
dem Kollektivbegriff des Kihapana oder des Kibado
zusammenzufassen. Zunächst macht die Sache dem Weißen Spaß,
zumal besonders das bado dem Gehege der Zähne mit einem
Schmelz entflieht, daß jede höhere Tochter der sprachberühmten
Städte Braunschweig und Celle über eine solche Geziertheit der
Aussprache des „a“ neidisch werden könnte; hat man indessen
immer bloß bado und immer bloß hapana zu hören bekommen, und
niemals ein „Ndio“ oder ein „Me kwisha, ich bin fertig“, so wird man
wild und greift am liebsten zum Kiboko. —
Gegen Abend dieses denkwürdigen Tages ist es, etwa eine
Stunde vor Sonnenuntergang. Mit keckem Schritt tritt ein kleines
Bürschchen von 8 bis 9 Jahren an meinen Tisch heran, breitet auf
mein „Karibu, tritt näher“, eine ganze Anzahl wunderhübsch
verzierter, kleiner Kämme vor meinen Augen aus und bleibt in
erwartungsvoller Pose stehen. Die Dinger sind in der Tat reizend; der
eigentliche Kamm selbst ist aus feinen, gerundeten Holzstäbchen
zusammengesetzt, der ganze Oberteil aber bedeckt mit
buntfarbigem Stroh, das zu schönen geometrischen Mustern
geordnet ist. „Wo werden die Dinger gemacht?“ frage ich den kleinen
Kaufmann. „Karibu sana, hier ganz in der Nähe“, lautet die prompte
Antwort. „Und wer macht diese Kämme?“ „Ein Fundi, ein Meister“,
ertönt es daraufhin, etwas verwundert diesmal, denn der Weiße
sollte doch billig wissen, daß hierzulande alles von
Berufshandwerkern, von Fundi, gefertigt wird. Schnell werden wir
handelseins, ebenso schnell habe ich meinen Tropenhelm mit dem
leichten Filzhut vertauscht, habe noch Kibwana, der merkwürdig
schnellfüßig mit einem rasch umgehängten Gewehr heranspringt,
angeschnauzt, er solle seine Donnerbüchse nur ruhig wieder
weghängen und so mitkommen, da sind wir auch schon mitten drin
im schönen, grünen Urwald. Der kleine Mann eilt mit erstaunlich
raschen Schritten fürbaß, 5 Minuten, 10 Minuten, 15 Minuten. „Na,
wo ist denn dein Fundi?“ frage ich ihn schon ungeduldig. „Karibu
sana“, tönt es beschwichtigend zurück. Aus den 15 Minuten werden
30, werden 40; die Sonne ist schon hinter dem nächsten Bergrücken
verschwunden. Auf meine Anfragen stets eine ausweichende
Antwort: Dort, wo die Schambe ist, dort wohnt der Fundi, oder aber:
Unmittelbar hier vor uns, da ist es. Schließlich springe ich den
kleinen, flinken Führer unversehens von hinten an, indem ich ihn in
Ermangelung eines anderen passenden Angriffspunktes bei beiden
Ohren nehme. Strenges Verhör unter sanfter Nachhilfe an den
Ohrläppchen. Da kommt es denn heraus: es sei reichlich noch
einmal so weit, als wir schon gelaufen seien, und es sei hoch oben
in den Bergen. Demnach wäre ich also frühestens zwischen 7 und 8
Uhr ans Ziel gekommen, in vollkommen dunkler Nacht, gänzlich
unbewaffnet, ohne jede Unterkunft. So weit ging meine Begeisterung
für das Studium der Negertechnik denn doch nicht; ich zog, unter
Zugrundelegung unserer europäischen Ansichten über Nah und
Fern, aber zur schmerzlichen Verwunderung des Autochthonen,
diesem noch einmal die Ohren lang, entließ ihn dann mit leichtem
Klaps und zog unverrichteter Dinge wieder heim. Damals war ich
stark entrüstet über dieses unberechenbare Negervolk; heute muß
ich zugeben, daß es bei uns doch eigentlich wenig anders ist; dem
einen sind 20 Kilometer ein Katzensprung, dem andern die halbe
Meile ein Tagemarsch. Das aber habe ich schon gemerkt: der Neger
rechnet ganz allgemein mit viel größeren Entfernungen und auch mit
größeren Marschleistungen als wir. —
Wieder brennt die Lampe mit unsicher flackerndem Licht unter
Nakaams Barasa. Zwar ist diese besser abgedichtet als gestern,
aber der Sturm braust heute ungleich gewaltiger wie den Abend
vorher.
„Und 60 Millionen Menschen wohnen in Uleia?“ fragt mich
Nakaam ganz verwundert. „60 Millionen? Aber was ist eine Million?
Ist es elfu elfu elfu, 1000 mal 1000 mal 1000?“
Donnerwetter, denke ich, der geht aber in die vollen; 1000 mal
1000 mal 1000, das ist ja eine Milliarde! 60 Milliarden Deutscher,
armes Vaterland! Es lebe die Bevölkerungsstatistik!
Doch soll ich den Nigger enttäuschen? Keinesfalls; wir haben an
Prestige sowieso nicht viel mehr zuzusetzen. So antworte ich ihm
denn: Ndio, elfu elfu elfu und belasse es bei den 60 Milliarden.
Und wieviel Askari hat der Sultani ya Uleia, der deutsche Kaiser?
Hier konnte ich ruhig bei der Wahrheit bleiben, denn in bezug auf
unsere Wehrmacht sind wir Gott sei Dank einstweilen noch allen
möglichen Gegnern über.
„Wenn wir keinen Krieg machen, haben wir 600000 Askari; wenn
wir aber Krieg machen, dann sind es 6 Millionen.“
Nakaam ist keiner von denen, die sich leicht imponieren lassen,
aber als er jetzt stumm nachrechnete: 6 mal elfu elfu elfu, da
wuchsen wir in seinem Ansehen ganz offensichtlich. Doch er ist nicht
nur kritisch veranlagt, sondern auch mit der Tagesgeschichte
wohlvertraut.
„Nicht wahr?“ sagt er, „in dem großen Kriege zwischen den
Russen und den Japanern haben die Russen Haue bekommen?“
Diese Tatsache konnte ich allerdings mit dem besten Willen nicht
wegleugnen, doch hielt ich es für durchaus angebracht, meiner
bejahenden Antwort in einem Atem hinzuzufügen, das wolle nichts
bedeuten, denn wir, die Wadachi, wir seien viel stärker als sie alle
zusammen, als die Russen, die Japaner und auch die Engländer.
Nakaam setzte jetzt endlich eine überzeugte Miene auf; aber ob sie
wirklich echt gewesen ist, wer kann das bei diesem schlauen Fuchs
ermessen.
In der Geographie hatte bis vor kurzem mein Boy Moritz die
beste Note; er hielt seinen Freunden, und auch wer ihm sonst
zuhören mochte, lange Kollegien über Uleia und Amerika, sprach
von Berlin, Hamburg und Leipzig und erklärte dem wißbegierigen
Auditorium mit gleichbleibender Geduld, welchen Daseinszweck auf
dieser Erde nun auch ich, sein Herr und Gebieter, dort im fernen
Uleia habe. Ich sei der Bwana kubwa eines großen, großen Hauses,
und in diesem großen Hause, da seien die Matten und die Stühle
und die Töpfe und die Löffel und die Kokosreiber aller Völker der
Erde, und ich sei hier ins Land gekommen, um nun auch von hier
alle diese schönen Dinge nach Uleia zu bringen. Moritz war also,
das muß man billig anerkennen, ein ganz guter Interpret meiner
Ziele, aber sein Ruhm war verblaßt, als ein paar Tage vor unserm
Abmarsch von Massassi Ali, der Weitgereiste, von Lindi herauf nach
Massassi gekommen war, um von neuem in Knudsens Dienste zu
treten. Jetzt verstummte Moritzens quäkige Stimme, denn nun
konnte Ali berichten, was er mit eigenen Augen in Berlin und
Hamburg gesehen hatte. Als Diener eines weißen Herrn war er in
der Tat im fernen Deutschland gewesen. Nur daß er Leipzig nicht
kannte, betrübte ihn.
Ältere Makonde-Frau im Festschmuck.

Nakaams topographische Kenntnisse waren, wie die Moritzens,


auch nur theoretischer Natur; er kannte zudem nur Berlin. Doch
welch tiefes Interesse hatte dieser Mann an allen möglichen
Einzelheiten einer europäischen Stadt! Die Länge der Straßen wollte
er wissen, die Höhe der Häuser, und wie man hoch oben auf diese
Türme von Häusern hinaufkäme; und wieviel Menschen in einem
Hause wohnten, und wo sie ihre Chakula, ihr Essen, kochten, und
hundert andere Dinge mehr. Für mich mit meinem immerhin
geringen Suaheliwortschatz war es natürlich ganz unmöglich, diese
Wißbegier in ihrem ganzen Umfange zu befriedigen; um so
dankbarer konnte ich Knudsen für seine Aushilfe sein.
Den nächsten Tag sind wir bis zu einem gottverlassenen Nest
namens Mkululu marschiert; es ist noch auf keiner Karte
verzeichnet. Wie stachen die elenden Hütten hier von Nakaams
Palast ab, und wie unendlich schmutzig und verwahrlost waren
Dorfplatz und Barasa! Beide bedurften erst einer gründlichen
Reinigung, bevor wir unsere Zelte unmittelbar am Rasthaus selbst
aufrichten konnten. Und doch müssen wir dem Schicksal danken,
daß wir ganz instinktiv den Schutz dieses dörflichen Strohdaches
gesucht haben. Der Sturm, der uns in Mwiti die Abende so verleidet
hatte, setzte auch hier bald nach Sonnenuntergang ein. Im Freien
wäre überhaupt keines Bleibens gewesen, so wirbelten Staub und
Laub und Gras und Zweige in der Luft herum; doch auch unter der
Barasa war es nicht zum Aushalten. Also marsch ins Zelt und ins
warme Bett hinein. Aber was ist das? Das Bett will heute gar nicht
warm werden; ich nehme zu der einen, gewohnten Kamelhaardecke
noch die zweite. Es nützt alles nichts; ein wahnsinniger Frost
schüttelt meine Glieder, und die Zähne klappern, daß es zeitweise
selbst das Brausen des Sturmes übertönt. Dieses Brausen ist mit
jeder Viertelstunde lauter und fürchterlicher geworden; ich schiebe
mein Frieren auf den üblichen abendlichen Temperatursturz und
stehe auf, um das Zelt noch dichter zu machen. Ich bin gar nicht
einmal ganz aus seinem Innern ins Freie getreten; dennoch bin ich
heilfroh, mich wieder in seinen Schutz zurückgerettet zu haben. Ein
wahrer Hexensabbat umtobte Barasa und Zelt; heulend, sausend,
pfeifend umrasten dicke Wolken von Staub und Unrat meine
schwanke Segeltuchhütte, und wirbelnd umfaßte mich die
Windsbraut, als ich nur ein wenig ins Freie trat. Dazu ein
unaufhörliches Krachen und Brechen ringsum; starke Äste mußten
es sein, die von den hohen Dorfbäumen herabgeschleudert wurden,
und selbst die Bäume schienen einem solchen Aufruhr der Natur
nicht standhalten zu können. Ich habe in jener Nacht kein Auge
schließen können; der starke Schüttelfrost wich bald einem starken
Schweißausbruch; nur der unerbittliche Zwang weiter zu
marschieren, hat mich am frühen Morgen auf die Beine gebracht.
Hüttentypus der Rovumaebene.

Hüttengrundriß.
Über den Gewaltmarsch von Mkululu bis Chingulungulu möchte
ich mich am liebsten ausschweigen; eine rühmliche Rolle kann ich in
meinem Zustand in den Augen unserer Mannschaft an jenem Tage
kaum gespielt haben. Auch Knudsen hatte Fieber. Am frühen
Morgen, solange es noch kühl und der Wald frisch und grün war,
ging es noch. Zwar mit dem Reiten war es nichts. Der Weg führte
zunächst am Westfuß des Makondeplateaus entlang. Es ist dies ein
Gebiet hoher Aufschüttung, zugleich auch eines starken
Quellenreichtums. Alle paar hundert Meter steht infolgedessen die
Karawane am Rande einer viele Meter tief senkrecht
eingeschnittenen Schlucht, die sich die Gewässer in das lockere
Erdreich gegraben haben. Unsicheren Fußes stolpert man den
steilen Abhang hinunter; nur mit Anspannung aller Kräfte des
fiebergeschwächten Körpers kommt man an der
gegenüberliegenden Seite wieder hinauf. So geht das mehr als ein
dutzendmal; da biegt der Führer vom Wege ab und verschwindet
rechts im Pori. Dieses wird lichter und lichter, je weiter die Steilwand
des Plateaus hinter uns zurückbleibt; schließlich ist es die typische
lichte Baumgrassteppe: ein Baum genau wie der andere, frisches
Grün nur hier und da; Unterholz auch nur spärlich, aber wo es
auftritt, von dorniger Beschaffenheit; das Gras an den meisten
Stellen bereits abgebrannt. Dann wirbelt in der glühenden
Mittagshitze eine undurchdringliche Aschenwolke, hervorgerufen
durch lokale Wirbelwinde, mehr wohl noch durch die Tritte der
Marschierenden, um uns herum, alles mit einer dichten schwarzen
Schicht überziehend. Ich habe die Zügel meines Tieres längst aus
der Hand gelassen; zweimal ist es in seinem angeborenen
Stumpfsinn und in seinem natürlichen Bestreben, stets den geraden
Weg zu gehen, in einen Dornenbusch gelaufen, so daß ich wohl
oder übel mich habe nach hinten fallen lassen müssen. Endlich die
erste Erlösung: das stolze Haus des Yaohäuptlings Susa taucht vor
uns auf; wenige Minuten später liegen Herren und Diener keuchend
in seinem Schatten.
Es ist doch etwas Stolzes um die Willensstärke eines
Vollkulturmenschen. Trotz unseres jammervollen Befindens hat es
uns nicht fünf Minuten auf unseren Reisestühlchen gelitten, da
standen Knudsen und ich auch schon in Susas Haus und fragten
und forschten und skizzierten und sammelten. Dieses war auch sehr
wohl angebracht, denn Susa scheint nicht nur persönlich ein ganz
einzigartiger Vertreter seiner Rasse zu sein, sondern auch sein Haus
ist eingerichtet, wie man es beim Neger niemals erwartet hätte. Er
selbst mit langem, schwarzem Vollbart, gut und sauber in weiße
Stoffe gekleidet, von intelligentem Gesichtsausdruck; seine Räume
hoch, außerordentlich sauber mit Lehm ausgestrichen, hell und
luftig. Der Herd ein wirkliches kleines Kunstwerk; zwar auch die
üblichen drei kopfgroßen Steine, aber diese Steine liegen auf einer
erhöhten Plattform aus Lehm, die sich die ganze Küche hindurch in
Meterbreite an der Wand entlang zieht. Rings um das Feuer eine
ganze Reihe höchst merkwürdiger, ebenfalls aus Lehm hergestellter
Konsolen, die, wie der Augenschein lehrt, den rundbäuchigen
Töpfen als Standfläche dienen. Und nun erst der Raum des
Hausherrn selbst! Zu europäischen Kanapees, wie der
Kamerunnigger sie längst in seiner Hütte besitzt, hat es der
Ostafrikaner Gott sei Dank noch nicht gebracht; dafür sehen wir aber
hier die Urform eines Ruhebetts: ebenfalls eine Plattform aus Lehm,
30 Zentimeter hoch, mehr als meterbreit, die Kanten nach außen
abgeschrägt; als Ruhelager für Kopf und Oberkörper eine schiefe
Ebene am oberen Ende; das Ganze endlich mit schönen, sauberen
Matten überdeckt.
Und doch kann ein Mann wie Susa nicht aus seiner Haut. Nach
Besichtigung aller Räume umschreiten wir das Haus. Was hängt
denn da? rufe ich und greife nach einer prächtigen Leberwurst, die
an einem fingerdicken Holzstabe von der Dachtraufe
herniederhängt. Freilich, Form und Aussehen unseres heimatlichen,
schätzenswerten Genußmittels hat das Ding wohl, auch führt der
Baum, auf dem es heranreift, im Munde der Weißen tatsächlich den
Namen Leberwurstbaum, aber im übrigen bestehen zwischen
Leberwurst und Kigelia weiter keine Beziehungen. Nach einigem
Zögern rückte Herr Susa mit einer Erklärung heraus. Es war
natürlich eine Daua, eine Medizin oder ein Amulett oder wie man
solch ein Schutzmittel nennen will. Die Frucht hatte die nicht leichte
Aufgabe, das Dach des Hauses vor den Folgen der hier in der
Ebene angeblich sehr häufigen, starken Windhosen zu schützen,
von denen es hieß, sie trügen mit Vorliebe Hausdächer davon.
Welche Ideenverknüpfung dazu geführt hat, der harmlosen
Baumfrucht die Fähigkeit zuzusprechen, die Natur selbst in ihren
stärksten Kraftäußerungen zu besiegen, war aus Susa nicht
herauszubekommen.
Ruhelager und Herd Susas.
Auch der vorherige Marsch durch das Pori hat mir Gelegenheit
zu ein paar hübschen Beobachtungen gegeben. In malerischem
Durcheinander lagert meine Karawane zur Frühstückspause an
einer verhältnismäßig grünen Stelle im Walde; Knudsen und ich
sitzen etwas abseits, weil meine Geruchsnerven in diesem
Fieberstadium noch sensibler sind als gewöhnlich. Da schlagen
faule Witze an unser Ohr, ganz im Charakter der unserer Soldaten,
wenn ein weibliches Wesen in Rufnähe an einer Kriegerschar
vorüberkommt. Tatsächlich ist die Sachlage die gleiche; im Abstande
von 20 bis 30 Metern sucht ein junges Weib die Gruppe der
Fremdlinge zu umgehen. Das ist nun an sich weiter nichts
Aufregendes, aber plötzlich rufen alle meine Mannen, die ja längst
wissen, was mich am meisten interessiert: „Kipini, bwana, siehe den
Nasenpflock, Herr!“ Im nächsten Augenblick haben einige von ihnen
die Maid auch schon zu uns herangeführt. Es ist allerdings ein
ausnehmend herrliches Exemplar von Ebenholzpflock, was diese
Schöne in ihrem linken Nasenflügel trägt, womöglich noch zierlicher
und geschmackvoller mit Zinnpflöckchen ausgelegt, als man es
sonst zu sehen gewohnt ist. Zuerst steht die Frau unsern
Kaufangeboten glatt ablehnend gegenüber, schließlich aber scheint
doch die Furcht vor so viel wild aussehenden fremden Männern
wirksamer zu sein als selbst der Glanz eines Viertelrupienstücks.
Zögernd fährt sie mit der Linken an die Nase, fast gleichzeitig folgt
die Rechte nach. Mit einem geschickten Druck muß die Linke das
Kipini aus seinem gewohnten Lager befreit haben, denn schon reicht
sie das Ding herüber. Sichtbar ist der ganze Vorgang nicht gewesen,
denn mit einer geradezu unerklärlichen Ängstlichkeit und
Beharrlichkeit hat sie die ganze Nasenpartie mit der ausgebreiteten
Rechten überdeckt. Auch jetzt, nachdem sie längst ihr Silberstück in
Empfang genommen hat, steht sie noch in dieser Haltung da; meine
Leute witzeln von neuem, doch immer fester drückt die Frau die
Rechte auf die entblößte Stelle. Mit diesem Hinweis auf die lokale
Nacktheit haben wir den Vorgang psychologisch unzweifelhaft richtig
gedeutet; mit der Entfernung des Kipini wird das Schamgefühl
verletzt, daher das krampfhafte Zudecken jener Stelle.

Yao-Frauen mit Nasenpflock.


Eine solche „Verlagerung“ des Schamgefühls ist in der
Völkerkunde nichts Seltenes. Mit innigem Behagen lese ich in
meiner Bibel, der Peschelschen Völkerkunde, immer wieder jene
köstliche Stelle, wo der Autor schildert, was ein frommer Moslim aus
Ferghana tun würde, wenn er einem unserer Bälle beiwohnte.
Peschel meint, daß dieser brave Moslim, wenn er die Entblößungen
unserer Frauen und Töchter, die halben Umarmungen bei unseren
Rundtänzen wahrnähme, im stillen nur die Langmut Allahs
bewundern würde, der nicht schon längst Schwefelgluten über
dieses sündhafte und schamlose Geschlecht habe herabregnen
lassen. Denselben Anschauungen entspricht es, daß die Araberin
Fuß, Bein und Busen ohne Verlegenheit sehen läßt, daß aber die
Entblößung des Hinterhauptes bei ihr für noch unanständiger gilt als
die des Gesichts, das ja auch sorgsam verborgen wird. Wieder eine
andere Verlagerung des Schamgefühls ist die ängstlich angestrebte
Bedeckung des Nabels bei den Malaiinnen und auch auf den Tonga-
Inseln, während jeder andere Körperteil skrupellos zur Schau gestellt
wird. Noch weiter von unseren Anschauungen weicht schließlich
diejenige der Chinesen ab, wo es als höchstes Ausmaß der
Unanständigkeit angesehen werden würde, wenn die Frau einem
Manne ihren künstlich verkrüppelten Fuß zeigte; gilt es dort doch
sogar für unschicklich, auch nur von ihm zu sprechen. Würde man in
gleicher Weise die ganze Erde absuchen, eine Unsumme der
verschiedensten, nach unseren Begriffen seltsamsten
Anschauungen über Anstößiges und Gestattetes würde uns dabei
entgegentreten. Unsere eigenen Ansichten über diesen Punkt sind in
dieser langen Reihe auch nur eine von den vielen; auch ist ihre
Berechtigung durchaus nicht besser begründet als irgendeine der
anderen, denn alle diese Anschauungen haben genetisch das
gemeinsam, daß a priori überhaupt nichts als verwerflich und
anstößig erscheint; erst nachdem sich eine bestimmte Ansicht
darüber gebildet hat, welcher Körperteil zu verhüllen und welcher
unbekleidet zu lassen sei, wird ein Verstoß gegen diese Ansicht zu
einer verwerflichen Handlung; nicht früher.
Die andere Beobachtung hat einen ernsthafteren Einschlag. In
dumpfem Brüten zieht die Karawane durch das Pori dahin; alles
„döst“, wie man bei uns in Norddeutschland den Zustand zwischen
Nichtdenkenwollen und Nichtdenkenkönnen bezeichnet. Plötzlich
fliege ich halb aus dem Sattel; mein Reittier ist jäh zur Seite
gesprungen und macht Miene, in den dritten Dornenbusch
hineinzurasen. Da ist auch schon die Ursache. Ein schräg aus dem
Waldboden herausragendes Etwas, das sich bei näherem Zusehen
als ein eingegrabener Baumrindenzylinder entpuppt. Das Ding ist
reichlich einen halben Meter lang und an dem oberen, unbedeckten
Teil mit ein paar vorgesteckten Rindentafeln verschlossen. Von
meinen Leuten weiß niemand aus dem Funde etwas zu machen,
wohl aber bringen ein paar zufällig des Weges kommende
Landeskinder die gewünschte Aufklärung. Es ist ein Kindergrab, und
zwar das eines totgeborenen Kindes. Diese werden bei den Makua
immer in dieser Weise beerdigt, heißt es.

Makuakindergrab.
Nach kurzer Rast bei Susa sind wir von neuem aufgebrochen,
um am selben Tage noch Chingulungulu zu erreichen. Dabei werden
Knudsen und ich von neuem vom Fieber erfaßt; krampfhaft halte ich
mich auf meinem Maultier; auch Knudsen kann sich nur mit Mühe
aufrecht erhalten. In ewigem Einerlei gleitet das lichte Pori an uns
vorüber; Baum für Baum; es ist kein Ende abzusehen. Ich auf dem
Reittier fühle meine Beine nicht mehr; alle paar Minuten schaue ich
nach der Uhr; im Schädel hämmert’s und pocht’s — es ist eine Qual.
Endlich, endlich ein fester Punkt im schrankenlosen Meer der
Bäume: ein umgestürzter Koloß versperrt den Weg. Wie ein Klotz ist
der Norweger auf ihn niedergesunken; nur nach langem Zureden
bringe ich den Fiebernden wieder empor. Noch einmal geht’s weiter;
da hört das Ohr Stimmengewirr. Wie durch einen Schleier erkenne
ich Matola, der mir in Massassi bereits begegnet ist; bei ihm sind
eine Anzahl weißgekleideter Männer, die sich immerfort feierlich
verneigen. Ich lächle und winke mit der Hand. Wir kommen an ein
von vielen Säulen getragenes Haus; unendlich mühsam steige ich
vom Reittier, ich klappere vor Frost trotz des fast senkrechten
Sonnenstandes. Mit freundlicher Miene stellt mir Matola sein
Säulenhaus zur Verfügung; ebenso freundlich kredenzt er mir einen
Krug kühler Milch. Mein Sinn ist nicht nach materiellen Genüssen;
nur ins Bett — nichts weiter. Mein Blick sucht Knudsen. Taumelnd
verschwindet er gerade im rasch errichteten Zelt. Zwei Minuten
später bin auch ich in zwei warme Kamelhaardecken gewickelt. Tut
das wohl! Und nun hinein ins erste Fieber!
Matolas Gehöft (s. S. 173).

Neuntes Kapitel.
Bei Matola.
Chingulungulu, Mitte August 1906.

Ein Gutes hat so ein richtiges, tüchtiges Fieber bei allen Übeln
doch; ist es zu Ende, so hat der Rekonvaleszent einen Appetit, daß
unser sanfter Ausdruck „essen“ sich zu dieser Tätigkeit des
Nahrungvertilgens verhält wie der liebliche Ton der Hirtenschalmei
zum donnernden Schlachtgetöse. Ein ganzes gebratenes Huhn ist in
dieser Lebenslage für ein Frühstück gerade knapp ausreichend,
wohlgemerkt, wenn man vorher noch einen großen Teller Knorrscher
Suppe vertilgt hat und hinterher einem noch viel größeren
Eierkuchen mit eingebackenen Bananen entgegensieht. Aber es
geht dann auch schnell mit der Wiederherstellung; sehr bald
schmeckt wieder die Zigarre, bekanntlich der beste Maßstab des
Wohlbefindens seit Wilhelm Busch. Nur ein gewisses
„Brägenschülpen“, das Gefühl, als wenn das Gehirn den ihm zur
Verfügung stehenden Raum nicht ganz ausfüllte und daher bei jeder
Kopfbewegung an den Rändern Wellen schlüge, erinnert noch ein
paar Tage lang in allerdings sehr wenig angenehmer Weise an den
schweren Fieberanfall.
Traum und Wirklichkeit oder Poesie und Prosa, so könnte man
das berühmte Chingulungulu mit Fug und Recht benennen. Man
muß in der Tat wie Nils Knudsen ein Jahrzent im Busch gesessen
haben, um dieses Emporium alles Schmutzes, Dreckes und Staubes
für das Paradies anzusehen, welches Chingulungulu nach Knudsens
Ansicht auch heute noch darstellt. Selbstverständlich haben wir
unsern Wohnsitz unter der berühmten Barasa aufgeschlagen. Sie ist
wirklich ein gar stolzes Gebäude. Eigentlich ist es nur ein von Säulen
getragenes Strohdach, aber dieses Strohdach hat 15 Meter
Durchmesser und liegt mit seiner Spitze mindestens 6 bis 7 Meter
über dem Estrich. Auch architektonisch ist es eine beachtenswerte
Leistung: um den Mittelpfeiler stehen die übrigen Säulen in drei
konzentrischen Kreisen; der Fußboden ist gestampfter Lehm, mit
Asche vermischt. Gestampft ist nicht der richtige Ausdruck, die Leute
benutzen hier vielmehr einen im stumpfen Winkel gebogenen
Schlegel, mit dessen breitem, flachem Schlagende die nötige
Bodenfestigkeit erzielt wird. Rings um die ganze Peripherie der Halle
verläuft, nur an drei um je 120° voneinander abstehenden Lücken
unterbrochen, ein um etwa 40 Zentimeter erhöhter Wall. Das sind die
Sitze für die Thingmänner, denn diese Barasa ist in der Tat nichts
anderes als das Parlamentsgebäude der dörflichen
Gemeindevertretung. Der Thingammann thront in der Mitte des
weiten Baues; rings um ihn in dichter Scharung kauern, sitzen und
stehen die schwarzen Mitbürger. Eine solche Barasa hat jedes
Negerdorf, aber von ihnen allen ist die von Chingulungulu am
berühmtesten. Matola ist denn auch nicht wenig stolz, daß er seinen
beiden Gästen gerade eine solch hervorragende Unterkunft
gewähren kann.
Doch auch Matolas Wohnhaus ist ein gar stattlicher Bau. Rings
um das Ganze natürlich, wie immer, die vom weitausladenden Dach
beschattete Veranda, gegen Regen und Ungeziefer um eines Fußes
Breite gegen die übrige Welt erhöht. Unter ihr hält Matola Tag für Tag
und den ganzen Tag Hof. Das ist interessant für mich, aber nicht

You might also like