Reader small image

You're reading from  Amazon Redshift Cookbook

Product typeBook
Published inJul 2021
Reading LevelBeginner
PublisherPackt
ISBN-139781800569683
Edition1st Edition
Languages
Right arrow
Authors (3):
Shruti Worlikar
Shruti Worlikar
author image
Shruti Worlikar

Shruti Worlikar is a cloud professional with technical expertise in data lakes and analytics across cloud platforms. Her background has led her to become an expert in on-premises-to-cloud migrations and building cloud-based scalable analytics applications. Shruti earned her bachelor's degree in electronics and telecommunications from Mumbai University in 2009 and later earned her masters' degree in telecommunications and network management from Syracuse University in 2011. Her work history includes work at J.P. Morgan Chase, MicroStrategy, and Amazon Web Services (AWS). She is currently working in the role of Manager, Analytics Specialist SA at AWS, helping customers to solve real-world analytics business challenges with cloud solutions and working with service teams to deliver real value. Shruti is the DC Chapter Director for the non-profit Women in Big Data (WiBD) and engages with chapter members to build technical and business skills to support their career advancements. Originally from Mumbai, India, Shruti currently resides in Aldie, VA, with her husband and two kids.
Read more about Shruti Worlikar

Thiyagarajan Arumugam
Thiyagarajan Arumugam
author image
Thiyagarajan Arumugam

Thiyagarajan Arumugam (Thiyagu) is a principal big data solution architect at AWS, architecting and building solutions at scale using big data to enable data-driven decisions. Prior to AWS, Thiyagu as a data engineer built big data solutions at Amazon, operating some of the largest data warehouses and migrating to and managing them. He has worked on automated data pipelines and built data lake-based platforms to manage data at scale for the customers of his data science and business analyst teams. Thiyagu is a certified AWS Solution Architect (Professional), earned his master's degree in mechanical engineering at the Indian Institute of Technology, Delhi, and is the author of several blog posts at AWS on big data. Thiyagu enjoys everything outdoors – running, cycling, ultimate frisbee – and is currently learning to play the Indian classical drum the mrudangam. Thiyagu currently resides in Austin, TX, with his wife and two kids.
Read more about Thiyagarajan Arumugam

Harshida Patel
Harshida Patel
author image
Harshida Patel

Harshida Patel is a senior analytics specialist solution architect at AWS, enabling customers to build scalable data lake and data warehousing applications using AWS analytical services. She has presented Amazon Redshift deep-dive sessions at re:Invent. Harshida has a bachelor's degree in electronics engineering and a master's in electrical and telecommunication engineering. She has over 15 years of experience architecting and building end-to-end data pipelines in the data management space. In the past, Harshida has worked in the insurance and telecommunication industries. She enjoys traveling and spending quality time with friends and family, and she lives in Virginia with her husband and son.
Read more about Harshida Patel

View More author details
Right arrow

Chapter 10: Extending Redshift's Capabilities

Amazon Redshift allows you to analyze all your data using standard SQL, using your existing business intelligence tools. Organizations are looking for more ways to extract valuable insights from the data, such as big data analytics, machine learning (ML) applications, and a range of analytical tools to drive new use cases and business processes. Building an entire solution by sourcing data, transforming data, reporting data, and ML can easily be accomplished by taking advantage of the capabilities provided by AWS' analytical services. With native integrations between the analytical services already built in, you don't have to write any additional code while using these capabilities.

The following recipes will be covered in this chapter:

  • Managing Amazon Redshift ML
  • Visualizing data using QuickSight
  • AppFlow for ingesting SaaS data in Redshift
  • Data wrangling using Databrew
  • Utilizing ElastiCache for...

Technical requirements

You will need the following technical requirements to complete the recipes in this chapter:

  • Access to the AWS Console.
  • An AWS Administrator should create an IAM user by following Recipe 1 – Creating an IAM user, in the Appendix. This IAM user will be used in some of the recipes in this chapter.
  • An AWS Administrator should create an IAM role by following Recipe 3 – Creating an IAM role for an AWS service, in the Appendix. This IAM role will be used in some of the recipes in this chapter.
  • An AWS Administrator should deploy the AWS CloudFormation template (https://github.com/PacktPublishing/Amazon-Redshift-Cookbook/blob/master/Chapter10/chapter_10_CFN.yaml) and create two IAM policies:

    a. An IAM policy attached to the IAM user, which will give them access to Amazon Redshift, Amazon S3, AWS Glue, AWS Glue DataBrew, AWS IAM, Amazon QuickSight, Amazon SageMaker, AWS Secrets Manager, Amazon CloudWatch, Amazon CloudWatch Logs, AWS CloudFormation...

Managing Amazon Redshift ML

Amazon Redshift ML enables Amazon Redshift users to create, deploy, and execute ML models using familiar SQL commands. Amazon Redshift has built-in integration with Amazon SageMaker Autopilot, which chooses the best ML algorithm based on your data using its automatic algorithm selection capabilities. It enables users to run ML algorithms without the need for expert knowledge of ML. On the other hand, ML experts such as data scientists have the flexibility to select algorithms such as XGBoost and specify the hyperparameters and preprocessors. Once the ML model has been deployed in Amazon Redshift, you can run the prediction using SQL at scale. This integration completely simplifies the pipeline, which is required to create, train, and deploy the model for prediction. Amazon Redshift ML allows you to create, deploy, and predict using the data in the data warehouse, as follows:

Figure 10.1 – Amazon Redshift ML capabilities

...

Visualizing data using Amazon QuickSight

Amazon QuickSight is a scalable, serverless, and embeddable ML powered business intelligence (BI) service built for the cloud. Visualizing the data warehouse data so that you can use BI tools such as Amazon QuickSight enables users such as business analysts, executive leaders, and more to make data-driven decisions faster. QuickSight dashboards can be accessed from any device and seamlessly embedded into your applications, portals, and websites.

Getting ready

To complete this recipe, you will need to do the following:

  • Create an IAM user with access to Amazon Redshift and Amazon QuickSight.
  • Create an Amazon Redshift cluster deployed in AWS region eu-west-1 with the retail sample dataset we set up in Chapter 3, Loading and Unloading Data.
  • Create Amazon Redshift cluster master user credentials.
  • Sign up for Amazon QuickSight Standard Edition using the instructions at https://docs.aws.amazon.com/quicksight/latest/user/signing...

AppFlow for ingesting SaaS data in Redshift

Amazon AppFlow provides flexible ways to ingest data from different Software-as-a-Service (SaaS) applications, such as Salesforce, Zendesk, Slack, ServiceNow, and so on, into AWS services such as Amazon S3 and Amazon Redshift. This fully managed integration service allows you to set up data flows without writing any code. The data workflows also allow you to perform data transformations, such as mapping and filtering, and can be automated using a schedule/event.

Getting ready

To complete this recipe, you will need to do the following:

  • Create an IAM user with access to Amazon Redshift and Amazon AppFlow.
  • Create an Amazon Redshift cluster deployed in AWS region eu-west-1.
  • Create Amazon Redshift cluster master user credentials.
  • Gain access to any SQL interface, such as a SQL client or the Amazon Redshift Query Editor.
  • Create an IAM role attached to an Amazon Redshift cluster that can access Amazon S3. We will reference...

Data wrangling using DataBrew

Amazon Redshift data warehouses allow your end users to get new insights from all your data easily. Ensuring data quality remains one of the core tenants for any data warehouse for building trust with your business analysts, data scientists, and more. Further, the decisions that are made due to these datasets are accurate for the intended business outcome. AWS Glue DataBrew is a data preparation tool that makes it easy to clean and normalize data before publishing it to Amazon Redshift.

You can choose from over 250 pre-built transformations to automate data preparation tasks, without the need to write any code. For example, you can de-dupe the dimensional tables using a DataBrew job before loading it into Amazon Redshift; this will ensure data integrity. DataBrew comes with out of the box integration with Amazon Redshift, and data can be prepared with just a few clicks using its visual interface.

Getting ready

To complete this recipe, you will...

Utilizing ElastiCache for sub-second latency

Amazon ElastiCache is a fully managed service that supports both Redis and Memcached in-memory databases. In-memory databases and caches allow you to build near-real-time applications that require sub-millisecond latency. ElastiCache allows you to scale both your write and read capacity for near-real-time applications. In this recipe, we will explore how ElasticCache can serve as a database cache.

Getting ready

To complete this recipe, you will need the following:

  • An IAM user with access to Amazon Redshift and Amazon ElastiCache.
  • An Amazon Redshift cluster deployed in AWS region eu-west-1 with the retail sample dataset we set up in Chapter 3, Loading and Unloading Data.
  • Amazon Redshift cluster master user credentials.
  • An EC2 Linux instance. Launch this in the same VPC as Amazon Redshift with a security group by providing access to your Amazon Redshift cluster by following the instructions at https://docs.aws.amazon...

Subscribing to third-party data using AWS Data Exchange

AWS Data Exchange makes it easy to find, subscribe to, and use third-party data in the cloud. Once you've subscribed to the data product, AWS Data Exchange can publish data into your own Amazon S3 bucket. You can then use this data for analysis with AWS analytics services, including Amazon Redshift. For example, suppliers, wholesalers, marketers, and data companies can obtain unique codes for every store in the retail trade market to target their products. Qualified data providers include category-leading and up-and-coming brands such as Reuters, Foursquare, TransUnion, Change Healthcare, Virtusa, Pitney Bowes, TP ICAP, Vortexa, IMDb, Epsilon, Enigma, TruFactor, ADP, Dun & Bradstreet, Compagnie Financière Tradition, Verisk, Crux Informatics, TSX Inc., Acxiom, Rearc, and many more.

Getting ready

To complete this recipe, you will need the following:

  • An IAM user with access to Amazon Redshift and AWS...
lock icon
The rest of the chapter is locked
You have been reading a chapter from
Amazon Redshift Cookbook
Published in: Jul 2021Publisher: PacktISBN-13: 9781800569683
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.
undefined
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

Authors (3)

author image
Shruti Worlikar

Shruti Worlikar is a cloud professional with technical expertise in data lakes and analytics across cloud platforms. Her background has led her to become an expert in on-premises-to-cloud migrations and building cloud-based scalable analytics applications. Shruti earned her bachelor's degree in electronics and telecommunications from Mumbai University in 2009 and later earned her masters' degree in telecommunications and network management from Syracuse University in 2011. Her work history includes work at J.P. Morgan Chase, MicroStrategy, and Amazon Web Services (AWS). She is currently working in the role of Manager, Analytics Specialist SA at AWS, helping customers to solve real-world analytics business challenges with cloud solutions and working with service teams to deliver real value. Shruti is the DC Chapter Director for the non-profit Women in Big Data (WiBD) and engages with chapter members to build technical and business skills to support their career advancements. Originally from Mumbai, India, Shruti currently resides in Aldie, VA, with her husband and two kids.
Read more about Shruti Worlikar

author image
Thiyagarajan Arumugam

Thiyagarajan Arumugam (Thiyagu) is a principal big data solution architect at AWS, architecting and building solutions at scale using big data to enable data-driven decisions. Prior to AWS, Thiyagu as a data engineer built big data solutions at Amazon, operating some of the largest data warehouses and migrating to and managing them. He has worked on automated data pipelines and built data lake-based platforms to manage data at scale for the customers of his data science and business analyst teams. Thiyagu is a certified AWS Solution Architect (Professional), earned his master's degree in mechanical engineering at the Indian Institute of Technology, Delhi, and is the author of several blog posts at AWS on big data. Thiyagu enjoys everything outdoors – running, cycling, ultimate frisbee – and is currently learning to play the Indian classical drum the mrudangam. Thiyagu currently resides in Austin, TX, with his wife and two kids.
Read more about Thiyagarajan Arumugam

author image
Harshida Patel

Harshida Patel is a senior analytics specialist solution architect at AWS, enabling customers to build scalable data lake and data warehousing applications using AWS analytical services. She has presented Amazon Redshift deep-dive sessions at re:Invent. Harshida has a bachelor's degree in electronics engineering and a master's in electrical and telecommunication engineering. She has over 15 years of experience architecting and building end-to-end data pipelines in the data management space. In the past, Harshida has worked in the insurance and telecommunication industries. She enjoys traveling and spending quality time with friends and family, and she lives in Virginia with her husband and son.
Read more about Harshida Patel