<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question querying a partition table in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/querying-a-partition-table/m-p/145031#M32285</link>
    <description>&lt;P&gt;Hello Exports&lt;/P&gt;&lt;P&gt;I have created a partition table as below &lt;/P&gt;&lt;P&gt;  SET hive.exec.dynamic.partition=true;
    SET hive.exec.dynamic.partition.mode=nonstrict;
CREATE EXTERNAL TABLE `table`(
  no of clomuns ))
PARTITIONED BY (year  INT,month INT,day   INT)
ROW FORMAT DELIMITED 
  FIELDS TERMINATED BY '|' 
STORED AS parquet
LOCATION
  'path';&lt;/P&gt;&lt;P&gt;While querying the tables with on of the partition column, I am getting the following error, for all other regular column it is working fine. Thanks.&lt;/P&gt;&lt;P&gt;0: jdbc:hive2:&lt;/P&gt;&lt;P&gt;//&amp;gt; select * from table  where year=2015;
Error: java.io.IOException: java.lang.IllegalArgumentException: Column [year] was not found in schema! (state=,code=0)&lt;/P&gt;&lt;P&gt;Can you please let me know what I am doing wrong here.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2016 22:46:26 GMT</pubDate>
    <dc:creator>venkatibrahmam_</dc:creator>
    <dc:date>2016-06-17T22:46:26Z</dc:date>
    <item>
      <title>querying a partition table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/querying-a-partition-table/m-p/145031#M32285</link>
      <description>&lt;P&gt;Hello Exports&lt;/P&gt;&lt;P&gt;I have created a partition table as below &lt;/P&gt;&lt;P&gt;  SET hive.exec.dynamic.partition=true;
    SET hive.exec.dynamic.partition.mode=nonstrict;
CREATE EXTERNAL TABLE `table`(
  no of clomuns ))
PARTITIONED BY (year  INT,month INT,day   INT)
ROW FORMAT DELIMITED 
  FIELDS TERMINATED BY '|' 
STORED AS parquet
LOCATION
  'path';&lt;/P&gt;&lt;P&gt;While querying the tables with on of the partition column, I am getting the following error, for all other regular column it is working fine. Thanks.&lt;/P&gt;&lt;P&gt;0: jdbc:hive2:&lt;/P&gt;&lt;P&gt;//&amp;gt; select * from table  where year=2015;
Error: java.io.IOException: java.lang.IllegalArgumentException: Column [year] was not found in schema! (state=,code=0)&lt;/P&gt;&lt;P&gt;Can you please let me know what I am doing wrong here.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 22:46:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/querying-a-partition-table/m-p/145031#M32285</guid>
      <dc:creator>venkatibrahmam_</dc:creator>
      <dc:date>2016-06-17T22:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: querying a partition table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/querying-a-partition-table/m-p/145032#M32286</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11141/venkatibrahmamchinnari.html" nodeid="11141"&gt;@manichinnari555&lt;/A&gt;, I noticed that the table was stored as Parquet.  &lt;A href="https://issues.apache.org/jira/browse/HIVE-11401"&gt;HIVE-11401&lt;/A&gt; is a known bug in Hive filtering on a partition column in Parquet.  There is no immediate plan to bring this patch into HDP, but a known workaround is to disable predicate pushdown by setting property hive.optimize.index.filter to false.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jun 2016 01:07:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/querying-a-partition-table/m-p/145032#M32286</guid>
      <dc:creator>cnauroth</dc:creator>
      <dc:date>2016-06-18T01:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: querying a partition table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/querying-a-partition-table/m-p/145033#M32287</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/381/cnauroth.html" nodeid="381"&gt;@Chris Nauroth&lt;/A&gt; Many thanks for answering the question and you  saved my day. &lt;/P&gt;&lt;P&gt;On the same note, I have another question. I have executed the query setting the property to flalse, do we need to set the property to flase every time we execute the query in production?&lt;/P&gt;&lt;P&gt;Or while creating the table I can set that to false?&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jun 2016 02:02:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/querying-a-partition-table/m-p/145033#M32287</guid>
      <dc:creator>venkatibrahmam_</dc:creator>
      <dc:date>2016-06-18T02:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: querying a partition table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/querying-a-partition-table/m-p/145034#M32288</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/11141/venkatibrahmamchinnari.html" nodeid="11141"&gt;@manichinnari555&lt;/A&gt;, I'm glad to hear this helped.  I believe setting at table creation time should be sufficient.</description>
      <pubDate>Sat, 18 Jun 2016 02:24:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/querying-a-partition-table/m-p/145034#M32288</guid>
      <dc:creator>cnauroth</dc:creator>
      <dc:date>2016-06-18T02:24:59Z</dc:date>
    </item>
  </channel>
</rss>

