

{"id":19999,"date":"2018-06-23T13:35:39","date_gmt":"2018-06-23T13:35:39","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=19999"},"modified":"2018-06-23T13:35:39","modified_gmt":"2018-06-23T13:35:39","slug":"hcatalog-cli-commands","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/","title":{"rendered":"Learn HCatalog CLI Commands (Create, Alter, View)"},"content":{"rendered":"<p><span style=\"font-weight: 400\">In our last <strong>HCatalog Tutorial<\/strong>, we discussed <strong>HCatalog features<\/strong>. Today, we will see\u00a0HCatalog CLI Commands. <\/span><\/p>\n<p><span style=\"font-weight: 400\">There are various commands like, create table, alter table, view, Show table etc are supported by HCatalog. So, in this HCatalog CLI Command tutorial, we will learn all these HCatalog CLI Commands in detail. <\/span><\/p>\n<p><span style=\"font-weight: 400\">So, let\u2019s start HCatalog CLI Commands.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">HCatalog CLI Commands<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Here we are discussing all the HCatalog CLI Commands in detail:<\/span><\/p>\n<h3><span style=\"font-weight: 400\">i. Creating Table in HCatalog<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Basically, to create a table in <strong>Hive metastore<\/strong> using HCatalog, we use Create Table statement CLI command in HCatalog. To create it, follow these steps:<\/span><\/p>\n<p><strong>Syntax of creating table in HCatalog<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">CREATE [TStudent1ORARY] [EXTERNAL] TABLE [IF NOT EXISTS] [db_name.] table_name\n[(col_name data_type [COMMENT col_comment], ...)]\n[COMMENT table_comment]\n[ROW FORMAT row_format]\n[STORED AS file_format]<\/pre>\n<p><strong>For Example<\/strong><br \/>\n<span style=\"font-weight: 400\">Suppose, we are creating a table with name Student by using CREATE TABLE statement. So, the table lists the fields and their data types in the Student table are:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">Sr. no. <\/span><\/td>\n<td><span style=\"font-weight: 400\">Field name<\/span><\/td>\n<td><span style=\"font-weight: 400\">Data Type<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1<\/span><\/td>\n<td><span style=\"font-weight: 400\">Student id<\/span><\/td>\n<td><span style=\"font-weight: 400\">int<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">2<\/span><\/td>\n<td><span style=\"font-weight: 400\">Name<\/span><\/td>\n<td><span style=\"font-weight: 400\">string<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">3<\/span><\/td>\n<td><span style=\"font-weight: 400\">Salary<\/span><\/td>\n<td><span style=\"font-weight: 400\">float<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">4<\/span><\/td>\n<td><span style=\"font-weight: 400\">Designation<\/span><\/td>\n<td><span style=\"font-weight: 400\">string<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Further, below data explains the supported fields like Comment, Row formatted fields like Field terminator, Lines terminator, as well as Stored File type.<br \/>\n<b>COMMENT \u2018Student details\u2019<\/b><br \/>\n<b>FIELDS TERMINATED BY \u2018\\t\u2019<\/b><br \/>\n<b>LINES TERMINATED BY \u2018\\n\u2019<\/b><br \/>\n<b>STORED IN TEXT FILE<\/b><br \/>\n<span style=\"font-weight: 400\">By using the above data, the following query creates a table named Student.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">.\/hcat \u2013e \"CREATE TABLE IF NOT EXISTS Student ( eid int, name String,\n  salary String, destination String) \\\nCOMMENT 'Student details' \\\nROW FORMAT DELIMITED \\\nFIELDS TERMINATED BY \u2018\\t\u2019 \\\nLINES TERMINATED BY \u2018\\n\u2019 \\\nSTORED AS TEXTFILE;\"<\/pre>\n<p><span style=\"font-weight: 400\">Although HCatalog ignores the statement in case the table already exists, If we add the option IF NOT EXISTS.<\/span><br \/>\n<strong>Output<\/strong><br \/>\n<b>OK<\/b><br \/>\n<b>Time taken: 5.905 seconds<\/b><\/p>\n<h3><span style=\"font-weight: 400\">ii. Load Data Statement<\/span><\/h3>\n<p><span style=\"font-weight: 400\">To insert data in HCatalog we can use the LOAD DATA statement.<\/span><br \/>\n<span style=\"font-weight: 400\">Basically, it is better to use LOAD DATA CLI Command in HCatalog to store bulk records, while inserting data into HCatalog. Generally, we can load data in two ways: <\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From local file system<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From <strong>Hadoop file<\/strong> system<\/span><\/li>\n<\/ul>\n<p><strong>Syntax of load data statement<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">LOAD DATA [LOCAL] INPATH 'filepath' [OVERWRITE] INTO TABLE tablename\n[PARTITION (partcol1=val1, partcol2=val2 ...)]\nto specify the local path, LOCAL is the identifier. Though, it is optional.\nAlso, to overwrite the data in the table, OVERWRITE is optional.\nAnd, PARTITION is also optional.<\/pre>\n<p><strong>For Example<\/strong><br \/>\n<span style=\"font-weight: 400\">Here we are inserting the following data into the table. So, a text file named sample1.txt in \/home\/user directory:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">1201<\/span><\/td>\n<td><span style=\"font-weight: 400\">Gaurav<\/span><\/td>\n<td><span style=\"font-weight: 400\">45000<\/span><\/td>\n<td><span style=\"font-weight: 400\">Technical manager<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1202<\/span><\/td>\n<td><span style=\"font-weight: 400\">Mehul<\/span><\/td>\n<td><span style=\"font-weight: 400\">45000<\/span><\/td>\n<td><span style=\"font-weight: 400\"> Proofreader<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1203<\/span><\/td>\n<td><span style=\"font-weight: 400\">Monika<\/span><\/td>\n<td><span style=\"font-weight: 400\">40000<\/span><\/td>\n<td><span style=\"font-weight: 400\"> Technical writer<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1204<\/span><\/td>\n<td><span style=\"font-weight: 400\">Kajal<\/span><\/td>\n<td><span style=\"font-weight: 400\">40000<\/span><\/td>\n<td><span style=\"font-weight: 400\">Hr Admin<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1205<\/span><\/td>\n<td><span style=\"font-weight: 400\">Karishma<\/span><\/td>\n<td><span style=\"font-weight: 400\">30000<\/span><\/td>\n<td><span style=\"font-weight: 400\">Op Admin<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Below query loads the given text into the table.<\/p>\n<pre class=\"EnlighterJSRAW\">.\/hcat \u2013e \"LOAD DATA LOCAL INPATH '\/home\/user\/sample1.txt'\nOVERWRITE INTO TABLE Student;<\/pre>\n<p><strong>Output<\/strong><br \/>\n<b>OK<\/b><br \/>\n<b>Time taken: 15.905 seconds<\/b><\/p>\n<h3><span style=\"font-weight: 400\">iii. Alter Table Statement<\/span><\/h3>\n<p><span style=\"font-weight: 400\">To alter a table, we can use the ALTER TABLE statement HCatalog CLI Command.<\/span><br \/>\n<strong>Syntax of alter table statement<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">ALTER TABLE name RENAME TO new_name\nALTER TABLE name ADD COLUMNS (col_spec[, col_spec ...])\nALTER TABLE name DROP [COLUMN] column_name\nALTER TABLE name CHANGE column_name new_name new_type\nALTER TABLE name REPLACE COLUMNS (col_spec[, col_spec ...])<\/pre>\n<h3><span style=\"font-weight: 400\">iv. Drop Table Statement<\/span><\/h3>\n<p><span style=\"font-weight: 400\">On dropping a table from the metastore, it removes the table\/column data and their metadata. Tables can be of two types: &#8211;<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">a normal table (stored in metastore)<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">an external table (stored in local file system); <\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">However, irrespective of their types, HCatalog treats both in the same manner.<\/span><br \/>\n<strong>Syntax of drop table statement<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">DROP TABLE [IF EXISTS] table_name;<\/pre>\n<p><span style=\"font-weight: 400\">So, below query drops a table named Student \u2212<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">.\/hcat \u2013e \"DROP TABLE IF EXISTS Student;\"<\/pre>\n<p><strong>Output<\/strong><br \/>\n<b>OK<\/b><br \/>\n<b>Time taken: 5.3 seconds<\/b><\/p>\n<h3><span style=\"font-weight: 400\">v. Create View Statement<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Moreover, CREATE VIEW statement creates a view with the given name. Although make sure, if a table or view with the same name already exists, an error is thrown, then to skip the error, we can use IF NOT EXISTS.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In addition, from the defining SELECT expression, if no column names are supplied, the names of the view&#8217;s columns will be derived automatically.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Also, make sure the resulting view column names will be generated in the form _C0, _C1, etc if the SELECT contains un-aliased scalar expressions like as x+y.<\/span><\/p>\n<p><span style=\"font-weight: 400\">However, if\u00a0somehow the view&#8217;s defining SELECT expression is invalid, then a CREATE VIEW statement will get fail.<\/span><\/p>\n<p><strong>Syntax of create view statement<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">CREATE VIEW [IF NOT EXISTS] [db_name.]view_name [(column_name [COMMENT column_comment], ...) ]\n[COMMENT view_comment]\n[TBLPROPERTIES (property_name = property_value, ...)]\nAS SELECT ...;<\/pre>\n<p><strong>For Example<\/strong><br \/>\n<span style=\"font-weight: 400\">Let&#8217;s suppose we have a Student table data. Now, to create a view named Student1_Deg_View containing the fields id, name, Designation, and salary of a Student having a salary greater than 35,000.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">ID<\/span><\/td>\n<td><span style=\"font-weight: 400\">Name<\/span><\/td>\n<td><span style=\"font-weight: 400\">Salary<\/span><\/td>\n<td><span style=\"font-weight: 400\">Designation<\/span><\/td>\n<td><span style=\"font-weight: 400\">Dept<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1201<\/span><\/td>\n<td><span style=\"font-weight: 400\">Gaurav<\/span><\/td>\n<td><span style=\"font-weight: 400\">45000<\/span><\/td>\n<td><span style=\"font-weight: 400\">Technical manager<\/span><\/td>\n<td><span style=\"font-weight: 400\">TP<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1202<\/span><\/td>\n<td><span style=\"font-weight: 400\">Mehul<\/span><\/td>\n<td><span style=\"font-weight: 400\">45000<\/span><\/td>\n<td><span style=\"font-weight: 400\"> Proofreader<\/span><\/td>\n<td><span style=\"font-weight: 400\">PR<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1203<\/span><\/td>\n<td><span style=\"font-weight: 400\">Monika<\/span><\/td>\n<td><span style=\"font-weight: 400\">30000<\/span><\/td>\n<td><span style=\"font-weight: 400\">Technical writer<\/span><\/td>\n<td><span style=\"font-weight: 400\">TP<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1204<\/span><\/td>\n<td><span style=\"font-weight: 400\">Kajal<\/span><\/td>\n<td><span style=\"font-weight: 400\">40000<\/span><\/td>\n<td><span style=\"font-weight: 400\">Hr Admin<\/span><\/td>\n<td><span style=\"font-weight: 400\">HR<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1205<\/span><\/td>\n<td><span style=\"font-weight: 400\">Karishma<\/span><\/td>\n<td><span style=\"font-weight: 400\">30000<\/span><\/td>\n<td><span style=\"font-weight: 400\">Op Admin<\/span><\/td>\n<td><span style=\"font-weight: 400\">Admin<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">To create a view based on the above-given data below is the command.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">.\/hcat \u2013e \"CREATE VIEW Student1_Deg_View (salary COMMENT ' salary more than 35,000')\n  AS SELECT id, name, salary, designation FROM Student WHERE salary \u2265 35000;\"<\/pre>\n<p><strong>Output<\/strong><br \/>\n<b>OK<\/b><br \/>\n<b>Time taken: 5.3 seconds<\/b><\/p>\n<h3><span style=\"font-weight: 400\">vi. Drop View Statement<\/span><\/h3>\n<p><span style=\"font-weight: 400\">So, for the specified view, DROP VIEW removes metadata.<\/span><br \/>\n<strong>Syntax of drop view statement<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">DROP VIEW [IF EXISTS] view_name;<\/pre>\n<p><strong>For Example<\/strong><br \/>\n<span style=\"font-weight: 400\">To drop a view named Student1_Deg_View, below is the command.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">DROP VIEW Student1_Deg_View;<\/pre>\n<h3><span style=\"font-weight: 400\">vii. Show Tables Statement<\/span><\/h3>\n<p><span style=\"font-weight: 400\">To display the names of all tables, we use the Show Tables statement HCatalog CLI Command. So, it lists tables from the current database, or with the IN clause, in a specified database, by default.<\/span><br \/>\n<strong>Syntax of show table statement<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">SHOW TABLES [IN database_name] ['identifier_with_wildcards'];<\/pre>\n<p><span style=\"font-weight: 400\">To display, a list of tables, below is the query \u2212<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">.\/hcat \u2013e \"Show tables;\"<\/pre>\n<p><strong>Output<\/strong><br \/>\n<b>OK<\/b><br \/>\n<b>Student1<\/b><br \/>\n<b>Student<\/b><br \/>\n<b>Time taken: 5.3 seconds<\/b><\/p>\n<h3><span style=\"font-weight: 400\">viii. Show Partitions Statement<\/span><\/h3>\n<p><span style=\"font-weight: 400\">To see the partitions that exist in a particular table, we can use the SHOW PARTITIONS CLI HCatalog command.<\/span><\/p>\n<p><strong>Syntax of show partitions statement<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">SHOW PARTITIONS table_name;<\/pre>\n<p><span style=\"font-weight: 400\">So, below query drops a table named Student \u2212<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">.\/hcat \u2013e \"Show partitions Student;\"<\/pre>\n<p><strong>Output<\/strong><br \/>\n<b>OK<\/b><br \/>\n<b>Designation = IT<\/b><br \/>\n<b>Time taken: 5.3 seconds<\/b><\/p>\n<h3><span style=\"font-weight: 400\">ix. Creating an Index<\/span><\/h3>\n<p><span style=\"font-weight: 400\">A pointer on a particular column of a table, is what we call an Index. So, we can say creating an index is as same as creating a pointer on a particular column of a table.<\/span><br \/>\n<strong>Syntax of creating an index<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">CREATE INDEX index_name\nON TABLE base_table_name (col_name, ...)\nAS 'index.handler.class.name'\n[WITH DEFERRED REBUILD]\n[IDXPROPERTIES (property_name = property_value, ...)]\n[IN TABLE index_table_name]\n[PARTITIONED BY (col_name, ...)][\n  [ ROW FORMAT ...] STORED AS ...\n  | STORED BY ...\n]\n[LOCATION hdfs_path]\n[TBLPROPERTIES (...)]<\/pre>\n<p><strong>For Example<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Hence, to understand the concept of index, here is an example. On using the same Student table that we have used earlier. Here also with the same fields Id, Name, Salary, Designation, and Dept. Now, \u00a0on the salary column of the Student table, create an index named index_salary.<\/span><\/p>\n<p><strong>Below query creates an index \u2212<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">.\/hcat \u2013e \"CREATE INDEX inedx_salary ON TABLE Student(salary)<\/pre>\n<h3><span style=\"font-weight: 400\">x. Dropping an Index<\/span><\/h3>\n<p><strong>Syntax of dropping an index<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">DROP INDEX &lt;index_name&gt; ON &lt;table_name&gt;<\/pre>\n<p><strong>Output<\/strong><br \/>\n<b>.\/hcat \u2013e &#8220;DROP INDEX index_salary ON Student;&#8221;<\/b><br \/>\nSo, this was all about HCatalog CLI Commands. Hope, you like our explanation.<\/p>\n<h2><span style=\"font-weight: 400\">Conclusion<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Hence, we have learned all the HCatalog CLI Commands in detail. This will definitely help you to use various commands easily. Still, if any doubt regarding HCatalog CLI Commands, ask in the comment tab.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our last HCatalog Tutorial, we discussed HCatalog features. Today, we will see\u00a0HCatalog CLI Commands. There are various commands like, create table, alter table, view, Show table etc are supported by HCatalog. So, in&#46;&#46;&#46;<\/p>\n","protected":false},"author":7,"featured_media":20209,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[441,2564,3103,3124,3156,4076,4077,4082,5509,5512,5535,8351,12853,12856],"class_list":["post-19999","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hcatalog","tag-alter-table-statement","tag-cli-commands-in-hcatalog","tag-create-view-statement","tag-creating-an-index","tag-creating-table-in-hcatalog","tag-drop-table-statement","tag-drop-view-statement","tag-dropping-an-index","tag-hcatalog-cli-commands","tag-hcatalog-commands","tag-hcatalog-tutorial","tag-load-data-statement","tag-show-partitions-statement","tag-show-tables-statement"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn HCatalog CLI Commands (Create, Alter, View) - DataFlair<\/title>\n<meta name=\"description\" content=\"HCatalog CLI Commands,HCatalog tutorial,what are different CLI commands in HCatalog,Creating Table in HCatalog,Creating an Index,Show Tables Statement\" \/>\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\/hcatalog-cli-commands\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn HCatalog CLI Commands (Create, Alter, View) - DataFlair\" \/>\n<meta property=\"og:description\" content=\"HCatalog CLI Commands,HCatalog tutorial,what are different CLI commands in HCatalog,Creating Table in HCatalog,Creating an Index,Show Tables Statement\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/\" \/>\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-06-23T13:35:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/HCatalog-CLI-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":"Learn HCatalog CLI Commands (Create, Alter, View) - DataFlair","description":"HCatalog CLI Commands,HCatalog tutorial,what are different CLI commands in HCatalog,Creating Table in HCatalog,Creating an Index,Show Tables Statement","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\/hcatalog-cli-commands\/","og_locale":"en_US","og_type":"article","og_title":"Learn HCatalog CLI Commands (Create, Alter, View) - DataFlair","og_description":"HCatalog CLI Commands,HCatalog tutorial,what are different CLI commands in HCatalog,Creating Table in HCatalog,Creating an Index,Show Tables Statement","og_url":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-06-23T13:35:39+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/HCatalog-CLI-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\/hcatalog-cli-commands\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd"},"headline":"Learn HCatalog CLI Commands (Create, Alter, View)","datePublished":"2018-06-23T13:35:39+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/"},"wordCount":939,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/HCatalog-CLI-Commands-01.jpg","keywords":["Alter Table Statement","CLI Commands in HCatalog","Create View Statement","Creating an Index","Creating Table in HCatalog","Drop Table Statement","Drop View Statement","Dropping an Index","HCatalog CLI Commands","HCatalog Commands","HCatalog Tutorial","Load Data Statement","Show Partitions Statement","Show Tables Statement"],"articleSection":["HCatalog Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/","url":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/","name":"Learn HCatalog CLI Commands (Create, Alter, View) - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/HCatalog-CLI-Commands-01.jpg","datePublished":"2018-06-23T13:35:39+00:00","description":"HCatalog CLI Commands,HCatalog tutorial,what are different CLI commands in HCatalog,Creating Table in HCatalog,Creating an Index,Show Tables Statement","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/HCatalog-CLI-Commands-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/HCatalog-CLI-Commands-01.jpg","width":1200,"height":628,"caption":"Learn HCatalog CLI Commands (Create, Alter, View)"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/hcatalog-cli-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"HCatalog Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/hcatalog\/"},{"@type":"ListItem","position":3,"name":"Learn HCatalog CLI Commands (Create, Alter, View)"}]},{"@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\/beb0cab24b7aa54423a3b50e669a9dcd","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team specializes in creating clear, actionable content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Backed by industry expertise, we make learning easy and career-oriented for beginners and pros alike.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam3\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/19999","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\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=19999"}],"version-history":[{"count":0,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/19999\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/20209"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=19999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=19999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=19999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}