Book Image

Business Intelligence with Databricks SQL

By : Vihag Gupta
Book Image

Business Intelligence with Databricks SQL

By: Vihag Gupta

Overview of this book

In this new era of data platform system design, data lakes and data warehouses are giving way to the lakehouse – a new type of data platform system that aims to unify all data analytics into a single platform. Databricks, with its Databricks SQL product suite, is the hottest lakehouse platform out there, harnessing the power of Apache Spark™, Delta Lake, and other innovations to enable data warehousing capabilities on the lakehouse with data lake economics. This book is a comprehensive hands-on guide that helps you explore all the advanced features, use cases, and technology components of Databricks SQL. You’ll start with the lakehouse architecture fundamentals and understand how Databricks SQL fits into it. The book then shows you how to use the platform, from exploring data, executing queries, building reports, and using dashboards through to learning the administrative aspects of the lakehouse – data security, governance, and management of the computational power of the lakehouse. You’ll also delve into the core technology enablers of Databricks SQL – Delta Lake and Photon. Finally, you’ll get hands-on with advanced SQL commands for ingesting data and maintaining the lakehouse. By the end of this book, you’ll have mastered Databricks SQL and be able to deploy and deliver fast, scalable business intelligence on the lakehouse.
Table of Contents (21 chapters)
1
Part 1: Databricks SQL on the Lakehouse
9
Part 2: Internals of Databricks SQL
13
Part 3: Databricks SQL Commands
16
Part 4: TPC-DS, Experiments, and Frequently Asked Questions

Running automated benchmarks

The spark-sql-perf library allows you to run automated benchmarks against the queries of the TPC-DS specifications. If you are interested in studying the queries, you can study the query templates that are bundled in the specifications. If you are interested in studying the Databricks SQL versions of these queries, you can navigate to spark-sql-perf/src/main/resources/tpcds_2_4. The following screenshot shows how to navigate the IDE:

Figure 13.11 – TPC-DS benchmark queries

As we noted in the Understanding the TPC-DS dataset section, we are not interested in recreating benchmarks. However, if you do want to do so, you can do so by following the README file of spark-sql-perf. Let me quickly show you how to run a benchmark in a Databricks workspace.

Note

The spark-sql-perf library can only run benchmarks against a Spark cluster. It does not have provisions to execute the automated benchmark on SQL Warehouses.

We will...