Data set context: Sakila contains data about movie rental and payment transactions. In addition, it also contains information about movies and customers.
Goal: Build a data warehouse with Apache Hive, extract, transform, and store (ETL) in Dimension and Fact tables. Serves for analyzing operations, helping to improve business strategies to bring profits to businesses
Customer segmentation: aims to group customers according to certain behavioral characteristics, forming data clusters. From there, marketing campaigns or incentives will easily reach the appropriate customer groups
- Use clustering model according to
KMean
algorithm: important attributes in this model arerecency
,frequency
andmonetary
- The performance measures of the model are
SSE
, sum of squared distances to cluster centers andSilhouette Coefficient
method. From there, you can choose the best number of clusters so that the data is clustered more clearly
The goal is to track the quantity of inventory and revenue of each film in the film warehouse. So that, there will be strategies to adjust the process of importing and exporting inventory accordingly
Note: Edit the core-site.xml file in Hadoop, add the proxy configuration section for the user and close the file
<property>
<name>hadoop.proxyuser.<username>.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.<username>.groups</name>
<value>*</value>
</property>
Note: start hiveserver2 before connect
hive --service hiveserver2 start
- Work-flow:
- Galaxy Schema of Data Warehouse: