<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Soumitra Banerjee</title>
    <description>The latest articles on DEV Community by Soumitra Banerjee (@soumitrabanerjee).</description>
    <link>https://dev.to/soumitrabanerjee</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F593569%2F92f72cb3-223c-4ce6-955b-31ddd02cd2cf.jpg</url>
      <title>DEV Community: Soumitra Banerjee</title>
      <link>https://dev.to/soumitrabanerjee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/soumitrabanerjee"/>
    <language>en</language>
    <item>
      <title>G for Git</title>
      <dc:creator>Soumitra Banerjee</dc:creator>
      <pubDate>Tue, 13 Dec 2022 10:09:04 +0000</pubDate>
      <link>https://dev.to/soumitrabanerjee/g-for-git-ck6</link>
      <guid>https://dev.to/soumitrabanerjee/g-for-git-ck6</guid>
      <description>&lt;p&gt;Maintaining code for us developers has been quite smooth because we have a tool that can keep track of each version of the code that is being modified and kept in distributed manner.&lt;/p&gt;

&lt;p&gt;Git is not only knowing pull, commit and push, there is lot more to it. if we understand git more we might handle our code versions a little more sensibly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Play around with git
&lt;/h3&gt;

&lt;p&gt;Inside git directory if you further look into .git directory(which is hidden usually), you'll see the commits and logs and other informations are being stored here. Incase for example you want to search your commits you previously made with certain message, you can simply hit the command&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;git log --grep="example search word"&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 where grep is global regular expression&lt;br&gt;
git having three components, repository, staging and working directory where every changes we make in working directory and usually we push it to stage and then commit it to repository and each commit produces a hash code aka SHA value which is 40 unique hexadecimal characters and this SHA-1 is generated based on each and every changes you commit (e.g. text file, code, binary file). Hence, even adding a space will generate a different SHA-1 value. Interesting thing here to note is, once you commit a change, HEAD will point to recent commit and once you commit another change the HEAD will now point to latest change and this this will also include the previous change and if you visualize, it will be a sort of linked list.&lt;/p&gt;

&lt;p&gt;[ Commit 1 ]------[ Commit 2 ]------[ Commit 3 ]&lt;/p&gt;

&lt;p&gt;[ 48ae79b ]&amp;lt;------[ 56f9ca ]&amp;lt;------[ 9c78de ] &amp;lt;== HEAD&lt;/p&gt;

&lt;p&gt;Snapshot-1 ------ Snapshot-2 ------ Snapshot-3&lt;br&gt;
Now let's say you ant to compare two commits, one handy tool to find difference between two commits is&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git diff b3c98a..c6ae4b&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 and if you want to commit all the changes skipping the staging part then you can use&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;git commit -a -m "some msg"&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;p&gt;If you want to study git in detail, you can go through this url: &lt;a href="https://www.toptal.com/git/the-advanced-git-guide"&gt;https://www.toptal.com/git/the-advanced-git-guide&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Shhh! Hadoop is working</title>
      <dc:creator>Soumitra Banerjee</dc:creator>
      <pubDate>Mon, 12 Jul 2021 18:01:50 +0000</pubDate>
      <link>https://dev.to/soumitrabanerjee/shhh-hadoop-is-working-932</link>
      <guid>https://dev.to/soumitrabanerjee/shhh-hadoop-is-working-932</guid>
      <description>&lt;p&gt;Imagine someone with a brain that can store and process zettabytes of data. It is not possible for a "Normal" human to have such powerful brain. But, even though you don't possess a brain with such massive processing and storing capacity, you could use a tool that can do the processing and storing part on your behalf. &lt;br&gt;
Yes, you guessed it correct - HADOOP!! is what I am talking about.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Hadoop?
&lt;/h3&gt;

&lt;p&gt;It's a tool that can store and process huge amount of data as it follows parallel processing concept and stores multiple copies of the data in different systems so that, if one system fails, you don't lose your data. &lt;/p&gt;

&lt;h3&gt;
  
  
  Hadoop Architecture
&lt;/h3&gt;

&lt;p&gt;There are mainly 4 components of Hadoop&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MapReduce&lt;/li&gt;
&lt;li&gt;Hadoop Distributed File System/HDFS&lt;/li&gt;
&lt;li&gt;Yet Another Resource Negotiator/YARN&lt;/li&gt;
&lt;li&gt;Utilities/Java Library&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  MapReduce
&lt;/h5&gt;

&lt;p&gt;This component work as two units i.e. &lt;strong&gt;Map&lt;/strong&gt; and &lt;strong&gt;Reduce&lt;/strong&gt;. First, the data set goes as input into map function which is nothing but tuples having key-value pair. These key-value pair then goes to reduce function where the data are shuffled and sorted and then aggregated and written in the file with the help of record writer.&lt;/p&gt;

&lt;h5&gt;
  
  
  HDFS
&lt;/h5&gt;

&lt;p&gt;HDFS is used for storage purpose. It works on master slave architecture where we have &lt;strong&gt;NameNode&lt;/strong&gt; as Master and &lt;strong&gt;DataNode&lt;/strong&gt; as slave. NameNode instructs DataNode, where and how to store data. It stores the metadata where as DataNode actually stores the data.&lt;/p&gt;

&lt;h5&gt;
  
  
  YARN
&lt;/h5&gt;

&lt;p&gt;Its main task is to &lt;strong&gt;schedule jobs&lt;/strong&gt; and &lt;strong&gt;manage resources&lt;/strong&gt;. YARN decides when and which task or job is to be performed and how much resources to be allocated to perform the job.&lt;/p&gt;

&lt;h5&gt;
  
  
  Utilities/Java libraries
&lt;/h5&gt;

&lt;p&gt;To run other components of Hadoop (MapReduce, HDFS and YARN) smoothly we need these java libraries. These libraries make sure that incase of any hardware failure or any other unfortunate circumstances Hadoop doesn't crash.&lt;/p&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;p&gt;Wanna know more about Hadoop? click on the below links.&lt;br&gt;
&lt;a href="https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html"&gt;HDFS Architecture&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/YARN.html"&gt;YARN Architecture&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bigdata</category>
      <category>datascience</category>
      <category>database</category>
      <category>hadoop</category>
    </item>
    <item>
      <title>PIVOT-UNPIVOT</title>
      <dc:creator>Soumitra Banerjee</dc:creator>
      <pubDate>Sat, 01 May 2021 12:21:02 +0000</pubDate>
      <link>https://dev.to/soumitrabanerjee/pivot-unpivot-2bne</link>
      <guid>https://dev.to/soumitrabanerjee/pivot-unpivot-2bne</guid>
      <description>&lt;h2&gt;
  
  
  What is PIVOT?
&lt;/h2&gt;

&lt;p&gt;You can rotate your SQL table using pivot function where you transform your row values into columns. Here you can turn unique values from one column into multiple columns.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is UNPIVOT?
&lt;/h2&gt;

&lt;p&gt;While PIVOT turns values from one column into multiple columns, UNPIVOT turns multiple column into row values of single column.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Cases
&lt;/h2&gt;

&lt;p&gt;These two functions of SQL is generally used to reorganize data, so that, the data can be viewed more efficiently and is more understandable than before.&lt;/p&gt;

&lt;h2&gt;
  
  
  Syntax:
&lt;/h2&gt;

&lt;h4&gt;
  
  
  PIVOT
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Column2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...)&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TableName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="n"&gt;PIVOT&lt;/span&gt;
 &lt;span class="p"&gt;(&lt;/span&gt; 
   &lt;span class="n"&gt;AggregateFunction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ColumnToBeAggregated&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="n"&gt;PivotColumn&lt;/span&gt; 
   &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PivotColumnValues1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PivotColumnValues2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...)&lt;/span&gt;
 &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;Alias&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  UNPIVOT
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Column2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...)&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TableName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="n"&gt;UNPIVOT&lt;/span&gt;
 &lt;span class="p"&gt;(&lt;/span&gt; 
   &lt;span class="n"&gt;AggregateFunction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ColumnToBeAggregated&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="n"&gt;PivotColumn&lt;/span&gt; 
   &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PivotColumnValues1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PivotColumnValues2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...)&lt;/span&gt;
 &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;Alias&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Example:
&lt;/h2&gt;

&lt;p&gt;So, a table that looks like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcl49twnd8nmwsot68mh2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcl49twnd8nmwsot68mh2.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can be converted into something like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F50u81prljk6c3xhqn9nj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F50u81prljk6c3xhqn9nj.png" alt="image"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;With this piece of code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;BRAND&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;TABLET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;MOBILE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;OS&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;BRAND&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PRODUCT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PRICE&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;TECHPRODUCTS&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;PIVOT&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PRICE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'TABLET'&lt;/span&gt; &lt;span class="n"&gt;TABLET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'MOBILE'&lt;/span&gt; &lt;span class="n"&gt;MOBILE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'OS'&lt;/span&gt; &lt;span class="n"&gt;OS&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;BRAND&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  If you want to learn more about PIVOT and UNPIVOT please refer:
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://blogs.oracle.com/sql/how-to-convert-rows-to-columns-and-back-again-with-sql-aka-pivot-and-unpivot" rel="noopener noreferrer"&gt;https://blogs.oracle.com/sql/how-to-convert-rows-to-columns-and-back-again-with-sql-aka-pivot-and-unpivot&lt;/a&gt;&lt;/p&gt;

</description>
      <category>sql</category>
      <category>database</category>
    </item>
    <item>
      <title>Big Data, What's the Big Deal</title>
      <dc:creator>Soumitra Banerjee</dc:creator>
      <pubDate>Sat, 13 Mar 2021 12:50:54 +0000</pubDate>
      <link>https://dev.to/soumitrabanerjee/big-data-what-s-the-big-deal-2h1e</link>
      <guid>https://dev.to/soumitrabanerjee/big-data-what-s-the-big-deal-2h1e</guid>
      <description>&lt;h1&gt;
  
  
  What is Big Data?
&lt;/h1&gt;

&lt;p&gt;A huge amount of data is being generated on daily basis from different devices connected through internet. This data is being stored mostly in clouds by businesses and they use this data to enhance their business activity.&lt;/p&gt;

&lt;h1&gt;
  
  
  How big is Big Data?
&lt;/h1&gt;

&lt;p&gt;As of 2021 our entire digital universe is estimated to be more than 44 zettabytes of data and almost 2.5 quintillion bytes(&lt;strong&gt;A quintillion is a million times a trillion&lt;/strong&gt;) of data are produced by humans every day. It is expected that &lt;em&gt;463 exabytes of data will be generated each day by humans as of 2025&lt;/em&gt;.&lt;br&gt;
It's huge right? Even I am in astonishment, as I am writing this.&lt;br&gt;
It is even more interesting to know that almost 90% of the total data has been generated in the last two years alone.&lt;/p&gt;

&lt;h1&gt;
  
  
  What we do with these data?
&lt;/h1&gt;

&lt;p&gt;Well well well!! hold your breath.&lt;br&gt;
What if I told you that the data generated out of your device is actually used to create an exact copy of yours? You won't believe right? But this is what it is. They track each and every move you make on internet and your each action is stored in the form of raw data. Data Scientists use these data and shape up a human behavior exactly like you and this is know as Data modeling. Then businesses use these models to manipulate you through different means, be it notifications, ad, suggestions etc.&lt;/p&gt;

&lt;p&gt;But, not everything businesses does are bad. In fact majority of the cases are for greater good of humankind. One such example is the use of big data in Medical/Life sciences industries. In the year of 2020 the Corona Virus pandemic had disrupted every possible thing human can think of except internet. Medical industries worked closely with the governments and Hospitals across the world to ensure the track of the rising COVID cases. The data generated by the Hospitals were analyzed and industries started predicting which are the places that needs special attention. Data from all the COVID victims who were admitted in hospitals were collected and efforts were being made on how to detect pattern among the various COVID cases, how to minimize the spread of virus, for what age group the virus is affecting more, in which climate the virus grows stronger and so on. While medical teams were working day and night in treating people and taking care of their immunity power, tech industries were busy getting the data together to help people in every way possible. Even, while making the COVID Vaccine the test results and side effects of each volunteers were recorded in the form of data and were analyzed by various healthcare professionals across the world to improve the quality of vaccine.&lt;/p&gt;

&lt;h4&gt;
  
  
  If you got some interest in Big Data and want to know more, check out these links
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.sas.com/en_in/insights/big-data/what-is-big-data.html"&gt;https://www.sas.com/en_in/insights/big-data/what-is-big-data.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.ibm.com/in-en/analytics/hadoop/big-data-analytics"&gt;https://www.ibm.com/in-en/analytics/hadoop/big-data-analytics&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>datascience</category>
      <category>bigdata</category>
    </item>
  </channel>
</rss>
