{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Ingest data with Redshift\n" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "\n", "This notebook's CI test result for us-west-2 is as follows. CI test results in other regions can be found at the end of the notebook. \n", "\n", "\n", "\n", "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This notebook demonstrates how to set up a database with Redshift and query data with it.\n", "\n", "Amazon Redshift is a fully managed data warehouse that allows you to run complex analytic queries against petabytes of structured data. Your queries are distributed and parallelized across multiple physical resources, and you can easily scale your Amazon Redshift environment up and down depending on your business needs.\n", "\n", "You can also check the [existing notebook](https://github.com/aws/amazon-sagemaker-examples/blob/master/advanced_functionality/working_with_redshift_data/working_with_redshift_data.ipynb) for more information on how to load data from and save data to Redshift." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## When should you use Redshift?\n", "\n", "While Athena is mostly used to run ad-hoc queries on Amazon S3 data lake, Redshift is usually recommended for large structured data sets, or traditional relational database; it does well with performing aggregations, complex joins, and inner queries. You would need to set up and load the cluster before using it; and you need to load data into created tables. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Set up Redshift\n", "First we are going to make sure we have policy attached to our role (The role we will create specifically for the Redshift task) to access Redshift. You can do this through IAM client as below, or through the AWS console.\n", "\n", "**Note: You would need IAMFullAccess to attach policies to the role.**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Attach IAMFullAccess Policy from Console\n", "\n", "**1.** Go to **Sagemaker Console**, choose **notebook instances** in the navigation panel, then select your notebook instance to view the details. Then under **Permissions and Encryption**, click on the **IAM role ARN** link and it will take you to your role summery in the **IAM Console**. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "