building a big data data warehouse - goto 2013

56
Go DataDriven PROUDLY PART OF THE XEBIA GROUP @fzk [email protected] Building a Big Data DWH Friso van Vollenhoven CTO Data Warehousing on Hadoop

Upload: godatadriven

Post on 08-May-2015

678 views

Category:

Technology


3 download

DESCRIPTION

Let's face it: data warehousing in the traditional sense has been tedious, lacking agility, and slow. Often designed and built around a static set of up front questions, they are basically a big database tailored to the application of populating dashboards. The fact that the volume of data that we need to deal with recently exploded by several order of magnitude isn't improving the situation. It's no surprise that we see a new class of data warehousing setups emerge, using big data technologies en NoSQL stores. A nice side effect is that these solutions are usually not only the domain of the BI crowd, but can also be developer friendly and allow development of more data driven apps. In this talk I will present about experiences using Hadoop and other tools from the Hadoop ecosystem, such as Hive, Pig and bare MapReduce, to handle data that grows tens of GBs per day. We create a system where data is captured, stored and made available to different users and use cases, ranging from end users that write SQL queries to software developers that access the underlying data to create data driven products. I will cover topics like ETL, querying, development and deployment and reporting; using a fully open source stack, of course.

TRANSCRIPT

Page 1: Building a Big data data warehouse - goto 2013

GoDataDrivenPROUDLY PART OF THE XEBIA GROUP

@[email protected]

Building a Big Data DWH

Friso van VollenhovenCTO

Data Warehousing on Hadoop

Page 3: Building a Big data data warehouse - goto 2013
Page 4: Building a Big data data warehouse - goto 2013
Page 5: Building a Big data data warehouse - goto 2013
Page 6: Building a Big data data warehouse - goto 2013

ETL

Page 7: Building a Big data data warehouse - goto 2013
Page 8: Building a Big data data warehouse - goto 2013

How to:• Add a column to the facts table?• Change the granularity of dates from day

to hour?• Add a dimension based on some

aggregation of facts?

Page 9: Building a Big data data warehouse - goto 2013

Schema’s are designed with questions in mind.

Changing it requires to redo the ETL.

Page 10: Building a Big data data warehouse - goto 2013

Schema’s are designed with questions in mind.

Changing it requires to redo the ETL.

Push things to the facts level.

Keep all source data available all times.

Page 11: Building a Big data data warehouse - goto 2013
Page 12: Building a Big data data warehouse - goto 2013

And now?• MPP databases?• Faster / better / more SAN?• (RAC?)

Page 13: Building a Big data data warehouse - goto 2013
Page 14: Building a Big data data warehouse - goto 2013

distributed storage

distributed processing

metadata + query engine

Page 15: Building a Big data data warehouse - goto 2013
Page 16: Building a Big data data warehouse - goto 2013

EXTRACTTRANSFORM

LOAD

Page 17: Building a Big data data warehouse - goto 2013
Page 18: Building a Big data data warehouse - goto 2013
Page 19: Building a Big data data warehouse - goto 2013
Page 20: Building a Big data data warehouse - goto 2013
Page 21: Building a Big data data warehouse - goto 2013
Page 22: Building a Big data data warehouse - goto 2013

• No JVM startup overhead for Hadoop API usage• Relatively concise syntax (Python)• Mix Python standard library with any Java libs

Page 23: Building a Big data data warehouse - goto 2013
Page 24: Building a Big data data warehouse - goto 2013

• Flexible scheduling with dependencies• Saves output• E-mails on errors• Scales to multiple nodes• REST API• Status monitor• Integrates with version control

Page 25: Building a Big data data warehouse - goto 2013
Page 26: Building a Big data data warehouse - goto 2013

Deployment

git push jenkins master

Page 27: Building a Big data data warehouse - goto 2013

•Scheduling•Simple deployment of ETL code•Scalable•Developer friendly

Page 28: Building a Big data data warehouse - goto 2013
Page 29: Building a Big data data warehouse - goto 2013
Page 30: Building a Big data data warehouse - goto 2013
Page 31: Building a Big data data warehouse - goto 2013
Page 32: Building a Big data data warehouse - goto 2013
Page 33: Building a Big data data warehouse - goto 2013

'februari-22 2013'

Page 34: Building a Big data data warehouse - goto 2013
Page 35: Building a Big data data warehouse - goto 2013

A: Yes, sometimes as often as 1 in every 10K calls. Or about once a week at 3K files / day.

Page 36: Building a Big data data warehouse - goto 2013
Page 37: Building a Big data data warehouse - goto 2013
Page 38: Building a Big data data warehouse - goto 2013

þ

Page 39: Building a Big data data warehouse - goto 2013

þ

Page 40: Building a Big data data warehouse - goto 2013

TSV ==thorn separated values?

Page 41: Building a Big data data warehouse - goto 2013

þ == 0xFE

Page 42: Building a Big data data warehouse - goto 2013

or -2, in HiveCREATE TABLE browsers ( browser_id STRING, browser STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '-2';

Page 43: Building a Big data data warehouse - goto 2013
Page 44: Building a Big data data warehouse - goto 2013
Page 45: Building a Big data data warehouse - goto 2013
Page 46: Building a Big data data warehouse - goto 2013
Page 47: Building a Big data data warehouse - goto 2013
Page 48: Building a Big data data warehouse - goto 2013
Page 49: Building a Big data data warehouse - goto 2013

• The format will change• Faulty deliveries will occur• Your parser will break• Records will be mistakingly produced (over-logging)• Other people test in production too (and you get the

data from it)• Etc., etc.

Page 50: Building a Big data data warehouse - goto 2013

•Simple deployment of ETL code•Scheduling•Scalable• Independent jobs•Fixable data store• Incremental where possible•Metrics

Page 51: Building a Big data data warehouse - goto 2013

Independent jobs

source (external)

staging (HDFS)

hive-staging (HDFS)

Hive

HDFS upload + move in place

MapReduce + HDFS move

Hive map external table + SELECT INTO

Page 52: Building a Big data data warehouse - goto 2013

Out of order jobs

• At any point, you don’t really know what ‘made it’ to Hive•Will happen anyway, because some days the data

delivery is going to be three hours late• Or you get half in the morning and the other half

later in the day• It really depends on what you do with the data• This is where metrics + fixable data store help...

Page 53: Building a Big data data warehouse - goto 2013

Fixable data store

• Using Hive partitions• Jobs that move data from staging create partitions•When new data / insight about the data arrives,

drop the partition and re-insert• Be careful to reset any metrics in this case• Basically: instead of trying to make everything

transactional, repair afterwards• Use metrics to determine whether data is fit for

purpose

Page 54: Building a Big data data warehouse - goto 2013

Metrics

Page 55: Building a Big data data warehouse - goto 2013

Metrics service

• Job ran, so may units processed, took so much time• e.g. 10GB imported, took 1 hr• e.g. 60M records transformed, took 10 minutes• Dropped partition• Inserted X records into partition

Page 56: Building a Big data data warehouse - goto 2013

GoDataDriven

We’re hiring / Questions? / Thank you!

@[email protected]

Friso van VollenhovenCTO