<?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>Forem: shubham mishra</title>
    <description>The latest articles on Forem by shubham mishra (@mishraoct786).</description>
    <link>https://forem.com/mishraoct786</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%2F1007763%2F8b56c0e9-5c6d-42d9-a4a1-32b3faf90b60.png</url>
      <title>Forem: shubham mishra</title>
      <link>https://forem.com/mishraoct786</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mishraoct786"/>
    <language>en</language>
    <item>
      <title>Mastering Machine Learning :Why One-Hot Encode Data in Machine Learning?</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Sat, 18 Jan 2025 07:10:33 +0000</pubDate>
      <link>https://forem.com/mishraoct786/mastering-machine-learning-why-one-hot-encode-data-in-machine-learning-53d0</link>
      <guid>https://forem.com/mishraoct786/mastering-machine-learning-why-one-hot-encode-data-in-machine-learning-53d0</guid>
      <description>&lt;h2&gt;
  
  
  Understanding Categorical Data
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fev98v791dh2rq0214o9s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fev98v791dh2rq0214o9s.png" alt="Image description" width="720" height="720"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Categorical data refers to information divided into specific groups or categories. For instance, when an organization collects biodata of its employees, the resulting data is categorized based on variables such as gender, state of residence, or department. This type of data is called categorical because it can be grouped by these shared attributes.&lt;br&gt;
Examples of Categorical Data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;    A “pet” variable with values: dog, cat.&lt;/li&gt;
&lt;li&gt;    A “color” variable with values: red, green, blue.&lt;/li&gt;
&lt;li&gt;    A “place” variable with values: first, second, third.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Categorical data must often be converted into numerical data to be utilized effectively in machine learning models. Two common methods to achieve this are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;    Integer Encoding&lt;/li&gt;
&lt;li&gt;    One-Hot Encoding&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Is One-Hot Encoding?
&lt;/h2&gt;

&lt;p&gt;One-hot encoding is a method of converting categorical variables into a numerical form that machine learning algorithms can process. It transforms each category value into a new binary column. Each binary column represents one category, with a value of 1 indicating the presence of the category and 0 indicating its absence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Use One-Hot Encoding?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One-hot encoding is crucial because most machine learning algorithms cannot work with categorical data directly. Algorithms require numerical input to compute distances, probabilities, and patterns effectively. Here’s why one-hot encoding is often preferred:&lt;/p&gt;

&lt;p&gt;**   Prevents Misinterpretation:**&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;    a. Unlike integer encoding, one-hot encoding prevents algorithms from interpreting category values as having a numerical hierarchy or relationship. For example, it avoids assuming that a “category 3” is greater than a “category 1.”&lt;/li&gt;
&lt;li&gt;    Ensures Data Compatibility:   a.Many machine learning models like logistic regression, neural networks, and decision trees perform better with one-hot encoded data.&lt;/li&gt;
&lt;li&gt;    Widely Supported:    a.Libraries such as scikit-learn (“sklearn”) provide robust support for implementing one-hot encoding efficiently.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;How to Apply One-Hot Encoding?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Python, one-hot encoding can be implemented using libraries like pandas or scikit-learn. Below is an example using pandas:&lt;br&gt;
Python Code Example:&lt;br&gt;
`&lt;br&gt;
import pandas as pd&lt;/p&gt;

&lt;h1&gt;
  
  
  Sample dataset
&lt;/h1&gt;

&lt;p&gt;data = {&lt;br&gt;
    'Bike': ['KTM', 'Ninza', 'Suzuki'],&lt;br&gt;
    'Price': [100, 200, 300]&lt;br&gt;
}# Create a DataFrame&lt;br&gt;
df = pd.DataFrame(data)# Apply one-hot encoding&lt;br&gt;
df_encoded = pd.get_dummies(df, columns=['Bike'])print(df_encoded)`&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;One-hot encoding is a critical step in data preprocessing for machine learning. By converting categorical data into binary columns, it ensures algorithms can interpret and process the data correctly. Whether you’re working with simple datasets or advanced models, mastering one-hot encoding will significantly enhance your ability to work effectively with categorical data.&lt;/p&gt;

&lt;p&gt;Would you like assistance with implementing one-hot encoding in your machine learning project? Let us know in the comments below!&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;check out similar blog *&lt;/em&gt;&lt;br&gt;
&lt;a href="https://medium.com/@mishra.oct786/mastering-machine-learning-outlier-detection-for-machine-learning-abdb45b0372a" rel="noopener noreferrer"&gt;https://medium.com/@mishra.oct786/mastering-machine-learning-outlier-detection-for-machine-learning-abdb45b0372a&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.orientalguru.co.in/myArticles/what-is-the-full-form-of-yarn" rel="noopener noreferrer"&gt;https://www.orientalguru.co.in/myArticles/what-is-the-full-form-of-yarn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.developerindian.com/articles/understanding-decision-trees-for-regression-step-by-step-explanation" rel="noopener noreferrer"&gt;https://www.developerindian.com/articles/understanding-decision-trees-for-regression-step-by-step-explanation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.developerindian.com/articles/outlier-detection-for-machine-learning-a-comprehensive-guide" rel="noopener noreferrer"&gt;https://www.developerindian.com/articles/outlier-detection-for-machine-learning-a-comprehensive-guide&lt;/a&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>ai</category>
      <category>deeplearning</category>
      <category>outlier</category>
    </item>
    <item>
      <title>What is Logical Planning</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Sun, 12 Feb 2023 19:44:32 +0000</pubDate>
      <link>https://forem.com/mishraoct786/what-is-logical-planning-40i1</link>
      <guid>https://forem.com/mishraoct786/what-is-logical-planning-40i1</guid>
      <description>&lt;p&gt;Taking user code and converting it into a logical plan is the first phase of execution. The logical plan only converts the user’s set of expressions into the most optimized version.&lt;/p&gt;

&lt;p&gt;It does this by converting the user code into an unresolved logical plan. This logical plan is unresolved because although your code might be valid, the tables or columns that it refers to may or may not exist. Spark uses a repository of all table, catalog and DataFrame information to resolve columns and tables in the analyzer. The analyzer may reject the unresolved logical plan if the required table or column name does not exist in the catalog. If the analyzer is able to resolve it, the result is passed through the Catalyst Optimizer. &lt;/p&gt;

&lt;p&gt;The Packages can extend Catalyst to include their own rules for domain specific optimizations.&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>SQL query to find second highest salary using dens_rank function ?</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Sun, 12 Feb 2023 19:39:40 +0000</pubDate>
      <link>https://forem.com/mishraoct786/sql-query-to-find-second-highest-salary-using-densrank-function--47d3</link>
      <guid>https://forem.com/mishraoct786/sql-query-to-find-second-highest-salary-using-densrank-function--47d3</guid>
      <description>&lt;p&gt;This is Question is most use full in Sql interview ,Below is Employee Table and we are going to write Sql Query using Dense rank function that is windowing function :&lt;/p&gt;

&lt;p&gt;Name    age salary  department&lt;br&gt;
shubham mishra  31  20000   computer&lt;br&gt;
rahul kumar 20  30000   electric&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select Name , age , salary   , 
dens_rank  over (partition by  department    order by  salary desc ) as rank 
from 
Employee 
where rank =2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This Solution is provided by Shubham mishra This article is contributed by Developer Indian team. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above. Also folllow our &lt;a href="https://www.instagram.com/developer_indian/?hl=en" rel="noopener noreferrer"&gt;instagram &lt;/a&gt;, linkedIn , Facebook , twiter account for more&lt;/p&gt;

</description>
      <category>jokes</category>
      <category>watercooler</category>
      <category>discuss</category>
    </item>
    <item>
      <title>What is Sql Constraints ?</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Sun, 12 Feb 2023 19:34:28 +0000</pubDate>
      <link>https://forem.com/mishraoct786/what-is-sql-constraints--345b</link>
      <guid>https://forem.com/mishraoct786/what-is-sql-constraints--345b</guid>
      <description>&lt;p&gt;SQL Constraint are used to implement business rules.&lt;br&gt;
Used to define rules to allow or restrict what values can be stored in columns.&lt;br&gt;
The purpose of inducing constraints is to enforce integrity of database.&lt;br&gt;
&lt;strong&gt;Type Of Constraints&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;NOT NULL&lt;/li&gt;
&lt;li&gt;UNIQUE&lt;/li&gt;
&lt;li&gt;PRIMARY KEY&lt;/li&gt;
&lt;li&gt;FOREIGN KEY or Referential Key&lt;/li&gt;
&lt;li&gt;CHECK&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Below details description on Type of SQL Constraints&lt;br&gt;
In table level constraints are declared after declaring all columns. Use table level when more than one column participates in constraint declaration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOT NULL&lt;/strong&gt;:&lt;br&gt;
NOT NULL constraint allows to specify that a column can not contain any NULL value.&lt;br&gt;
 NOT NULL can be used to CREATE and ALTER a table. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UNIQUE&lt;/strong&gt; :&lt;br&gt;
The UNIQUE constraint does not allow to insert a duplicate value in a column. &lt;br&gt;
More than one UNIQUE column can be used in a table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PRIMARY KEY&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;A PRIMARY KEY constraint enforces the table to accept unique data for a specific column &lt;br&gt;
and this constraint create a unique index for accessing the table faster. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FOREIGN KEY&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;A FOREIGN KEY in L creates a link between two tables by one specific column of both table.&lt;br&gt;
 The specified column in one table must be a PRIMARY KEY &lt;br&gt;
 and referred by the column of another table known as FOREIGN KEY.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CHECK&lt;/strong&gt;:  &lt;/p&gt;

&lt;p&gt;A CHECK constraint controls the values in the associated column. &lt;br&gt;
The CHECK constraint determines whether the value is valid &lt;br&gt;
or not from a logical expression.  &lt;/p&gt;

&lt;p&gt;This is Example primary key Constrains:&lt;/p&gt;

&lt;p&gt;CREATE TABLE Student(roll_no varchar(7),name varchar(20) ,address&lt;br&gt;
varchar(50) ,tot_marks int, branch varchar(6), PRIMARY KEY(roll_no));&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Conclusion *&lt;/em&gt;:&lt;br&gt;
Here we Learn What is Sql Constarints ?&lt;/p&gt;

&lt;p&gt;What is type of SQL Constraints?&lt;/p&gt;

&lt;p&gt;It Is clear we are using constraints to restrict certain activity on data of Table.&lt;/p&gt;

&lt;p&gt;If You have any doubt reach out to us&lt;/p&gt;

</description>
      <category>streaming</category>
      <category>api</category>
      <category>opensource</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>css interview questions and answers 2023 -dev.to</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Sun, 12 Feb 2023 19:27:13 +0000</pubDate>
      <link>https://forem.com/mishraoct786/css-interview-questions-and-answers-2023-devto-2ca3</link>
      <guid>https://forem.com/mishraoct786/css-interview-questions-and-answers-2023-devto-2ca3</guid>
      <description>&lt;ol&gt;
&lt;li&gt;What is Position related&lt;/li&gt;
&lt;li&gt;What is Pseudo css?&lt;/li&gt;
&lt;li&gt;What is the Box model in CSS?&lt;/li&gt;
&lt;li&gt;What are the advantages of using CSS?&lt;/li&gt;
&lt;li&gt;What are the limitations of CSS?&lt;/li&gt;
&lt;li&gt;What is CSS and how does it work with HTML?&lt;/li&gt;
&lt;li&gt;What are selectors and what are their different types?&lt;/li&gt;
&lt;li&gt;What is CSS selector specificity and how does it work?&lt;/li&gt;
&lt;li&gt;Describe z-index and how stacking context is formed.&lt;/li&gt;
&lt;li&gt;Describe BFC (Block Formatting Context) and how it works.&lt;/li&gt;
&lt;li&gt;Have you ever used a grid system, and if so, what do you prefer?&lt;/li&gt;
&lt;li&gt;Have you used or implemented media queries or mobile specific layouts/CSS?&lt;/li&gt;
&lt;li&gt;Explain how a browser determines what elements match a CSS selector.&lt;/li&gt;
&lt;li&gt;Describe pseudo-elements and discuss what they are used for.&lt;/li&gt;
&lt;li&gt;Explain your understanding of the box mode.&lt;/li&gt;
&lt;li&gt;What does * { box-sizing: border-box; } do? What are its advantages?&lt;/li&gt;
&lt;li&gt;What is the CSS display property and can you give a few examples of its use?&lt;/li&gt;
&lt;li&gt;What's the difference between inline and inline-block?&lt;/li&gt;
&lt;li&gt;What's the difference between the "nth-of-type()" and "nth-child()" selectors?&lt;/li&gt;
&lt;li&gt;What's the difference between a relative, fixed, absolute and statically positioned element?&lt;/li&gt;
&lt;li&gt;What existing CSS frameworks have you used locally, or in production? How would you change/improve them?&lt;/li&gt;
&lt;li&gt;Have you used CSS Grid?&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>welcome</category>
    </item>
    <item>
      <title>What is different type of Selector in CSS -dev.to</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Sun, 12 Feb 2023 19:22:49 +0000</pubDate>
      <link>https://forem.com/mishraoct786/what-is-different-type-of-selector-in-css-devto-49og</link>
      <guid>https://forem.com/mishraoct786/what-is-different-type-of-selector-in-css-devto-49og</guid>
      <description>&lt;h2&gt;
  
  
  What is different type of Selector in CSS
&lt;/h2&gt;

&lt;p&gt;Basically Cascading style sheet css used to design a font and color etc on html element therefore we need to specify target html element .&lt;/p&gt;

&lt;p&gt;So if you want to select or target HTML element ,following are selector  :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Universal selector&lt;/li&gt;
&lt;li&gt;Type selector&lt;/li&gt;
&lt;li&gt;class selector&lt;/li&gt;
&lt;li&gt;ID selector&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;** Introduction of Css and History of Css**&lt;br&gt;
Cascading Style Sheets (CSS) is a simple mechanism for adding style&lt;br&gt;
(e.g., fonts, colors, spacing) to Web documents&lt;/p&gt;

&lt;p&gt;Althrogh HTML isvery essentialto generate adding&lt;br&gt;
a web page bu their aresome important drawback which HTML&lt;br&gt;
suffer&lt;/p&gt;

&lt;p&gt;HTML has no style for layout&lt;br&gt;
Using HTML we can’t add position of element&lt;br&gt;
HTML does’t support for multiple unit like px ,em etc&lt;/p&gt;

&lt;p&gt;Background image display using HTML repeate itself&lt;/p&gt;

&lt;p&gt;To improve look and feel WC3 school launch a new language&lt;br&gt;
called css in year 1996 .&lt;/p&gt;

&lt;p&gt;The term css stand for Cascading Style Sheets&lt;br&gt;
It is purly a design language&lt;br&gt;
It only to handle look and feel of our page .&lt;/p&gt;

&lt;p&gt;This means that still we have to use HTML&lt;br&gt;
to process element but there presentation manage&lt;br&gt;
by CSS&lt;/p&gt;

&lt;p&gt;CSS Syntex :&lt;/p&gt;

&lt;p&gt;Selector { property : Value }&lt;/p&gt;

&lt;p&gt;“:+” single value&lt;/p&gt;

&lt;p&gt;As I mention CSS are provide below type selector which are :&lt;/p&gt;

&lt;p&gt;Universal selector : This selector are apply to all element of Html. &lt;br&gt;
Type selector : This selector are apply to  particular HTML tag.&lt;br&gt;
Class selector :This selector are apply on same value of class attriute.&lt;br&gt;
ID selector : This selector are apply on attribute of  ID of Html element &lt;/p&gt;

</description>
      <category>productivity</category>
      <category>scalability</category>
      <category>leadership</category>
      <category>career</category>
    </item>
    <item>
      <title>Learn CSS - dev.to</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Sun, 12 Feb 2023 19:15:08 +0000</pubDate>
      <link>https://forem.com/mishraoct786/learn-css-devto-k14</link>
      <guid>https://forem.com/mishraoct786/learn-css-devto-k14</guid>
      <description>&lt;h2&gt;
  
  
  How to Write CSS
&lt;/h2&gt;

&lt;p&gt;If you familiar with HTML syntax will notice that CSS syntax looks a different in nature.&lt;br&gt;
CSS is apply on HTML tags.Learning css is much easier.&lt;br&gt;
There is multiple method to apply CSS in HTML,Instead of listing page content, CSS lists the style rules that are assigned to HTML elements,&lt;br&gt;
CSS is apply on entire HTML document, or even multiple HTML documents.&lt;br&gt;
These rules are processed by the web browser loading the HTML file.So you can say our bowser (chrome, Edge ,Mozilla ) contain compiler for CSS.&lt;br&gt;
CSS Comments&lt;br&gt;
Similarly with HTML, you can write comments in CSS. Comments are ignored by the browser and are useful in providing context and meaning and functionality notes for your code.&lt;br&gt;
To comment in CSS, write /*, then your comment text, then end with */.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is CSS Used For in development ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The CSS is provide design , animation and position to web application as we know CSS would look as graphic property as well. To illustrate, our HTML Element on website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a CSS Selector?&lt;/strong&gt; &lt;br&gt;
Here i describe full explaination of CSS Selector.i.e  CSS Selector.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is CSS style declaration?&lt;/strong&gt;&lt;br&gt;
This means that still we have to use HTML to process element but there presentation manage by CSS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Syntex :&lt;/strong&gt;&lt;br&gt;
Selector { property : Value }&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a CSS Style property?&lt;/strong&gt;&lt;br&gt;
A CSS property is a characteristic (like color, animation , position) whose connect value defines one aspect of how the browser compile and display the element after changes.&lt;/p&gt;

&lt;p&gt;There are CSS properties are follow that you can use to style a html element :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Float&lt;/li&gt;
&lt;li&gt;Clear&lt;/li&gt;
&lt;li&gt;Overflow&lt;/li&gt;
&lt;li&gt;Text-transform&lt;/li&gt;
&lt;li&gt;Z-index&lt;/li&gt;
&lt;li&gt;Font-size&lt;/li&gt;
&lt;li&gt;Background-color&lt;/li&gt;
&lt;li&gt;Width&lt;/li&gt;
&lt;li&gt;Height&lt;/li&gt;
&lt;li&gt;Border&lt;/li&gt;
&lt;li&gt;Padding&lt;/li&gt;
&lt;li&gt;Margins&lt;/li&gt;
&lt;li&gt;Font-family&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Below is an example of a basic  CSS  that would print the words Hello World.&lt;/p&gt;


&lt;br&gt;
    &lt;br&gt;
        My CSS experiment&lt;br&gt;
        &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
      &lt;h1&gt;Hello World!&lt;/h1&gt;
&lt;br&gt;
      &lt;p&gt;This is my first CSS example&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;


&lt;p&gt;Mandatory Tools you will need to install before work on Css or HTML and javascript.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;you will need a Pentium 200-MHz computer with a minimum of 128 MB of RAM.&lt;/li&gt;
&lt;li&gt;Linux 7.1 or Windows 95/98/2000/XP operating system.&lt;/li&gt;
&lt;li&gt;chrome browser.&lt;/li&gt;
&lt;li&gt;Microsoft Notepad or any other text editor or any tool like visual studio.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>jokes</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>Scala class inherit or extend another case class not possible</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Fri, 20 Jan 2023 10:52:16 +0000</pubDate>
      <link>https://forem.com/mishraoct786/scala-class-inherit-or-extend-another-case-class-not-possible-4i7i</link>
      <guid>https://forem.com/mishraoct786/scala-class-inherit-or-extend-another-case-class-not-possible-4i7i</guid>
      <description>&lt;h1&gt;
  
  
  Scala case class inherit , #extend , #case class , #case class #inheritance #code #coding_question
&lt;/h1&gt;

&lt;p&gt;It is not possible that we can not inherite another case class .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you want to inherite then you can create Trait&lt;/strong&gt;&lt;br&gt;
Here we create Student Trait&lt;br&gt;
case class Student(identifier: String) {}&lt;/p&gt;

&lt;p&gt;case class SportTeam (salary: Long) extends student&lt;br&gt;
Here we define a Student&lt;br&gt;
trait Student{ def identifier: String }&lt;/p&gt;

&lt;p&gt;Here we create class which is extends Student&lt;br&gt;
case class SportTeam(identifier: String, salary: Long) extends Student&lt;/p&gt;

&lt;h2&gt;
  
  
  Case classs not able to extend of another case class because of following -
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;It led to wrong circumstances and unexpected behaviour.&lt;/li&gt;
&lt;li&gt;It produce issue in multiple problems in the pattern matcher.&lt;/li&gt;
&lt;li&gt;Case class most consistent with inheritance would violate the spec.&lt;/li&gt;
&lt;li&gt;Scala doesn’t generate a copy method if one already exists in the class/traits the case class inherits.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>discuss</category>
      <category>devmeme</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>Interview questions for sql queries 2023</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Sun, 15 Jan 2023 12:45:20 +0000</pubDate>
      <link>https://forem.com/mishraoct786/interview-questions-for-sql-queries-2023-1no0</link>
      <guid>https://forem.com/mishraoct786/interview-questions-for-sql-queries-2023-1no0</guid>
      <description>&lt;p&gt;If you want to improve SQL skills, then install a SQL package like MySQL and start practicing with it. To get you started, we’ve outlined a few SQL query questions in this post.&lt;br&gt;
The interview questions for sql queries we’ve filtered out of interviews held by top IT MNC like Flipkart and Amazon. So you’ll gain real-time experience by going through them.&lt;br&gt;
Interview questions for sql queries is contain easy to hard variety of question and now a days windowing function is necessary in advance SQL queries&lt;/p&gt;

&lt;p&gt;If you interested to grap a command on SQL ,we providing sql test questions and answers which is easy to help in crack interview exam and sql technical exam. Here we have example of emp and dept table in mysql . emp table in sql contain data of his employee . check out employee and department table queries in mysql&lt;/p&gt;

&lt;h4&gt;
  
  
  The MySQL schema for this database
&lt;/h4&gt;

&lt;p&gt;DROP TABLE IF EXISTS dept;&lt;br&gt;
DROP TABLE IF EXISTS salgrade;&lt;br&gt;
DROP TABLE IF EXISTS emp;&lt;/p&gt;

&lt;p&gt;CREATE TABLE salgrade(&lt;br&gt;
grade int(4) not null primary key,&lt;br&gt;
losal decimal(10,2),&lt;br&gt;
hisal decimal(10,2));&lt;/p&gt;

&lt;p&gt;CREATE TABLE dept(&lt;br&gt;
deptno int(2) not null primary key,&lt;br&gt;
dname varchar(50) not null,&lt;br&gt;
location varchar(50) not null);&lt;/p&gt;

&lt;p&gt;CREATE TABLE emp(&lt;br&gt;
empno int(4) not null primary key,&lt;br&gt;
ename varchar(50) not null,&lt;br&gt;
job varchar(50) not null,&lt;br&gt;
mgr int(4),&lt;br&gt;
hiredate date,&lt;br&gt;
sal decimal(10,2),&lt;br&gt;
comm decimal(10,2),&lt;br&gt;
deptno int(2) not null);&lt;/p&gt;

&lt;h4&gt;
  
  
  insert data in dept table
&lt;/h4&gt;

&lt;p&gt;insert into dept values (20,'Research','Dallas');&lt;/p&gt;

&lt;p&gt;insert into dept values (30,'Sales','Chicago');&lt;/p&gt;

&lt;p&gt;insert into dept values (40,'Operations','Boston');&lt;/p&gt;

&lt;h4&gt;
  
  
  Insert data in emp table
&lt;/h4&gt;

&lt;p&gt;insert into emp values (7369,'SMITH','CLERK',7902,'93/6/13',800,0.00,20);&lt;/p&gt;

&lt;p&gt;insert into emp values (7499,'ALLEN','SALESMAN',7698,'98/8/15',1600,300,30);&lt;/p&gt;

&lt;p&gt;insert into emp values (7521,'WARD','SALESMAN',7698,'96/3/26',1250,500,30);&lt;/p&gt;

&lt;p&gt;insert into emp values (7566,'JONES','MANAGER',7839,'95/10/31',2975,null,20);&lt;/p&gt;

&lt;p&gt;insert into emp values (7698,'BLAKE','MANAGER',7839,'92/6/11',2850,null,30);&lt;/p&gt;

&lt;p&gt;insert into emp values (7782,'CLARK','MANAGER',7839,'93/5/14',2450,null,10);&lt;/p&gt;

&lt;p&gt;insert into emp values (7788,'SCOTT','ANALYST',7566,'96/3/5',3000,null,20);&lt;/p&gt;

&lt;p&gt;insert into emp values (7839,'KING','PRESIDENT',null,'90/6/9',5000,0,10);&lt;/p&gt;

&lt;p&gt;insert into emp values (7844,'TURNER','SALESMAN',7698,'95/6/4',1500,0,30);&lt;/p&gt;

&lt;p&gt;insert into emp values (7876,'ADAMS','CLERK',7788,'99/6/4',1100,null,20);&lt;/p&gt;

&lt;p&gt;insert into emp values (7900,'JAMES','CLERK',7698,'00/6/23',950,null,30);&lt;/p&gt;

&lt;p&gt;insert into emp values (7934,'MILLER','CLERK',7782,'00/1/21',1300,null,10);&lt;/p&gt;

&lt;p&gt;insert into emp values (7902,'FORD','ANALYST',7566,'97/12/5',3000,null,20);&lt;/p&gt;

&lt;p&gt;insert into emp values (7654,'MARTIN','SALESMAN',7698,'98/12/5',1250,1400,30);&lt;/p&gt;

&lt;h3&gt;
  
  
  Insert data into salgrade table
&lt;/h3&gt;

&lt;p&gt;insert into salgrade values (1,700,1200);&lt;/p&gt;

&lt;p&gt;insert into salgrade values (2,1201,1400);&lt;/p&gt;

&lt;p&gt;insert into salgrade values (3,1401,2000);&lt;/p&gt;

&lt;p&gt;insert into salgrade values (4,2001,3000);&lt;/p&gt;

&lt;p&gt;insert into salgrade values (5,3001,99999);&lt;/p&gt;

&lt;p&gt;Q.1 Write an SQL query to print the first three characters of ename from emp table&lt;br&gt;
Select substring(ename ,1,3) from emp;&lt;/p&gt;

&lt;p&gt;Q.2 Write an SQL query to print the ename from Worker table after removing white spaces from the right side.&lt;br&gt;
Select LTRIM(ename) from emp;&lt;/p&gt;

&lt;p&gt;Q.3 Write an SQL query to print the job from Worker table after removing white spaces from the left side&lt;br&gt;
Select LTRIM(job ) from emp;&lt;/p&gt;

&lt;p&gt;Q.4 Write an SQL query that fetches the unique values of job from emp table and prints its length.&lt;br&gt;
Select distinct length(job ) from emp ;&lt;/p&gt;

&lt;p&gt;Q.5 Write an SQL query to print all emp details from the emp table order by ename Ascending.&lt;br&gt;
Select * from emp order by ename asc;&lt;/p&gt;

&lt;p&gt;Q.6 Write an SQL query to print details for emp with the ename as “ADAMS” and “JAMES” from emp table.&lt;br&gt;
Select * from emp where ename in ('Vipul','Satish');&lt;/p&gt;

&lt;p&gt;Q.7 Write an Query print sum of salary based on department ?&lt;br&gt;
selet sum(Sal) ,deptno from emp group by deptno having sum(sal) &amp;gt; 5000&lt;/p&gt;

&lt;p&gt;Q.8 Write an Query print sum of Salary based on job and also print ename ,job&lt;/p&gt;

&lt;p&gt;select ename ,job, salary from emp b&lt;br&gt;
inner join&lt;br&gt;
(select sum(Sal) as salary ,job from emp group by job ) a&lt;br&gt;
on b.job = a.job&lt;/p&gt;

&lt;p&gt;Q.9 Write an Query select depart name is not present in emp table&lt;/p&gt;

&lt;p&gt;select b.dname , b.location form emp a&lt;br&gt;
left outer join dept b&lt;br&gt;
on b.deptno = a.deptno&lt;br&gt;
where a.deptno is null&lt;/p&gt;

&lt;p&gt;Q.10 Write an SQL query to print details of emp with Job name as "CLERK".&lt;br&gt;
Select * from emp where job like 'CLERK%';&lt;/p&gt;

&lt;p&gt;Q.11 Write an SQL query to print details of the emps whose ename contains ‘a’.&lt;br&gt;
Select * from emp where ename like '%a%';&lt;/p&gt;

&lt;p&gt;Q.12. Write an SQL query to print details of the empswhose ename ends with ‘a’.&lt;br&gt;
Select * from emp where ename like '%a';&lt;/p&gt;

&lt;p&gt;Q.13. Write an SQL query to print details of the emp whose ename ends with ‘h’ and contains six alphabets.&lt;br&gt;
Select * from emp where ename like '_____h';&lt;/p&gt;

&lt;p&gt;Q.14. Write an SQL query to print details of the emps whose SALARY lies between 100000 and 500000.&lt;br&gt;
Select * from emp where sal between 100000 and 500000;&lt;/p&gt;

&lt;p&gt;Q.15. Write an SQL query to print details of the emps who have joined in Feb’2014.&lt;br&gt;
Select * from emp where year(hiredate) = 2014 and month(hiredate) = 2;&lt;/p&gt;

&lt;p&gt;Q.16. Write an SQL query to fetch the count of employees working in the job ‘CLERK’.&lt;br&gt;
SELECT COUNT(*) FROM emp WHERE DEPARTMENT = 'CLERK';&lt;/p&gt;

&lt;p&gt;Q.17Write an SQL query to fetch the no. of emp for each Job in the descending order.&lt;br&gt;
SELECT DEPARTMENT, count(WORKER_ID) No_Of_Workers&lt;br&gt;
FROM worker&lt;br&gt;
GROUP BY DEPARTMENT&lt;br&gt;
ORDER BY No_Of_Workers DESC;&lt;/p&gt;

&lt;p&gt;Q.18 Write an SQL query to fetch duplicate records having matching data in some fields of a table.&lt;br&gt;
SELECT ename , COUNT(&lt;em&gt;)&lt;br&gt;
FROM emp&lt;br&gt;
GROUP BY ename&lt;br&gt;
HAVING COUNT(&lt;/em&gt;) &amp;gt; 1;&lt;/p&gt;

&lt;p&gt;Q.19 Write an SQL query to clone a new table from another table.&lt;br&gt;
SELECT * INTO empClone FROM Worker;&lt;/p&gt;

&lt;p&gt;Q.20 The general way to clone a table without information is:&lt;br&gt;
SELECT * INTO empClone FROM Worker WHERE 1 = 0;&lt;/p&gt;

&lt;p&gt;Q.21 Write an SQL query to fetch intersecting records of two tables.&lt;br&gt;
(SELECT * FROM emp)&lt;br&gt;
INTERSECT&lt;br&gt;
(SELECT * FROM EmpClone);&lt;/p&gt;

&lt;p&gt;Q.22 Following MySQL query returns the current date:&lt;br&gt;
SELECT CURDATE();&lt;/p&gt;

&lt;p&gt;Q.21 Following MySQL query returns the current date and time:&lt;br&gt;
SELECT NOW();&lt;/p&gt;

&lt;p&gt;Q.23 Following SQL Server query returns the current date and time:&lt;br&gt;
SELECT getdate();&lt;/p&gt;

&lt;p&gt;Q.24 Following Oracle query returns the current date and time:&lt;br&gt;
SELECT SYSDATE FROM DUAL;&lt;/p&gt;

&lt;p&gt;Q.25. Write an SQL query to show the top n (say 10) records of a table.&lt;br&gt;
SELECT * FROM Worker ORDER BY Salary DESC LIMIT 10;&lt;/p&gt;

&lt;p&gt;Q.26 Following SQL Server query will return the top n records using the TOP command:&lt;br&gt;
SELECT TOP 10 * FROM Worker ORDER BY Salary DESC;&lt;/p&gt;

&lt;p&gt;Q.27 Following Oracle query will return the top n records with the help of ROWNUM:&lt;br&gt;
SELECT * FROM (SELECT * FROM Worker ORDER BY Salary DESC)&lt;br&gt;
WHERE ROWNUM &amp;lt;= 10;&lt;/p&gt;

&lt;p&gt;Q.28 How can we avoid duplicating records in a query?&lt;br&gt;
SELECT distinct * FROM Worker&lt;br&gt;
OR&lt;br&gt;
SELECT count(*),ename FROM Worker group by ename&lt;br&gt;
The SELECT DISTINCT statement is used to return only distinct (different) values. Inside a table, a column often contains many duplicate values;&lt;br&gt;
In Group by taking column name and provide us disctinct result based on Column value.&lt;/p&gt;

&lt;p&gt;Q.29 Explain the difference between Rename and Alias.&lt;br&gt;
RENAME TABLE emp TO emp_old, emp_new TO emp;&lt;br&gt;
Or&lt;br&gt;
An alias is created with the AS keyword.&lt;br&gt;
SELECT ename AS EmployeeName FROM Emp&lt;/p&gt;

&lt;p&gt;Q.30 What is schema?&lt;br&gt;
In a SQL database, a schema is represent a list of logical structures of data. A database user owns the schema,It can be single or multiple . depend upon requirment . which has the same name as the database manager. As of SQL Server 2005, a schema is an individual entity (container of objects) distinct from the user who constructs the object.&lt;/p&gt;

&lt;p&gt;Q.31 View contain Data?&lt;br&gt;
No ,It is contain virtual represtation of data, with cutomize out put.&lt;br&gt;
Answer: No, Views are virtual structures.&lt;/p&gt;

&lt;p&gt;Q.32 Can a View be based on another View?&lt;br&gt;
Answer: Yes, A View is based on another View.&lt;/p&gt;

&lt;p&gt;Q.33 What is CTE?&lt;br&gt;
Answer: A CTE or common table expression is an expression that contains a temporary result set which is defined in a SQL statement.&lt;/p&gt;

&lt;p&gt;Q-34. Write an SQL query to print the name of employees having the highest salary in each department.&lt;br&gt;
Ans.&lt;br&gt;
The required query is:&lt;/p&gt;

&lt;p&gt;SELECT t.dname ,&lt;br&gt;
t.ename,&lt;br&gt;
t.sal as salary,&lt;br&gt;
from(SELECT max(sal) as&lt;br&gt;
TotalSalary,dname from dept group by deptno ) as TempNew&lt;br&gt;
Inner Join emp t on TempNew.deptno =t.deptno&lt;br&gt;
and TempNew.TotalSalary=t.sal;&lt;/p&gt;

&lt;p&gt;Q-35 Write an SQL query to fetch three max salaries from a table of employee.&lt;br&gt;
Ans.&lt;br&gt;
SELECT distinct Salary&lt;br&gt;
from emp&lt;br&gt;
a WHERE 3 &amp;gt;= (SELECT&lt;br&gt;
count(distinct Salary) from emp b&lt;br&gt;
WHERE a.Salary &amp;lt;= b.Salary)&lt;br&gt;
order by a.Salary desc;&lt;/p&gt;

&lt;p&gt;Q-36 Write an SQL query to fetch three min salaries from a table of employee.&lt;br&gt;
Answer&lt;br&gt;
SELECT distinct sal&lt;br&gt;
from emp a&lt;br&gt;
WHERE 3 &amp;gt;= (SELECT count(distinct Salary)&lt;br&gt;
from worker b&lt;br&gt;
WHERE a.Salary &amp;gt;= b.Salary)&lt;br&gt;
order by a.Salary desc;&lt;/p&gt;

&lt;p&gt;Q-37 Write an SQL query to fetch nth max salaries from a table of employee.&lt;br&gt;
Answer&lt;br&gt;
SELECT distinct Salary&lt;br&gt;
from worker a&lt;br&gt;
WHERE n &amp;gt;= (SELECT count(distinct Salary)&lt;br&gt;
from worker b&lt;br&gt;
WHERE a.Salary &amp;lt;= b.Salary)&lt;br&gt;
order by a.Salary desc;&lt;/p&gt;

&lt;p&gt;Q-38 Write an SQL query to fetch the names of employee who earn the highest salary in table :&lt;br&gt;
Answer:&lt;br&gt;
SELECT ename, sal&lt;br&gt;
from emp&lt;br&gt;
WHERE sal=(SELECT max(sal) from emp);&lt;/p&gt;

&lt;p&gt;Q-39 Select the department name of the company which is assigned to the employee whose employee id is grater 103&lt;br&gt;
Answer : select dname from empdept where deptno in (select dept from emp where empid&amp;gt;103)&lt;/p&gt;

&lt;p&gt;Q-40 Select the name of the employee who is working under shubham.&lt;br&gt;
Answer :select ename from emp where mgr =(select empid from employee where empname='shubham')&lt;/p&gt;

&lt;p&gt;Q-41 Select the name of the employee who is department head of HR.&lt;br&gt;
Answer : select ename from emp where empno =(select mgr from dept where dname='hr')&lt;/p&gt;

&lt;p&gt;Q-42 select the details of all employee working in development department.&lt;br&gt;
Answer : select * from emp where deptno in(select deptno from dept where dname='development')&lt;/p&gt;

&lt;p&gt;Q-43 Write an SQL query to delete only emp table data.&lt;br&gt;
Ans. We can use the TRUNCATE query to delete data from the SQL database table.&lt;br&gt;
TRUNCATE TABLE emp;&lt;/p&gt;

&lt;p&gt;Q-44 Write an SQL query for removing duplicates from a table without using a temporary table.&lt;/p&gt;

&lt;p&gt;DELETE FROM StudentStipend&lt;br&gt;
WHERE StudId IN (&lt;br&gt;
SELECT StudId&lt;br&gt;
FROM StudentStipend&lt;br&gt;
GROUP BY Project, Stipend&lt;br&gt;
HAVING COUNT(*) &amp;gt; 1));&lt;/p&gt;

&lt;p&gt;Q-45 Write an SQL query for creating a new table with data and structure copied from another table.&lt;br&gt;
Ans. We can perform the required operation using the SELECT INTO query.&lt;br&gt;
SELECT * INTO newTable FROM StudentDetails;&lt;/p&gt;

&lt;p&gt;Q-46 Write an SQL query for finding current date-time.&lt;br&gt;
Ans. SQL queries for various Databases are as described below.&lt;br&gt;
SQL Query In Oracle&lt;br&gt;
SELECT SYSDATE FROM DUAL;&lt;/p&gt;

&lt;p&gt;Q-47 SQL Query In SQL Server&lt;br&gt;
SELECT getdate();&lt;/p&gt;

&lt;p&gt;Q-48 SQL Query In MySQL&lt;br&gt;
SELECT NOW();&lt;/p&gt;

&lt;p&gt;Q-49 Using limit clause(MySQL)&lt;br&gt;
SELECT ename FROM emp ORDER BY ename DESC LIMIT N-1,1;&lt;/p&gt;

&lt;p&gt;Q-50 How to display Date in DD-MON-YYYY Employee table?&lt;br&gt;
Answer: Select to_date (Hire_date,’DD-MON-YYYY’) Date_Format from Employee;&lt;/p&gt;

&lt;p&gt;Q-51 Write SQL query for fetching top n records using LIMIT in emp table ?&lt;br&gt;
Ans. SQL queries for fetching top n records using LIMIT for various Databases are as described below.&lt;br&gt;
In MySQL in emp table&lt;br&gt;
SELECT * FROM emp ORDER BY ename DESC LIMIT N;&lt;/p&gt;

&lt;p&gt;In SQL server using the TOP command&lt;br&gt;
SELECT TOP N * FROM emp ORDER BY ename DESC&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Here in this Article We can see sql questions practice Details of list of basic sql practical questions . sql query questions is help you to start your learning in sql . We also provide you question of emp and dept table in mysql. sql queries interview questions&lt;/p&gt;

</description>
      <category>sql</category>
      <category>interview</category>
      <category>sqlquestion</category>
      <category>query</category>
    </item>
    <item>
      <title>Hadoop HDFS Commands</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Sat, 14 Jan 2023 05:54:48 +0000</pubDate>
      <link>https://forem.com/mishraoct786/hadoop-hdfs-commands-dfn</link>
      <guid>https://forem.com/mishraoct786/hadoop-hdfs-commands-dfn</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hadoop HDFS Commands&lt;/strong&gt;&lt;br&gt;
Most of the commands in FS shell behave like corresponding Unix commands. Differences are described with each of the commands. Error information is sent to stderr and the output is sent to stdout.&lt;/p&gt;

&lt;p&gt;We will start with some very basic help commands of hadoop and go into more detail as we go through this lesson.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HDFS Commands&lt;/strong&gt;&lt;br&gt;
fsck&lt;br&gt;
HDFS Command to check the health of the Hadoop file system.&lt;br&gt;
Command: hdfs fsck /&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ls&lt;/strong&gt;&lt;br&gt;
HDFS Command to display the list of Files and Directories in HDFS.&lt;br&gt;
Command: hdfs dfs –ls /&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mkdir&lt;/strong&gt;&lt;br&gt;
HDFS Command to create the directory in HDFS.&lt;br&gt;
Command: hdfs dfs –mkdir /new_deveoperIndian&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;touchz&lt;/strong&gt;&lt;br&gt;
HDFS Command to create a file in HDFS with file size 0 bytes.&lt;br&gt;
command: hdfs dfs –touchz /directory/new_deveoperIndian&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;du&lt;/strong&gt;&lt;br&gt;
HDFS Command to check the file size.Command:&lt;br&gt;
hdfs dfs –du –s /new_developerIndian/testfile&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cat&lt;/strong&gt;&lt;br&gt;
HDFS Command that reads a file on HDFS and prints the content of that file to the console as output.&lt;br&gt;
Command: hdfs dfs –cat /new_developerIndian/testfile&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;text&lt;/strong&gt;&lt;br&gt;
HDFS Command that takes a source file and outputs the file in text format.&lt;br&gt;
Command: hdfs dfs –text /new_developerIndian/testfile&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;copyFromLocal&lt;/strong&gt;&lt;br&gt;
HDFS Command to copy the file from a Local file system to HDFS.&lt;br&gt;
Command: hdfs dfs –copyFromLocal /home/edureka/test /new_developerIndian&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;copyToLocal&lt;/strong&gt;&lt;br&gt;
HDFS Command to copy the file from HDFS to Local File System.&lt;br&gt;
Command: hdfs dfs –copyToLocal /new_developerIndian/test /home/developerIndian&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;put&lt;/strong&gt;&lt;br&gt;
HDFS Command to copy single source or multiple sources from local file system to the destination file system.&lt;br&gt;
Command: hdfs dfs –put /home/edureka/test /user&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;get&lt;/strong&gt;&lt;br&gt;
HDFS Command to copy files from hdfs to the local file system.&lt;br&gt;
Command: hdfs dfs –get /user/test /home/developerIndian&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;count&lt;/strong&gt;&lt;br&gt;
HDFS Command to count the number of directories, files, and bytes under the paths that match the specified file pattern.&lt;br&gt;
Command: hdfs dfs –count /user&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;rm&lt;/strong&gt;&lt;br&gt;
HDFS Command to remove the file from HDFS.&lt;br&gt;
Command: hdfs dfs –rm /new_developerIndian/test&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;rm -r&lt;/strong&gt;&lt;br&gt;
HDFS Command to remove the entire directory and all of its content from HDFS.&lt;br&gt;
Command: hdfs dfs -rm -r /new_developerIndian&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cp&lt;/strong&gt;&lt;br&gt;
HDFS Command to copy files from source to destination. This command allows multiple sources as well, in which case the destination must be a directory.&lt;br&gt;
Command: hdfs dfs -cp /user/hadoop/file1 /user/hadoop/file2&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mv&lt;/strong&gt;&lt;br&gt;
HDFS Command to move files from source to destination. This command allows multiple sources as well, in which case the destination needs to be a directory.&lt;br&gt;
Command: hdfs dfs -mv /user/hadoop/file1 /user/hadoop/file2&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;expunge&lt;/strong&gt;&lt;br&gt;
HDFS Command that makes the trash empty.&lt;br&gt;
Command: hdfs dfs -expunge&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;rmdir&lt;/strong&gt;&lt;br&gt;
HDFS Command to remove the directory.&lt;br&gt;
Command: hdfs dfs –rmdir /user/hadoop&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;usage&lt;/strong&gt;&lt;br&gt;
HDFS Command that returns the help for an individual command.&lt;br&gt;
Command: hdfs dfs -usage mkdir&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;help&lt;/strong&gt;&lt;br&gt;
HDFS Command that displays help for given command or all commands if none is specified.&lt;br&gt;
Command: hdfs dfs -help&lt;/p&gt;

&lt;p&gt;Uese of Hadoop HDFS&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hdfs is used for Very Large Files&lt;/li&gt;
&lt;li&gt;HDF work with Streaming Data Access&lt;/li&gt;
&lt;li&gt;It is support low cost hardware.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>hadoop</category>
      <category>command</category>
      <category>spark</category>
      <category>sql</category>
    </item>
    <item>
      <title>Type of data in hadoop</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Sat, 14 Jan 2023 05:17:00 +0000</pubDate>
      <link>https://forem.com/mishraoct786/type-of-big-data-hadoop-1hb4</link>
      <guid>https://forem.com/mishraoct786/type-of-big-data-hadoop-1hb4</guid>
      <description>&lt;p&gt;First developed by Doug Cutting and Mike Cafarella in 2005, Licence umder forApache License 2.0&lt;br&gt;
Apache Hadoopis an open source software framework for storage and large scale processing of data-sets on clusters of commodity hardware. The Hadoop Distributed File System (HDFS) is Hadoop's storage layer. Housed on multiple servers, data is divided into blocks based on file size. These blocks are then randomly distributed and stored across slave machines. HDFS in Hadoop Architecture divides large data into different blocks&lt;br&gt;
Cloudera HadoopCloudera's open source platform, is the most popular distribution of Hadoop and related projects in the world .&lt;/p&gt;

&lt;p&gt;** What is big data ?&lt;br&gt;
**&lt;br&gt;
Big Data is a collection of data that is huge in volume, yet growing exponentially with time. It is a data with so large size and complexity that none of traditional data management tools can store it or process it efficiently. Big data is also a data but with huge size. For this we can useApache Hadoopandcloudera hadoop&lt;/p&gt;

&lt;h2&gt;
  
  
  Type of  data used in big data(Apache Hadoop / Spark)?
&lt;/h2&gt;

&lt;p&gt;**Structured –&lt;br&gt;
**that which can be stored in rows and columns like relational data sets&lt;/p&gt;

&lt;p&gt;Unstructured – data that cannot be stored in rows and columns like video, images, etc.&lt;br&gt;
Semi-structured – data in XML that can be read by machines and human&lt;br&gt;
Unstructured&lt;br&gt;
Structured –that which can be stored in rows and columns like relational data sets&lt;/p&gt;

&lt;p&gt;**Semi-structured&lt;br&gt;
**Unstructured – data that cannot be stored in rows and columns like video, images, etc.&lt;/p&gt;

&lt;p&gt;Lights&lt;br&gt;
Semi-structured – data in XML that can be read by machines and human&lt;/p&gt;

&lt;h2&gt;
  
  
  About Apache Hadoop
&lt;/h2&gt;

&lt;p&gt;Hadoop is the most important framework for working with Big Data. The biggest strength of Hadoop is scalability. It can upgrade from working on a single node to thousands of nodes without any issue in a seamless manner.&lt;br&gt;
Advantages of hadoop&lt;br&gt;
Apache hadoopstores data in a distributed fashion, which allows data to be processed distributedly on a cluster of nodes&lt;/p&gt;

&lt;p&gt;In short, we can say thatApache hadoopis an open-source framework. Hadoop is best known for its fault tolerance and high availability feature&lt;br&gt;
Apache hadoopclusters are scalable.&lt;br&gt;
TheApache hadoopframework is easy to use.&lt;br&gt;
In HDFS, the fault tolerance signifies the robustness of the system in the event of failure. The HDFS is highly fault-tolerant that if any machine fails, the other machine containing the copy of that data automatically become active.&lt;/p&gt;

</description>
      <category>bigdata</category>
      <category>hadoop</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Hadoop hdfs</title>
      <dc:creator>shubham mishra</dc:creator>
      <pubDate>Fri, 13 Jan 2023 20:03:12 +0000</pubDate>
      <link>https://forem.com/mishraoct786/hadoop-hdfs-command-2jch</link>
      <guid>https://forem.com/mishraoct786/hadoop-hdfs-command-2jch</guid>
      <description>&lt;p&gt;The File System (FS) shell includes various shell-like commands that directly interact with the Hadoop Distributed File System (HDFS) as well as other file systems that Hadoop supports, such as Local FS, WebHDFS, S3 FS, and others. The FS shell is invoked by:&lt;/p&gt;

&lt;p&gt;**Hadoop HDFS Commands&lt;br&gt;
**Most of the commands in FS shell behave like corresponding Unix commands. Differences are described with each of the commands. Error information is sent to stderr and the output is sent to stdout.&lt;/p&gt;

&lt;p&gt;If HDFS is being used, hdfs dfs is a synonym. Relative paths can be used. For HDFS, the current working directory is the HDFS home directory /user/ that often has to be created manually. The HDFS home directory can also be implicitly accessed, e.g., when using the HDFS trash folder, the .Trash directory in the home directory.&lt;/p&gt;

&lt;p&gt;We will start with some very basic help commands and go into more detail as we go through this lesson.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;fsck&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ls&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mkdir&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;touchz&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;du&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;cat&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;text&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;copyFromLocal&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;copyToLocal&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;put&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;get&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;count&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rm&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rm -r&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;cp&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mv&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;expunge&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rmdir&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;usage&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;help&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>hadoop</category>
      <category>command</category>
      <category>example</category>
      <category>hive</category>
    </item>
  </channel>
</rss>
