Book Image

ETL with Azure Cookbook

By : Christian Cote, Matija Lah, Madina Saitakhmetova
Book Image

ETL with Azure Cookbook

By: Christian Cote, Matija Lah, Madina Saitakhmetova

Overview of this book

ETL is one of the most common and tedious procedures for moving and processing data from one database to another. With the help of this book, you will be able to speed up the process by designing effective ETL solutions using the Azure services available for handling and transforming any data to suit your requirements. With this cookbook, you’ll become well versed in all the features of SQL Server Integration Services (SSIS) to perform data migration and ETL tasks that integrate with Azure. You’ll learn how to transform data in Azure and understand how legacy systems perform ETL on-premises using SSIS. Later chapters will get you up to speed with connecting and retrieving data from SQL Server 2019 Big Data Clusters, and even show you how to extend and customize the SSIS toolbox using custom-developed tasks and transforms. This ETL book also contains practical recipes for moving and transforming data with Azure services, such as Data Factory and Azure Databricks, and lets you explore various options for migrating SSIS packages to Azure. Toward the end, you’ll find out how to profile data in the cloud and automate service creation with Business Intelligence Markup Language (BIML). By the end of this book, you’ll have developed the skills you need to create and automate ETL solutions on-premises as well as in Azure.
Table of Contents (12 chapters)

Generating T-SQL select statements for all tables

Let's start with the most straightforward and demonstrative example – generating a T-SQL statement. Biml has access to a treasure trove of metadata, or database information, such as table names, schema names, column names, foreign keys, indexes, and more. Having this valuable data, we can do lots and lots of useful things! We will see how we can generate a list of select statements for every table in a database that counts the number of rows of each table.

Getting ready

Open Visual Studio 2019, and then open the ETLInAzure SSIS project that was created in the Installing prerequisites section.

How to do it…

Add a new BimlScript file and, using the power of Biml native objects, generate your T-SQL code:

  1. To add a new BimlScript file to your solution, right-click on the SSIS project name and choose Add New Biml File as shown in the following screenshot:

    Figure 10.3 – A screenshot showing adding...