HIVE SERDE REGEX: Output format - want to use only few of the output Strings
<p>the input file is as follows </p>

<p>eno::ename::dept::sal</p>

<p>101::emp1::comp1::2800000</p>

<p>201::emp2::comp2::2800000</p>

<p>301::emp3::comp3::3400000</p>

<p>401::emp4::comp4::3600000</p>

<p>501::emp5::comp5::400000</p>

<pre><code>&gt;create table emp(ename string,edept string)
&gt; row format serde 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'           
&gt; WITH SERDEPROPERTIES(                                                         
&gt; "input.regex"="^([^\\::]+)\\::([^\\::]+)\\::([^\\::]+)\\::([^\\::]+)$",           
&gt; "output.format.string"="%2$s%3$s")                                            
&gt; ;
&gt;load data local inpath '/home/cloudera/test/emp.txt' into table emp;
</code></pre>

<p>i want to pull only the 2nd and 3rd literals into the table. So using "output.format.string"="%2$s%3$s" - is this right way  ?</p>

<p>But my table gets loaded with eno &amp; ename only.</p>