Performing Metrics and Bucket Aggregations in Elasticsearch 7.13

2 hours
  • 3 Learning Objectives

About this Hands-on Lab

Performing metrics and bucket aggregations is essential to asking questions of your data in Elasticsearch. In this hands-on lab, you will get to craft metrics and bucket aggregations — and combine them together — to answer more complex questions about your data.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Craft an Aggregation to Answer the Question: What Are the Total Lifetime Sales Before Tax?

From the Kibana console, craft a metrics aggregation on the ecommerce dataset that answers the question.

Craft an Aggregation to Answer the Question: How Many Orders Per Day Are There for Each Calendar Day?

From the Kibana console, craft a bucket aggregation on the ecommerce dataset that answers the question.

Craft an Aggregation to Answer the Question: What Are the Total Sales Before Tax Per Day for Each Calendar Day?

From the Kibana console, craft a nested aggregation on the ecommerce dataset that answers the question.

Additional Resources

Logging In to the Elastic Environment

  1. Open a new browser tab and navigate to the public IP address of the es1 node provided on the lab page (e.g., http://public_ip).
  2. Log in using the username elastic and password elastic_acg.

Lab Scenario

You work as a data analyst for an online apparel department store. You've been tasked with answering the following questions using your company's ecommerce sales dataset stored in Elasticsearch:

  • What are the total lifetime sales before tax?
  • How many orders per day are there for each calendar day?
  • What are the total sales before tax per day for each calendar day?

For each aggregation, set the hits array size to 0 to simplify the aggregation output.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?