<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4693187765980952034</id><updated>2026-10-07T00:27:03.335-07:00</updated><category term="hadoop"/><category term="beginner"/><category term="cloudera"/><category term="install hadoop"/><category term="learning"/><category term="map reduce"/><category term="mapreduce"/><category term="book journal"/><category term="hive"/><category term="HDFS"/><category term="black friday"/><category term="black friday 2012 excel"/><category term="black friday deals"/><category term="blackfriday"/><category term="data engineer interviews"/><category term="deals in excel"/><category term="deals in spreadsheet"/><category term="excel"/><category term="hadoop book review"/><category term="hadoop in action"/><category term="hdfs shell"/><category term="including another jar"/><category term="inverted index"/><category term="libjar"/><category term="namenode safemode recover leave"/><category term="python algorithms"/><category term="python interviews"/><category term="python programming interviews"/><category term="sequential"/><category term="small files"/><category term="split size"/><category term="spreadsheet"/><category term="string manipulation"/><title type='text'>BigDW</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-954502331022943744</id><published>2017-02-04T22:13:00.001-08:00</published><updated>2017-02-05T08:23:46.920-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="data engineer interviews"/><category scheme="http://www.blogger.com/atom/ns#" term="python algorithms"/><category scheme="http://www.blogger.com/atom/ns#" term="python interviews"/><category scheme="http://www.blogger.com/atom/ns#" term="python programming interviews"/><title type='text'>Just enough python programming for interview</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;script src=&quot;https://gist.github.com/gobigondata/814e59cfd5b1298058e81f1085bd0bdf.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;b&gt;Factorial of a number (using while loop)

&lt;/b&gt;&lt;script src=&quot;https://gist.github.com/gobigondata/992d8b9f92f2b201c4d97fe7d6fd6161.js&quot;&gt;&lt;/script&gt;

&lt;/div&gt;
&lt;b&gt;Sum every 3rd number
&lt;script src=&quot;https://gist.github.com/gobigondata/162482c686ca1cbc337c2a6a0d6c2f37.js&quot;&gt;&lt;/script&gt;

Adding consecutive numbers

&lt;script src=&quot;https://gist.github.com/gobigondata/4523dd5bc8458a064b0e0a86144b3ef5.js&quot;&gt;&lt;/script&gt;

Checking if a number is prime

&lt;script src=&quot;https://gist.github.com/gobigondata/1e70ecf8e8d1af6283204ae465787230.js&quot;&gt;&lt;/script&gt;

Palindrome check

&lt;script src=&quot;https://gist.github.com/gobigondata/277d3d25d6be1bd1021e518f483ab7f7.js&quot;&gt;&lt;/script&gt;

List functions

&lt;script src=&quot;https://gist.github.com/gobigondata/e52e902288ed81820681523df5637db8.js&quot;&gt;&lt;/script&gt;

Average of list

&lt;script src=&quot;https://gist.github.com/gobigondata/f31f19123eed1e76641e85ea3a2f7866.js&quot;&gt;&lt;/script&gt;

Perfect number

&lt;script src=&quot;https://gist.github.com/gobigondata/e847f89728acc90775c8080c33edbec1.js&quot;&gt;&lt;/script&gt;

LCM

&lt;script src=&quot;https://gist.github.com/gobigondata/a2f7995cc674aa1967dd1aaeec1f442e.js&quot;&gt;&lt;/script&gt;

Recursive Algorithm - Fibonacci series

&lt;script src=&quot;https://gist.github.com/gobigondata/e9aba8e602333013f0d191788de485dc.js&quot;&gt;&lt;/script&gt;

Recursive Algorithm - Exponent

&lt;script src=&quot;https://gist.github.com/gobigondata/9df82f8083d82d5f735ada9c93aca6ba.js&quot;&gt;&lt;/script&gt;

Recursive algorithm - GCD

&lt;/b&gt;&lt;script src=&quot;https://gist.github.com/gobigondata/945019782921c037e307f86fe1e8ad92.js&quot;&gt;&lt;/script&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/954502331022943744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2017/02/just-enough-python-programs-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/954502331022943744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/954502331022943744'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2017/02/just-enough-python-programs-for.html' title='Just enough python programming for interview'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-2115688129453244678</id><published>2016-09-04T11:34:00.000-07:00</published><updated>2016-09-04T11:40:32.318-07:00</updated><title type='text'>Taming the Data Lake</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: &amp;quot;source serif pro&amp;quot;, serif; font-stretch: inherit; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-size: 2.1rem; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU1RjmkYn-_Gacqw6uSxfV64i5_pdJ6fn3OGH6LKDRBw94YPlYiLxDSf_tqTUPsN0D0DLogZeheMivV6CVe3E3feEffYNY84VzWbv7_e54rffqdy_shRiIsOnCVZwNPpuxZKc4tSrpMqJf/s1600/data_lake.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;364&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU1RjmkYn-_Gacqw6uSxfV64i5_pdJ6fn3OGH6LKDRBw94YPlYiLxDSf_tqTUPsN0D0DLogZeheMivV6CVe3E3feEffYNY84VzWbv7_e54rffqdy_shRiIsOnCVZwNPpuxZKc4tSrpMqJf/s640/data_lake.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 2.1rem; text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: left; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Big data is
not more a fad that geeks, major enterprises, start-ups alike are in love with
- it is a reality driven by the dynamic and diverse nature of channels,
business lines, innovative products and customer behavior. All the 4Vs –
Volume, Velocity, Variety and Veracity of data are true and us analysts, data
scientists, data professionals, strategists, business leaders have to live
with. Investments are being made into Technology, Infastructure and Talents but
like a wise man once said “all problems in the world cannot be solved by
throwing money at it”.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 2.1rem; font-stretch: inherit; font-variant-numeric: inherit; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; outline: 0px;&quot;&gt;&lt;span style=&quot;border: none windowtext 1.0pt; font-family: &amp;quot;inherit&amp;quot;,serif; font-size: 10.0pt; mso-border-alt: none windowtext 0in; padding: 0in;&quot;&gt;Reality Check:&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 2.1rem; font-stretch: inherit; font-variant-numeric: inherit; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;It is not as simple as
creating a data lake where everything can be dumped and Data Scientists and
Analysts can feed off of that. The adoption should not be just an Investment
question (cost of data storage, data preparation, management and retrieval) on
which predominantly the decisions are made. It is also a Returns question
(Reports, Business Analytics, Advanced Analytics, Data Products, Decision
Engines, etc.) which is usually ignored when making the decision. Investment
only decisions usually create a sub-optimal experience for the end users, i.e.,
it may be efficient for Reporting but may be very slow and inefficient when an
Analyst has to use it or vice versa. Adoption and Engagement needs a Strategic
framework of key corporate needs, an Tactical Outcome Focused delivery approach
and an iterative learning execution model.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 2.1rem; font-stretch: inherit; font-variant-numeric: inherit; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; outline: 0px;&quot;&gt;&lt;span style=&quot;border: none windowtext 1.0pt; font-family: &amp;quot;inherit&amp;quot;,serif; font-size: 10.0pt; mso-border-alt: none windowtext 0in; padding: 0in;&quot;&gt;Scalable Metrics Model:&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 2.1rem; font-stretch: inherit; font-variant-numeric: inherit; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;RDBMS structure is still one
of the most “go-to” framework for Enterprise Data Warehouse and has been so for
decades. The reliability, stability, speed, ease of understanding makes it
optimal for many core services. The downside is the flexibility, extensibility,
cost of modifications and rigidity of the structure which is what Hadoop File
System framework tries to address. But lack of structure brings its own
problems of performance, reliability, error corrections, etc. and just forcing
a structure via Metadata or Aggregates might not be sufficient for a wide
variety of users. We need a hybrid framework which brings in the strengths of
RDBMS with merits of HDFS whose key objective is to serve the diverse needs of
users and is malleable enough to efficiently and effectively change with the
needs. It has to be modular enough to predominantly address a bucket of needs
(e.g, Reports/Decision Engines by functions) but also with connections that can
help connect the dots (e.g., Deep Dive into drivers). The Scalable metrics
model is one such option and we are discussing it at the Global Big Data Conference
at Santa Clara on Sep 2nd. &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 2.1rem; font-stretch: inherit; font-variant-numeric: inherit; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; outline: 0px;&quot;&gt;&lt;span style=&quot;border: none windowtext 1.0pt; font-family: &amp;quot;inherit&amp;quot;,serif; font-size: 10.0pt; mso-border-alt: none windowtext 0in; padding: 0in;&quot;&gt;More about the Global Big Data Conference:&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 2.1rem; font-stretch: inherit; font-variant-numeric: inherit; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;a href=&quot;http://globalbigdataconference.com/53/santa-clara/3rd-annual-global-big-data-conference/event.html&quot; style=&quot;cursor: pointer; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; outline: none; word-wrap: break-word;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: none windowtext 1.0pt; color: #8c68cb; font-family: &amp;quot;inherit&amp;quot;,serif; mso-border-alt: none windowtext 0in; padding: 0in; text-decoration: none; text-underline: none;&quot;&gt;http://globalbigdataconference.com/53/santa-clara/3rd-annual-global-big-data-conference/event.html&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 2.1rem; font-stretch: inherit; font-variant-numeric: inherit; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; outline: 0px;&quot;&gt;&lt;span style=&quot;border: none windowtext 1.0pt; font-family: &amp;quot;inherit&amp;quot;,serif; font-size: 10.0pt; mso-border-alt: none windowtext 0in; padding: 0in;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;It brings together leaders and practitioners in the field of Big Data
and provides a platform for sharing ideas, getting feedback and learning about
the new trends and technologies that are in the industry today. We are excited
to be a part of it and hope to have a very good chat and learning session.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 2.1rem; font-stretch: inherit; font-variant-numeric: inherit; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp;The slides on Scalable
Metrics Model can be found at:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 2.1rem; font-stretch: inherit; font-variant-numeric: inherit; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;a href=&quot;http://www.slideshare.net/BharathiRajaChandras/taming-data-lake-scalable-metrics-model&quot; style=&quot;cursor: pointer; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; outline: none; word-wrap: break-word;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;border: none windowtext 1.0pt; color: #8c68cb; font-family: &amp;quot;inherit&amp;quot;,serif; mso-border-alt: none windowtext 0in; padding: 0in; text-decoration: none; text-underline: none;&quot;&gt;http://www.slideshare.net/BharathiRajaChandras/taming-data-lake-scalable-metrics-model&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/2115688129453244678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2016/09/taming-data-lake.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/2115688129453244678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/2115688129453244678'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2016/09/taming-data-lake.html' title='Taming the Data Lake'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU1RjmkYn-_Gacqw6uSxfV64i5_pdJ6fn3OGH6LKDRBw94YPlYiLxDSf_tqTUPsN0D0DLogZeheMivV6CVe3E3feEffYNY84VzWbv7_e54rffqdy_shRiIsOnCVZwNPpuxZKc4tSrpMqJf/s72-c/data_lake.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-4924915415997717254</id><published>2015-07-12T19:33:00.002-07:00</published><updated>2015-07-12T19:33:45.128-07:00</updated><title type='text'>Metrics on the fly – with Hadoop and Tableau</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
Let’s take a use case, customer segmentation. How do we segment
our customer base? - just accumulate whatever dimensions and metrics you can
find for that user and store on the granularity of customer, then put a
reporting layer on top of it for the Analyst to create reports and
visualizations.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
There are numerous ways to do aggregations - one way is
to build&amp;nbsp;Aggregates on top of a star schema. This approach might be
costlier to process on a Databases (ELT) or in a ETL tool, especially if our
customer base is huge.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
Some challenges in building aggregates:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
1. Required to do many full table scans - eg # transactions
by user, #logins by user&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
2. The requirement for these metrics changes frequently -
we have to make frequent DDL and ETL changes&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
How about using Hadoop? Hadoop/Hive is good in handling
huge datasets, but bad in interactivity and ease of use, where Tableau excels. Let’s
discuss how to marry these two technologies to create metric framework where we
can add metrics on the fly and actually do data analysis. Assume the required
base-tables for deriving dimensions and calculating metrics are injected (using
sqoop) into Hadoop and available as Hive tables. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
The idea is to create a metrics (final fact) table with a
id columns and one metrics&amp;nbsp;column(map datatype) which bags all the metrics.
Since Metrics column is a Map datatype, it can hold column names and corresponding
metrics values. In this way, we are not constrained to defined columns, we can
add as many metrics as we go.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;3&quot; class=&quot;MsoNormalTable&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: .75pt .75pt .75pt .75pt; width: 467.5pt;&quot; width=&quot;935&quot;&gt;
  &lt;div class=&quot;MsoNoSpacing&quot;&gt;
CREATE EXTERNAL TABLE `customer_metrics`(&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: .75pt .75pt .75pt .75pt; width: 467.5pt;&quot; width=&quot;935&quot;&gt;
  &lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;b&gt;&amp;nbsp; `customer_id` int,&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: .75pt .75pt .75pt .75pt; width: 467.5pt;&quot; width=&quot;935&quot;&gt;
  &lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;b&gt;&amp;nbsp; `metrics` map&amp;lt;string,string&amp;gt;)&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h1&gt;
Data Model&lt;o:p&gt;&lt;/o:p&gt;&lt;/h1&gt;
&lt;div class=&quot;MsoNoSpacing&quot; style=&quot;margin-left: .5in; mso-list: l0 level1 lfo4; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;1.&lt;span style=&quot;font-size: 7pt; font-stretch: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;Determine the granularity of the metrics table -
In our case its customerId. (can be multiple columns too)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot; style=&quot;margin-left: .5in; mso-list: l0 level1 lfo4; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;2.&lt;span style=&quot;font-size: 7pt; font-stretch: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;Write hive queries to get metrics on the
specified granularity. Just create separate hive queries - a query for one or
more metrics. All these queries should have same granularity. (Login_attempts,Last_login_date,Transaction_count)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot; style=&quot;margin-left: .5in; mso-list: l0 level1 lfo4; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;3.&lt;span style=&quot;font-size: 7pt; font-stretch: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;Create a staging table with 3 columns( id,key
and value)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;3&quot; class=&quot;MsoNormalTable&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: .75pt .75pt .75pt .75pt; width: 465.0pt;&quot; width=&quot;930&quot;&gt;
  &lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;background: silver; mso-highlight: silver;&quot;&gt;CREATE
  EXTERNAL TABLE `stg_customer_metrics`(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: .75pt .75pt .75pt .75pt; width: 465.0pt;&quot; width=&quot;930&quot;&gt;
  &lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;background: silver; mso-bidi-font-weight: bold; mso-highlight: silver;&quot;&gt;&amp;nbsp; `customerId` int,&lt;/span&gt;&lt;span style=&quot;background: silver; mso-highlight: silver;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: .75pt .75pt .75pt .75pt; width: 465.0pt;&quot; width=&quot;930&quot;&gt;
  &lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;background: silver; mso-bidi-font-weight: bold; mso-highlight: silver;&quot;&gt;&amp;nbsp; `key` string,&lt;/span&gt;&lt;span style=&quot;background: silver; mso-highlight: silver;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: .75pt .75pt .75pt .75pt; width: 465.0pt;&quot; width=&quot;930&quot;&gt;
  &lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;background: silver; mso-bidi-font-weight: bold; mso-highlight: silver;&quot;&gt;&amp;nbsp; `value` string)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNoSpacing&quot; style=&quot;margin-left: .5in; mso-list: l0 level1 lfo4; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;4.&lt;span style=&quot;font-size: 7pt; font-stretch: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;Create the target metrics table&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;3&quot; class=&quot;MsoNormalTable&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: .75pt .75pt .75pt .75pt; width: 467.5pt;&quot; width=&quot;935&quot;&gt;
  &lt;div class=&quot;MsoNoSpacing&quot;&gt;
CREATE EXTERNAL TABLE `customer_metrics`(&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: .75pt .75pt .75pt .75pt; width: 467.5pt;&quot; width=&quot;935&quot;&gt;
  &lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;b&gt;&amp;nbsp; `customer_id` int,&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: .75pt .75pt .75pt .75pt; width: 467.5pt;&quot; width=&quot;935&quot;&gt;
  &lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp; `metrics` map&amp;lt;string,string&amp;gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;h1&gt;
ETL framework:&lt;o:p&gt;&lt;/o:p&gt;&lt;/h1&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
Now, to create a scalable ETL framework in order to add
  metrics on the fly. The Metrics query is going to be a union of any number of
  subqueries. Each subquery should follow the standards&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18.0pt; margin-bottom: 3.75pt; margin-left: 30.0pt; mso-list: l1 level1 lfo1; mso-margin-top-alt: auto; tab-stops: list .5in; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;1.&lt;span style=&quot;font-size: 7pt; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Should
  include columns of granularity and an array of key value pairs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18.0pt; margin-bottom: 3.75pt; margin-left: 30.0pt; mso-list: l1 level1 lfo1; mso-margin-top-alt: auto; tab-stops: list .5in; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;2.&lt;span style=&quot;font-size: 7pt; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Each
  key value pair should be defined in the format&amp;nbsp;&lt;b&gt;‘metric_name’=metric_value&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18.0pt; margin-bottom: 3.75pt; margin-left: 30.0pt; mso-list: l1 level1 lfo1; mso-margin-top-alt: auto; tab-stops: list .5in; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;3.&lt;span style=&quot;font-size: 7pt; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;This
  can be achieved by concatenating a static string to the aggregated value
  field.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18.0pt; margin-bottom: 3.75pt; margin-left: 30.0pt; mso-list: l1 level1 lfo1; mso-margin-top-alt: auto; tab-stops: list .5in; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;4.&lt;span style=&quot;font-size: 7pt; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  result will be a union of all multiple subqueries with grain columns and
  array of key value pairs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18.0pt; margin-bottom: 3.75pt; margin-left: 30.0pt; mso-list: l1 level1 lfo1; mso-margin-top-alt: auto; tab-stops: list .5in; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;5.&lt;span style=&quot;font-size: 7pt; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Convert
  array column into multiple rows using hive explode function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18.0pt; margin-bottom: 3.75pt; margin-left: 30.0pt; mso-list: l1 level1 lfo1; mso-margin-top-alt: auto; tab-stops: list .5in; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;6.&lt;span style=&quot;font-size: 7pt; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Split
  the key value pairs into two columns key and value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18.0pt; margin-bottom: 3.75pt; margin-left: 30.0pt; mso-list: l1 level1 lfo1; mso-margin-top-alt: auto; tab-stops: list .5in; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;7.&lt;span style=&quot;font-size: 7pt; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;This
  entire query should be loaded in to the staging table created earlier.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
INSERT OVERWRITE TABLE stg_customer_metrics&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
Select&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp;customer_id as
  customer_id,&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp;split(keyvalue,&#39;=&#39;)[0]
  as key, &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp;split(keyvalue,&#39;=&#39;)[1]
  as value &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from ( &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp;select
  u.customer_id, &lt;span style=&quot;background: silver; mso-highlight: silver;&quot;&gt;/*
  METRICS 1&amp;amp;2 - LOGIN ATTEMPTS AND LAST LOGIN DATE*/&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array(&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; concat_ws(&#39;=&#39;,&#39;Login_attempts&#39;,cast(count
  (DISTINCT(case when i.CSTMR_STA_NM = &#39;LOGIN&#39; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;then i.CSTMR_ID End)) as STRING)),&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;concat_ws(&#39;=&#39;,&#39;Last_login_date&#39;,cast(Max(i.chg_dt)
  as STRING))) as mp&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;from customer_login &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group
  by u.customer_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
UNION ALL&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
select u.customer_id, &amp;nbsp;&lt;span style=&quot;background: silver; mso-highlight: silver;&quot;&gt;/* METRIC 3: TO GET TRANSACTION COUNT */&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
array(&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
concat_ws(&#39;=&#39;,&#39;Transaction_count&#39;,cast(count(distinct
  p.PYMT_ID) as STRING))&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
) as mp&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
from user_transaction&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
group by u.customer_id&amp;nbsp;
  /* GRANULARITY: CUSTOMER_ID */&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
) b&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
LATERAL VIEW explode(mp) mptable as keyvalue&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
where 1=1&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The stage table may
  look like..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
   &lt;tbody&gt;
&lt;tr&gt;
    &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.5pt;&quot; valign=&quot;top&quot; width=&quot;157&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
Customer_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 117.0pt;&quot; valign=&quot;top&quot; width=&quot;234&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
Key&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 76.5pt;&quot; valign=&quot;top&quot; width=&quot;153&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;/tr&gt;
&lt;tr&gt;
    &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.5pt;&quot; valign=&quot;top&quot; width=&quot;157&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
1123&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 117.0pt;&quot; valign=&quot;top&quot; width=&quot;234&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
Login_attempts&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 76.5pt;&quot; valign=&quot;top&quot; width=&quot;153&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
10&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;/tr&gt;
&lt;tr&gt;
    &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.5pt;&quot; valign=&quot;top&quot; width=&quot;157&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
1123&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 117.0pt;&quot; valign=&quot;top&quot; width=&quot;234&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
Last_login_date&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 76.5pt;&quot; valign=&quot;top&quot; width=&quot;153&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
2015-07-07&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;/tr&gt;
&lt;tr&gt;
    &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.5pt;&quot; valign=&quot;top&quot; width=&quot;157&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
1123&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 117.0pt;&quot; valign=&quot;top&quot; width=&quot;234&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
Transaction_count&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 76.5pt;&quot; valign=&quot;top&quot; width=&quot;153&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
2&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;/tr&gt;
&lt;tr&gt;
    &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.5pt;&quot; valign=&quot;top&quot; width=&quot;157&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
9989&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 117.0pt;&quot; valign=&quot;top&quot; width=&quot;234&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
Login_attempts&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 76.5pt;&quot; valign=&quot;top&quot; width=&quot;153&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
20&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;/tr&gt;
&lt;tr&gt;
    &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.5pt;&quot; valign=&quot;top&quot; width=&quot;157&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
9989&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 117.0pt;&quot; valign=&quot;top&quot; width=&quot;234&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
Last_login_date&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 76.5pt;&quot; valign=&quot;top&quot; width=&quot;153&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
2015-06-01&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;/tr&gt;
&lt;tr&gt;
    &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 78.5pt;&quot; valign=&quot;top&quot; width=&quot;157&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
9989&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 117.0pt;&quot; valign=&quot;top&quot; width=&quot;234&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
Transaction_count&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 76.5pt;&quot; valign=&quot;top&quot; width=&quot;153&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
5&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;To
  add new metrics, create a select query and append to the union at staging
  table load.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;h1&gt;
Load to final
  metrics table&lt;o:p&gt;&lt;/o:p&gt;&lt;/h1&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
ADD JAR udf-0.0.1-SNAPSHOT.jar;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
INSERT OVERWRITE TABLE &lt;span style=&quot;background: silver; mso-highlight: silver;&quot;&gt;customer_metrics&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
select customer_id,UNION_MAP(MAP(key,value)) from
  stg_customer_metrics&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
group by customer_id;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: .75pt .75pt .75pt .75pt; width: 467.5pt;&quot; width=&quot;935&quot;&gt;
  &lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
   &lt;tbody&gt;
&lt;tr&gt;
    &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 83.0pt;&quot; valign=&quot;top&quot; width=&quot;166&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
Customer_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 380.0pt;&quot; valign=&quot;top&quot; width=&quot;760&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
Metrics&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;/tr&gt;
&lt;tr&gt;
    &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 83.0pt;&quot; valign=&quot;top&quot; width=&quot;166&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
1123&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 380.0pt;&quot; valign=&quot;top&quot; width=&quot;760&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
{&quot; Login_attempts&quot;:”10”,&quot; Last_login_date
    &quot;:&quot;2015-07-07&quot;,&quot; Transaction_count &quot;:&quot;2&quot;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;/tr&gt;
&lt;tr style=&quot;height: 30.1pt; mso-yfti-irow: 2; mso-yfti-lastrow: yes;&quot;&gt;
    &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 30.1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 83.0pt;&quot; valign=&quot;top&quot; width=&quot;166&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
9989&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
    &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 30.1pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 380.0pt;&quot; valign=&quot;top&quot; width=&quot;760&quot;&gt;
    &lt;div class=&quot;MsoNoSpacing&quot;&gt;
{&quot; Login_attempts&quot;:”20”,&quot; Last_login_date
    &quot;:&quot;2015-06-01&quot;,&quot; Transaction_count &quot;:&quot;5&quot;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h1&gt;
View:&lt;o:p&gt;&lt;/o:p&gt;&lt;/h1&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Calibri Light&amp;quot;,sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-font-family: Helvetica; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-theme-font: major-latin;&quot;&gt;Create
  a view on top of this final table. It helps in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-add-space: auto; mso-list: l3 level1 lfo2; mso-margin-top-alt: auto; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;b&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Calibri Light&amp;quot;,sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-font-family: &amp;quot;Calibri Light&amp;quot;; mso-bidi-theme-font: major-latin; mso-fareast-font-family: &amp;quot;Calibri Light&amp;quot;; mso-fareast-theme-font: major-latin; mso-hansi-theme-font: major-latin;&quot;&gt;1.&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt; font-stretch: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Calibri Light&amp;quot;,sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-font-family: Helvetica; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-theme-font: major-latin;&quot;&gt;Creating
  a reference metadata&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-add-space: auto; mso-list: l3 level1 lfo2; mso-margin-top-alt: auto; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;b&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Calibri Light&amp;quot;,sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-font-family: &amp;quot;Calibri Light&amp;quot;; mso-bidi-theme-font: major-latin; mso-fareast-font-family: &amp;quot;Calibri Light&amp;quot;; mso-fareast-theme-font: major-latin; mso-hansi-theme-font: major-latin;&quot;&gt;2.&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt; font-stretch: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Calibri Light&amp;quot;,sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-font-family: Helvetica; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-theme-font: major-latin;&quot;&gt;Abstracts
  the complexity of selecting map data-type and changes happening to metrics
  table (you are free to add new metrics without impacting reporting layer)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-add-space: auto; mso-list: l3 level1 lfo2; mso-margin-top-alt: auto; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;b&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Calibri Light&amp;quot;,sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-font-family: &amp;quot;Calibri Light&amp;quot;; mso-bidi-theme-font: major-latin; mso-fareast-font-family: &amp;quot;Calibri Light&amp;quot;; mso-fareast-theme-font: major-latin; mso-hansi-theme-font: major-latin;&quot;&gt;3.&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt; font-stretch: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Calibri Light&amp;quot;,sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-font-family: Helvetica; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-theme-font: major-latin;&quot;&gt;Easy
  drag and drop in Tableau reporting layer&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-add-space: auto; mso-list: l3 level1 lfo2; mso-margin-top-alt: auto; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;b&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Calibri Light&amp;quot;,sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-font-family: &amp;quot;Calibri Light&amp;quot;; mso-bidi-theme-font: major-latin; mso-fareast-font-family: &amp;quot;Calibri Light&amp;quot;; mso-fareast-theme-font: major-latin; mso-hansi-theme-font: major-latin;&quot;&gt;4.&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt; font-stretch: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Calibri Light&amp;quot;,sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-font-family: Helvetica; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-theme-font: major-latin;&quot;&gt;Different
  views for different user-groups&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-add-space: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
CREATE VIEW `vw_customer_metrics` AS &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
select `customer_id`&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
,`metrics`[&quot; Login_attempts&quot;] as ` Login_attempts`&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
,`metrics`[&quot; Last_login_date&quot;] as ` Last_login_date`&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
,`metrics`[&quot; Transaction_count&quot;] as ` Transaction_count`&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
From customer_metrics;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;h1&gt;
Reporting layer
  (tableau):&lt;o:p&gt;&lt;/o:p&gt;&lt;/h1&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
Pull this view into Tableau layer as an extract, so
  that the report will be faster and interactive. You can add new calculations
  on tableau layer especially for non-additive facts. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
(If you are new to tableau, I strongly suggest to
  download Tableau public at : &lt;a href=&quot;https://public.tableau.com/s/&quot;&gt;https://public.tableau.com/s/&lt;/a&gt;
  &amp;nbsp;and checkout the free learning videos
  on: &lt;a href=&quot;http://www.tableau.com/learn/training&quot;&gt;http://www.tableau.com/learn/training&lt;/a&gt;
  &amp;nbsp;for anyone who works on data)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
Bringing this metrics to tableau layer provides the
  following advantages which Hadoop layer cannot provide&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-add-space: auto; mso-list: l2 level1 lfo3; mso-margin-top-alt: auto; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: Helvetica;&quot;&gt;1.&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Interactive
  (faster response) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-add-space: auto; mso-list: l2 level1 lfo3; mso-margin-top-alt: auto; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: Helvetica;&quot;&gt;2.&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Slicing and dicing
  ( by not invoking MapReduce every time)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-add-space: auto; mso-list: l2 level1 lfo3; mso-margin-top-alt: auto; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: Helvetica;&quot;&gt;3.&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Blending with
  other data sets (quickly! Without IT &lt;/span&gt;&lt;span style=&quot;color: #4d4f51; font-family: Wingdings; font-size: 12.0pt; mso-ascii-font-family: Helvetica; mso-bidi-font-family: Helvetica; mso-bidi-font-weight: bold; mso-char-type: symbol; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Helvetica; mso-symbol-font-family: Wingdings;&quot;&gt;J&lt;/span&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-add-space: auto; mso-list: l2 level1 lfo3; mso-margin-top-alt: auto; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: Helvetica;&quot;&gt;4.&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Create calculated
  columns&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-add-space: auto; mso-list: l2 level1 lfo3; mso-margin-top-alt: auto; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;b&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: Helvetica;&quot;&gt;5.&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt; font-stretch: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #4d4f51; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Visualization (Ofcourse!)&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h1&gt;
Conclusion:&lt;o:p&gt;&lt;/o:p&gt;&lt;/h1&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18.0pt; margin-bottom: 22.5pt; mso-margin-top-alt: auto;&quot;&gt;
We designed this idea with the mindset “Business logic at
the cost of resources” – implementing the business logic is more important. We
need to also think about file-formats, compression and incremental logic
depending on specific use-case. Tableau layer is not effective on huge detailed
data, aggregating dataset and reducing the rows (and size) matters a lot during
data-analysis. Pushing down the business logic to Hadoop layer abstracts the
complexity and reduce clutter at Tableau layer.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/4924915415997717254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2015/07/metrics-on-fly-with-hadoop-and-tableau.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/4924915415997717254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/4924915415997717254'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2015/07/metrics-on-fly-with-hadoop-and-tableau.html' title='Metrics on the fly – with Hadoop and Tableau'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-1657227423783195531</id><published>2014-06-06T07:09:00.000-07:00</published><updated>2014-06-06T07:12:43.441-07:00</updated><title type='text'>Hadoop summit 2014 - commentary</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg91MsgK7k1rWmkzz5tibogqY6ppBYVjwdvPox_5E7v_WRB-tNirFX06kFWN6w-PWqUcpFGeCkfQF7xAQDJZYOabCX1BhE4qi_hCt8L3o-pa4ij1Iix6KjtkNO3uI_mPlnSlaL3Y5nFNFdD/s1600/hadoopsummit.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg91MsgK7k1rWmkzz5tibogqY6ppBYVjwdvPox_5E7v_WRB-tNirFX06kFWN6w-PWqUcpFGeCkfQF7xAQDJZYOabCX1BhE4qi_hCt8L3o-pa4ij1Iix6KjtkNO3uI_mPlnSlaL3Y5nFNFdD/s1600/hadoopsummit.jpg&quot; height=&quot;99&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
3 days of continuous presentations, some really cool ones, many sales pitches and few useful networking, food and drinks :). Apart from these, My agenda is get the Datawarehousing side of Hadoop, to learn some more tricks for my long running quest to implement a BI solution in Hadoop. I do learnt some and got some benchmarks to prove some designs. I feel confident that a lots of effort put into this space from Hadoop community.&lt;br /&gt;
&lt;br /&gt;
Like one of a presenter quoted Churchill&lt;br /&gt;
&lt;span style=&quot;background-color: #fbfbfb; color: #101010; font-family: &#39;Open Sans&#39;, Arial, sans-serif; line-height: 40px;&quot;&gt;&quot;Now this is not the end. It is not even the beginning of the end. But it is, perhaps, the end of the beginning&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;This conference was organized by HortonWorks and not cloudera.YARN and TEZ dominated the talks, I saw &quot;mapreduce is dead&quot; in couple of presentations, hope its for good. All the enterprise users must move to YARN in near future else they will miss the future tools and essential enhancements to current tools like Hive,spark.&lt;br /&gt;
&lt;br /&gt;
In a way These conferences gives an idea how mature the technology is and how serious are the businesses in using it. But you can always relate to this quote &quot;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;“Big data is like teen sex. Everybody is talking about it, everyone thinks everyone else is doing it, so everyone claims they are doing it.”&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Coming to the overall theme - I could see 4 themes from my perspective.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Performance&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Parallelism and mapreduce is old story, now getting results fast is the coolest thing.&lt;/li&gt;
&lt;li&gt;Key concepts to look for in this area are YARN, TEZ, ORC (compressed columnar format), Parquet (another columnar format), In-memory query engines (Impala, spark), there were talks about collecting statistics to make Hive behave like databases.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Security&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Most enterprises brought their data into Hadoop, there is a big gap to be filled in securing data. Some concepts on this line like&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Keeping Hadoop behind the Database and restricting direct access to Hadoop. In this way you can utilize the security features of Database for Hadoop objects (teradata and Oracle already has appliances for this)&lt;/li&gt;
&lt;li&gt;Hive 0.13 - Improved security features like &amp;nbsp;grant/revoke, ROLE, columns and row level access, permissions for views.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Linux_Unified_Key_Setup&quot;&gt;LUKE (Linux unified key setup)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.cloudera.com/content/cloudera/en/products-and-services/cdh/sentry.html&quot;&gt;Apache sentry&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Apache Knox&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Federation&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Data blending, this is where big players want to play a role like &quot;We too do Hadoop&quot; and making Hadoop coexists with traditional datawarehouse ecosystem.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Teradata hadoop connector&lt;/li&gt;
&lt;li&gt;Oracle smart something!&lt;/li&gt;
&lt;li&gt;Microsoft PDW (parallel data warehouse) and PolyBase&lt;/li&gt;
&lt;li&gt;My favorite data-blending is by using Tableau (ofcourse on a smaller scale)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;ACID&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
This is the topic Im mostly interested in, How to do &lt;a href=&quot;http://en.wikipedia.org/wiki/ACID&quot;&gt;ACID&lt;/a&gt; on Hive, if not how to mock, because I feel updates are very critical to truly deliver an Datawarehouse in Hadoop.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Store data as columnar format (ORC, Parquet)&lt;/li&gt;
&lt;li&gt;Maintain a single partition using compaction(this table is going to be huge, but thats what Hadoop is made for)&lt;/li&gt;
&lt;li&gt;Keep appending the history (dont delete).&lt;/li&gt;
&lt;li&gt;Get the latest data while reading. There is a new Acidinput and Acidreader to accomplish this.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Have to write a seperate blog for this topic.I need to get deeper the architecture and need to do a POC on this.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/1657227423783195531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2014/06/hadoop-summit-2014-commentary.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/1657227423783195531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/1657227423783195531'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2014/06/hadoop-summit-2014-commentary.html' title='Hadoop summit 2014 - commentary'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg91MsgK7k1rWmkzz5tibogqY6ppBYVjwdvPox_5E7v_WRB-tNirFX06kFWN6w-PWqUcpFGeCkfQF7xAQDJZYOabCX1BhE4qi_hCt8L3o-pa4ij1Iix6KjtkNO3uI_mPlnSlaL3Y5nFNFdD/s72-c/hadoopsummit.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-762197869742626240</id><published>2014-05-13T14:19:00.002-07:00</published><updated>2014-05-13T14:19:44.779-07:00</updated><title type='text'>Learning something new? - try varying your methods</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJDOygGnf6ncjZiQqYrR_gSJ6u0llb8WQUeDW6Fohv7r0JdxZtlbwi4lBBdYNm03WoekNoLrSabLOHmQ73Tz_sLwCXeTTxrGpSM7nXZrWUuyyGjdsG22oZ-b0U_mCADskgRQPU7SVmPF3A/s1600/tumblr_m4lk7ebwkA1rvy81yo1_500.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJDOygGnf6ncjZiQqYrR_gSJ6u0llb8WQUeDW6Fohv7r0JdxZtlbwi4lBBdYNm03WoekNoLrSabLOHmQ73Tz_sLwCXeTTxrGpSM7nXZrWUuyyGjdsG22oZ-b0U_mCADskgRQPU7SVmPF3A/s1600/tumblr_m4lk7ebwkA1rvy81yo1_500.jpg&quot; height=&quot;320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
Now-a-days Learning is largely democratized and nothing stops you from learning or mastering a totally new subject, thanks to MOOC. (read Massive Open Online Courses..&amp;nbsp;&lt;a data-mce-href=&quot;http:// http://blog.ted.com/2014/01/29/moocs-by-the-numbers-where-are-we-now/&quot; href=&quot;http://%20http//blog.ted.com/2014/01/29/moocs-by-the-numbers-where-are-we-now/&quot; style=&quot;color: #006699; outline: medium;&quot; target=&quot;_blank&quot;&gt;infographic&lt;/a&gt;) These are learning systems which are already disrupting the traditional university structure. Im pretty sure that we are just in the beginning of a great education revolution. (very excited for my 3 year old daughter on her learning options!)&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
Although free is great, Three things are missing though in these learning platforms -- the planning, control and validation process of traditional methods.(These three are available in some MOOC like coursera). So its upto the learner to acquire the must 3&#39;s of any learning venture.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
Lets assume you found the subject area let it be Micro economics, a programming language, a new language or natural history. Not sure what right for you or your career? I cannot answer this question as it is a personal thing. But have the attitude of &quot;Whats the worst might happen?&quot; -- &quot;You may end up learning something new, however minuscule it might be&quot; -- &quot;You might loose 3-4 hrs of your life, take it as a wrong movie choice&quot;.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
The road ahead is not going to be easy especially at the beginning, as I said be an explorer.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;strong&gt;&quot;All change is hard at first, messy in the middle and gorgeous at the end.&quot; - Robin Sharma&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
This formula might help in making sure you reach the goal which you are capable off or more than that.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;strong&gt;warm-up&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
1. If its totally new or the one you scared about, cover the basics. Spend a lots of time in understanding the fundamentals. Its worth the time here as it will ease the learning of complex things comes later in process.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
2. Dont try or target expert problems first - it may break your courage to venture very earlier in the process.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;strong&gt;Finding&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
1. The method which suits your style. (Youtube, webminars, Books, online courses, community courses, podcasts, audiobooks, slideshare, meetups, specific learning blogs).&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
2. The material which suits your knowledge. All learning materials are not created equal. It should match your level of competency.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
3. Vary your learning methods - Accept the fact that google&#39;s or Amazons top search may not find you the one you are looking for, try different methods. And the method should also suit your lifestyle. Like can you watch youtube at office!? read a pdf in your reader while commuting or listening to podcast.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
4. Fail Faster - Move ahead, may be a different author, a different youtube playlist, a different course.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
5. Find the &quot;one&quot; - the above steps will lead you to this, stuck to it, follow it and go until the level that method can take you.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;strong&gt;Execution:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
1. Create a &quot;plan&quot; and a achievable target.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
2. Make incremental progress. Dont have targets like &quot;learn and build a social site in a month.&quot; instead &quot;learn to create a dynamic website using PHP in a week/month&quot;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
3. Track your progress based on the plan.This will prevent you from getting distracted.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
4. &quot;cost it&quot; - there might be some $ involved in some learning methods, you might be surprised to know how cheaper it is to learn when compared to the returns. The biggest cost you will incur is your time.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
5. &quot;try it&quot; - creating a sandbox, executing a sample code or trying to solve an existing problem.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
6. &quot;do it&quot; - a small project, get certification if its available or publish it your personal blog. The options are limitless.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;strong&gt;Stuck:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
You are fortunate if you could find a human who can mentor and good in mentoring. The other options could be &quot;joining a meetup&quot; , following a niche blog, identifying a dedicated forum.. and your &quot;GRIT&quot; to get out of a stuck situation.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
“When the pupil is ready, the Master appears”&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
Happy learning!&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/762197869742626240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2014/05/learning-something-new-try-varying-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/762197869742626240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/762197869742626240'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2014/05/learning-something-new-try-varying-your.html' title='Learning something new? - try varying your methods'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJDOygGnf6ncjZiQqYrR_gSJ6u0llb8WQUeDW6Fohv7r0JdxZtlbwi4lBBdYNm03WoekNoLrSabLOHmQ73Tz_sLwCXeTTxrGpSM7nXZrWUuyyGjdsG22oZ-b0U_mCADskgRQPU7SVmPF3A/s72-c/tumblr_m4lk7ebwkA1rvy81yo1_500.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-6316756752263264640</id><published>2014-05-13T13:59:00.003-07:00</published><updated>2014-05-13T13:59:55.815-07:00</updated><title type='text'>&quot;Big Data&quot; - Im a believer!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
What is the use case where Hadoop is &quot;the&quot; best technology to use?. Im working in Hadoop and Big-data for some years, using it for production analytics and learning and improving everyday .Attended numerous big data webminars and conferences. Talked great about the mighty of Big data to those who never used it or scared about it. But I haven&#39;t felt the real benefit of using Hadoop or big data ( Im talking about my case !) apart from its cost effective.Most of the stuff can be done using some other existing technology. With the traction Hadoop is getting in technology grounds there must be something really BIG use case here. Yeah there are stories about Facebook, twitter and other sites, but there must be something which Hadoop can only do. I couldn&#39;t find that unavoidable purpose for this technology, until...&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9x1IWI6R0Z5A00dU4F8t-b52iBSVbYLdhWpgq1huesBC2wMIg4NcRFTPrAfXU-1wenb_3xcTFf-_9JfhNwN84h7DFRC-3BVmwGyoIXraDEGln05ltkKd8e_gb9w-5RFrI69JATsXUfgwj/s1600/0ecb785.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9x1IWI6R0Z5A00dU4F8t-b52iBSVbYLdhWpgq1huesBC2wMIg4NcRFTPrAfXU-1wenb_3xcTFf-_9JfhNwN84h7DFRC-3BVmwGyoIXraDEGln05ltkKd8e_gb9w-5RFrI69JATsXUfgwj/s1600/0ecb785.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;I recently enrolled in &quot;&lt;/span&gt;&lt;a href=&quot;https://www.coursera.org/course/ml&quot; style=&quot;border: 0px; color: #006699; font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;machine learning&lt;/a&gt;&lt;span style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot; course from Coursera. An awesome course from an awesome teacher&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.linkedin.com/in/andrewyng&quot; style=&quot;border: 0px; color: #006699; font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;(Andrew Ng)&lt;/a&gt;&lt;span style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;. I never imagined that I could understand why all the loads of Math in school and college (why the heck differentiation, integration?). I could have learned just languages and computer language. But this course changed my perspective towards math like a slap across the face. All the things we see, use and consume are developed using some form of math. This course is an eye-opener. I would recommend this course to anyone who has a data background, you will not see any data as a waste of memory, you will see it as a gold-mine waiting for the right explorer.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, sans-serif; font-size: 15px; line-height: 20px; margin-bottom: 1em; margin-top: 1em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;span style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Now while machine learning, there are lots of techniques to predict something (give &#39;x&#39; and it will give you &#39;y&#39; not simple like that :0). Im still a beginner but what I found is that we need to do thousands of, in some cases even millions of iterations just to find a simple parameter. And there could be thousands of parameters in some cases. That&#39;s the aha! moment for me, Hadoop/ Big data is the only place &quot;where you can store and process humongous data&quot; in a cost effective way. Previously engineers could have limited themselves in number of iteration because of resources, not anymore they have the power of HDFS and mapreduce to store and process respectively.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;There are many compelling use-case I seen in numerous webniars, conferences and whitepapers, but machine learning / predictive modeling is the most compelling reason( at least for me) that Hadoop is indispensable for the future analytics world. Especially we are living in digital-social world where the factors(x1,x2,x3...Xn) which could affect any outcome(y) is ever increasing. Now I&#39;m no more a practitioner but a believer!&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/6316756752263264640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2014/05/big-data-im-believer.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/6316756752263264640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/6316756752263264640'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2014/05/big-data-im-believer.html' title='&quot;Big Data&quot; - Im a believer!'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9x1IWI6R0Z5A00dU4F8t-b52iBSVbYLdhWpgq1huesBC2wMIg4NcRFTPrAfXU-1wenb_3xcTFf-_9JfhNwN84h7DFRC-3BVmwGyoIXraDEGln05ltkKd8e_gb9w-5RFrI69JATsXUfgwj/s72-c/0ecb785.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-5760454766859408514</id><published>2013-06-14T16:47:00.002-07:00</published><updated>2013-06-14T16:47:11.972-07:00</updated><title type='text'>HBase Conference 2013</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
At my current workplace we are using Hadoop and related technologies for Datawarehousing. The main advantage we get out of this was ofcourse cost and scalability. But Hadoop and related technologies (especially Hive,PIG) are not perfect for DW and BI development projects. The major issue we faced are updates and capturing incremental data, since we are trying to do a Dimensional model with slowly changing dimensions.&lt;br /&gt;
&lt;br /&gt;
I heard many saying about HBase, which can do updates in Hadoop. But my question is, Is HBase suitable for DW related updates? , Is it suitable for Dimensional modeling?, How about maintainance since DW systems constantly undergo change..&lt;br /&gt;
&lt;br /&gt;
So got an oppurtunity to attend HBase conference to get my answer.. and certainly its a no.. There are some use cases where HBase is used to serve reports or an online reporting portal but certainly unsuitable for a Bus architecture based Dimensional models.&lt;br /&gt;
&lt;br /&gt;
Anyway HBase seems to be serving magnifiently for online applications and nice to see some case studies which we use everyday like Groupon, jws player.&lt;br /&gt;
&lt;br /&gt;
Some notes from the sessions Im able to attend..&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;u&gt;apache hive and Hbase&lt;/u&gt;&lt;/b&gt;&lt;/h4&gt;
Seems like data-retrieval and updates are very programatic and hard in HBase&lt;br /&gt;
Since Hive is becoming very popular because of SQL nature, this presentation talks about how to use Hive above HBase&lt;br /&gt;
&amp;nbsp; Hive over Hbase - online,unstructured and used by programmers&lt;br /&gt;
&amp;nbsp; Hive over HDFS - offline, structured and used by analyst&lt;br /&gt;
&amp;nbsp; use case 1 -- keep dimensions in Hbase .. fact in Hive and query can derive data from both&lt;br /&gt;
&amp;nbsp; use case 2 -- continuous updates to Hbase and &amp;nbsp; periodic dump to HDFS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join the above with a single Hive query&lt;br /&gt;
Actual presentation link&lt;br /&gt;
&lt;a href=&quot;http://www.slideshare.net/hortonworks/integration-of-hive-and-hbase&quot;&gt;http://www.slideshare.net/hortonworks/integration-of-hive-and-hbase&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
Phoenix Project&lt;/h4&gt;
An SQL skin for HBase&lt;br /&gt;
embedded JDBC driver to run HBase&lt;br /&gt;
&lt;br /&gt;
presentation link&lt;br /&gt;
&lt;a href=&quot;http://www.slideshare.net/dmitrymakarchuk/phoenix-h-basemeetup&quot;&gt;http://www.slideshare.net/dmitrymakarchuk/phoenix-h-basemeetup&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
Impala and Hbase&amp;nbsp;&lt;/h4&gt;
Cloudera trying to help the analyst community by returning query data faster&lt;br /&gt;
problem could be on efficiency&lt;br /&gt;
it may not used for a batch process like ETL - as there is a possibility of failiure&lt;br /&gt;
can be used for analyst queries&lt;br /&gt;
not the best yet -- in other words not production ready yet&lt;br /&gt;
Im skeptical about the optimizer these tools use&lt;br /&gt;
&lt;br /&gt;
Couldnt find the actual presentation, but this PPT has most of the info&lt;br /&gt;
&lt;a href=&quot;http://www.slideshare.net/cloudera/cloudera-impala-a-modern-sql-engine-for-hadoop&quot;&gt;http://www.slideshare.net/cloudera/cloudera-impala-a-modern-sql-engine-for-hadoop&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
Apache Drill&lt;/h4&gt;
Another SQL for HBase, I liked this talk since the presenter from MapR accepted that this product is not yet production ready.&lt;br /&gt;
The design has a Distributed cache in each data-node, which means more data-transfer to build this cache.&lt;br /&gt;
Maybe suitable for small, quick analytical queries. Have to wait and see for production use cases.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.slideshare.net/ApacheDrill/apache-drill-technical-overview&quot;&gt;http://www.slideshare.net/ApacheDrill/apache-drill-technical-overview&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
HBase in Pinterest - Use case&lt;/h4&gt;
Interesting talk about pinning, unpinning, follow etc, Couldnt find the actual presentation&lt;br /&gt;
&lt;br /&gt;
And there is WiBiData&#39;s Kiji ..maybe this link will give some idea&lt;br /&gt;
&lt;a href=&quot;http://gigaom.com/2012/11/14/wibidata-open-sources-kiji-to-make-hbase-more-useful/&quot;&gt;http://gigaom.com/2012/11/14/wibidata-open-sources-kiji-to-make-hbase-more-useful/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/5760454766859408514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2013/06/hbase-conference-2013.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/5760454766859408514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/5760454766859408514'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2013/06/hbase-conference-2013.html' title='HBase Conference 2013'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-1823303917415197419</id><published>2013-06-04T10:32:00.002-07:00</published><updated>2013-06-04T11:14:07.807-07:00</updated><title type='text'>Cloudera Forum Live </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Im watching on live streaming&amp;nbsp;&lt;a href=&quot;http://cloudera.com/content/cloudera/en/campaign/unaccept-the-status-quo-live-feed.html&quot;&gt;http://cloudera.com/content/cloudera/en/campaign/unaccept-the-status-quo-live-feed.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&quot;Center of gravity is shifting&quot; -- the message is that the center of gravity of a Data warehouse is moving to Hadoop from Relational DB.&lt;br /&gt;
&lt;br /&gt;
Hadoop distribution is only the beginning, we need other services like meta-data management, High-level querying language, faster response.&lt;br /&gt;
&lt;br /&gt;
Moving Hadoop from a batch processing mode to real-time querying.&lt;br /&gt;
&lt;br /&gt;
Cloudera Search -- latest addition from Cloudera to Hadoop ecosystem&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;intreractive speed on big data scale&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;no demo yet!&lt;br /&gt;
&lt;br /&gt;
This classification looks good&lt;br /&gt;
Enterprise users &amp;nbsp; &amp;nbsp; &amp;nbsp;- Search&lt;br /&gt;
Developer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Mapreduce / PIG / HIVE&lt;br /&gt;
Analyst &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Impala&lt;br /&gt;
&lt;br /&gt;
Analyst from Dell puts it right -- &quot; Its not about having Hadoop in our environment and having data in it.. its all about how use Hadoop for our advantage and get real value out of it&quot;&lt;br /&gt;
&lt;br /&gt;
Oracle is popping up in many of Cloudera&#39;s events, anything cooking up!!&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/1823303917415197419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2013/06/cloudera-forum-live.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/1823303917415197419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/1823303917415197419'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2013/06/cloudera-forum-live.html' title='Cloudera Forum Live '/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-5090543712402738708</id><published>2013-04-22T15:13:00.002-07:00</published><updated>2013-04-22T22:48:12.828-07:00</updated><title type='text'>Dimensional modeling using Hive ( is it effective? )</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I strongly believe that dimensional model cannot/should not be build (effectively) in Hive. First of all Hive is not for slicing and dicing ( as expected in a DataMart), Hive is a SQL wrapper which makes executing complex MR jobs very very easier.&lt;br /&gt;
&lt;br /&gt;
Still there are many Projects ( small &amp;amp; large ) which are trying to accomplish Dimensional modeling in Hive.&lt;br /&gt;
With an open framework like Hive, its certainly not impossible. But the question is how effective it is?&lt;br /&gt;
&lt;br /&gt;
Effective in the sense, How scalable? How flexible? and How easy it is for an BI team to implement this?&lt;br /&gt;
Mostly answers to all the above are negative. My belief is that a BI team should spend most of its time in solving business problems &amp;nbsp;not technical problems. If we implement dimensional model in Hive we will end-up writing code for all Hive&#39;s not-haves w.r.t any Database. And that a big overhead especially on smaller BI teams with high expectations.&lt;br /&gt;
&lt;br /&gt;
This is a very good paper on how to do implement&amp;nbsp;&lt;a href=&quot;http://dbtr.cs.aau.dk/DBPublications/DBTR-31.pdf&quot;&gt;http://dbtr.cs.aau.dk/DBPublications/DBTR-31.pdf&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
So what can be Hive&#39;s in a datawarehouse reporting and ETL? Hive can play two roles.&lt;br /&gt;
1. It can act as a staging which actually resembles the source, with incrementally captured partitions. Later &amp;nbsp; data from this layer can be ETLed to a Datamart in Datawarehouse.&lt;br /&gt;
2. A flattened table which merges all the information into a single flattened table.&lt;br /&gt;
3. All reporting DB&#39;s will serve only for certain History data, The historical dimensional model can be flattened and imported into Hive partitions. This gives greater scalability of Archiving. You can actually query and report out of this archive. (certainly not in real-time !!)&lt;br /&gt;
&lt;br /&gt;
All these solutions are because of Hive&#39;s biggest advantage of scalability and performance. And also taking into consideration that Hive is not suitable for Updates and historical revisits.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/5090543712402738708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2013/04/dimensional-modeling-using-hive-is-it.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/5090543712402738708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/5090543712402738708'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2013/04/dimensional-modeling-using-hive-is-it.html' title='Dimensional modeling using Hive ( is it effective? )'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-6467897077911159836</id><published>2012-11-17T11:23:00.002-08:00</published><updated>2012-11-20T11:07:35.675-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="black friday"/><category scheme="http://www.blogger.com/atom/ns#" term="black friday 2012 excel"/><category scheme="http://www.blogger.com/atom/ns#" term="black friday deals"/><category scheme="http://www.blogger.com/atom/ns#" term="blackfriday"/><category scheme="http://www.blogger.com/atom/ns#" term="deals in excel"/><category scheme="http://www.blogger.com/atom/ns#" term="deals in spreadsheet"/><category scheme="http://www.blogger.com/atom/ns#" term="excel"/><category scheme="http://www.blogger.com/atom/ns#" term="spreadsheet"/><title type='text'>Black friday 2012 deals - google spreadsheet excel</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Excel is a fantastic tool to search and maintain a list.. Instead of scanning through multiple print adds, a single spreadsheet can be a nice tool to compare and to find actual deals&lt;br /&gt;
&lt;br /&gt;
I will keep this file updated until Blackfriday with latest deals&lt;br /&gt;
&lt;br /&gt;
Created a spreadsheet of all popular mart blackfriday deals..&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;https://docs.google.com/spreadsheet/ccc?key=0AlP4buxzoaxsdExjMkM2WmJBcFZ5TlExTFMyWU1Oc1E&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-large;&quot;&gt;Only the &lt;b&gt;popular deals&lt;/b&gt; ( about 500 items )&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/spreadsheet/pub?key=0AlP4buxzoaxsdExjMkM2WmJBcFZ5TlExTFMyWU1Oc1E&amp;amp;output=html&quot;&gt;https://docs.google.com/spreadsheet/ccc?key=0AlP4buxzoaxsdExjMkM2WmJBcFZ5TlExTFMyWU1Oc1E&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have certain product or store or category use this detailed list ( more than 5000 items )&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;https://docs.google.com/spreadsheet/ccc?key=0AlP4buxzoaxsdFBteHJwMjFlczVESUlTNXNNbEtuMXc&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-large;&quot;&gt;complete list&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/spreadsheet/ccc?key=0AlP4buxzoaxsdFBteHJwMjFlczVESUlTNXNNbEtuMXc&quot;&gt;https://docs.google.com/spreadsheet/ccc?key=0AlP4buxzoaxsdFBteHJwMjFlczVESUlTNXNNbEtuMXc&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Google spreadsheet has a search filtering option for all the columns.. it is very easy to search and compare price of a particular item between different stores ..&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #cc0000;&quot;&gt;
&lt;b&gt;Please download a local copy as XLS or pdf or any other format&amp;nbsp; from &quot;file &amp;gt; Download as&quot;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;using the menu bar..&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/6467897077911159836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/11/black-friday-deals-google-spreadsheet.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/6467897077911159836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/6467897077911159836'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/11/black-friday-deals-google-spreadsheet.html' title='Black friday 2012 deals - google spreadsheet excel'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-1931915846573421307</id><published>2012-11-02T13:42:00.003-07:00</published><updated>2012-11-02T13:42:50.920-07:00</updated><title type='text'>top Travel movies -- My favorite genre</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
One of my colleagues , he is actually from&amp;nbsp;Mediterranean&amp;nbsp;. but he usually talks in detail about India, like he studied the country. Later he revealed about the travel he made in India during his early 20s with his friends. They had minimal money and certainly not enough to travel in planes and stay at palaces. This makes their travel intriguing and interesting.&lt;br /&gt;
&lt;br /&gt;
Me.. I always made planned travels, maybe I dont have the heart to face the&amp;nbsp;uncertainty&amp;nbsp;of unplanned travels.. this&amp;nbsp;uncertainty&amp;nbsp;and exploration makes a travel movie very interesting..&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyXbuzM7Bm-53ZO2Lf7zAjj-RT2nOcG7zDWzSG2thDwE4cwh6md6nEx5uFC4oCm2f0fYqEp6x6x50quP8MMY944wORWa-8sS69HupQxeiXGAcApQPZZR1tRW9LdPdLR-q7nV8q6SjwihKU/s1600/motorcycle_diaries.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyXbuzM7Bm-53ZO2Lf7zAjj-RT2nOcG7zDWzSG2thDwE4cwh6md6nEx5uFC4oCm2f0fYqEp6x6x50quP8MMY944wORWa-8sS69HupQxeiXGAcApQPZZR1tRW9LdPdLR-q7nV8q6SjwihKU/s1600/motorcycle_diaries.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Motorcycle Diaries&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this movie can easily takes the top spot of travel movies .. I like the south american scenic beauty and Che&#39;s friend who&amp;nbsp;traveled&amp;nbsp;with him. How about travelling a continent with a close friend on a bike ?&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi50SDJvvmfJBhzaKum3OXulcrNxAVXLrXqpcJH3vuX-nOX0PoN7QKFj08Oo567SkvBhdo9DKcyqAmlKF78yaprgLGEj4tu3HAfMh_HI7qJXYAMZid_Aph6WbP3WImCPtZ0ysx28iLLN6sx/s1600/znmdb.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi50SDJvvmfJBhzaKum3OXulcrNxAVXLrXqpcJH3vuX-nOX0PoN7QKFj08Oo567SkvBhdo9DKcyqAmlKF78yaprgLGEj4tu3HAfMh_HI7qJXYAMZid_Aph6WbP3WImCPtZ0ysx28iLLN6sx/s1600/znmdb.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Zindagi na milega do bara (Hindi)&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Although it has the Hindi masala factor still an enjoyable travel movie. Friends exploring themselves on a aimless travel to spain.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji_0aRJpYHS9Z8_KbU9R00fhGD8Xe5ao092PwIE4IRf2GkJosEAyDYs5UdaASsT9enAIc97mYXUtKxknK1FBUVm7ilRWsn1WY0jWZ839OTWdPsqcHKyWhWpUwujtrXZA0inm4tlF8gAymJ/s1600/kikijuro.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji_0aRJpYHS9Z8_KbU9R00fhGD8Xe5ao092PwIE4IRf2GkJosEAyDYs5UdaASsT9enAIc97mYXUtKxknK1FBUVm7ilRWsn1WY0jWZ839OTWdPsqcHKyWhWpUwujtrXZA0inm4tlF8gAymJ/s1600/kikijuro.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Kikujiro (Japanese)&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;What about travelling with a kid aimlessly . this is a funny and Im sure it touches everyone watches it, I think its because the boy&#39;s life resembles some of our childhood.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtxBGp53V5udRNjemuOePfsIz-yctCsOf_4kw2gR_AURELU3uAQyZUvG2aTDk10XE62TzySF_xLrPBM7OtI37dsTnlIJbSNAT63fd6XMmwjhkKnIeBf6fmLFhvPYyN7nAydFOWufFovwoo/s1600/legrand.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtxBGp53V5udRNjemuOePfsIz-yctCsOf_4kw2gR_AURELU3uAQyZUvG2aTDk10XE62TzySF_xLrPBM7OtI37dsTnlIJbSNAT63fd6XMmwjhkKnIeBf6fmLFhvPYyN7nAydFOWufFovwoo/s1600/legrand.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Le Grand Voyage (French)&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;How special it is to travel with a father on his pilgrimage. I know the idea is no fun when he is alive , but I didnt have the oppurtunity to spend this quality time with my father . Im longing for a travel which I can never start.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNvf_UZUP7MfQ-F3CWUEg92mAmV-viQJwJ06gDU2J1p-kEtYmGI3bmiRjc8lJTN6gXkeLOz-O2mpejsOR_DQe2U4M7GMvhy25c9eaOCvG9bO6AUTX_GrgTjOU5Y7x4JfpN2_C6GyU1tjND/s1600/up.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNvf_UZUP7MfQ-F3CWUEg92mAmV-viQJwJ06gDU2J1p-kEtYmGI3bmiRjc8lJTN6gXkeLOz-O2mpejsOR_DQe2U4M7GMvhy25c9eaOCvG9bO6AUTX_GrgTjOU5Y7x4JfpN2_C6GyU1tjND/s1600/up.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Up&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Risking a travel at &amp;gt;60 for a petty promise he made to his wife as a kid.. Although this is animation this has lot of heart&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDnuLE3i7RotCtbXZA4lGoIdSYfRQjO5ryc8wc4BEAPPvGRZ5Stq6lGVVxJ5GknieXBpYXeCBIytckThkz2ZaSPoanQ8CNpGzOCVCfdQRby1zhSoDusUjhGuONKZ7t2uO5-kKVAAsD0Mlv/s1600/into+wild.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDnuLE3i7RotCtbXZA4lGoIdSYfRQjO5ryc8wc4BEAPPvGRZ5Stq6lGVVxJ5GknieXBpYXeCBIytckThkz2ZaSPoanQ8CNpGzOCVCfdQRby1zhSoDusUjhGuONKZ7t2uO5-kKVAAsD0Mlv/s1600/into+wild.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&amp;nbsp;Into the wild&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;slow movie , can be a time for self exploration ... although I hate the idea of running away from humanity&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz7-iXt_6PhbYsq4z9fV5Dq0FMQ8Fqu2HYjOhHvSomX9Qj6Naf1oq5y5TEPKXZP3z1LyiD2m_zGZbLlj3iiGzs9zXSDnHSIJZUpAYbxyfP0ubuvJIyqYXLkC4j2WWy8nVHhJa1lQQkhxXM/s1600/127.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz7-iXt_6PhbYsq4z9fV5Dq0FMQ8Fqu2HYjOhHvSomX9Qj6Naf1oq5y5TEPKXZP3z1LyiD2m_zGZbLlj3iiGzs9zXSDnHSIJZUpAYbxyfP0ubuvJIyqYXLkC4j2WWy8nVHhJa1lQQkhxXM/s1600/127.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;127 Hours&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Good music and plot&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1-fPFLJKYFf64l6NrJk_OYTZ_qhPw0qw7I49kgjqxpArsbS88QFuFfxLtwKEomczfEulSMZbP8oB1wdcgDUEwEhNEWj1HLNyz9lZNOkhf_B-QMfG_18-Ina3ChPH1BR_0z1TVu1cSLtEH/s1600/nemo.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1-fPFLJKYFf64l6NrJk_OYTZ_qhPw0qw7I49kgjqxpArsbS88QFuFfxLtwKEomczfEulSMZbP8oB1wdcgDUEwEhNEWj1HLNyz9lZNOkhf_B-QMfG_18-Ina3ChPH1BR_0z1TVu1cSLtEH/s1600/nemo.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&amp;nbsp;Finding Nemo&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A fathers search for his son with the help of weird friend.. a must watch I would say&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/1931915846573421307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/11/top-travel-movies-my-favorite-genre.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/1931915846573421307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/1931915846573421307'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/11/top-travel-movies-my-favorite-genre.html' title='top Travel movies -- My favorite genre'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyXbuzM7Bm-53ZO2Lf7zAjj-RT2nOcG7zDWzSG2thDwE4cwh6md6nEx5uFC4oCm2f0fYqEp6x6x50quP8MMY944wORWa-8sS69HupQxeiXGAcApQPZZR1tRW9LdPdLR-q7nV8q6SjwihKU/s72-c/motorcycle_diaries.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-6385976423695297710</id><published>2012-11-01T14:48:00.001-07:00</published><updated>2012-11-01T14:48:04.209-07:00</updated><title type='text'>Pentaho solution for Sqoop call with dynamic partitions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Pentaho big data release doesnt have a step for SQOOP as of this writing..&lt;br /&gt;
Simple solution is to use a &quot;Shell script&quot; stage to call sqoop..&lt;br /&gt;
&lt;br /&gt;
But our requirement has a twist .. and most of sqoop users might have as well..&lt;br /&gt;
- capture incremental data for certain tables and keep it in a new hive partition&lt;br /&gt;
- Run the sqoop extract for a window of dates where each day&#39;s data goes to a partition (DAILY , HOURLY, MONTHLY etc)&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Design&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNSfeePzbyUhulYWqikdF18udCsWFpw7zuulO4KpGmiP_O2HWLudxEumtAZlyFH6UEj1Cejw_wG1vvbg3Qj-QHtrmAzgKunEAbwmicUI4ABNx4B348kuT1-L1X6XqeXF_t_-KiMYrNaiNn/s1600/pensqoop.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;203&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNSfeePzbyUhulYWqikdF18udCsWFpw7zuulO4KpGmiP_O2HWLudxEumtAZlyFH6UEj1Cejw_wG1vvbg3Qj-QHtrmAzgKunEAbwmicUI4ABNx4B348kuT1-L1X6XqeXF_t_-KiMYrNaiNn/s400/pensqoop.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The solution is to use a DB for configuration and pentaho to frame sqoop calls&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
JOB&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4bTPxfSqs5uWAnDSVSCzoF08GDJTE2muBN2bfBdPIJkL-ufePbyGPihicTgwwById0KLFx5bpOlb9kWHg74D2f_lj-Q9fVDJhbuelgFDLU-sjsQ-t5mrsRVCROls-gK8XqFd833Vj9il8/s1600/pensqoop_kjb.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;82&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4bTPxfSqs5uWAnDSVSCzoF08GDJTE2muBN2bfBdPIJkL-ufePbyGPihicTgwwById0KLFx5bpOlb9kWHg74D2f_lj-Q9fVDJhbuelgFDLU-sjsQ-t5mrsRVCROls-gK8XqFd833Vj9il8/s320/pensqoop_kjb.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
We are calling the pensqoop transformation to frame the list of sqoop calls to run&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
shell stage actually runs the sqoop script.. here check the &quot;execute for each input row &quot; so that this script will be called for each sqoop call framed in previous step.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;u&gt;TRANSFORMATION&lt;/u&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIRWVEYdkgEsH3UXcZkoSQDSgD9y05FL8LfSbAdKJyvo5mdCYePFS0xwC0uXfoSkOa7wdMMywwiTwjPFlrkEFyNE3iWe0BiuVBxkAFOXn85-zhg7N4rHnpqT6txd02DtPF9g8N-k-mFdSA/s1600/pensqoop_ktr.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIRWVEYdkgEsH3UXcZkoSQDSgD9y05FL8LfSbAdKJyvo5mdCYePFS0xwC0uXfoSkOa7wdMMywwiTwjPFlrkEFyNE3iWe0BiuVBxkAFOXn85-zhg7N4rHnpqT6txd02DtPF9g8N-k-mFdSA/s640/pensqoop_ktr.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
1. get table configurations (like db connection, incremental column to use for incremental data capture etc)&lt;br /&gt;
2. switch the flow for DAILY partitions or FULL refresh&lt;br /&gt;
3. frame sqoop call using string manipulation at javascript stage&lt;br /&gt;
4. &quot;copy rows to result&quot; to send the output to calling job&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/6385976423695297710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/11/pentaho-solution-for-sqoop-call-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/6385976423695297710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/6385976423695297710'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/11/pentaho-solution-for-sqoop-call-with.html' title='Pentaho solution for Sqoop call with dynamic partitions'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNSfeePzbyUhulYWqikdF18udCsWFpw7zuulO4KpGmiP_O2HWLudxEumtAZlyFH6UEj1Cejw_wG1vvbg3Qj-QHtrmAzgKunEAbwmicUI4ABNx4B348kuT1-L1X6XqeXF_t_-KiMYrNaiNn/s72-c/pensqoop.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-4938368653516299456</id><published>2012-06-20T14:18:00.003-07:00</published><updated>2013-09-16T14:10:14.710-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="namenode safemode recover leave"/><title type='text'>Hive Maintenance</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;u&gt;Hive log filling up tmp space&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
/tmp is usually the neglected folder in any unix environment, but there is where Hive is going to place all its log files. If you didnt have enough space allocated for this then your scheduled sqoop or hive queries are going to fail because of silly reason - no temp space. Not worth it..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
1.&lt;span style=&quot;font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;Create a cron to remove the /tmp/&amp;lt;username&amp;gt;/*.txt files frequenty&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
2.&lt;span style=&quot;font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;Change the hive log directory to a different
location which is monitored by ops ..&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;I I
prefer the 2&lt;sup&gt;nd&lt;/sup&gt; since this change will not remove any files in the
process.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;t &amp;nbsp; To make the configuration change got to /etc/hive/conf/hive-site.xml and add the following property&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;&amp;lt;property&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&amp;nbsp; &amp;lt;name&amp;gt;hive.querylog.location&amp;lt;/name&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&amp;nbsp; &amp;lt;value&amp;gt;/var/&amp;lt;username&amp;gt;/tmp&amp;lt;/value&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&amp;nbsp; &amp;lt;description&amp;gt;Directory where structured hive query logs are created&amp;lt;/description&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&amp;lt;/property&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;u&gt;Freeing up unused HDFS memory&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Two directories we can concentrate to free-up a lot of HDFS memory&lt;br /&gt;
&lt;br /&gt;
1. /tmp/hive-&amp;lt;username&amp;gt;/&lt;br /&gt;
2.&amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;/local/hadoop/mapred/staging/user/.staging/job*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;If you have Hue you can cleanup some of long unused saved reports&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp;1.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;/tmp/hive-beeswax-&amp;lt;username&amp;gt;/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;If you can limit the files by date less than the current month, you are safe..(since this is delete operation)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Hadoop, Hive and Hue does have demon or code to clean-up these folders (Im not sure) but&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
Usually all these files are there because of orphaned mapreduce jobs. Like when you CTRL+C instead of formally &amp;nbsp;&quot;hadoop -job kill &amp;lt;job_id&amp;gt;&quot;&lt;br /&gt;
&lt;br /&gt;
And ofcourse scanning the hdfs directory and hive directory for junk files will also help..&lt;br /&gt;
&lt;br /&gt;
the following are default configuration directories&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;for beeswax cleanup -- hadoop fs -rmr /tmp/hive-beeswax-*/hive* &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;for hive tmp -- &amp;nbsp; hadoop fs -rmr /tmp/hive-bhchandr/hive*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;older job files -- &amp;nbsp;hadoop fs -rmr /local/hadoop/mapred/staging/&amp;lt;application_user&amp;gt;/.staging/job_2012*&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Free Sqoop temp space&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;remove the compile folders for sqoop job&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
/tmp/sqoop-&amp;lt;username&amp;gt;/compile/&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;remove log files older than 1/2 day at jobtracker and data-nodes&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 1.0in; mso-list: l0 level2 lfo1; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;font-size: 7pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 1.0in; mso-list: l0 level2 lfo1; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;font-size: 7pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;!--[endif]--&gt;/var/log/hadoop-*-*/userlogs/* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;u&gt;recover from safemode&lt;/u&gt;&lt;/b&gt;&lt;/h3&gt;
Hadoop can go into safemode when the local directory mapped to HDFS is full.. this usually happens when your HDFS files usedup all the space.. but the trick is you cannot remove files unless you recover from safemode.&lt;br /&gt;
&lt;br /&gt;
So first remove some local files from&lt;br /&gt;
/opt/local/hadoop/mapred/local/taskTracker&lt;br /&gt;
/opt/local/hadoop/mapred/local/taskTracker/distcache&lt;br /&gt;
/opt/local/hadoop/mapred/local/taskTracker/&amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&lt;br /&gt;
hadoop dfsadmin -safemode leave&lt;br /&gt;
&lt;br /&gt;
since Hadoop is out of safemode.. you can cleanup some HDFS using the steps in the first sections&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #1f497d; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;&quot;&gt;/var/log/hadoop-0.20/history/done&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/4938368653516299456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/06/hive-maintenance.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/4938368653516299456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/4938368653516299456'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/06/hive-maintenance.html' title='Hive Maintenance'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-427980627037269878</id><published>2012-05-24T13:25:00.002-07:00</published><updated>2012-05-24T13:25:57.274-07:00</updated><title type='text'>Hive - digging deeper into metastore</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
We usually use information_schema or database metadata tables to query the tables, columns, indexes ..in the case of traditional databases. How about the same in Hive?&lt;br /&gt;
&lt;br /&gt;
In the case of Hive there is a metastore which acts as a metadata for the databases, Hive uses this database to store the tables, partitions, databases, serde in this database. Say you want to know the tables in a database or physical(HDFS) location of the tables or similar column names across the tables..&lt;br /&gt;
&lt;br /&gt;
I have no idea about the default derby DB.. so letme talk about metastore in a traditional database like Mysql..( If you dont have your metastore in an external DB you can follow this link to do so..&amp;nbsp;&lt;a href=&quot;https://ccp.cloudera.com/display/CDHDOC/Hive+Installation#HiveInstallation-ConfiguringtheHiveMetastore&quot;&gt;https://ccp.cloudera.com/display/CDHDOC/Hive+Installation#HiveInstallation-ConfiguringtheHiveMetastore&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
Hive metastore has minimal tables when compared to the metadata layer of a traditional database but Im sure the metadata schema will get bigger and complex in future.&lt;br /&gt;
&lt;br /&gt;
Lets go through the most desirable tables ...&lt;br /&gt;
&lt;br /&gt;
COLUMNS&lt;br /&gt;
DBS &amp;nbsp;-- the list of schemas&lt;br /&gt;
PARTITIONS&lt;br /&gt;
TBLS - tables&lt;br /&gt;
&lt;br /&gt;
Querying these tables will give a basic idea and the datamodel of Hive metastore ( I couldnt find any over the internet), understanding of these tables are essential if you are seriously into Hive and have some production data.&lt;br /&gt;
&lt;br /&gt;
for eg.. In a&amp;nbsp;weird case we found some partitions of one database&amp;nbsp;is being loaded into HDS location of another database (may be a code issue ) but using the following query Im able to narrow down to the affected tables..&lt;br /&gt;
&lt;br /&gt;
select distinct a.tbl_id,a.tbl_name&lt;br /&gt;
&amp;nbsp; &amp;nbsp; from TBLS a&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join PARTITIONS c on (a.TBL_ID=c.TBL_ID)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join SDS b on (c.SD_ID=b.SD_ID)&lt;br /&gt;
&amp;nbsp;where b.location like &#39;%sbx.db%&#39; and a.DB_ID=1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/427980627037269878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/05/hive-digging-deeper-into-metastore.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/427980627037269878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/427980627037269878'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/05/hive-digging-deeper-into-metastore.html' title='Hive - digging deeper into metastore'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-1310960677517673560</id><published>2012-04-25T18:14:00.000-07:00</published><updated>2012-04-25T18:14:46.045-07:00</updated><title type='text'>Secondary Sort using Python and MRJob</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
MRjob is an excellent module developed as open source project by Yelp.. I chosed mrjob because of the following features&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;It provides a seamless JSON reader and writer (i.e the mapper can read json lines and convert them into &amp;nbsp; lists)&lt;/li&gt;
&lt;li&gt;We can test hadoop job locally (in windows or unix) on a small dataset without actually using huge hdfs files (quick !!)&lt;/li&gt;
&lt;li&gt;Can orchestrate many mappers and reducers in the same code&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
My task is to parse json formatted web log files and parse them, say the columns are sessionid,stepno and data. so the psuedo-code&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Read the json files using mrjob protocol&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DEFAULT_INPUT_PROTOCOL = &#39;json_value&#39;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DEFAULT_OUTPUT_PROTOCOL = &#39;repr_value&#39; &amp;nbsp;# &amp;nbsp;output is delimited&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; 2. &amp;nbsp;yield sessionid, (sessionid,stepno,data) from mapper&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; the Mapreduce will make sure that all sessionids(key) goes to same mapper.. with the remaining values sent as a dictionary (value) to make it easier for us to srt in reducer&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;3. &amp;nbsp;Use sorted from itertools of python module to sort by stepnumber in reducer&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;def reducer(self, sessionId, details):&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sdetail = sorted(details, key=lambda x: x[1]) &amp;nbsp;# sorting by stepno for each session&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for d in sdetail:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line_data=&#39;\t&#39;.join(str(n) for n in d)&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We are doing the secondary sort to scan through each events as the sequence is very important to do the funnel analysis of logs..&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Complete code :&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
import sys,time&lt;/div&gt;
&lt;div&gt;
#sys.path.append(&#39;/usr/lib/python2.4/site-packages/&#39;)&lt;/div&gt;
&lt;div&gt;
from mrjob.job import MRJob&lt;/div&gt;
&lt;div&gt;
from mrjob.protocol import JSONValueProtocol&lt;/div&gt;
&lt;div&gt;
from itertools import groupby&lt;/div&gt;
&lt;div&gt;
from operator import itemgetter, attrgetter&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
class uet(MRJob):&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DEFAULT_INPUT_PROTOCOL = &#39;json_value&#39;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DEFAULT_OUTPUT_PROTOCOL = &#39;repr_value&#39;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def mapper(self, _, line):&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sessionId = line[&#39;sessionId&#39;]&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data = line[&#39;data&#39;]&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if len(sessionId) &amp;lt; 13:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for i in range(len(data)):&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; no = data[i][&#39;no&#39;]&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yield sessionId,(sessionId, no,data)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def reducer(self, sessionId, details):&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sdetail = sorted(details, key=lambda x: x[1]) &amp;nbsp;# sorting by stepno for each session&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for d in sdetail:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line_data=&#39;\t&#39;.join(str(n) for n in d)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print str(line_data)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
if __name__ == &#39;__main__&#39;:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; uet.run()&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/1310960677517673560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/04/secondary-sort-using-python-and-mrjob.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/1310960677517673560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/1310960677517673560'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/04/secondary-sort-using-python-and-mrjob.html' title='Secondary Sort using Python and MRJob'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-1512905037490117489</id><published>2012-04-17T17:56:00.008-07:00</published><updated>2012-04-17T22:31:39.490-07:00</updated><title type='text'>Top NBA Players - by twitter followers</title><content type='html'>I really dont have any idea of how advertising companies decide on the price for certain celebrities. Because its very hard to measure the direct relationship to the sales and to derive an ROI. Also Im not sure if any celebrity with enormous following can make a big impact.  I did data collection for fun to see who is actually more popular in Twitter and have more following. I used infochimps rest api calls to get the aggregated information and formatted files to make it readable by Tableau. (used Python for ETL).. seems like SHAQ even after out of the league has a greater fan following than active player.. I havent included Kobe and Rose.. and I tried my best to get the official ids of each player..&lt;br /&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;http://public.tableausoftware.com/javascripts/api/viz_v1.js&quot;&gt;&lt;/script&gt;&lt;div class=&quot;tableauPlaceholder&quot; style=&quot;text-align: center;width: 762px; height: 762px; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;tableauPlaceholder&quot; style=&quot;width:762px; height:762px;&quot;&gt;&lt;br /&gt;&lt;noscript&gt;&lt;/noscript&gt;&lt;object class=&quot;tableauViz&quot; width=&quot;762&quot; height=&quot;762&quot; style=&quot;display:none;&quot;&gt;&lt;param name=&quot;host_url&quot; value=&quot;http%3A%2F%2Fpublic.tableausoftware.com%2F&quot;&gt;&lt;param name=&quot;site_root&quot; value=&quot;&quot;&gt;&lt;param name=&quot;name&quot; value=&quot;TopNBA-bytwitterfollowers/Sheet1&quot;&gt;&lt;param name=&quot;tabs&quot; value=&quot;no&quot;&gt;&lt;param name=&quot;toolbar&quot; value=&quot;yes&quot;&gt;&lt;param name=&quot;static_image&quot; value=&quot;http://public.tableausoftware.com/static/images/To/TopNBA-bytwitterfollowers/Sheet1/1.png&quot;&gt;&lt;param name=&quot;animate_transition&quot; value=&quot;yes&quot;&gt;&lt;param name=&quot;display_static_image&quot; value=&quot;yes&quot;&gt;&lt;param name=&quot;display_spinner&quot; value=&quot;yes&quot;&gt;&lt;param name=&quot;display_overlay&quot; value=&quot;yes&quot;&gt;&lt;param name=&quot;display_count&quot; value=&quot;yes&quot;&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style=&quot;width:762px;height:22px;padding:0px 10px 0px 0px;color:black;font:normal 8pt verdana,helvetica,arial,sans-serif;&quot;&gt;&lt;div style=&quot;float:right; padding-right:8px;&quot;&gt;&lt;a href=&quot;http://www.tableausoftware.com/public?ref=http://public.tableausoftware.com/views/TopNBA-bytwitterfollowers/Sheet1&quot; target=&quot;_blank&quot;&gt;Powered by Tableau&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/1512905037490117489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/04/href-altsheet-1-srchttp-styleborder.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/1512905037490117489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/1512905037490117489'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/04/href-altsheet-1-srchttp-styleborder.html' title='Top NBA Players - by twitter followers'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-6703150071708984130</id><published>2012-04-10T15:19:00.004-07:00</published><updated>2012-04-10T17:07:53.019-07:00</updated><title type='text'>DW in Hive - handling big dimensions</title><content type='html'>&lt;span &gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;This is a an issue bothering our reporting data quality. How to handle big dimension tables in Hive &lt;/span&gt;data warehouse&lt;span style=&quot;font-size: 100%;&quot;&gt;. How to balance performance and data-quality..&lt;/span&gt;&lt;/span&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-variant: normal; line-height: normal; &quot;&gt;&lt;b&gt;&lt;span &gt;&lt;i&gt;Problem statement:&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;Currently dimension hive table (dim_customer) is partitioned by date. The daily incremental creates the new partition so that we can improve the performance at the reporting side. This poses 2 critical issues&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;1. slowly changing dimension is lost&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;2. Compromise in data-quality&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;3. Have to filter by the dimension table in the reporting&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-variant: normal; line-height: normal; &quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span &gt;Solution:&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;The only way to solve this problem is to have the dimension table as one big Hive table instead of partitions. But this creates issues with the refresh strategy and overhead on reporting Hive query..&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;The following is a &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;recipe&lt;/span&gt; to solve this block.. step.1 is certainly the priority&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;i&gt;&lt;span &gt;1. Increase processing power&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;Hadoop&lt;/span&gt; is not only about mega storage it is also about mega processing ..so if we process big files then we &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;got to&lt;/span&gt; have good number of nodes. say we have 30 nodes to process partitioned  dimension table..we have to move to 120 nodes for single dimension file strategy. Processing power is tripled - it is directly proportional !.&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;i&gt;&lt;span &gt;2. Use &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;SQOOP&lt;/span&gt; merge &lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;         We cannot extract the whole table from transactional system &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;every time&lt;/span&gt;..source transactional systems might not allow.. we can only capture the change data. &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;SQOOP&lt;/span&gt; merge comes handy for this purpose. We can overwrite only the incremental records in the hive table (type 1 &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;SCD)&lt;/span&gt;. Again this is a &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_9&quot;&gt;Map reduce&lt;/span&gt; program.. we need processing power..&lt;/div&gt;&lt;div&gt;&lt;span &gt;&lt;div&gt;&lt;a href=&quot;http://archive.cloudera.com/cdh/3/sqoop/SqoopUserGuide.html#_literal_sqoop_merge_literal&quot;&gt;http://archive.cloudera.com/cdh/3/sqoop/SqoopUserGuide.html#_literal_sqoop_merge_literal&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span &gt;3. Use Bucketed Hive tables&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;         Hive performance block comes while joining. We can create a table with bucketing.. like hashing index on the customer_id. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://hive.apache.org/docs/r0.8.1/language_manual/working_with_bucketed_tables.html&quot;&gt;http://hive.apache.org/docs/r0.8.1/language_manual/working_with_bucketed_tables.html&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If the tables being joined are &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_10&quot;&gt;bucketized&lt;/span&gt;, and the buckets are a multiple of each other, the buckets can be joined with each other. If table A has 8 buckets are table B has 4 buckets, the following join&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;SELECT /*+ &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_11&quot;&gt;MAPJOIN&lt;/span&gt;(b) */ a.KEY, a.value&lt;/div&gt;&lt;div&gt; FROM a JOIN b ON a.KEY = b.KEY&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;can be done on the mapper only. Instead of fetching B completely for each mapper of A, only the required buckets are fetched. For the query above, the mapper processing bucket 1 for A will only fetch bucket 1 of B. It is not the default behavior, and is governed by the following parameter&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span &gt;Bucketing and &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_12&quot;&gt;Sqoop&lt;/span&gt; merge requires good planning and &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_13&quot;&gt;metadata&lt;/span&gt; management.. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span &gt;Managing Hadoop from the scratch is challenging as we bump into the limits sooner, we need to adapt quickly else data might grow beyond limits. One advantage( and complexity) is that the internal processing (mapreduce) is open and its upto the developer to improve. And the biggest advantage of all is scaling out.. you can add nodes easily to really make a difference..&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/6703150071708984130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/04/dw-in-hive-handling-big-dimensions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/6703150071708984130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/6703150071708984130'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/04/dw-in-hive-handling-big-dimensions.html' title='DW in Hive - handling big dimensions'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-692745453289829363</id><published>2012-03-29T15:47:00.006-07:00</published><updated>2012-03-29T16:40:49.387-07:00</updated><title type='text'>Data science -- the cool scientist without white gowns</title><content type='html'>&lt;span style=&quot;font-size: 100%;&quot;&gt;&quot;Scientist&quot; is a cool word during my school days, wanna become one but donno on what. All I see as scientists wore white gown with colorful liquids around. But later during college and working days scientists seemed to be boring people with no personal life, accumulated in educational institutes with college kids helping around. &lt;/span&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;Recently there is a profile called &quot;Data scientist&quot; all over the BI mark&lt;span style=&quot;font-size: 100%; &quot;&gt;et and started appearing in every article where Hadoop / Big data is there. It must be some part what a BI/DW person is doing with some specialization. Yes it is the formula,as for me..&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center; &quot;&gt;&lt;b&gt;&lt;i&gt;BI + big-data  + st&lt;span&gt;atistics + scripting + visualization = Data scientist&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; text-align: center; &quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_4ktvxTtWR7Mo_LmxZaCkC5QePS1KXB_K0mr8FWwenO3yYpNI0Zc2X875XBdXTZ8AvLH8BYvmwu5LJkURzkUUU6UvNy003bSzMyo28D1axtttCkmXejPcAGIByM2Bp4X0rrhgEZ830Hfh/s320/images.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5725467394912650930&quot; style=&quot;cursor: pointer; width: 259px; height: 194px; &quot; /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;Ok can be scientist and work for a corporate or invent something new for you name? possibly...&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;But seems like a lot to cover , learn and experience at work. Maybe not really if we are in right job. Im just listing the very higher level outline..(and it is not limited to..) and my intention is not to oversimplify, but certainly to simplify the puzzle..&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; &quot;&gt;&lt;b&gt;&lt;i&gt;BI &lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;  - DW work like ETL , databases, SQL with exposure to enterprise setup. Collecting data from  heterogenous data sources. Log analysis. Dimensional modelling, DW architecture. DB performance.&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Big-data&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;   Hadoop is the first thing comes to mind for Big-data.. but good to know about noSQL dbs.&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;Mapreduce - shared nothing architecture - need for MR - use cases - tools available - pros and cons&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Statistics&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;   Basics - application of statistics in real-world - R programming&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Scripting &lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;   Perl, Python, Java&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;b&gt;Visualization &lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;    Reporting (I like Tableau), Complex SQLs , Ability to tell a story with data - by whatever way you effectively deliver..&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;I would like to list some of the coolest learning materials available for above topics..&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt; I believe the thirst for discovery, admiring the hidden secret in the boring pile of data would make a Data Scientist..&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 100%; font-style: normal; font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/692745453289829363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/03/data-science-cool-scientist-without.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/692745453289829363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/692745453289829363'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/03/data-science-cool-scientist-without.html' title='Data science -- the cool scientist without white gowns'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_4ktvxTtWR7Mo_LmxZaCkC5QePS1KXB_K0mr8FWwenO3yYpNI0Zc2X875XBdXTZ8AvLH8BYvmwu5LJkURzkUUU6UvNy003bSzMyo28D1axtttCkmXejPcAGIByM2Bp4X0rrhgEZ830Hfh/s72-c/images.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-2026841893161906105</id><published>2012-02-21T13:20:00.000-08:00</published><updated>2012-02-21T13:22:17.916-08:00</updated><title type='text'>Dual table in Hive</title><content type='html'>&lt;p class=&quot;MsoNormal&quot; style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;Since there is no Dual table in Hive..&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;I have created a dummy dual with dummy value ‘X’.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;o:p&gt;hive&amp;gt;  CREATE TABLE dual (dummy STRING);&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&lt;span &gt;hive&amp;gt; load data local inpath &#39;/local/user/dw/hive/dual.txt&#39; overwrite into table dual;&lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;Now we can use this table to select string values. Like &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;span style=&quot;font-size: 100%; &quot;&gt;hive&amp;gt; select &#39;name&#39;,&#39;place&#39;,&#39;age&#39; from dual;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;span style=&quot;font-size: 100%; &quot;&gt;to get current timestamp&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; &quot;&gt;hive&amp;gt; select unix_timestamp() from dual;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/2026841893161906105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/02/dual-table-in-hive.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/2026841893161906105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/2026841893161906105'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/02/dual-table-in-hive.html' title='Dual table in Hive'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-4743685215247368207</id><published>2012-02-17T13:19:00.000-08:00</published><updated>2012-02-17T13:43:47.211-08:00</updated><title type='text'>Talent is overrated - Geoff Colvin</title><content type='html'>&lt;span style=&quot;font-style: normal; font-variant: normal; font-weight: normal; &quot;&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;Simply to say this book is good and can be life changing for you or may be to your kid.&lt;/span&gt;&lt;/span&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span &gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;I will get some new idea everyday, while taking bath or watching some movie or during half-sleep @ office or even at workout. Some of them are great, turned out to be great things which are implemented by someone, some are already existing and &lt;/span&gt;I&#39;m&lt;span style=&quot;font-size: 100%;&quot;&gt; ignorant of it. Many self analyzing thought made what &lt;/span&gt;I&#39;m&lt;span style=&quot;font-size: 100%;&quot;&gt; now. But the point is &lt;/span&gt;I&#39;m&lt;span style=&quot;font-size: 100%;&quot;&gt; not great, maybe by the scale of this society. Then how to define greatness - a person &lt;/span&gt;achieved&lt;span style=&quot;font-size: 100%;&quot;&gt; enviable status in a field. The word field is the key here.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span &gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;Being a Software Engineer I cannot become maddeningly wealthy like Buffet just by reading &#39;the intelligent investor&#39;. Im already a hard-wired employee in a field who&#39;s time is controlled by someone else. And if you are married with kids personal time is a joke. There are success stories everywhere in Tennis, basketball, investing and especially &lt;/span&gt;entrepreneurship&lt;span style=&quot;font-size: 100%;&quot;&gt;. Just by looking at it or researching will not make us the same. You might have known this but yet human greed takeover sometimes and we will start day-dreaming. Mostly the end result is &lt;/span&gt;disappointment&lt;span style=&quot;font-size: 100%;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span &gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;If I have to become a cricketer I should have that thought by &lt;/span&gt;at least&lt;span style=&quot;font-size: 100%;&quot;&gt; age 10 and played relentlessly until my skin is totally tanned. At this point this book makes a clear the 10000 hours point which Malcolm Gladwell&#39;s &#39;Outliers&#39; is also talking about. Reading &quot;Talent is overrated&quot; book I can recall Arnold &lt;/span&gt;Schwarzenegger&#39;s&lt;span style=&quot;font-size: 100%;&quot;&gt; quote ..&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;span style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto; &quot;&gt;&quot;Number one, come to America. Number two, work your butt off. And number three, marry a Kennedy.&quot; &lt;/span&gt; &lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;span style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;span style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto; &quot;&gt;The book says these very clearly&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;span style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;span style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto; &quot;&gt;1. Choose your field, if you are already in a field and earning from it, its hard to leave and try new. But children has the advantage to excel enormously.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;span style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto; &quot;&gt;2. Deliberate practice .. it must be conscious, measurable and improving&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;span style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto; &quot;&gt;3. Dont stick in the OK plateau if you want to become world-class&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;span style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto; &quot;&gt;4. Never look around to excel in other area which you cannot afford to spend time on.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;span style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto; &quot;&gt;5. Get family support for what you are doing&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;span style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-align: -webkit-auto; &quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Its a revealing read and can be read again if you fail to succeed in some area. The world is so competitive that only the extraordinary can win. (even in a job interview ) Can be a great book if you are a parent which can change your kids life all together.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; font-family: Georgia, serif; font-size: 100%; line-height: normal; &quot;&gt;&lt;span style=&quot;font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; text-align: -webkit-auto; &quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/4743685215247368207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/02/talent-is-overrated-geoff-colvin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/4743685215247368207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/4743685215247368207'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/02/talent-is-overrated-geoff-colvin.html' title='Talent is overrated - Geoff Colvin'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-7827195869704583321</id><published>2012-02-10T11:12:00.001-08:00</published><updated>2012-02-10T11:13:20.386-08:00</updated><title type='text'>Shell script - snippets</title><content type='html'>Loop through dates&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;startdate=`/bin/date  --date=&quot;2007-07-01&quot; +%Y-%m-%d`&lt;/div&gt;&lt;div&gt;enddate=`/bin/date --date=&quot;2011-07-01&quot; +%Y-%m-%d`&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;foldate=&quot;$startdate&quot;&lt;/div&gt;&lt;div&gt;until [ &quot;$foldate&quot; == &quot;$enddate&quot; ]&lt;/div&gt;&lt;div&gt;do&lt;/div&gt;&lt;div&gt;echo $foldate&lt;/div&gt;&lt;div&gt;foldate=`/bin/date --date=&quot;$foldate 1 month&quot; +%Y-%m-%d`&lt;/div&gt;&lt;div&gt;done&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/7827195869704583321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/02/shell-script-snippets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/7827195869704583321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/7827195869704583321'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/02/shell-script-snippets.html' title='Shell script - snippets'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-7346786123960323304</id><published>2012-01-24T16:52:00.000-08:00</published><updated>2012-01-26T14:58:32.470-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hadoop"/><category scheme="http://www.blogger.com/atom/ns#" term="hive"/><title type='text'>Slowly changing dimensions in Hive</title><content type='html'>If you keep you Datawarehouse in Hive,How to implement slowly changing dimensions?&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Slowly_changing_dimension&quot;&gt;http://en.wikipedia.org/wiki/Slowly_changing_dimension&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is not a solution blog, actually Im looking for an effective solution to implement SCD in Hive.&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, &#39;Nimbus Sans L&#39;, sans-serif; font-size: 13px; line-height: 15px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); &quot;&gt;Since all the types uses Update one way or another. for eg Type 2 can be a good candidate but it requires to update the enddate of history record. T&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, &#39;Nimbus Sans L&#39;, sans-serif; font-size: 13px; line-height: 15px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); &quot;&gt;he only option I can think off is to insert the rows into the dimension and query on the maxid or maxdate to get the latest dimensions on the analytics layer.. (seems like an overhead on mapreduce)&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, &#39;Nimbus Sans L&#39;, sans-serif; font-size: 13px; line-height: 15px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;I posted this question to Cloudera professionals group at LinkedIn. And Jasper recommended an idea which is not using Hive queries, moreover he prefers mapreduce scripts to handle SCD situations. I modified the flow to suit Hive tables.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;Idea is this &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;1. Open the underlying HDFS file or select all rows using Hive-ql&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;2. Pass the data through a mapper as key,value pair &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;3. End-date the old record and leave the new record with NULL end_date (for type2) through script&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;4. Overwrite the Hive table&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;But the process could be tricky if the data is present in different partitions.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span  &gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/7346786123960323304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/01/slowly-changing-dimensions-in-hive.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/7346786123960323304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/7346786123960323304'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/01/slowly-changing-dimensions-in-hive.html' title='Slowly changing dimensions in Hive'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-6661941400851937</id><published>2012-01-24T15:47:00.000-08:00</published><updated>2012-01-26T15:05:21.695-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="book journal"/><title type='text'>tipping point - Book journal</title><content type='html'>Malcolm Gladwell is an expert in writing book about the things we know already (very vaguly) and make an compelling book with storytelling and statistics.. he must be the perfect author for the current information overloaded culture.&lt;div&gt;&lt;br /&gt;Tipping point said to be his best, but for me listening in audio format felt &#39;outliers&#39; was interesting and stories remained in memory for relatively more time. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;the law of few - it is true that few people make a big difference and also some critical piece of work make a big difference in a big project. Here the point is not about innovation but marketing. I feel we play all these roles sometimes in different context. Gladwell categorizes these people, so it makes it easier to find who is who is future...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Stickiness factor - we are living in a era of short memory loss.. stickiness could be a day to a week. In the case of viral videos it could be an hour of fame. There is a war out there in advertising, web and entertainment to make a thing sticky. the point to make your stuff sticky specifically to your target audience. Sometimes the stickiness can come from a funny context or intelligence or experience. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;new york crime example - this is a fascinating story of how new york subway handled crime by simply clearing the cars from graffiti everyday. You can make a big difference by making small spirited changes. Like if you allow small mistakes in a project to go by and didnt appreciate the people taking care of those stuff..then the manager is setting a wrong example. Its all about defined values. And always values are simple and to the core.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Connectivity - You are connected to anyone in this world in a factor of six. this may be reduced after facebook and linkedin. And 150 is the number where a group or organization can work effectively. I see the reason why my company split organizations without any reason and give meaningless names to those groups.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Teenage smoking issue - simple in one line &quot;experimenting may not become a habit&quot;. We can protect our kids only to a certain extent from smoking. But anyway they are going to try at least once, but that doesn&#39;t means that they are hooked forever. More than 80% of kids who tried smoking quit is along the way. Chippers is the name for occasional and non-addictive smokers.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Prelude - Identifying mavens.. identifying the right context.. identifying minor signs before they tip.. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How small things can bring big impact.. small things mostly are in our control..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/6661941400851937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/01/tipping-point-book-journal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/6661941400851937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/6661941400851937'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/01/tipping-point-book-journal.html' title='tipping point - Book journal'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-8863371450971232343</id><published>2012-01-23T14:38:00.000-08:00</published><updated>2012-01-24T16:10:43.000-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hadoop"/><category scheme="http://www.blogger.com/atom/ns#" term="hive"/><title type='text'>Hive outer join issue</title><content type='html'>Recently we faced a memory issue (java heap space) when joining two partitioned tables.&lt;div&gt;Both the tables are huge in millions of rows and each partitioned on hourly basis.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;select a.*,b.* &lt;/div&gt;&lt;div&gt;from a left outer join b&lt;/div&gt;&lt;div&gt;on a.id = b.id&lt;/div&gt;&lt;div&gt;where&lt;/div&gt;&lt;div&gt;a.part &amp;gt; &#39;2012-01-01&#39;&lt;/div&gt;&lt;div&gt;and b.part &amp;gt; &#39;2012-01-01&#39;;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;this fails during peak times. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;issue:&lt;/div&gt;&lt;div&gt;when we checked the logs we found that the mapper is trying to access all the partitions of table b. Since the system is scarce in resources the job failed due to heap space issue. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;resolution:&lt;/div&gt;&lt;div&gt;Change the right table to a inline..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;select a.*,b.* &lt;/div&gt;&lt;div&gt;from a left outer join (select * from b where b.part &amp;gt; &#39;2012-01-01&#39;) c&lt;/div&gt;&lt;div&gt;on a.id = c.id&lt;/div&gt;&lt;div&gt;where&lt;/div&gt;&lt;div&gt;a.part &amp;gt; &#39;2012-01-01&#39;;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;the number of mappers reduced dramatically and execution is scanning only the required partitions from table b.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Learning:&lt;/div&gt;&lt;div&gt;Always check the number of mappers while running. If the numbers are not realistic take a peak.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Divide and conquer approach when writing complex hive queries.&lt;/div&gt;&lt;div&gt;Since Hive is not yet a completely matured SQL, we need to put extra effort to examine the execution plan.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/8863371450971232343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/01/hive-outer-join-issue.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/8863371450971232343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/8863371450971232343'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/01/hive-outer-join-issue.html' title='Hive outer join issue'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4693187765980952034.post-2207176611225193421</id><published>2012-01-10T11:20:00.001-08:00</published><updated>2012-01-24T16:11:12.935-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="book journal"/><title type='text'>Moonwalking with Einstein - Book Journal</title><content type='html'>The book cover itself says its not another &quot;mind power&quot; book.. with boring technical and mostly impractical and sometimes with petty techniques which I already posses..&lt;br /&gt;&lt;br /&gt;Author Foer takes us a journey which he takes to win the American memory championship by sprinkling some of the techniques he used to remember different stuff. Certainly the book is not for learning new memory techniques as the author just gives a glimpse and feel of those techniques, its upto the reader to dig-deeper those sprinkled techniques. Rather the book is successful in being interesting, funny and informative. Since Im reading the Malcolm Gladwell series, MWE narration comes closer to Outliers. And some of the information is there in both the books, which makes me think both Foer or Gladwell are originator of the original idea (like the 10,000 hrs deliberate work) they are just aggregators and presenters of existing facts..&lt;br /&gt;&lt;br /&gt;Memory palace - eventhough this is a technique we all use to keep things in memory, we can deliberately build memory palaces (with the places we know well) for certain group of things. This is helpful to me in preserving things to do, passwords and some numbers. the trick is to assign weird images/persons or persons doing weird things.&lt;br /&gt;&lt;br /&gt;remembering cards - the POA method seems to be very effective (person Object Activity). For each card in the deck assign a personality doing some action on an object&lt;br /&gt;&lt;br /&gt;A-spade - Rajnikanth wearing a coolers&lt;br /&gt;2-spade - Kamal kissing a girl&lt;br /&gt;3-spade - vijay dancing on a table&lt;br /&gt;4-spade - Ajith raising his red-shirts collar&lt;br /&gt;&lt;br /&gt;And when you get a 3 card combination we can create a mental image of POA&lt;br /&gt;Ajith dancing with a girl represents 4-spade,3-spade,2-spade..&lt;br /&gt;Its hard to remember the image for each card, but once it is assigned with practice its possible to remember atleast 10 cards I think !!&lt;br /&gt;&lt;br /&gt;remembering numbers - this can be done with the same technique above by assigning a image to each 2 digit combination (this is hard I think but possible with deliberate practise)&lt;br /&gt;&lt;br /&gt;extreme peoples -&lt;br /&gt;Other interesting part is about a man who forgets the breakfast he had 5 mins back and some info on the famous Rain man. The interesting information is our time will seems longer if you have more memories about the time-period. Like the vacations, the job changes, important events and successful events&lt;br /&gt;&lt;br /&gt;Role of memory in education -&lt;br /&gt;I feel education needs some memory to analyze the data.. the future is of-course how effectively we analyze the data, but memory also plays a part it seems..&lt;br /&gt;&lt;br /&gt;Overall interesting read other than boring self-improvement books which always portraits an ideal personality (which in reality cant exists)</content><link rel='replies' type='application/atom+xml' href='http://bigdatadw.blogspot.com/feeds/2207176611225193421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bigdatadw.blogspot.com/2012/01/moonwalking-with-einstein-book-journal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/2207176611225193421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4693187765980952034/posts/default/2207176611225193421'/><link rel='alternate' type='text/html' href='http://bigdatadw.blogspot.com/2012/01/moonwalking-with-einstein-book-journal.html' title='Moonwalking with Einstein - Book Journal'/><author><name>Karna</name><uri>http://www.blogger.com/profile/17490251362890667082</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>