7. SQL
Azure SQL Data
Warehouse
Power BI
SQL Server
Analysis Services
機械学習
Azure Machine
Learning
HDInsight / Data Lake
Azure SQL
Database
業務 データ
デバイス データ
20. 均一にすべてのディストリビューションに
CREATE TABLE (…)
WITH DISTRIBUTION = ROUND_ROBIN
Dist_DB_1
Dist_DB_2
Dist_DB_3
Dist_DB_4
ID Name City Balance
201 Bob Madison $3,000
105 Sue San Fran $110
933 Sue Seattle $40,000
150 George Seattle $60
220 Sally Mtn View $990
86 Bob New York $2,300
201 Bob …
105 Sue …
150 Geoge …
220 Sally …
86 Bob …
933 Sue …
482 John …
115 Asad …
201 Bob Madison $3,000
105 Sue San Fran $110
933 Sue Seattle $40,000
150 George Seattle $60
220 Sally Mtn View $990
86 Bob New York $2,300
21. ID UserID Name Tran
201 123 Bob $3,000
105 324 Sue $110
933 324 Sue $40,000
150 45 George $60
220 154 Sally $990
86 123 Bob $2,300
201 123 Bob $3,000
105 324 Sue $110
933 324 Sue $40,000
150 45 George $60
220 154 Sally $990
86 123 Bob $2,300
Dist_DB_1
Dist_DB_2
Dist_DB_3
Dist_DB_4
同じキーは同じディストリビューションに
123 Bob …
324 Sue …
45 Geoge …
154 Sally …
123 Bob …
324 Sue …
CREATE TABLE (…)
WITH DISTRIBUTION = HASH(UserID)
28. する
vs_key color ord
11 Red 15
32 Blue 20
54 Yellow 22
68 Purple 17
ss_key vid qty
1 2 5
3 32 10
5 6 12
7 78 7
vs_key color ord
2 Red 13
4 Blue 21
6 Yellow 27
8 Green 11
ss_key vid qty
2 11 3
4 4 11
6 54 17
8 8 1
HASH(vs_key) HASH(ss_key)
11, 15, 3
2, 13, 5
11, 15, 3 : 2, 13, 5
SELECT vs_key, a.ord ,b.qty
FROM vendor_sales a
JOIN store_sales b ON a.vs_key = b.vid
WHERE a.color = 'Red'
29. しない
ws_key color Qty
1 Red 15
3 Blue 20
5 Yellow 22
7 Green 17
ss_key color Qty
1 Red 5
3 Blue 10
5 Yellow 12
7 Green 7
ws_key color Qty
2 Red 13
4 Blue 21
6 Yellow 27
8 Green 11
ss_key color Qty
2 Red 3
4 Blue 11
6 Yellow 17
8 Green 1
HASH(ws_key) HASH(ss_key)
Red, 5
Red, 3
Red, 5 : Red, 3
SELECT a.color, b.Qty
FROM web_sales a
JOIN store_sales b ON a.ws_key = b.ss_key
WHERE a.color = 'Red'