[aws black belt online seminar] amazon redshift update · amazon redshift...

72
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Webinar https://amzn.to/JPWebinar https://amzn.to/JPArchive Junpei Ozono, Solutions Architect 2019/1/22 Amazon Redshift Update [AWS Black Belt Online Seminar]

Upload: others

Post on 31-Aug-2019

6 views

Category:

Documents


0 download

TRANSCRIPT

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS Webinar

https://amzn.to/JPWebinar https://amzn.to/JPArchive

Junpei Ozono, Solutions Architect

2019/1/22

Amazon Redshift Update

[AWS Black Belt Online Seminar]

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Redshift Specialist Solutions Architect

• Redshift

• DWH Data Lake

• Amazon Redshift

• Amazon QuickSight

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS Black Belt Online Seminar

①吹き出しをクリック②質問を入力③ Sendをクリック

Twitter

#awsblackbelt

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

• 2019 1 22

AWS (http://aws.amazon.com)

• AWS

AWS

• AWS does not offer binding price quotes. AWS pricing is publicly available and is subject to

change in accordance with the AWS Customer Agreement available at

http://aws.amazon.com/agreement/. Any pricing information included in this document is provided

only as an estimate of usage charges for AWS services based on certain information that you

have provided. Monthly charges will be based on your actual use of AWS services, and may vary

from the estimates provided.

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

• Redshift

• Redshift

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

• Redshift

• Redshift 2018

• Redshift (re:Invent2018 )

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

• Redshift

• Redshift 2018

• Redshift (re:Invent2018 )

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Amazon Redshift

Amazon

Redshift

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Amazon Redshift

データウェアハウス・分析向けに特化したRDBさまざまな種類の分析ワークロードについて、より迅速な洞察を取得可能

ペタバイト級までスケールアウト分析要求やデータ容量が増加しても、動的にスケールアップ/アウトが可能

データレイク上のデータへの直接アクセスAmazon S3 上のオープンフォーマットデータをそのまま分析可能

高速

スケーラブル

データレイクへの拡張

高いコスト効果

初期費用なし、小規模から始めて、利用に応じた支払いが可能約$1,000/TB/年、最小$0.314/時*から

*費用は2019年1月時点での東京リージョンのものです

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Amazon Redshift

• SQL

• SQL

• /

• / ロードアンロードバックアップリストア

SQL クライアント/BI ツール

128GB RAM

16TB disk

16 cores

JDBC/ODBC

128GB RAM

16TB disk

16 cores

128GB RAM

16TB disk

16 cores

128GB RAM

16TB disk

16 cores

Amazon S3

Amazon Redshift

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Amazon Redshift

• SQL

• SQL

• /

• /

Amazon Redshift Spectrum

• Amazon S3

SQL クライアント/BI ツール

128GB RAM

16TB disk

16 cores

JDBC/ODBC

128GB RAM

16TB disk

16 cores

128GB RAM

16TB disk

16 cores

128GB RAM

16TB disk

16 cores

Amazon S3

...1 2 3 4 N

Amazon

Redshift

Spectrum

ロードクエリ

Amazon Redshift

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

• Redshift

MPP : Massive Parallel

Processing• 1

• Redshift

SQL クライアント/BI ツール

128GB RAM

16TB disk

16 cores

JDBC/ODBC

128GB RAM

16TB disk

16 cores

128GB RAM

16TB disk

16 cores

128GB RAM

16TB disk

16 cores

Amazon Redshift

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

2, 16

SQL クライアント/BI ツール

128GB RAM

16TB disk

16 cores

JDBC/ODBC

128GB RAM

16TB disk

16 cores

128GB RAM

16TB disk

16 cores

128GB RAM

16TB disk

16 cores

Amazon Redshift

Core Core Core Core Core Core

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Amazon Redshift

• SSD DC2 HDD DS2

DC2 - Dense Compute

vCPU メモリ(GB) ストレージ スライス ノード数 価格(※)

dc2.large 2 15 0.16TB NVMe SSD 2 1~32 $0.314 /1時間

dc2.8xlarge 32 244 2.56TB NVMe SSD 16 2~128 $6.095 /1時間

DS2 – Dense Storage

ds2.xlarge 4 31 2TB HDD 2 1~32 $1.190 /1時間

ds2.8xlarge 36 244 16TB HDD 16 2~128 $9.520 /1時間

※価格は東京リージョンにおいて2019年1月時点のものです

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

I/O

列指向ストレージ•

• 1MB

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

I/O

列指向ストレージ•

• 1MB

データ圧縮•

• I/O

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

I/O

列指向ストレージ•

• 1MB

データ圧縮•

• I/O

min: 100

max: 999

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

(SQA)

機械学習 機械学習によってクエリの実行時間を予測する

1

ショートクエリと判断されたクエリは専用の高速キューにルーティングされる

2

リソースはショートクエリのために動的に確保される

3

SQAの機能

分析およびBI / ダッシュボードツール

コンピュートノード

コンピュートノード

コンピュートノード

Amazon Redshift

高速キュー

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

RESULTS CACHE

QUERY_ID RESULT

QUERY_ID RESULT

( )1

クエリはリーダーノードにて受付1

リーダーノード内のキャッシュにクエリ結果が含まれている場合、コンピュートノード上での処理を伴わずに返される

2

クエリ結果がキャッシュに存在しない場合、コンピュートノード上でクエリが実行されて、その結果がキャッシングされる

3

結果セットのキャッシュ機能

コンピュートノード

コンピュートノード

コンピュートノード

分析およびBI / ダッシュボードツール

Amazon Redshift

結果キャッシュ

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

• コンピュートノードの追加でパフォーマンスがリニアに向上

• マネージメントコンソールから数クリックで拡張・縮小が可能

コンピュートノード1

SQLクライアント/BI

ツール

リーダーノード

JDBC/ODBC

コンピュートノード2

コンピュートノード3

コンピュートノード1

SQLクライアント/BI

ツール

リーダーノード

JDBC/ODBC

コンピュートノード2

コンピュートノード3

コンピュートノード4

コンピュートノード5

コンピュートノード6

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Amazon Redshift

JDBC/ODBC

...

1 2 3 4 N

Amazon S3 AWS Glue

Redshift Spectrum

SELECT COUNT(*)FROM S3.EXT_TABLEGROUP BY ...S3

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Redshift Spectrum

データロード処理が不要に

コンピュートとストレージを分けてスケーリング

RedshiftとS3それぞれに存在するデータを結合

安定したクエリパフォーマンスと高い並行処理

オープンファイルフォーマット対応(Parquet, ORC, JSON, Grok, Avro, およびCSV等)

スキャンしたデータ量のみの課金制

S3データレイク

Redshiftデータ

Redshift Spectrumクエリエンジン

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Redshiftのインスタンス料金• x 1

• 3 , 1

Amazon S3 データレイクへのクエリ料金• S3 1TB $5

SQL クライアント/BI ツール

128GB RAM

16TB disk

16 cores

JDBC/ODBC

128GB RAM

16TB disk

16 cores

128GB RAM

16TB disk

16 cores

128GB RAM

16TB disk

16 cores

Amazon S3

...1 2 3 4 N

Amazon Redshift

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

• Redshift

• Redshift 2018

• Redshift (re:Invent2018 )

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Redshift 2018

features and enhancements released*

Automatically enabled

short query acceleration

Support for lateral column

alias reference

New Quick Starts

New CloudWatch metrics

Customized

Recommendations

with Advisor

Current and trailing tracks

for release update

Federated authentication

with single sign-on

Improved performance

for commits

COPY from Parquet and

ORC file formats

Additional Spectrum regions

Support for Scalar JSON

and Ion data types

Late materialization for

faster query processing

Support for DATE data

type with Spectrum

Short Query

Acceleration

Utilization reports

Machine learning integration

to accelerate dashboards

and interactive analysis

Improved resource

management for

memory-intensive queries

Faster string manipulation

Support for Parquet and

ORC in Kinesis Data Firehose

Improved workload

management console

experience

Query Editor

Support for late-binding views

SQL Scalar user-defined

functions

Integration with AWS Glue

Support for Nested

Data with Spectrum

Spectrum support

for DATE data type

Improved performance

for UNION ALL queries

Free upgrade from

DC1 to DC2 RIs

Query monitoring rules (QMR)

Support for Zstandard high

compression encoding

Query processing

improvements

Support for Python

UDF logging module

Enhanced VPC routing

Automatically hopping

queries without restarts

Support for uppercase

column names

Result Caching for

Repeat Queries

Support for LISTAGG DISTINCT

Support for ORC and

Grok file formats

Integration with QuickSight

DMS support with Redshift

3.5x Improved

Throughput

Improved performance

for repeat queries

*Since re:Invent 2017

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

*Since re:Invent 2017

Redshift 2018

features and enhancements released*

Automatically enabled

short query acceleration

Support for lateral column

alias reference

New Quick Starts

New CloudWatch metrics

Customized

Recommendations

with Advisor

Current and trailing tracks

for release update

Federated authentication

with single sign-on

Improved performance

for commits

COPY from Parquet and

ORC file formats

Additional Spectrum regions

Support for Scalar JSON

and Ion data types

Late materialization for

faster query processing

Support for DATE data

type with Spectrum

Short Query

Acceleration

Utilization reports

Machine learning integration

to accelerate dashboards

and interactive analysis

Improved resource

management for

memory-intensive queries

Faster string manipulation

Support for Parquet and

ORC in Kinesis Data Firehose

Improved workload

management console

experience

Query Editor

Support for late-binding views

SQL Scalar user-defined

functions

Integration with AWS Glue

Support for Nested

Data with Spectrum

Spectrum support

for DATE data type

Improved performance

for UNION ALL queries

Free upgrade from

DC1 to DC2 RIs

Query monitoring rules (QMR)

Support for Zstandard high

compression encoding

Query processing

improvements

Support for Python

UDF logging module

Enhanced VPC routing

Automatically hopping

queries without restarts

Support for uppercase

column names

Result Caching for

Repeat Queries

Support for LISTAGG DISTINCT

Support for ORC and

Grok file formats

Integration with QuickSight

DMS support with Redshift

3.5x Improved

Throughput

Improved performance

for repeat queries

Speed ScaleSimplicity

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

*Since re:Invent 2017

Compiled code cache

Support for lateral

column alias reference

Resource management

for

memory-intensive

queries

Late materializationResult caching

Joins involving large numbers of

NULL values in a join key

column

Queries with intermediate

subquery

results that can be distributed

Cluster

resize operations

Queries that refer to stable

functions with constant

expressions

Short query

acceleration

Queries operating over CHAR

and VARCHAR columns

Single-row inserts

Improvements to speed

Expressions on the partition

columns of external tablesFaster string manipulation

Complex EXCEPT

subqueries

Commit processing

enhancements

DC2 nodes

2x the number of tables

in a cluster

Hash join memory utilization

optimizations and cache line

prefetching

COPY operation when

ingesting data from

Parquet

and ORC formats

Performance improvement for

queries that refer to stable

functions over constant

expressions

Improvements for the COPY

operation when ingesting data

from Parquet and ORC formats

Query processing

improvements

Query rewrites that pushdown selective joins into a subquery

Query planning

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Normalized Queries Per Hour (QPH)

Assuming Redshift’s QPH 6 months ago=100%

Qu

eri

es

pe

r h

ou

r

As

a %

of

red

shif

t 6

mo

nth

s

ag

o

( )

100%

181%

237%

284%

350%3倍高速

New!

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

28% 100%

• 64

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Elastic Resize New!

クラスターリーダーノード

データ

データ

データ

データ

Redshift マネージド S3

クラスタに追加するノードを数分で追加/削除する

既に Redshiftが動作する全リージョンで利用可能

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

コンピュートノード1

SQLクライアント/BI

ツール

リーダーノード

JDBC/ODBC

コンピュートノード2

コンピュートノード3

Classic Resize ( )

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

コンピュートノード1

SQLクライアント/BI

ツール

リーダーノード

JDBC/ODBC

コンピュートノード2

コンピュートノード3

Classic Resize ( )

コンピュートノード1

リーダーノード

コンピュートノード2

コンピュートノード3

コンピュートノード4

コンピュートノード5

コンピュートノード6

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

コンピュートノード1

SQLクライアント/BI

ツール

リーダーノード

JDBC/ODBC

コンピュートノード2

コンピュートノード3

Classic Resize ( )

コンピュートノード1

リーダーノード

コンピュートノード2

コンピュートノード3

コンピュートノード4

コンピュートノード5

コンピュートノード6

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

コンピュートノード1

SQLクライアント/BI

ツール

リーダーノード

JDBC/ODBC

コンピュートノード2

コンピュートノード3

Classic Resize ( )

コンピュートノード1

リーダーノード

コンピュートノード2

コンピュートノード3

コンピュートノード4

コンピュートノード5

コンピュートノード6

バイナリデータ転送

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

コンピュートノード1

SQLクライアント/BI

ツール

リーダーノード

JDBC/ODBC

コンピュートノード2

コンピュートノード3

エンドポイントDNS切替

Classic Resize ( )

コンピュートノード1

リーダーノード

コンピュートノード2

コンピュートノード3

コンピュートノード4

コンピュートノード5

コンピュートノード6

• データはクラスター間を移動して再分散される(それなりに時間が必要)• リサイズ中はクラスターは読み取り専用モードになる

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Elastic Resizeにより、数分でノードを増減できる

ユースケース: ノードを一時的に増やし、クエリ処理をより高速化 ノードを一時的に増やし、ETLをより高速に完了 ノードを一時的に減らし、オフピーク時間のコストを抑制

Elastic Resize

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

resize-cluster

resize-cluster--cluster-identifier <value>[--cluster-type <value>][--node-type <value>]--number-of-nodes <value>[--classic | --no-classic][--cli-input-json <value>][--generate-cli-skeleton <value>]

CLI

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

コンピュートノード1

SQLクライアント/BI

ツール

リーダーノード

JDBC/ODBC

コンピュートノード2

コンピュートノード3

コンピュートノード4

コンピュートノード5

コンピュートノード6

Elastic Resize Deep Dive3 6

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

• Elastic Resizeが開始されると、Amazon S3へ自動的にスナップショットが取得される

• その間のクラスターに対する読み書きは可能

コンピュートノード1

SQLクライアント/BI

ツール

リーダーノード

JDBC/ODBC

コンピュートノード2

コンピュートノー3

Amazon S3

Backup Backup Backup

Elastic Resize

のリクエスト

数〜数十分

Elastic Resize :S3

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

40

Amazon S3

• リサイズ中は、既存クラスターに新しいノードが追加、または削除される

• スライスはシャッフル

• すべてのクエリセッションはリーダーノードでキューイング

• いくつかのクエリは中断される可能性がある

コンピュートノード1

SQLクライアント/BI

ツール

リーダーノード

JDBC/ODBC

コンピュートノード2

コンピュートノード3

コンピュートノード4

コンピュートノード5

コンピュートノード6

Elastic Resize

のリクエスト 開始 終了

数分

Elastic Resize :

数〜数十分

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

41

Amazon S3

• このフェーズでクラスターは使用可能になり、データはS3からバックグラウンドで転送

• クエリに必要なホットブロックから先に戻す

コンピュートノード1

リーダーノード

JDBC/ODBC

コンピュートノード2

コンピュートノード3

コンピュートノード4

コンピュートノード5

コンピュートノード6

データ転送完了

データ転送

Elastic Resize

のリクエスト 開始 終了

Elastic Resize :

数〜数十分 数分

SQLクライアント/BI

ツール

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Elastic Resize

4

dc2.large

ds2.xlarge

1/2

2

2, 4, 8

dc2.8xlarge

ds2.8xlarge

1/2 2 2, 3, 4, 5, 6, 7, 8

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

43

Elastic resize Classic resize

/✔

(SSD <-

> HDD)

Elastic Resize ✔

(

) ( )

Elastic Resize Classic Resize

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

*Since re:Invent 2017

Improvements to simplicity

CloudWatch metrics

for Workload Execution

Breakdown

Current and trailing

tracks for release

updates

Lateral column

alias reference

CloudWatch metrics

for Query Duration

by WLM QueuesCluster resize operations

CloudWatch

Query Runtime Breakdown metric

Stream real-time data in

Parquet or ORC formats

using Kinesis Data

Firehose

DISTSTYLE AUTO

distribution styleFree upgrade from for DC1

RIs to DC2

Query Monitoring Rules (QMR)

now support 3x more rules

Short query

acceleration is

self-optimizing

Redshift Advisor for best

practice recommendationsCloudWatch metrics

for Query

Throughput by WLM

Queues

Cluster resize Query Editor

Enhancements to

VACUUM DELETE

Manage

components of a

multi-part query in

the AWS console

Automatic vacuum delete

Efficiency of backup performance

CloudWatch metrics for Query

Throughput, Query Duration

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Vacuum Analyze

Vacuum Delete• Vacuum DELETE UPDATE

• Vacuum

Analyze• Analyze

• auto_analyze OFF

New!

Analyze

Vacuum

Auto

Auto

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Redshift

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Redshift

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

データベースパフォーマンスタブの追加

Amazon CloudWatch

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

(1/2)

メンテナンスウィンドウの延期

14

Amazon SNS

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

(2/2)

メンテナンストラックの設定

Current”

“Trailing”

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

RedshiftQuery editor & Saved queries

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Redshift &

クエリエディタ機能

Redshift

( )

Saved queries

dc1.8xlarge, dc2.large,

dc2.8xlarge, or ds2.8xlarge

ds2.xlarge

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

RedshiftAdvisor

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Redshift

アドバイザ機能

Redshift

1.

2. COPY S3

3.

4. WLM

5. COPY

6. COPY S3

7.

8. SQA

9. Interleaved Sort Key

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

*Since re:Invent 2017

Improvements to scaleIntegrate seamlessly with your data lake

DATE data

type

Retrieving metadata for late-binding

viewsSupport for Enhanced VPC Routing

IN-list predicate processing

in Spectrum scans

Query external tables

during a resize operation

Specify the root of an

S3 bucket as the

source for an existing

table

Spectrum queries with

aggregations on partition

columns

Renaming

external table

columns

Table property to specify the file

compression type for external tables

Push the LENGTH()

string function to

Spectrum

ALTER TABLE ADD/DROP

COLUMN for external tables is

now supported via standard JDBC

calls

Map datatypes in

Spectrum to contain

arrays

Support for Parquet, ORC, Avro,

CSV, and other open file formats

New Spectrum

regions

Spectrum support

for JSON and IONSpectrum support

for nested data

Arrays of arrays and

arrays of maps

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

VPC Spectrum

• VPC VPC Redshift

S3 VPC

• Redshift

• Redshift VPC

Spectrum

• VPC

Spectrum

https://docs.aws.amazon.com/ja_jp/redshift/latest/mgmt/spectrum-enhanced-vpc.html

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Parquet / ORC COPY

ORC Parquet Redshift

COPY table FROM ‘s3 prefix’ FORMAT AS ORC | PARQUET ;

Amazon S3 Amazon Redshift

ORC

Parquet

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Spectrum

• ネスト化された半構造化データを、Redshift Spectrumの外部表として指定することが可能に

• オープンファイルフォーマットをサポート: Parquet, ORC, JSON, Ion

{ Id: 1,

Name: {Given:"John", Family:"Smith"},

Phones: ["123-457789"],

Orders: [ {Shipdate: ”Jul 12,2018 11:59:59", Price: 100.50}

{Shipdate: ”Jul 13,2018 09:10:00", Price: 99.12} ]

}

{ Id: 2,

Name: {Given:"Jenny", Family:"Doe"},

Phones: ["858-8675309", "415-9876543"],

Orders: [ ]

}

{ Id: 3,

Name: {Given:"Andy", Family:"Jones"},

Phones: [ ]

Orders: [ {Shipdate: ”Jul 12,2018 08:02:15", Price: 13.50} ]

}

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Spectrum

• ネスト化された半構造化データを、Redshift Spectrumの外部表として指定することが可能に

• オープンファイルフォーマットをサポート: Parquet, ORC, JSON, Ion

• サポートするComplex Data Type : struct, array, map

• 既存のSQLを拡張し、ネスト構造をドット表記で表現

• CTASを用いて、ネスト化されたデータのETL (Redshift Localテーブルへロード)が容易に

create external table datalake.nested_customers_orc(

id int,

name struct<given:varchar(20),

family:varchar(20)>,

phones array<varchar(20)>,

orders array<struct<shipdate:timestamp,price:double precision>>

)

STORED AS ORC

LOCATION 's3://mybucket/nested_orc/';

SELECT c.id, c.name.given, c.name.family,

o.shipdate, o.price

FROM datalake.nested_customers_orc c

LEFT JOIN c.orders o

ON true;

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

id | given | family | shipdate | price

----+-------+--------+---------------------+-------

1 | John | Smith | 2018-07-12 08:02:15 | 100.5

1 | John | Smith | 2018-07-13 09:10:00 | 99.12

2 | Jenny | Doe | |

3 | Andy | Jones | 2018-07-12 08:02:15 | 13.5

(4 rows)

SELECT

c.id, c.name.given, c.name.family, o.shipdate, o.price

FROM

datalake.nested_customers_orc c

LEFT JOIN

c.orders o

ON true;

Array orders

FROM

”c” 1

Orders

create external table

datalake.nested_customers_orc(

id int,

name struct<given:varchar(20),

family:varchar(20)>,

phones array<varchar(20)>,

orders array<struct

<shipdate:timestamp,

price:double precision>>

)

:

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

• Redshift

• Redshift 2018

• Redshift (re:Invent2018 )

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Redshiftのこれまでの課題

OLTP SQL 1

...

• RDS/Aurora

• BI

• Redshift (Spectrum )

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

オンデマンドで追加のクラスターを自動的に起動

従来よりはるかに多くのクエリを同時に処理

エンドポイントはメインクラスターのまま

すべてのクラスターでデータの整合性は保たれる

Concurrency Scaling (プレビュー)従来よりはるかに高い同時実行性で一貫して高速なパフォーマンス

New!

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

メインクラスターが使用されている24時間毎に、Concurrency Scalingのために1時間分のクレジットを提供

追加クラスターで稼働したクエリに対して1秒単位の課金

そのため多くのお客様は,Concurrency Scaling を無料でご利用可能

New!Concurrency Scaling (プレビュー)従来よりはるかに高い同時実行性で一貫して高速なパフォーマンス

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Amazon Redshift

VacuumAnalyze WLM Concurrency

Setting

AutoAuto Auto

Vacuumや Analyzeのようなメンテナンスプロセスはバックグラウンドで自動実行されるようになる

Redshift は最適化されたスループットを提供するため、WLM concurrency settingの自動調整機能を提供予定

ゼロメンテナンスを目指して

Coming Soon!

✔ ✔

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Amazon Redshift

パフォーマンス向上とディスクスペース最適化のためテーブルのデータ分散を自動化します

継続的なワークロード分析に基づき、インテリジェントなチューニングリコメンデーションを提供します

ALL

keyA keyB keyC keyD

Node 1

Slice 1 Slice 2

Node 2

Slice 3 Slice 4

EVEN

Node 1

Slice 1 Slice 2

Node 2

Slice 3 Slice 4

KEY

Node 1

Slice 1 Slice 2

Node 2

Slice 3 Slice 4recommended distribution key

もう distkeyで悩む必要はありません !

Advise

Coming Soon!

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

in Redshift

既存のストアドプロシージャを使ってRedshift上で動かすことができるようになります

Redshift は PL/pgSQLフォーマットのストアドプロシージャをサポートする予定です。これにより、既存のストアドプロシージャをそのまま持ち込むことができるようになります

Redshift への移行がより容易に!

Coming Soon!

ETL、データバリデーション、カスタムビジネスロジックを効率的に実行するための

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Amazon Redshift SpectrumS3

Redshift Spectrum

Redshift S3

Redshift データ

S3データレイク

データロード処理が不要に

コンピュートとストレージを分けてスケーリング

S3上のデータに直接クエリを実行

オープンファイルフォーマット対応(Parquet, ORC, JSON, Grok, Avro, およびCSV等)

スキャンしたデータ量のみの課金制 Unload to Parquet

Spectrum Request Accelerator

Coming

Soon!

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

• Redshift

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Amazon Redshift

• https://aws.amazon.com/jp/redshift/

Amazon Redshift

• https://aws.amazon.com/jp/documentation/redshift/

Amazon Redshift Q A ※ AWS

• https://forums.aws.amazon.com/forum.jspa?forumID=155

Amazon Redshift Release Notes

• https://aws.amazon.com/releasenotes/Amazon-Redshift

Amazon Redshift Top 10

• http://aws.typepad.com/sajp/2015/12/top-10-performance-tuning-techniques-for-amazon-redshift.html

Amazon Redshift Spectrum 10

• https://aws.amazon.com/jp/blogs/news/10-best-practices-for-amazon-redshift-spectrum/

AWS Bigdata Blog

• https://aws.amazon.com/jp/blogs/big-data/

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Q&A

AWS Japan Blog https://aws.amazon.com/jp/blogs/news/

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS Webinar

https://amzn.to/JPWebinar https://amzn.to/JPArchive