Lenses: An On-Demand Approach to ETL Ying Yang + , Niccolo - - PowerPoint PPT Presentation

lenses an on demand approach to etl
SMART_READER_LITE
LIVE PREVIEW

Lenses: An On-Demand Approach to ETL Ying Yang + , Niccolo - - PowerPoint PPT Presentation

The ODIn Lab @ Lenses: An On-Demand Approach to ETL Ying Yang + , Niccolo Meneghe0 + , Ronny Fehling*,Zhen Hua Liu*, Oliver Kennedy + + SUNY Buffalo, * Oracle {yyang25,


slide-1
SLIDE 1

The ODIn Lab @

Lenses: An On-Demand Approach to ETL

Ying ¡Yang+, ¡Niccolo ¡Meneghe0+, ¡Ronny ¡Fehling*,Zhen ¡Hua ¡Liu*, ¡Oliver ¡Kennedy+ ¡

+ ¡SUNY ¡Buffalo, ¡* ¡Oracle ¡

¡ ¡ {yyang25, ¡niccolom, ¡okennedy}@buffalo.edu ¡ {ronny.fehling, ¡zhen.liu}@oracle.com ¡ ¡

slide-2
SLIDE 2

The ODIn Lab @

Ef#icient ¡analytics ¡depends ¡on ¡accurate, ¡reliable, ¡high-­‑quality ¡

  • information. ¡ ¡

2 ¡

slide-3
SLIDE 3

The ODIn Lab @

Ef#icient ¡analytics ¡depends ¡on ¡accurate, ¡reliable, ¡high-­‑quality ¡

  • information. ¡ ¡

Data ¡ Lake ¡ ETL ¡Tool ¡ Data ¡Mart ¡ 3 ¡

slide-4
SLIDE 4

The ODIn Lab @

Ef#icient ¡analytics ¡depends ¡on ¡accurate, ¡reliable, ¡high-­‑quality ¡

  • information. ¡ ¡

Data ¡ Lake ¡ ETL ¡Tool ¡ Data ¡ Warehouse ¡ 4 ¡

slide-5
SLIDE 5

The ODIn Lab @

Ef#icient ¡analytics ¡depends ¡on ¡accurate, ¡reliable, ¡high-­‑quality ¡

  • information. ¡ ¡

Data ¡ Lake ¡ ETL ¡Tool ¡ 5 ¡ Data ¡ Warehouse ¡

slide-6
SLIDE 6

The ODIn Lab @

Ef#icient ¡analytics ¡depends ¡on ¡accurate, ¡reliable, ¡high-­‑quality ¡

  • information. ¡ ¡

Data ¡ Lake ¡ ETL ¡Tool ¡ 6 ¡ Data ¡ Warehouse ¡

slide-7
SLIDE 7

The ODIn Lab @

But, ¡raw ¡data ¡are ¡messy. ¡

Data ¡ Lake ¡ ETL ¡Tool ¡ 7 ¡ Data ¡ Warehouse ¡

slide-8
SLIDE 8

The ODIn Lab @

The ¡data ¡is ¡very ¡messy: ¡

  • Product: ¡missing ¡data. ¡
  • Rating1: ¡missing ¡data. ¡ ¡
  • Rating1 ¡and ¡Rating2: ¡different ¡schemas. ¡

id ¡ name ¡ brand ¡ category ¡ ROWID ¡ P123 ¡ Apple ¡6s, ¡White ¡ NULL ¡ phone ¡ R1 ¡ P124 ¡ Apple ¡5s, ¡Black ¡ NULL ¡ phone ¡ R2 ¡ P125 ¡ Samsung ¡Note2 ¡ Samsung ¡ phone ¡ R3 ¡ P2345 ¡ Sony ¡to ¡inches ¡ NULL ¡ NULL ¡ R4 ¡ P34234 ¡ Dell, ¡Intel ¡4 ¡core ¡ Dell ¡ laptop ¡ R5 ¡ ¡ P34235 ¡ HP, ¡AMD ¡2 ¡core ¡ HP ¡ laptop ¡ R6 ¡

HappyBuy: ¡Product ¡ Mobile ¡Application: ¡Rating2 ¡ Survey: ¡Rating1 ¡

pid ¡ … evaluation ¡

Num_ratings ¡

ROWID ¡ P125 ¡ … 3 ¡ 121 ¡ R10 ¡ P34234 ¡ … 5 ¡ 5 ¡ R11 ¡ P34235 ¡ … 4.5 ¡ 4 ¡ R12 ¡ pid ¡ … ¡

rating ¡ review_ct ¡

ROWID ¡ P123 ¡ … ¡ 4.5 ¡ 50 ¡ R7 ¡ P2345 ¡ … ¡ NULL ¡ 245 ¡ R8 ¡ P124 ¡ … ¡ 4 ¡ 100 ¡ R9 ¡

8 ¡

slide-9
SLIDE 9

The ODIn Lab @

The ¡data ¡is ¡very ¡messy: ¡

  • Product: ¡missing ¡data. ¡

id ¡ name ¡ brand ¡ category ¡ ROWID ¡ P123 ¡ Apple ¡6s, ¡White ¡ NULL ¡ phone ¡ R1 ¡ P124 ¡ Apple ¡5s, ¡Black ¡ NULL ¡ phone ¡ R2 ¡ P125 ¡ Samsung ¡Note2 ¡ Samsung ¡ phone ¡ R3 ¡ P2345 ¡ Sony ¡to ¡inches ¡ NULL ¡ NULL ¡ R4 ¡ P34234 ¡ Dell, ¡Intel ¡4 ¡core ¡ Dell ¡ laptop ¡ R5 ¡ ¡ P34235 ¡ HP, ¡AMD ¡2 ¡core ¡ HP ¡ laptop ¡ R6 ¡

HappyBuy: ¡Product ¡

9 ¡

slide-10
SLIDE 10

The ODIn Lab @

The ¡data ¡is ¡very ¡messy: ¡

  • Rating1: ¡missing ¡data. ¡

pid ¡ … evaluation ¡

Num_ratings ¡

ROWID ¡ P125 ¡ … 3 ¡ 121 ¡ R10 ¡ P34234 ¡ … 5 ¡ 5 ¡ R11 ¡ P34235 ¡ … 4.5 ¡ 4 ¡ R12 ¡ pid ¡ … ¡

rating ¡ review_ct ¡

ROWID ¡ P123 ¡ … ¡ 4.5 ¡ 50 ¡ R7 ¡ P2345 ¡ … ¡ NULL ¡ 245 ¡ R8 ¡ P124 ¡ … ¡ 4 ¡ 100 ¡ R9 ¡

10 ¡

Mobile ¡Application: ¡Rating2 ¡ Survey: ¡Rating1 ¡

slide-11
SLIDE 11

The ODIn Lab @

The ¡data ¡is ¡very ¡messy: ¡

  • Rating1 ¡and ¡Rating2: ¡different ¡schemas. ¡

pid ¡ … evaluation ¡

Num_ratings ¡

ROWID ¡ P125 ¡ … 3 ¡ 121 ¡ R10 ¡ P34234 ¡ … 5 ¡ 5 ¡ R11 ¡ P34235 ¡ … 4.5 ¡ 4 ¡ R12 ¡ pid ¡ … ¡

rating ¡ review_ct ¡

ROWID ¡ P123 ¡ … ¡ 4.5 ¡ 50 ¡ R7 ¡ P2345 ¡ … ¡ NULL ¡ 245 ¡ R8 ¡ P124 ¡ … ¡ 4 ¡ 100 ¡ R9 ¡

11 ¡

Mobile ¡Application: ¡Rating2 ¡ Survey: ¡Rating1 ¡

slide-12
SLIDE 12

The ODIn Lab @

id ¡ name ¡ brand ¡ category ¡ ROWID ¡ P123 ¡ Apple ¡6s, ¡White ¡ NULL ¡ phone ¡ R1 ¡ P124 ¡ Apple ¡5s, ¡Black ¡ NULL ¡ phone ¡ R2 ¡ P125 ¡ Samsung ¡Note2 ¡ Samsung ¡ phone ¡ R3 ¡ P2345 ¡ Sony ¡to ¡inches ¡ NULL ¡ NULL ¡ R4 ¡ P34234 ¡ Dell, ¡Intel ¡4 ¡core ¡ Dell ¡ laptop ¡ R5 ¡ ¡ P34235 ¡ HP, ¡AMD ¡2 ¡core ¡ HP ¡ laptop ¡ R6 ¡

HappyBuy: ¡Product ¡

pid ¡ … evaluation ¡

Num_ratings ¡

ROWID ¡ P125 ¡ … 3 ¡ 121 ¡ R10 ¡ P34234 ¡ … 5 ¡ 5 ¡ R11 ¡ P34235 ¡ … 4.5 ¡ 4 ¡ R12 ¡ pid ¡ … ¡

rating ¡ review_ct ¡

ROWID ¡ P123 ¡ … ¡ 4.5 ¡ 50 ¡ R7 ¡ P2345 ¡ … ¡ NULL ¡ 245 ¡ R8 ¡ P124 ¡ … ¡ 4 ¡ 100 ¡ R9 ¡

id ¡ name ¡ brand ¡ category ¡ ROWID ¡ P123 ¡ Apple ¡6s, ¡White ¡ NULL ¡ phone ¡ R1 ¡ P124 ¡ Apple ¡5s, ¡Black ¡ NULL ¡ phone ¡ R2 ¡ P125 ¡ Samsung ¡Note2 ¡ Samsung ¡ phone ¡ R3 ¡ P2345 ¡ Sony ¡to ¡inches ¡ NULL ¡ NULL ¡ R4 ¡ P34234 ¡ Dell, ¡Intel ¡4 ¡core ¡ Dell ¡ laptop ¡ R5 ¡ ¡ P34235 ¡ HP, ¡AMD ¡2 ¡core ¡ HP ¡ laptop ¡ R6 ¡

Mobile ¡Application: ¡Rating2 ¡ Survey: ¡Rating1 ¡

The ¡data ¡is ¡very ¡messy: ¡

  • Product: ¡missing ¡data. ¡
  • Rating1: ¡missing ¡data. ¡ ¡
  • Rating1 ¡and ¡Rating2: ¡different ¡schemas. ¡

12 ¡

slide-13
SLIDE 13

The ODIn Lab @

id ¡ name ¡ brand ¡ category ¡ ROWID ¡ P123 ¡ Apple ¡6s, ¡White ¡ Apple ¡ phone ¡ R1 ¡ P124 ¡ Apple ¡5s, ¡Black ¡ Apple ¡ phone ¡ R2 ¡ P125 ¡ Samsung ¡Note2 ¡ Samsung ¡ phone ¡ R3 ¡ P2345 ¡ Sony ¡to ¡inches ¡ Sony ¡ TV ¡ R4 ¡ P34234 ¡ Dell, ¡Intel ¡4 ¡core ¡ Dell ¡ laptop ¡ R5 ¡ ¡ P34235 ¡ HP, ¡AMD ¡2 ¡core ¡ HP ¡ laptop ¡ R6 ¡

HappyBuy: ¡Product ¡ AllRatings ¡

The ¡clean ¡data ¡

13 ¡

pid ¡ … ¡

rating ¡ review_ct ¡

ROWID ¡ P125 ¡ … ¡ 3 ¡ 121 ¡ R10 ¡ P34234 ¡ … ¡ 5 ¡ 5 ¡ R11 ¡ P34235 ¡ … ¡ 4.5 ¡ 4 ¡ R12 ¡ P123 ¡ … ¡ 4.5 ¡ 50 ¡ R7 ¡ P2345 ¡ … ¡ 5 ¡ 245 ¡ R8 ¡ P124 ¡ … ¡ 4 ¡ 100 ¡ R9 ¡

slide-14
SLIDE 14

The ODIn Lab @

Upfront ¡cleaning ¡ Unnecessary ¡processing ¡of ¡unused ¡data. ¡

Data ¡Cleaning ¡Technician: ¡ ¡ Cleaning ¡all ¡messy ¡data ¡before ¡analysis ¡ Data ¡ Lake ¡ ETL ¡Tool ¡ 14 ¡ Data ¡ Warehouse ¡

slide-15
SLIDE 15

The ODIn Lab @

(1) Unnecessary ¡processing ¡of ¡unused ¡data. ¡ ¡ (2) Duplication ¡of ¡work. ¡

Data ¡Analyst: ¡ Cleaning ¡all ¡messy ¡data ¡ ¡ when ¡ ¡analysis ¡

Inline ¡cleaning ¡

Data ¡ Lake ¡ ETL ¡Tool ¡ 15 ¡ Data ¡ Warehouse ¡

slide-16
SLIDE 16

The ODIn Lab @

On-­‑demand ¡cleaning ¡

Data ¡ Lake ¡ ETL ¡Tool ¡ Data ¡Scientist/Crowdsourcing: ¡ Delay ¡the ¡cleaning ¡process ¡until ¡ needed ¡and ¡clean ¡

  • incrementally. ¡

16 ¡ Data ¡ Warehouse ¡

slide-17
SLIDE 17

The ODIn Lab @

Query ¡

SELECT r.pid, r.rating,r.review_ct FROM Rating r WHERE r.rating >= 4 and r. review_ct >=100

Analysis ¡Result ¡ ... ¡

Interacting ¡with ¡paygo: ¡ ¡ ¡ ¡ Alice: ¡I ¡want ¡to ¡clean ¡the ¡data. ¡ ¡ ¡ Paygo: ¡OK, ¡does ¡“rating” ¡ ¡ ¡match ¡to ¡“evaluation”? ¡ ¡ Alice: ¡Yes. ¡ ¡ Paygo: ¡Good, ¡here ¡is ¡the ¡result, ¡ do ¡you ¡want ¡to ¡clean ¡further? ¡ ¡ Alice: ¡… ¡

More ¡Accurate ¡ Analysis ¡Result ¡ ... ¡

Feedback: ¡

17 ¡

slide-18
SLIDE 18

The ODIn Lab @

On-­‑demand ¡cleaning ¡

Data ¡ Lake ¡ ETL ¡Tool ¡ Data ¡Scientist/Crowdsourcing: ¡ Delay ¡the ¡cleaning ¡process ¡ until ¡needed ¡and ¡clean ¡

  • incrementally. ¡

¡

Time ¡and ¡cost ¡ef#icient ¡comparatively ¡ ¡ We ¡need ¡a ¡general ¡on-­‑demand ¡cleaning ¡framework ¡

18 ¡ Data ¡ Warehouse ¡

slide-19
SLIDE 19

The ODIn Lab @

Transform ¡ Transform ¡

Paygo ¡ Func>on DB ¡

<object,attribute,value> ¡ t0=<123,rating,4.5> ¡ t1=<124,rating,4> ¡ t4=<34234,rating,5> ¡ t5=<34235,rating,4.5> ¡ t7=<124,review_ct,100> ¡ t8=<2345,review_ct,245> ¡ t9=<125,review_ct,121> ¡ pid ¡ … ¡ rating ¡ review_ct ¡ ROWID ¡ P2345 ¡ … ¡ 4.5 ¡ 245 ¡ R8 ¡ P124 ¡ … ¡ 4 ¡ 100 ¡ R9 ¡

Current ¡systems ¡focus ¡on ¡different ¡data ¡quality ¡problems ¡and ¡have ¡different ¡ representations ¡and ¡different ¡forms ¡of ¡feedback. ¡

19 ¡

slide-20
SLIDE 20

The ODIn Lab @

pid ¡ categoty ¡ Rating ¡ review_ct ¡ P124 ¡ phone ¡ 4 ¡ 100 ¡ <object,attribute,value> ¡ t0=<123,rating,4.5> ¡ t1=<124,rating,4> ¡ t4=<34234,rating,5> ¡ t5=<34235,rating,4.5> ¡ t7=<124,review_ct,100> ¡ t8=<2345,review_ct,245> ¡ t9=<125,review_ct,121> ¡ pid ¡ … rating ¡ review_ct ¡ ROWID ¡ P2345 ¡ … 4.5 ¡ 245 ¡ R8 ¡ P124 ¡ … 4 ¡ 100 ¡ R9 ¡ pid ¡ … ¡ rating ¡ review_ct ¡ ROWID ¡ P2345 ¡ … ¡ 4.5 ¡ 245 ¡ R8 ¡ P124 ¡ … ¡ 4 ¡ 100 ¡ R9 ¡

Too ¡much ¡extra ¡work ¡to ¡unify ¡the ¡systems! ¡

20 ¡

slide-21
SLIDE 21

The ODIn Lab @

  • 1. How ¡does ¡Alice ¡express ¡her ¡data ¡cleaning ¡needs? ¡
  • 2. How ¡do ¡we ¡present ¡(uncertain) ¡query ¡results ¡to ¡Alice? ¡
  • 3. What ¡can ¡Alice ¡do ¡with ¡that ¡information? ¡
  • 4. ... ¡

We ¡need ¡a ¡unified ¡system ¡for ¡on-­‑demand ¡ETL! ¡

21 ¡

Challenges: ¡

slide-22
SLIDE 22

The ODIn Lab @

1. How ¡does ¡Alice ¡express ¡her ¡data ¡cleaning ¡needs? ¡ 2. How ¡do ¡we ¡present ¡(uncertain) ¡query ¡results ¡to ¡Alice? ¡ 3. What ¡can ¡Alice ¡do ¡with ¡that ¡information? ¡ 4. ... ¡

We ¡need ¡a ¡unified ¡system ¡for ¡on-­‑demand ¡ETL! ¡ Mimir ¡

A ¡uni#ied ¡solution ¡for ¡managing ¡uncertainty ¡

http://www.taringa.net/posts/arte/15354098/El-­‑tributo-­‑de-­‑Odin-­‑a-­‑la-­‑sabiduria.html ¡

22 ¡

slide-23
SLIDE 23

The ODIn Lab @

id ¡ name ¡ brand ¡ category ¡ ROWID ¡ P123 ¡ Apple ¡6s, ¡White ¡ NULL ¡ phone ¡ R1 ¡ P124 ¡ Apple ¡5s, ¡Black ¡ NULL ¡ phone ¡ R2 ¡ P125 ¡ Samsung ¡Note2 ¡ Samsung ¡ phone ¡ R3 ¡ P2345 ¡ Sony ¡to ¡inches ¡ NULL ¡ NULL ¡ R4 ¡ P34234 ¡ Dell, ¡Intel ¡4 ¡core ¡ Dell ¡ laptop ¡ R5 ¡ ¡ P34235 ¡ HP, ¡AMD ¡2 ¡core ¡ HP ¡ laptop ¡ R6 ¡

HappyBuy:Product ¡

We ¡have: ¡

23 ¡

slide-24
SLIDE 24

The ODIn Lab @

id ¡ name ¡ brand ¡ category ¡ ROWID ¡ P123 ¡ Apple ¡6s, ¡White ¡ Apple ¡ phone ¡ R1 ¡ P124 ¡ Apple ¡5s, ¡Black ¡ Apple ¡ phone ¡ R2 ¡ P125 ¡ Samsung ¡Note2 ¡ Samsung ¡ phone ¡ R3 ¡ P2345 ¡ Sony ¡to ¡inches ¡ Sony ¡ TV ¡ R4 ¡ P34234 ¡ Dell, ¡Intel ¡4 ¡core ¡ Dell ¡ laptop ¡ R5 ¡ ¡ P34235 ¡ HP, ¡AMD ¡2 ¡core ¡ HP ¡ laptop ¡ R6 ¡

HappyBuy: ¡SaneProduct ¡

We ¡want: ¡

24 ¡

slide-25
SLIDE 25

The ODIn Lab @

CREATE LENS SaneProduct AS SELECT * FROM Product USING DOMAIN_REPAIR( category string NOT NULL, brand string NOT NULL );

id ¡ name ¡ brand ¡ category ¡ ROWID ¡ P123 ¡ Apple ¡6s, ¡White ¡ Apple ¡ phone ¡ R1 ¡ P124 ¡ Apple ¡5s, ¡Black ¡ Apple ¡ phone ¡ R2 ¡ P125 ¡ Samsung ¡Note2 ¡ Samsung ¡ phone ¡ R3 ¡ P2345 ¡ Sony ¡to ¡inches ¡ Sony ¡ TV ¡ R4 ¡ P34234 ¡ Dell, ¡Intel ¡4 ¡core ¡ Dell ¡ laptop ¡ R5 ¡ ¡ P34235 ¡ HP, ¡AMD ¡2 ¡core ¡ HP ¡ laptop ¡ R6 ¡

HappyBuy: ¡SaneProduct ¡

id ¡ name ¡ brand ¡ category ¡ ROWID ¡ P123 ¡ Apple ¡6s, ¡White ¡ NULL ¡ phone ¡ R1 ¡ P124 ¡ Apple ¡5s, ¡Black ¡ NULL ¡ phone ¡ R2 ¡ P125 ¡ Samsung ¡Note2 ¡ Samsung ¡ phone ¡ R3 ¡ P2345 ¡ Sony ¡to ¡inches ¡ NULL ¡ NULL ¡ R4 ¡ P34234 ¡ Dell, ¡Intel ¡4 ¡ core ¡ Dell ¡ laptop ¡ R5 ¡ ¡ P34235 ¡ HP, ¡AMD ¡2 ¡core ¡ HP ¡ laptop ¡ R6 ¡

HappyBuy: ¡Product ¡

?

Lens: ¡a ¡data ¡processing ¡component ¡that ¡is ¡evaluated ¡as ¡part ¡of ¡a ¡normal ¡ ETL ¡pipeline. ¡

25 ¡

slide-26
SLIDE 26

The ODIn Lab @

¡ Model ¡

Lenses ¡make ¡best ¡use ¡of ¡source ¡data ¡and ¡make ¡a ¡best-­‑effort ¡guess ¡using ¡the ¡learnt ¡

  • model. ¡ ¡

Raw ¡input ¡ Output ¡

26 ¡

slide-27
SLIDE 27

The ODIn Lab @

What ¡the ¡user ¡sees ¡through ¡the ¡lens ¡MAY ¡BE ¡WRONG! ¡

https://s-­‑media-­‑cache-­‑ak0.pinimg.com/736x/06/e0/a1/06e0a140416c2d58eb2176aa501e44c7.jpg ¡

27 ¡

slide-28
SLIDE 28

The ODIn Lab @

id ¡ name ¡ brand ¡ category ¡ ROWID ¡ P123 ¡ Apple ¡6s, ¡White ¡ Apple* ¡ phone ¡ R1 ¡ P124 ¡ Apple ¡5s, ¡Black ¡ Apple* ¡ phone ¡ R2 ¡ P125 ¡ Samsung ¡Note2 ¡ Samsung ¡ phone ¡ R3 ¡ P2345 ¡ Sony ¡to ¡inches ¡ Sony* ¡ TV* ¡ R4 ¡ P34234 ¡ Dell, ¡Intel ¡4 ¡core ¡ Dell ¡ laptop ¡ R5 ¡ ¡ P34235 ¡ HP, ¡AMD ¡2 ¡core ¡ HP ¡ laptop ¡ R6 ¡

HappyBuy: ¡SaneProduct ¡

Mimir ¡provides: ¡

P123 ¡Brand ¡:Apple ¡0.9, ¡Samsung ¡0.1,... ¡ P124 ¡Brand: ¡Apple ¡0.9, ¡Samsung ¡0.1,... ¡ P12345 ¡Brand: ¡Apple ¡0.1, ¡Sony ¡0.9,... ¡ P12345 ¡Category: ¡phone ¡0.1,TV ¡0.8,... ¡

28 ¡

  • Nondeterministic ¡result ¡
  • Analysis ¡of ¡result ¡quality ¡
  • User ¡the ¡flexibility ¡to ¡improve ¡the ¡result ¡
slide-29
SLIDE 29

The ODIn Lab @

id ¡ name ¡ brand ¡ category ¡ ROWID ¡ P123 ¡ Apple ¡6s, ¡White ¡ VAR(‘X’,R1) ¡ phone ¡ R1 ¡ P124 ¡ Apple ¡5s, ¡Black ¡ VAR(‘X’,R2) ¡ phone ¡ R2 ¡ P125 ¡ Samsung ¡Note2 ¡ Samsung ¡ phone ¡ R3 ¡ P2345 ¡ Sony ¡to ¡inches ¡ VAR(‘X’,R4) ¡ VAR(‘Y’,R4) ¡ R4 ¡ P34234 ¡ Dell, ¡Intel ¡4 ¡core ¡ Dell ¡ laptop ¡ R5 ¡ ¡ P34235 ¡ HP, ¡AMD ¡2 ¡core ¡ HP ¡ laptop ¡ R6 ¡

SaneProduct ¡

Lens ¡produces ¡a ¡PC-­‑Table, ¡which ¡defines ¡the ¡set ¡of ¡possible ¡outputs, ¡and ¡a ¡probability ¡ measure ¡that ¡approximates ¡the ¡likelihood ¡that ¡any ¡given ¡possible ¡output ¡accurately ¡ models ¡the ¡real ¡world. ¡

29 ¡

slide-30
SLIDE 30

The ODIn Lab @

We ¡have: ¡

pid ¡ … evaluation ¡

Num_ratings ¡

ROWID ¡ P125 ¡ … 3 ¡ 121 ¡ R10 ¡ P34234 ¡ … 5 ¡ 5 ¡ R11 ¡ P34235 ¡ … 4.5 ¡ 4 ¡ R12 ¡ pid ¡ … ¡

rating ¡ review_ct ¡

ROWID ¡ P123 ¡ … ¡ 4.5 ¡ 50 ¡ R7 ¡ P2345 ¡ … ¡ NULL ¡ 245 ¡ R8 ¡ P124 ¡ … ¡ 4 ¡ 100 ¡ R9 ¡

30 ¡

Mobile ¡Application: ¡Rating2 ¡ Survey: ¡Rating1 ¡

slide-31
SLIDE 31

The ODIn Lab @

MatchedRa)ngs2 ¡

AllRatings ¡

pid ¡ … rating ¡

review_ct ¡

ROWID ¡ P125 ¡ … 3 ¡ 121 ¡ R10 ¡ P34234 ¡ … 5 ¡ 5 ¡ R11 ¡ P34235 ¡ … 4.5 ¡ 4 ¡ R12 ¡ P123 ¡ … 4.5 ¡ 50 ¡ R7 ¡ P2345 ¡ … 5 ¡ 245 ¡ R8 ¡ P124 ¡ … 4 ¡ 100 ¡ R9 ¡

We ¡want: ¡

31 ¡

slide-32
SLIDE 32

The ODIn Lab @

CREATE LENS MatchedRating2 AS SELECT * FROM Rating2 USING SCHEMA_MATCHING( pid string, ..., rating float, review_ct float, NO LIMIT ); CREATE VIEW AllRatings AS SELECT * FROM MatchedRatings2 UNION SELECT * FROM Ratings1;

32 ¡

pid ¡ … evaluation ¡ Num_ratings ¡ ROWID ¡ P125 ¡ … 3 ¡ 121 ¡ R10 ¡ P34234 ¡ … 5 ¡ 5 ¡ R11 ¡ P34235 ¡ … 4.5 ¡ 4 ¡ R12 ¡ pid ¡ … ¡ rating ¡ review_ct ¡ ROWID ¡ P123 ¡ … ¡ 4.5 ¡ 50 ¡ R7 ¡ P2345 ¡ … ¡ NULL ¡ 245 ¡ R8 ¡ P124 ¡ … ¡ 4 ¡ 100 ¡ R9 ¡

?

AllRatings ¡

pid ¡ … rating ¡ review_ct ¡ ROWID ¡ P125 ¡ … 3 ¡ 121 ¡ R10 ¡ P34234 ¡ … 5 ¡ 5 ¡ R11 ¡ P34235 ¡ … 4.5 ¡ 4 ¡ R12 ¡ P123 ¡ … 4.5 ¡ 50 ¡ R7 ¡ P2345 ¡ … NULL ¡ 245 ¡ R8 ¡ P124 ¡ … 4 ¡ 100 ¡ R9 ¡

Mobile ¡Application: ¡Rating2 ¡ Survey: ¡Rating1 ¡

slide-33
SLIDE 33

The ODIn Lab @

¡ Model ¡

Lenses ¡make ¡best ¡use ¡of ¡source ¡data ¡and ¡make ¡a ¡best-­‑effort ¡guess ¡ ¡ using ¡the ¡learnt ¡model. ¡ ¡

Raw ¡input ¡ Output ¡

33 ¡

slide-34
SLIDE 34

The ODIn Lab @

pid ¡ … rating ¡ Review_ct ¡ P125 ¡ … If ¡Var(‘rat=eval’) ¡then ¡3 ¡else ¡ ¡ ¡ ¡ ¡If ¡Var(‘rat=num_rating’) ¡then ¡121 ¡ ¡else ¡NULL ¡ ¡ If ¡Var(‘review_ct=eval’) ¡then ¡3 ¡else ¡ ¡ ¡ ¡ ¡If ¡Var(‘review_ct=num_rating’) ¡then ¡121 ¡ ¡else ¡ NULL ¡ P34234 ¡ … If ¡Var(‘rat=eval’) ¡then ¡5 ¡else ¡ ¡ ¡ ¡ ¡If ¡Var(‘rat=num_rating’) ¡then ¡5 ¡ ¡else ¡NULL ¡ If ¡Var(‘review_ct=eval’) ¡then ¡5 ¡else ¡ ¡ ¡ ¡ ¡If ¡Var(‘review_ct=num_rating’) ¡then ¡5 ¡ ¡else ¡NULL ¡ P34235 ¡ … If ¡Var(‘rat=eval’) ¡then ¡4.5 ¡else ¡ ¡ ¡ ¡ ¡If ¡Var(‘rat=num_rating’) ¡then ¡4 ¡ ¡else ¡NULL ¡ If ¡Var(‘review_ct=eval’) ¡then ¡4.5 ¡else ¡ ¡ ¡ ¡ ¡If ¡Var(‘review_ct=num_rating’) ¡then ¡4 ¡ ¡else ¡NULL ¡ MatchedRa)ngs2 ¡

Cells ¡in ¡a ¡generalized ¡C-­‑Table ¡can ¡have ¡arbitrary ¡expressions. ¡

34 ¡

slide-35
SLIDE 35

The ODIn Lab @ AllRaHngs ¡ SaneRaHngs ¡

CREATE LENS SaneRatings AS SELECT pid, rating, review_ct FROM AllRatings USING DOMAIN_REPAIR( rating DECIMAL NOT NULL); Query: SELECT p.pid, p.category, r.rating, r.review_ct FROM SaneRatings r NATURAL JOIN SaneProduct p WHERE p.category IN (`phone',`TV') OR r.rating > 4

Rating2 ¡ Rating1 ¡ MatchedRaHngs2 ¡ PsaneRaHngs

¡

SaneProduct ¡ result ¡ 35 ¡

Lenses ¡guarantee ¡to ¡compose ¡and ¡are ¡closed ¡on ¡relational ¡algebra. ¡ ¡

slide-36
SLIDE 36

The ODIn Lab @

CREATE LENS SaneRatings AS SELECT pid, rating, review_ct FROM AllRatings USING DOMAIN_REPAIR( rating DECIMAL NOT NULL); Query: SELECT p.pid, p.category, r.rating, r.review_ct FROM SaneRatings r NATURAL JOIN SaneProduct p WHERE p.category IN (`phone',`TV') OR r.rating > 4

Rating2 ¡ Rating1 ¡ MatchedRaHngs2 ¡ PsaneRaHngs

¡

SaneProduct ¡ result ¡ AllRaHngs ¡ SaneRaHngs ¡ 36 ¡

Lenses ¡guarantee ¡to ¡compose ¡and ¡are ¡closed ¡on ¡relational ¡algebra. ¡ ¡

slide-37
SLIDE 37

The ODIn Lab @

The ¡best ¡effort ¡result ¡hides ¡uncertainty ¡from ¡the ¡user, ¡ ¡leaving ¡the ¡user ¡the ¡ summary ¡of ¡which ¡results ¡are ¡uncertain. ¡ SELECT p.pid, p.category, r.rating, r.review_ct FROM AllRatings r NATURAL JOIN SaneProduct p WHERE p.category IN (`phone',`TV') OR r.rating > 4

37 ¡

slide-38
SLIDE 38

The ODIn Lab @

Why ¡asterisk? ¡

id ¡ Category ¡ rating ¡ Review_ct ¡ ¡Φ(condition) ¡ P123 ¡ phone ¡ 4.5 ¡ 50 ¡ Τ ¡ P124 ¡ phone ¡ 4 ¡ 100 ¡ Τ ¡ P125 ¡ phone ¡ If ¡Var(‘rat=eval’) ¡then ¡ … ¡ ¡ …else ¡Var(‘Z’,R10) ¡ If ¡Var(‘rat=eval’) ¡then ¡ … ¡ ¡ …else ¡NULL ¡ Τ ¡ P2345 ¡ Var(‘Y’,R4) ¡ Var(‘Z’,R8) ¡ 245 ¡ (Var(‘Y‘,R4) ¡= ¡‘phone’) ¡ ¡(Var(‘Y’,R4) ¡= ¡‘TV’) ¡ ¡Var(‘Z’,R8) ¡> ¡4 ¡ P34234 ¡ laptop ¡ If ¡Var(‘rat=eval’) ¡then ¡ … ¡ ¡ …else ¡Var(‘Z’,R11) ¡ If ¡Var(‘rat=eval’) ¡then ¡ … ¡ ¡ …else ¡NULL ¡ Var(‘rat=eval’) ¡ ¡ ¡Var(‘rat=num_rating’))= ¡ ¡Var(‘Z’,R11) ¡> ¡4 ¡ P34235 ¡ laptop ¡ If ¡Var(‘rat=eval’) ¡then ¡ … ¡ ¡ …else ¡Var(‘Z’,R12) ¡ If ¡Var(‘rat=eval’) ¡then ¡ … ¡ ¡ …else ¡NULL ¡

Var(‘rat=eval’) ¡ ¡ Or ¡(not ¡ ¡ Var(‘rat=num_rating’) ¡ ¡( ¡and ¡Var(‘Z’,R11) ¡> ¡4)) ¡

Mimir: ¡I ¡guessed ¡the ¡value ¡of ¡ Rating ¡is ¡5, ¡but ¡I ¡am ¡not ¡sure. ¡

38 ¡

slide-39
SLIDE 39

The ODIn Lab @

¬

¡Var(‘rat=eval’) ¡ ¡ ¡ ¡( ¡ ¡ ¡ ¡ ¡Var(‘rat=num_rating’) ¡ ¡ ¡ ¡ ¡(Var(‘Z’,R11) ¡> ¡4)) ¡ ¡

¡entropy: ¡H(t) ¡= ¡-­‑(pt ¡. ¡log2(pt) ¡+ ¡(1-­‑pt) ¡. ¡log2(1-­‑pt)) ¡

We ¡use ¡entropy ¡to ¡measure ¡how ¡uncertain ¡the ¡best ¡effort ¡result ¡is. ¡

39 ¡

How ¡bad ¡is ¡ the ¡result? ¡

slide-40
SLIDE 40

The ODIn Lab @

OK! ¡(Generating ¡ feedback...) ¡

Pick ¡A ¡ Pick ¡B ¡ Pick ¡C ¡

Model ¡

  • Random ¡
  • NMETC: ¡naïve ¡minimum ¡expected ¡total ¡cost ¡
  • CPI: ¡approximate ¡minimum ¡expected ¡total ¡cost ¡(EG2, ¡CS-­‑ID3,IDX,C4.5) ¡

var ¡ Cost ¡ P ¡ A ¡ 10 ¡ 0.5 ¡ B ¡ 5 ¡ 0.8 ¡ C ¡ 3 ¡ 0.5 ¡

40 ¡

A ¡ ¡(B ¡ ¡ ¡ ¡C) ¡

∨ ∧

I ¡want ¡to ¡improve ¡the ¡ result ¡quality. ¡

slide-41
SLIDE 41

The ODIn Lab @

H=0.88 ¡

Pick ¡A ¡ true ¡ (B ¡ ¡ ¡ ¡ ¡C) ¡

var ¡ Cost ¡ P ¡ A ¡ 5 ¡ 0.5 ¡ B ¡ 3 ¡ 0.8 ¡ C ¡ 10 ¡ 0.5 ¡

p(T)=0.5 ¡ p(F)=0.5 ¡ [1+,0-­‑];H=0 ¡ [0.4+,0.6-­‑];H=0.97 ¡ E[H(A)]=p(T)*H(T)+p(F)*H(F)=0.5*0+0.97*0.5=0.485 ¡

var ¡ Cost ¡ P ¡ A ¡ 10 ¡ 0.5 ¡ B ¡ 5 ¡ 0.8 ¡ C ¡ 3 ¡ 0.5 ¡

41 ¡

A ¡ ¡(B ¡ ¡ ¡ ¡C) ¡

∨ ∧

I ¡want ¡to ¡improve ¡the ¡ result ¡quality. ¡ OK! ¡(Generating ¡ feedback...) ¡

slide-42
SLIDE 42

The ODIn Lab @

H=0.88 ¡

Pick ¡A ¡

E[H(A)]=0.485 ¡

EG2-­‑based ¡CPI(A)=(H-­‑E[H(A)])/cost=0.0395 ¡

var ¡ Cost ¡ P ¡ A ¡ 10 ¡ 0.5 ¡ B ¡ 5 ¡ 0.8 ¡ C ¡ 3 ¡ 0.5 ¡

42 ¡

A ¡ ¡(B ¡ ¡ ¡ ¡C) ¡

∨ ∧

I ¡want ¡to ¡improve ¡the ¡ result ¡quality. ¡ OK! ¡(Generating ¡ feedback...) ¡

slide-43
SLIDE 43

The ODIn Lab @

H=0.88 ¡

Pick ¡A ¡ Pick ¡B ¡ Pick ¡C ¡

E(H)=0.485 ¡ CPI=0.0395 ¡ E(H)=0.8488 ¡ CPI=0.00624 ¡ E(H)=0.7345 ¡ CPI=0.0485 ¡

43 ¡

A ¡ ¡(B ¡ ¡ ¡ ¡C) ¡

∨ ∧

I ¡want ¡to ¡improve ¡the ¡ result ¡quality. ¡ OK! ¡(Generating ¡ feedback...) ¡

slide-44
SLIDE 44

The ODIn Lab @

  • Yes. ¡

Mimir: ¡Is ¡the ¡value ¡of ¡ Rating ¡for ¡P34235 ¡ larger ¡than ¡4? ¡ H=0.88 ¡

Pick ¡A ¡ Pick ¡B ¡ Pick ¡C ¡

E(H)=0.485 ¡ CPI=0.0395 ¡ E(H)=0.8488 ¡ CPI=0.00624 ¡ E(H)=0.7345 ¡ CPI=0.0485 ¡

44 ¡

A ¡ ¡(B ¡ ¡ ¡ ¡C) ¡

∨ ∧

slide-45
SLIDE 45

The ODIn Lab @

OK! ¡Here ¡is ¡the ¡

  • result. ¡Do ¡you ¡want ¡

to ¡continue? ¡

Picked ¡C ¡

(A ¡ ¡ ¡ ¡B) ¡ H=0.47 ¡

Pick ¡A ¡ Pick ¡B ¡

... ¡

45 ¡

  • Yes. ¡

A ¡ ¡(B ¡ ¡ ¡ ¡C) ¡

∨ ∧ ∨

slide-46
SLIDE 46

The ODIn Lab @ 100 200 300 400 500 600 5000 10000 15000 20000 25000 Total Result Entropy Units of Effort Invested EG2 NMETC Random

Effectiveness ¡of ¡cleaning ¡

10 20 30 40 50 600 1200 1800 2400 3000 3600 4200 Total Result Entropy Units of Effort Invested EG2 NMETC Random 46 ¡

EG2-­‑based ¡CPI ¡method ¡is ¡sufficiently ¡close ¡to ¡NMETC ¡in ¡units ¡of ¡effort ¡invested ¡ and ¡has ¡steep ¡curve ¡to ¡produce ¡high-­‑quality ¡results ¡with ¡minimal ¡investment. ¡

  • Random ¡
  • NMETC: ¡naïve ¡minimum ¡expected ¡total ¡cost ¡
  • EG2: ¡approximate ¡minimum ¡expected ¡total ¡cost ¡ ¡
slide-47
SLIDE 47

The ODIn Lab @

In ¡the ¡paper ¡

  • Composition ¡ ¡
  • Composition ¡description, ¡commands, ¡examples. ¡
  • Experiment ¡analysis. ¡
  • Variable ¡generation ¡relational ¡algebra ¡(VG-­‑RA) ¡
  • Virtual ¡C-­‑Tables ¡
  • Other ¡lens ¡examples ¡ ¡e.g. ¡Archival ¡lens ¡

47 ¡

slide-48
SLIDE 48

The ODIn Lab @

Conclusions ¡

¡

Mimir ¡is ¡a ¡system ¡that: ¡ ¡

  • 1. Provides ¡Lenses ¡to ¡automatically ¡curate ¡different ¡kinds ¡
  • f ¡messy ¡data ¡in ¡a ¡uniform ¡way. ¡
  • 2. Presents ¡non-­‑deterministic ¡result ¡and ¡indicates ¡

uncertainty ¡to ¡user. ¡

  • 3. Provides ¡heuristic ¡uncertainty ¡ranking ¡algorithms ¡to ¡

reduce ¡uncertainty ¡and ¡minimize ¡the ¡total ¡cost. ¡(In ¡the ¡ paper) ¡

¡

Questions? ¡

48 ¡