Giter Site home page Giter Site logo

packtpublishing / serverless-analytics-with-amazon-athena Goto Github PK

View Code? Open in Web Editor NEW
23.0 8.0 12.0 60.42 MB

Serverless Analytics with Amazon Athena, published by packt

License: MIT License

Shell 7.12% Jupyter Notebook 60.43% Python 1.90% HiveQL 1.56% Java 29.00%

serverless-analytics-with-amazon-athena's Introduction

Serverless Analytics with Amazon Athena

Power Query Cookbook

This is the code repository for Serverless Analytics with Amazon Athena, published by Packt.

Query structured, unstructured, or semi-structured data in seconds without setting up any infrastructure

What is this book about?

Amazon Athena is an interactive query service that makes it easy to analyze data in Amazon S3 using SQL, without needing to manage any infrastructure.

This book begins with an overview of the serverless analytics experience offered by Athena and teaches you how to build and tune an S3 Data Lake using Athena, including how to structure your tables using open-source file formats like Parquet. You’ll learn how to build, secure, and connect to a data lake with Athena and Lake Formation. Next, you’ll cover key tasks such as ad hoc data analysis, working with ETL pipelines, monitoring and alerting KPI breaches using CloudWatch Metrics, running customizable connectors with AWS Lambda, and more. Moving on, you’ll work through easy integrations, troubleshooting and tuning common Athena issues, and the most common reasons for query failure. You will also review tips to help diagnose and correct failing queries in your pursuit of operational excellence. Finally, you’ll explore advanced concepts such as Athena Query Federation and Athena ML to generate powerful insights without needing to touch a single server.

By the end of this book, you’ll be able to build and use a data lake with Amazon Athena to add data-driven features to your app and perform the kind of ad hoc data analysis that often precedes many of today’s ML modeling exercises.

This book covers the following exciting features:

  • Secure and manage the cost of querying your data
  • Use Athena ML and User Defined Functions (UDFs) to add advanced features to your reports
  • Write your own Athena Connector to integrate with a custom data source
  • Discover your datasets on S3 using AWS Glue Crawlers
  • Integrate Amazon Athena into your applications
  • Setup Identity and Access Management (IAM) policies to limit access to tables and databases in Glue Data Catalog
  • Add an Amazon SageMaker Notebook to your Athena queries
  • Get to grips with using Athena for ETL pipelines

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders.

The code will look like the following:

try:
    sink.writeFrame(new_and_updated_impressions_dataframe)
    glueContext.commit_transaction(txid1)
except:
    glueContext.abort_transaction(txid1)

Following is what you need for this book: Business intelligence (BI) analysts, application developers, and system administrators who are looking to generate insights from an ever-growing sea of data while controlling costs and limiting operational burden, will find this book helpful. Basic SQL knowledge is expected to make the most out of this book.

With the following software and hardware list you can run all code files present in the book (Chapter 1-14).

Software and Hardware List

Chapter Software required OS required
1-14 Amazon Web Services Windows, Mac OS X, and Linux (Any)

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Related products

Get to Know the Author(s)

Anthony Virtuoso works as a Principal Engineer at Amazon and holds multiple patents in distributed systems, software defined networks, and security. In his eight years at Amazon, he has helped launch several Amazon Web Services, the most recent of which was Amazon Managed Blockchain. As one of the original authors of Athena Query Federation, you'll often find him lurking on the Athena Federation GitHub repository answering questions and shipping bug fixes. When not at work, Anthony obsesses over a different set of customers, namely his wife and two little boys, aged 2 and 5. His kids enjoy doing science experiments with dad, like 3D printing toys, building with Lego, or searching the local pond for tardigrades.

Mert Turkay Hocanin is a Principal Big Data Architect at Amazon Web Services within the AWS Glue and AWS Lake Formation services and has previously worked for several other services including Amazon Athena, Amazon EMR, Amazon Managed Blockchain. During his time at AWS, he worked with several Fortune 500 companies on some of the largest data lakes in the world and was involved with the launching of three Amazon Web Services. Prior to being a Big Data Architect, he was a Senior Software Developer within Amazon's retail systems organization building one of the earliest data lakes in the company in 2013. When he is not helping customers build data lakes, he enjoys spending time with his wife-Subrina, son-Tristan, and exploring New York City.

Aaron Wishnick works as a Senior Software Engineer at Amazon, where he has been for 7 years. During that time he has worked on Amazon's payment systems, financial intelligence systems, as well as working for AWS on Athena and AWS Proton. When not at work, Aaron and his fiance, Alyssa, are on a quest to determine just how much dog fur is too much, with their husky and malamute, Mina and Wally.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781800562349

serverless-analytics-with-amazon-athena's People

Contributors

avirtuos avatar davids-packt avatar hocanint-amzn avatar merthoc avatar packt-itservice avatar packtutkarshr avatar rahul-packt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

serverless-analytics-with-amazon-athena's Issues

Athena IAM permissions changed massively

Just encountered this repo by doing a GitHub search and wanted to let you know that various athena: IAM permissions seen in at least chapter 3 do not exist anymore.

E.g. athena:GetExecutionEngine, athena:GetExecutionEngines, athena:GetNamespace, athena:GetCatalogs, athena:GetNamespaces, athena:GetTables, athena:GetTable.

Unable to download taxi data from chapter 3

Running the provided Chapter 3 (page 59) taxi_data_prep.sh in WSL gives 403, access denied error, as the URL https://s3.amazonaws.com/nyc-tlc/trip+data/ also gives 403 access denied when accessing from browser.

How can i get access to the data?

--2023-07-21 15:42:25-- https://s3.amazonaws.com/nyc-tlc/trip+data/yellow_tripdata_2020-04.csv Resolving s3.amazonaws.com (s3.amazonaws.com)... 52.217.202.160, 54.231.233.40, 52.217.133.64, ... Connecting to s3.amazonaws.com (s3.amazonaws.com)|52.217.202.160|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 2023-07-21 15:42:26 ERROR 403: Forbidden.

ST_CONTAINS ERROR Unexpected parameters (varbinary, Geometry)

When running the query on page 84, either on bash or on the athena query editor I have the following error:

SYNTAX_ERROR: line 4:7: Unexpected parameters (varbinary, Geometry) for function st_contains. Expected: st_contains(Geometry, Geometry) , st_contains(varchar, varchar) , st_contains(Geometry, varchar) , st_contains(varchar, Geometry)
This query ran against the "packt_serverless_analytics" database, unless qualified by the query

The datasets were downloaded with the script in this repository. I have tried to use ST_GeomFromBinary(varbinary) to convert it to Geometry, but it complains about the WKB representation? (this is with both Athena Engine 2 and 3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.