Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Serverless Analytics with Amazon Athena

You're reading from  Serverless Analytics with Amazon Athena

Product type Book
Published in Nov 2021
Publisher Packt
ISBN-13 9781800562349
Pages 438 pages
Edition 1st Edition
Languages
Authors (3):
Anthony Virtuoso Anthony Virtuoso
Profile icon Anthony Virtuoso
Mert Turkay Hocanin Mert Turkay Hocanin
Profile icon Mert Turkay Hocanin
Aaron Wishnick Aaron Wishnick
Profile icon Aaron Wishnick
View More author details
Toc

Table of Contents (20) Chapters close

Preface 1. Section 1: Fundamentals Of Amazon Athena
2. Chapter 1: Your First Query 3. Chapter 2: Introduction to Amazon Athena 4. Chapter 3: Key Features, Query Types, and Functions 5. Section 2: Building and Connecting to Your Data Lake
6. Chapter 4: Metastores, Data Sources, and Data Lakes 7. Chapter 5: Securing Your Data 8. Chapter 6: AWS Glue and AWS Lake Formation 9. Section 3: Using Amazon Athena
10. Chapter 7: Ad Hoc Analytics 11. Chapter 8: Querying Unstructured and Semi-Structured Data 12. Chapter 9: Serverless ETL Pipelines 13. Chapter 10: Building Applications with Amazon Athena 14. Chapter 11: Operational Excellence – Monitoring, Optimization, and Troubleshooting 15. Section 4: Advanced Topics
16. Chapter 12: Athena Query Federation 17. Chapter 13: Athena UDFs and ML 18. Chapter 14: Lake Formation – Advanced Topics 19. Other Books You May Enjoy

Running approximate queries

In Chapter 1, Your First Query, we used TABLESAMPLE to run a query that allowed us to get familiar with our data by viewing an evenly distributed sampling of rows from across the entire table. TABLESAMPLE enables you to approximate the results of any query by sampling the underlying data. Athena also supports more targeted forms of approximation that offer bounded error. For example, the approx_distinct function should produce results with a standard error of 2.3% but completes its execution 97% faster while also using less peak memory than its completely accurate counterpart, COUNT(DISTINCT x). We'll learn more about these and several other approximate query tools by exploring our NYC taxi ride tables.

TABLESAMPLE is a somewhat generic technique for running approximate queries. Unlike the other methods we discuss in this section, TABLESAMPLE works by sampling the input data. This allows you to use it in conjunction with any other SQL features supported...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}