

{"id":10523,"date":"2018-03-14T00:00:06","date_gmt":"2018-03-14T00:00:06","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=10523"},"modified":"2018-03-14T00:00:06","modified_gmt":"2018-03-14T00:00:06","slug":"hive-serde","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/hive-serde\/","title":{"rendered":"Hive SerDe &#8211; Custom &amp; Built-in SerDe in Hive"},"content":{"rendered":"<p><span style=\"font-weight: 400\">For the purpose of IO, <strong>Apache Hive<\/strong> uses SerDe interface. However, there are many more insights to know about Hive SerDe. So, this document aims the whole concept of Hive SerDe. However, we will cover how to write own Hive SerDe. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Also, we will know about Registration of Native Hive SerDe, Built-in and How to write Custom SerDes in Hive,\u00a0<\/span><span style=\"font-weight: 400\">ObjectInspector, Hive Serde CSV, Hive Serde JSON,\u00a0Hive Serde Regex, and\u00a0Hive JSON Serde Example<\/span><span style=\"font-weight: 400\">. In this way, we will cover each aspect of Hive SerDe to understand it well.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">What is Hive SerDe?<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Basically, for Serializer\/Deserializer in Hive or Hive SerDe (an acronym). However, for the purpose of IO, we use the Hive SerDe interface. Hence, it handles both serialization and deserialization in Hive. Also, interprets the results of serialization as individual fields for processing.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In addition, to read in data from a table a SerDe allows Hive. Further writes it back out to <strong>HDFS<\/strong> in any custom format. However, it is possible that anyone can write their own SerDe for their own data formats.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">HDFS files &#8211;&gt; InputFileFormat &#8211;&gt; &lt;key, value&gt; &#8211;&gt; Deserializer &#8211;&gt; Row object<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Row object &#8211;&gt; Serializer &#8211;&gt; &lt;key, value&gt; &#8211;&gt; OutputFileFormat &#8211;&gt; HDFS files<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">It is very important to note that the &#8220;key&#8221; part is ignored when reading, and is always a constant when writing. However, \u00a0row object is stored into the &#8220;value&#8221;.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Moreover, Hive does not own the HDFS file format.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Types of SerDe in Hive<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Also, make sure that that org.apache.hadoop.hive.serde is the deprecated old Hive SerDe library. Hence, look at org.apache.hadoop.hive.serde2 for the latest version.<\/span><\/p>\n<h3>a. Built-in SerDes in Hive<\/h3>\n<p><span style=\"font-weight: 400\">Basically, to read and write <strong>HDFS<\/strong> files Hive uses these FileFormat classes currently:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><strong>TextInputFormat\/HiveIgnoreKeyTextOutputFormat<\/strong><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">It read\/write data in plain text file format.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><strong>SequenceFileInputFormat\/SequenceFileOutputFormat<\/strong><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">It read\/write data in <strong>Hadoop<\/strong> SequenceFile format.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Moreover, to serialize and deserialize data Hive uses these Hive SerDe classes currently:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><strong>MetadataTypedColumnsetSerDe<\/strong><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">So, to read\/write delimited records we use this Hive SerDe. Such as CSV, tab-separated control-A separated records (sorry, quote is not supported yet).<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><strong>LazySimpleSerDe<\/strong><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Also, to read the same data format as MetadataTypedColumnsetSerDe and TCTLSeparatedProtocol, we can use this Hive SerDe. Moreover, it creates Objects in a lazy way. Hence, that offers better performance. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Basically, with a specified encode charset starting in Hive 0.14.0, it supports read\/write data.<\/span><br \/>\n<span style=\"font-weight: 400\">For example:<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><b>ALTER TABLE person SET SERDEPROPERTIES (&#8216;serialization.encoding&#8217;=&#8217;GBK&#8217;)<\/b><br \/>\n<span style=\"font-weight: 400\">Since, the configuration property hive.lazysimple.extended_boolean_literal is set to true (Hive 0.14.0 and later) LazySimpleSerDe can treat &#8216;T&#8217;, &#8216;t&#8217;, &#8216;F&#8217;, &#8216;f&#8217;, &#8216;1&#8217;, and &#8216;0&#8217; as extended, legal boolean literals.<\/span><\/p>\n<p>However, the default is false. Hence it means only &#8216;TRUE&#8217; and &#8216;FALSE&#8217; are treated as legal boolean literals.<\/p>\n<ul>\n<li style=\"font-weight: 400\"><strong>Thrift SerDe in Hive<\/strong><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">To read\/write Thrift serialized objects, we use this Hive SerDe. However, make sure, for the Thrift object the class file must be loaded first.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><strong>Dynamic SerDe in Hive<\/strong><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">To read\/write Thrift serialized objects we use this Hive SerDe. Although, it understands Thrift DDL so the schema of the object can be provided at runtime. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Also, it supports a lot of different protocols, including TBinaryProtocol, TJSONProtocol, TCTLSeparatedProtocol (which writes data in delimited records).<\/span><br \/>\n<span style=\"font-weight: 400\">Also:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">For JSON files, JsonSerDe was added in Hive 0.12.0. An Amazon SerDe is available at s3:\/\/elasticmapreduce\/samples\/hive-ads\/libs\/jsonserde.jar for releases prior to 0.12.0.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In Hive 0.9.1 an Avro SerDe was added. Starting in Hive 0.14.0 its specification is implicit with the STORED AS AVRO clause.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Afterward, in Hive 0.11.0, a SerDe for the ORC file format was added.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Further, in Hive 0.10 and natively in Hive 0.13.0 a SerDe for Parquet was added via the plug-in.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Then, in Hive 0.14, a SerDe for CSV was added.<\/span><\/li>\n<\/ul>\n<h3><span style=\"font-weight: 400\">b. Custom Serde in Hive<\/span><\/h3>\n<p>How to write your Own Hive Serde:<\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Despite Hive SerDe users want to write a Deserializer in most cases. It is because users just want to read their own data format instead of writing to it<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">By using the configuration parameter &#8216;regex&#8217;, the RegexDeserializer will deserialize the data, and possibly a list of column names (see serde2.MetadataTypedColumnsetSerDe). <\/span><\/li>\n<\/ul>\n<p><strong>Some important points about Writing Hive SerDe:<\/strong><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Basically, Hive SerDe, not the DDL, defines the table schema. Since some of the SerDe in Hive are implementations use the DDL for configuration. However, \u00a0the SerDe can also override that.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Moreover, \u00a0Column types can be arbitrarily nested arrays, maps, and structures.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">However, with CASE\/IF or when using complex or nested types the callback design of ObjectInspector allows lazy deserialization.<\/span><\/li>\n<\/ul>\n<h2><span style=\"font-weight: 400\">ObjectInspector<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Basically, to analyze the internal structure of the row object and also the structure of the individual columns Hive uses ObjectInspector.<\/span><a href=\"https:\/\/data-flair.training\/blogs\/apache-hive-partitions\/\"><strong><br \/>\n<\/strong><\/a><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">To be more specific, to access complex objects ObjectInspector offers a uniform way. Hence, it can be stored in multiple formats in the memory. However, it includes:<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">&#8211; An instance of a Java class. Either Thrift or native Java.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">&#8211; A standard <strong>Java object<\/strong>. So, to represent Map we use java.util.List to represent Struct and Array, and use java.util.Map.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">&#8211; A lazily-initialized object. For example, a Struct of string fields stored in a single <strong>Java<\/strong> <strong>string<\/strong> objects with starting offset for each field.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Moreover, by a pair of ObjectInspector and Java Object, we can represent a complex object. Also, it gives us ways to access the internal fields inside the Object apart from the information about the structure of the Object<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">Again, it is important to note that for serialization purposes, Hive recommends custom ObjectInspectors created for use with custom SerDes have a no-argument constructor in addition to their normal constructors.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Registration of Native SerDes<\/span><\/h2>\n<p><span style=\"font-weight: 400\">However, for native Hive SerDe, As of Hive 0.14, a registration mechanism has been introduced. However, in place of a triplet of {SerDe, InputFormat, and OutputFormat} specification, in CreateTable statements, it allows dynamic binding between a &#8220;STORED AS&#8221; keyword.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><br \/>\n<span style=\"font-weight: 400\">Moreover, through this registration mechanism, we can add the following mappings:<\/span><br \/>\n<strong>Table.1- Hive SerDe &#8211; Native SerDes in Hive\u00a0<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Syntax<\/strong><\/td>\n<td><strong>Equivalent<\/strong><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">STORED AS AVRO \/<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">STORED AS AVROFILE<\/span><\/td>\n<td><span style=\"font-weight: 400\">ROW FORMAT SERDE<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.serde2.avro.AvroSerDe&#8217;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0STORED AS INPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat&#8217;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0OUTPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat&#8217;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">STORED AS ORC \/<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">STORED AS ORCFILE<\/span><\/td>\n<td><span style=\"font-weight: 400\">ROW FORMAT SERDE<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.ql.io.orc.OrcSerde&#8217;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0STORED AS INPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.ql.io.orc.OrcInputFormat&#8217;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0OUTPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat&#8217;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">STORED AS PARQUET \/<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">STORED AS PARQUETFILE<\/span><\/td>\n<td><span style=\"font-weight: 400\">ROW FORMAT SERDE<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe&#8217;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0STORED AS INPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat&#8217;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0OUTPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat&#8217;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">STORED AS RCFILE<\/span><\/td>\n<td><span style=\"font-weight: 400\">STORED AS INPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.ql.io.RCFileInputFormat&#8217;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0OUTPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.ql.io.RCFileOutputFormat&#8217;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">STORED AS SEQUENCEFILE<\/span><\/td>\n<td><span style=\"font-weight: 400\">STORED AS INPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.mapred.SequenceFileInputFormat&#8217;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0OUTPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.mapred.SequenceFileOutputFormat&#8217;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">STORED AS TEXTFILE<\/span><\/td>\n<td><span style=\"font-weight: 400\">STORED AS INPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.mapred.TextInputFormat&#8217;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0OUTPUTFORMAT<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"> \u00a0&#8216;org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat&#8217;<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">Further, \u00a0follow these steps to add a new native Hive SerDe with &#8220;STORED AS&#8221; keyword:<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">&#8211; At, first from AbstractStorageFormatDescriptor.java create a storage format descriptor class extending. Then it returns a &#8220;stored as&#8221; keyword and the names of InputFormat, OutputFormat, and Hive SerDe classes.<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">&#8211; Moreover, \u00a0add the name of the storage format descriptor class to the StorageFormatDescriptor registration file.<\/span><br \/>\nThis was all\u00a0about Apache Hive SerDe Tutorial. Hope you like our explanation of SerDes in Hive.<\/p>\n<h2><span style=\"font-weight: 400\">Conclusion<\/span><\/h2>\n<p>As a result, we have seen the whole concept of Hive SerDe, how to write own Hive SerDe, Registration of Native SerDe, Built-in Serde in Hive, How to write Custom SerDes in Hive, ObjectInspector, and some example of SerDe in Hive. However, if you feel any query feel free to ask in the comment section.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the purpose of IO, Apache Hive uses SerDe interface. However, there are many more insights to know about Hive SerDe. So, this document aims the whole concept of Hive SerDe. However, we will&#46;&#46;&#46;<\/p>\n","protected":false},"author":7,"featured_media":10750,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[2226,4276,5743,5779,5781,5784,7822],"class_list":["post-10523","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hive","tag-built-in-serde","tag-example-of-hive-serde","tag-hive-json-serde-cloudera","tag-hive-serde","tag-hive-serde-example","tag-hive-serde-vs-inputformat","tag-json-serde-hive-example"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Hive SerDe - Custom &amp; Built-in SerDe in Hive - DataFlair<\/title>\n<meta name=\"description\" content=\"Hive SerDe,how to write own Hive SerDe, Registration of Native SerDe in hive, Built-in Serde,Custom SerDes in Hive, ObjectInspector,example of Hive SerDe\" \/>\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\/hive-serde\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hive SerDe - Custom &amp; Built-in SerDe in Hive - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Hive SerDe,how to write own Hive SerDe, Registration of Native SerDe in hive, Built-in Serde,Custom SerDes in Hive, ObjectInspector,example of Hive SerDe\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/hive-serde\/\" \/>\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-14T00:00:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Hive-Serde-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":"Hive SerDe - Custom &amp; Built-in SerDe in Hive - DataFlair","description":"Hive SerDe,how to write own Hive SerDe, Registration of Native SerDe in hive, Built-in Serde,Custom SerDes in Hive, ObjectInspector,example of Hive SerDe","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\/hive-serde\/","og_locale":"en_US","og_type":"article","og_title":"Hive SerDe - Custom &amp; Built-in SerDe in Hive - DataFlair","og_description":"Hive SerDe,how to write own Hive SerDe, Registration of Native SerDe in hive, Built-in Serde,Custom SerDes in Hive, ObjectInspector,example of Hive SerDe","og_url":"https:\/\/data-flair.training\/blogs\/hive-serde\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-03-14T00:00:06+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Hive-Serde-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\/hive-serde\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/hive-serde\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd"},"headline":"Hive SerDe &#8211; Custom &amp; Built-in SerDe in Hive","datePublished":"2018-03-14T00:00:06+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/hive-serde\/"},"wordCount":1308,"commentCount":2,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/hive-serde\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Hive-Serde-01.jpg","keywords":["Built-in Serde","example of Hive SerDe","hive json serde cloudera","Hive SerDe","Hive SerDe example","hive serde vs inputformat","json serde hive example"],"articleSection":["Hive Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/hive-serde\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/hive-serde\/","url":"https:\/\/data-flair.training\/blogs\/hive-serde\/","name":"Hive SerDe - Custom &amp; Built-in SerDe in Hive - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/hive-serde\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/hive-serde\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Hive-Serde-01.jpg","datePublished":"2018-03-14T00:00:06+00:00","description":"Hive SerDe,how to write own Hive SerDe, Registration of Native SerDe in hive, Built-in Serde,Custom SerDes in Hive, ObjectInspector,example of Hive SerDe","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/hive-serde\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/hive-serde\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/hive-serde\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Hive-Serde-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Hive-Serde-01.jpg","width":1200,"height":628,"caption":"Hive SerDe"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/hive-serde\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Hive Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/hive\/"},{"@type":"ListItem","position":3,"name":"Hive SerDe &#8211; Custom &amp; Built-in SerDe in Hive"}]},{"@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\/10523","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=10523"}],"version-history":[{"count":0,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/10523\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/10750"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=10523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=10523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=10523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}