Sunday, September 30, 2018

Analytics

As per SAS , Analytics is an encompassing and multidimensional field that uses mathematics, statistics, predictive modeling and machine-learning techniques to find meaningful patterns and knowledge in recorded data.

We use statistical and quantitative techniques to find the meaningful pattern and insights into the data.

Analytics is primarily divided into four parts :-
 
Descriptive Analytics (What Happened ?)
Diagnostics Analytics (Why Happened ?)
Predictive Analytics (What will happen ?)
Prescriptive Analytics (What should be done ?)

What is not Analytics ?

  • Data Entry
  • Data Warehousing
  • ETL
  • OLAP
What is Analytics ?
  • Decision Tree
  • Regression
  • K-Means Clustering
  • Neural Networks
Let us take an example , ABC product has sold 100k units of a product in quarter 1 and it's profit has risen to 70 percent.This is an example of OLAP . While How many people are going to respond a particular product based upon their previous buying trend, is an example of Analytics.

Thursday, September 13, 2018

Sqoop - Command (Part 1)

We have gone through the Sqoop architecture in our last post.In this blog post , we will focus on some of the sqoop commands.

Sqoop help list-databases :- It will display all the commands that are available with the list-databases.

 
Listing Databases in My SQL :- It will show all the databases that are available in the MY SQL .

Syntax :- sqoop list-databases --connect jdbc:mysql://localhost/ --username --password

Note that it is advisable to provide the password in the console ,this can be achieved by writing
 -P in the above command.

sqoop list-databases --connect jdbc:mysql://localhost/ --username root -P

List Tables in a specified database :- It will display all the tables that are available in a particular database.
Syntax:-  sqoop list-tables --connect jdbc:mysql://localhost/databasename  --username -password
 
Table to read and store :- It will import the specified table into the HDFS directory.

Syntax:- sqoop import --connect jdbc:mysql://localhost/databasename --username -P --table tablename
We have fired the below command and got the output.
sqoop import --connect jdbc:mysql://localhost/company --username root -password root --table department
 
The details of the file that has been generated in the HDFS.The files will be in the form part-m-0000 .
 
The below are the contents of the file.
 

Storing data in a particular directory in HDFS :- We can import the table and store it in a particular directory in the HDFS.
Syntax :- sqoop import --connect jdbc:mysql://localhost/databasename --username -P --target-dir dirname  --table tablename
 

Note : - If the output directory already exists . we can get an error message.

Delta Lake - Time Travel

  Time Travel allows you to query, restore, or compare data from a previous version of a Delta table. Delta Lake automatically keeps tra...