

{"id":11520,"date":"2018-03-28T06:21:51","date_gmt":"2018-03-28T06:21:51","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=11520"},"modified":"2021-05-09T13:11:18","modified_gmt":"2021-05-09T07:41:18","slug":"impala-shell-command","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/","title":{"rendered":"Impala Shell Command &#8211; Types of Impala Commands"},"content":{"rendered":"<p><span style=\"font-weight: 400\">In this <strong>Impala<\/strong> Shell tutorial, we will learn the\u00a0<\/span><span style=\"font-weight: 400\">Impala Shell Command.<\/span><span style=\"font-weight: 400\">\u00a0Moreover, we will study different types of Shell Commands in Impala:\u00a0<\/span><span style=\"font-weight: 400\">Table and Database specific options,\u00a0<\/span><span style=\"font-weight: 400\">General Commands, and\u00a0<\/span><span style=\"font-weight: 400\">Query specific options. <\/span><\/p>\n<p><span style=\"font-weight: 400\">In addition we will see the various Impala Commands from this Impala Shell Commands.\u00a0<\/span><\/p>\n<p>So, let&#8217;s start Impala Shell Commands.<\/p>\n<h2><span style=\"font-weight: 400\">What is Impala Shell Command?<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Basically, to set up databases and tables, insert data, and issue queries, we can use the Impala shell tool (impala-shell).<\/span> Moreover, we can submit SQL statements in an interactive session for ad hoc queries and exploration.<\/p>\n<p>Also, to process a single statement or a script file or to process a single statement or a script file we can specify command-line options.<\/p>\n<p><span style=\"font-weight: 400\">In addition, it supports all the same SQL statements listed in Impala SQL Statements along with some shell-only commands. Hence, \u00a0that we can use for tuning performance and diagnosing problems.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Starting Impala Shell<\/span><\/h2>\n<p><span style=\"font-weight: 400\">In order to start the Impala shell.<\/span>\u00a0Thus, follow several steps;<\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">At first, Open the Cloudera terminal.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Afterward, sign in as superuser.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Then, type Cloudera as password<\/span><\/li>\n<\/ul>\n<p>as shown below.<br \/>\n<span style=\"font-weight: 400\">[cloudera@quickstart ~]$ su<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Password: cloudera<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">[root@quickstart cloudera]#<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Start Impala shell by typing the following command \u2212<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">[root@quickstart cloudera] # impala-shell <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Starting Impala Shell without Kerberos authentication <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Connected to quickstart.cloudera:21000 <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Server version: impalad version 2.3.0-cdh5.5.0 RELEASE <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">(build 0c891d79aa38f297d244855a32f1e17280e2129b)<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">********************************************************************* <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Welcome to the Impala shell. Copyright (c) 2015 Cloudera, Inc. All rights reserved.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">(Impala Shell v2.3.0-cdh5.5.0 (0c891d7) built on Mon Nov 9 12:18:12 PST 2015)<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Want to know what version of Impala you&#8217;re connected to? Run the VERSION command to <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">find out! <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">********************************************************************* <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">[quickstart.cloudera:21000] &gt;<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Impala Command Reference<\/span><\/h2>\n<p><span style=\"font-weight: 400\">However, we can categorize the Impala Shell Commands in 3 ways.<\/span> Such as general commands, query specific options, and table and database specific options. So, let&#8217;s discuss all three Impala commands in detail<\/p>\n<h3><span style=\"font-weight: 400\">a.\u00a0General Commands<\/span><\/h3>\n<div id=\"attachment_19309\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/General-Commands-01-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-19309\" class=\"wp-image-19309 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/General-Commands-01-1.jpg\" alt=\"\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/General-Commands-01-1.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/General-Commands-01-1-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/General-Commands-01-1-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/General-Commands-01-1-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/General-Commands-01-1-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-19309\" class=\"wp-caption-text\">Impala Shell Command &#8211; Types of Impala Commands<\/p><\/div>\n<p><strong>i. Help Command<\/strong><br \/>\n<span style=\"font-weight: 400\">By using the help Impala Shell Command, we can access the complete list of the commands available \u2212<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span>[quickstart.cloudera:21000] &gt; help;<br \/>\n<span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Documented commands (type help &lt;topic&gt;):<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">========================================================<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">compute \u00a0describe insert \u00a0set unset with \u00a0version<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">connect \u00a0explain quit \u00a0\u00a0\u00a0show values use<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">exit \u00a0\u00a0\u00a0\u00a0history profile select \u00a0shell tip <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Undocumented commands:<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">========================================= <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">alter create desc drop help load summary<\/span><\/p>\n<p><strong>ii. Version Command<\/strong><br \/>\n<span style=\"font-weight: 400\">Basically, when we need to use the current version of Impala, apply the below version command.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">[quickstart.cloudera:21000] &gt; version;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Shell version: Impala Shell v2.3.0-cdh5.5.0 (0c891d7) built on Mon Nov 9 <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">12:18:12 PST 2015<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Server version: impalad version 2.3.0-cdh5.5.0 RELEASE (build <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">0c891d79aa38f297d244855a32f1e17280e2129b)<\/span><\/p>\n<p><strong>iii. History Command<\/strong><br \/>\n<span style=\"font-weight: 400\">The history Imapala Command displays the last 10 commands executed in the shell. Following is the example of the history command. So, here we have executed 5 commands, namely, version, help, show, use, and history.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">[quickstart.cloudera:21000] &gt; history;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">[1]:version;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">[2]:help;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">[3]:show databases;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">[4]:use my_db;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">[5]:history;<\/span><\/p>\n<p><strong>iv. Quit\/exit Command<\/strong><br \/>\n<span style=\"font-weight: 400\">Moreover, we use below quit or exit command in order to come out of the Impala shell.<br \/>\n<\/span><br \/>\n<span style=\"font-weight: 400\">[quickstart.cloudera:21000] &gt; exit; <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Goodbye cloudera<\/span><\/p>\n<p><strong>v. Connect Command<\/strong><br \/>\n<span style=\"font-weight: 400\">While we want to connect to a given instance of Impala we use the below Impala shell command. However, we can connect to the default port 21000 if in case we do not specify any instance.<br \/>\n<\/span><br \/>\n<span style=\"font-weight: 400\">[quickstart.cloudera:21000] &gt; connect; <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Connected to quickstart.cloudera:21000 <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Server version: impalad version 2.3.0-cdh5.5.0 RELEASE (build <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">0c891d79aa38f297d244855a32f1e17280e2129b)<\/span><\/p>\n<h3><span style=\"font-weight: 400\">b. Query Specific Options<\/span><\/h3>\n<div id=\"attachment_19311\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Query-Specific-Options-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-19311\" class=\"wp-image-19311 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Query-Specific-Options-01.jpg\" alt=\"Table and Database Specific Options\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Query-Specific-Options-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Query-Specific-Options-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Query-Specific-Options-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Query-Specific-Options-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Query-Specific-Options-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-19311\" class=\"wp-caption-text\">Impala shell commands<\/p><\/div>\n<p><strong>i. Explain<\/strong><br \/>\nWhile we need execution plan, we use Explain command. Basically, This Impala returns the execution plan for the given query.<span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">[quickstart.cloudera:21000] &gt; explain select * from sample;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Query: explain select * from sample<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">| Explain String \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">| Estimated Per-Host Requirements: Memory = 48.00MB VCores = 1 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">| WARNING: The following tables are missing relevant table and\/or column statistics. |<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">| my_db.customers \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">| 01:EXCHANGE [UNPARTITIONED] \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">| 00:SCAN HDFS [my_db.customers] \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">| partitions = 1\/1 files = 6 size = 148B \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Fetched 7 row(s) in 0.17s<\/span><\/p>\n<p><strong>ii. Profile<\/strong><br \/>\nBy the help of the profile command, we can see the low-level information about the recent query. In addition, for diagnosis and performance tuning of a query we use this Impala shell command. Let&#8217;s understand this with an example. Here, the profile command returns the low-level information explaining query.<span style=\"font-weight: 400\"><br \/>\n<\/span><br \/>\n<span style=\"font-weight: 400\">[quickstart.cloudera:21000] &gt; profile;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Query Runtime Profile: <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Query (id=164b1294a1049189:a67598a6699e3ab6): <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0Summary: <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Session ID: e74927207cd752b5:65ca61e630ad3ad<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Session Type: BEESWAX <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Start Time: 2016-04-17 23:49:26.08148000 End Time: 2016-04-17 23:49:26.2404000 <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Query Type: EXPLAIN <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Query State: FINISHED <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Query Status: OK <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Impala Version: impalad version 2.3.0-cdh5.5.0 RELEASE (build 0c891d77280e2129b) <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0User: cloudera <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Connected User: cloudera <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Delegated User: <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Network Address:10.0.2.15:43870 <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Default Db: my_db <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Sql Statement: explain select * from sample <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Coordinator: quickstart.cloudera:22000 <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0: 0ns <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0Query Timeline: 167.304ms <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; Start execution: 41.292us (41.292us) &#8211; Planning finished: 56.42ms (56.386ms) <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; Rows available: 58.247ms (1.819ms) <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; First row fetched: 160.72ms (101.824ms) <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; Unregister query: 166.325ms (6.253ms)<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0ImpalaServer: <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0&#8211; ClientFetchWaitTimer: 107.969ms <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0\u00a0\u00a0\u00a0\u00a0&#8211; RowMaterializationTimer: 0ns<\/span><\/p>\n<h3><span style=\"font-weight: 400\">c. Table and Database Specific Options<\/span><\/h3>\n<div id=\"attachment_19310\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Table-and-Database-Specific-Options-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-19310\" class=\"wp-image-19310 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Table-and-Database-Specific-Options-01.jpg\" alt=\"\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Table-and-Database-Specific-Options-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Table-and-Database-Specific-Options-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Table-and-Database-Specific-Options-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Table-and-Database-Specific-Options-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Table-and-Database-Specific-Options-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-19310\" class=\"wp-caption-text\">Impala Shell Command &#8211; Types of Impala Commands<\/p><\/div>\n<p><strong>i. Alter<\/strong><br \/>\nWhile we want to change the structure and name of a table we use the alter command in Impala.<\/p>\n<p><strong>ii. Describe<\/strong><br \/>\nMoreover, when we need metadata of a table we use the describe Impala Shell Command. The Describe command carries the information like columns and their data types. Also, it has a shortcut as a desc.<\/p>\n<p><strong>iii. Drop<\/strong><br \/>\nIn order to remove a construct from Impala, we use the drop Impala shell command. Here, a construct refers to a table, a view, or a database function.<\/p>\n<p><strong>iv. Insert<\/strong><br \/>\nHowever, there are several uses of the insert Impala Shell Command. Such as<span style=\"font-weight: 400\"><br \/>\n<\/span><br \/>\n<span style=\"font-weight: 400\">1. Append data (columns) into a table.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">2. Override the data of an existing table.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">3. Override the data of an existing table.<\/span><\/p>\n<p><strong>v.\u00a0Select<\/strong><br \/>\nMoreover, to perform the desired operation on a particular dataset we use the select statement. Also. we can specify the dataset on which to complete some action, through this command. In addition, it is possible to print or store (in a file) the result of the select statement.<\/p>\n<p><strong>vi. Show<\/strong><br \/>\n<span style=\"font-weight: 400\">Also, to display the Metastore of various constructs, we use the show statement of Impala.\u00a0For Example tables, databases, etc.<\/span><\/p>\n<p><strong>vii. Use<\/strong><br \/>\n<span style=\"font-weight: 400\">In order to change the current context to the desired database, we select the use statement of Impala.<\/span><\/p>\n<p>So, this was all about\u00a0Impala Shell Command. Hope you like our explanation.<\/p>\n<h2><span style=\"font-weight: 400\">Conclusion &#8211; Impala Shell Command<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Hence, we have seen the whole concept of the Impala Shell Command. However, if any query occurs, please ask through the comment section.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this Impala Shell tutorial, we will learn the\u00a0Impala Shell Command.\u00a0Moreover, we will study different types of Shell Commands in Impala:\u00a0Table and Database specific options,\u00a0General Commands, and\u00a0Query specific options. In addition we will see&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":19304,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[5038,6488,6489,6558,6559,11103,12842],"class_list":["post-11520","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-impala","tag-general-commands","tag-impala-command-reference","tag-impala-commands","tag-impala-shell","tag-impala-shell-command","tag-query-specific-options","tag-shell-commands-in-impala"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Impala Shell Command - Types of Impala Commands - DataFlair<\/title>\n<meta name=\"description\" content=\"Impala Shell Command: Types of Impala Commands, Table and Database specific options, General Commands, and Query specific options, explain, profile, use\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/impala-shell-command\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Impala Shell Command - Types of Impala Commands - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Impala Shell Command: Types of Impala Commands, Table and Database specific options, General Commands, and Query specific options, explain, profile, use\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/impala-shell-command\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-28T06:21:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-09T07:41:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Shell-Commands-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Impala Shell Command - Types of Impala Commands - DataFlair","description":"Impala Shell Command: Types of Impala Commands, Table and Database specific options, General Commands, and Query specific options, explain, profile, use","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/","og_locale":"en_US","og_type":"article","og_title":"Impala Shell Command - Types of Impala Commands - DataFlair","og_description":"Impala Shell Command: Types of Impala Commands, Table and Database specific options, General Commands, and Query specific options, explain, profile, use","og_url":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-03-28T06:21:51+00:00","article_modified_time":"2021-05-09T07:41:18+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Shell-Commands-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Impala Shell Command &#8211; Types of Impala Commands","datePublished":"2018-03-28T06:21:51+00:00","dateModified":"2021-05-09T07:41:18+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/"},"wordCount":1121,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Shell-Commands-01.jpg","keywords":["General Commands","Impala Command Reference","Impala Commands","Impala Shell","Impala Shell Command","Query specific options","Shell commands in Impala"],"articleSection":["Impala Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/impala-shell-command\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/","url":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/","name":"Impala Shell Command - Types of Impala Commands - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Shell-Commands-01.jpg","datePublished":"2018-03-28T06:21:51+00:00","dateModified":"2021-05-09T07:41:18+00:00","description":"Impala Shell Command: Types of Impala Commands, Table and Database specific options, General Commands, and Query specific options, explain, profile, use","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/impala-shell-command\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Shell-Commands-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Impala-Shell-Commands-01.jpg","width":1200,"height":628,"caption":"Impala Shell Command - Types of Impala Commands"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/impala-shell-command\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Impala Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/impala\/"},{"@type":"ListItem","position":3,"name":"Impala Shell Command &#8211; Types of Impala Commands"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/11520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=11520"}],"version-history":[{"count":1,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/11520\/revisions"}],"predecessor-version":[{"id":94056,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/11520\/revisions\/94056"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/19304"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=11520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=11520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=11520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}