<?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 Re: Impala SQL for KUDU does not work in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66265#M77115</link>
    <description>&lt;P&gt;I had to do this in many steps, why does CTAS option not work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DROP TABLE IF EXISTS kudu_db.fact_patientencounter_kudu;&lt;/P&gt;&lt;P&gt;CREATE TABLE kudu_db.fact_patientencounter_kudu&lt;BR /&gt;(&lt;BR /&gt;pk_PatientEncounterID int,&lt;BR /&gt;fk_AgencyID int,&lt;BR /&gt;measure_ChuteTime_TimeInSeconds bigint,&lt;BR /&gt;measure_Response_TimeInSeconds bigint,&lt;BR /&gt;PRIMARY KEY(pk_PatientEncounterID, fk_AgencyID)&lt;BR /&gt;)&lt;BR /&gt;PARTITION BY HASH(fk_AgencyID) PARTITIONS 3&lt;BR /&gt;STORED AS KUDU;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;INSERT INTO kudu_db.fact_patientencounter_kudu&lt;BR /&gt;SELECT pk_PatientEncounterID, fk_AgencyID, measure_ChuteTime_TimeInSeconds, measure_Response_TimeInSeconds FROM default.fact_patientencounter;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Apr 2018 19:55:43 GMT</pubDate>
    <dc:creator>AKB</dc:creator>
    <dc:date>2018-04-11T19:55:43Z</dc:date>
    <item>
      <title>Impala SQL for KUDU does not work</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66260#M77111</link>
      <description>&lt;P&gt;CDH 5.14&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CREATE TABLE kudu_db.fact_patientencounter_kudu&lt;BR /&gt;PRIMARY KEY (pk_PatientEncounterID int, fk_AgencyID int)&lt;BR /&gt;PARTITION BY HASH(fk_AgencyID) PARTITIONS 4&lt;BR /&gt;STORED AS KUDU&lt;BR /&gt;AS SELECT pk_PatientEncounterID, fk_AgencyID FROM default.fact_patientencounter;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why does this CREATE TABLE statement not work? This documentation says it should work -&amp;nbsp;&lt;A href="https://kudu.apache.org/docs/kudu_impala_integration.html" target="_blank"&gt;https://kudu.apache.org/docs/kudu_impala_integration.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://kudu.apache.org/docs/kudu_impala_integration.html#_code_create_table_as_select_code" target="_blank"&gt;CREATE TABLE AS SELECT&lt;/A&gt;&lt;/P&gt;&lt;DIV class="paragraph"&gt;&lt;P&gt;You can create a table by querying any other table or tables in Impala, using a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;CREATE TABLE …​ AS SELECT&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;statement. The following example imports all rows from an existing table&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;old_table&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;into a Kudu table&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;new_table. The names and types of columns in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;new_table&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;will determined from the columns in the result set of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SELECT&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;statement. Note that you must additionally specify the primary key and partitioning.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class="listingblock"&gt;&lt;DIV class="content"&gt;&lt;PRE&gt;CREATE TABLE new_table
PRIMARY KEY (ts, name)
PARTITION BY HASH(name) PARTITIONS 8
STORED AS KUDU
AS SELECT ts, name, value FROM old_table;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:05:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66260#M77111</guid>
      <dc:creator>AKB</dc:creator>
      <dc:date>2022-09-16T13:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Impala SQL for KUDU does not work</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66261#M77112</link>
      <description>&lt;P&gt;Hard to say for certain without the error message, but it's likely that the parser doesn't like the column types being supplied in the PRIMARY KEY clause.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 19:31:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66261#M77112</guid>
      <dc:creator>Dan Burkert</dc:creator>
      <dc:date>2018-04-11T19:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Impala SQL for KUDU does not work</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66262#M77113</link>
      <description>&lt;P&gt;This is the actual query&lt;/P&gt;&lt;P&gt;CREATE TABLE kudu_db.fact_patientencounter_kudu&lt;BR /&gt;PRIMARY KEY (pk_PatientEncounterID, fk_AgencyID)&lt;BR /&gt;PARTITION BY HASH(fk_AgencyID) PARTITIONS 3&lt;BR /&gt;STORED AS KUDU&lt;BR /&gt;AS SELECT pk_PatientEncounterID, fk_AgencyID FROM default.fact_patientencounter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont see any errors in the log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is displayed&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ERROR: AnalysisException: null&lt;BR /&gt;CAUSED BY: IllegalStateException: null&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 19:41:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66262#M77113</guid>
      <dc:creator>AKB</dc:creator>
      <dc:date>2018-04-11T19:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Impala SQL for KUDU does not work</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66263#M77114</link>
      <description>&lt;P&gt;Let me ask the question better, where should I be looking for logs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cdh1 and cdh2 are masters&lt;/P&gt;&lt;P&gt;cdh3-6 are tablet servers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running from impalad on cdh4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The master logs dont show any errors for this transaction.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 19:44:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66263#M77114</guid>
      <dc:creator>AKB</dc:creator>
      <dc:date>2018-04-11T19:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Impala SQL for KUDU does not work</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66265#M77115</link>
      <description>&lt;P&gt;I had to do this in many steps, why does CTAS option not work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DROP TABLE IF EXISTS kudu_db.fact_patientencounter_kudu;&lt;/P&gt;&lt;P&gt;CREATE TABLE kudu_db.fact_patientencounter_kudu&lt;BR /&gt;(&lt;BR /&gt;pk_PatientEncounterID int,&lt;BR /&gt;fk_AgencyID int,&lt;BR /&gt;measure_ChuteTime_TimeInSeconds bigint,&lt;BR /&gt;measure_Response_TimeInSeconds bigint,&lt;BR /&gt;PRIMARY KEY(pk_PatientEncounterID, fk_AgencyID)&lt;BR /&gt;)&lt;BR /&gt;PARTITION BY HASH(fk_AgencyID) PARTITIONS 3&lt;BR /&gt;STORED AS KUDU;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;INSERT INTO kudu_db.fact_patientencounter_kudu&lt;BR /&gt;SELECT pk_PatientEncounterID, fk_AgencyID, measure_ChuteTime_TimeInSeconds, measure_Response_TimeInSeconds FROM default.fact_patientencounter;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 19:55:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66265#M77115</guid>
      <dc:creator>AKB</dc:creator>
      <dc:date>2018-04-11T19:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Impala SQL for KUDU does not work</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66269#M77116</link>
      <description>&lt;P&gt;Hi AKB,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nothing is expected to show up in Kudu logs, because the failure is occurring in the Impala query analysis stage.&amp;nbsp; I haven't been able to reproduce something similar using CDH 5.14, for instance the following queries complete successfully:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CREATE TABLE fact_patientencounter
(
pk_PatientEncounterID int,
fk_AgencyID int,
measure_ChuteTime_TimeInSeconds bigint,
measure_Response_TimeInSeconds bigint
)
STORED AS PARQUET;

CREATE TABLE fact_patientencounter_kudu
PRIMARY KEY (pk_PatientEncounterID, fk_AgencyID)
PARTITION BY HASH(fk_AgencyID) PARTITIONS 3
STORED AS KUDU
AS SELECT pk_PatientEncounterID, fk_AgencyID FROM fact_patientencounter;&lt;/PRE&gt;&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/22360"&gt;@tmarshall&lt;/a&gt;do you have any ideas about where that null analysis exception might be coming from?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 22:39:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66269#M77116</guid>
      <dc:creator>Dan Burkert</dc:creator>
      <dc:date>2018-04-11T22:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Impala SQL for KUDU does not work</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66280#M77117</link>
      <description>&lt;P&gt;Looks like&amp;nbsp;&lt;A href="https://issues.apache.org/jira/browse/IMPALA-6454" target="_blank"&gt;https://issues.apache.org/jira/browse/IMPALA-6454&lt;/A&gt; which was recently fixed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is with the casing of primary key or partition column names. Should work if you convert all column names to lower case in your CTAS.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 05:07:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66280#M77117</guid>
      <dc:creator>alex.behm</dc:creator>
      <dc:date>2018-04-12T05:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Impala SQL for KUDU does not work</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66294#M77118</link>
      <description>&lt;P&gt;DROP TABLE IF EXISTS kudu_db.fact_patientencounter_kudu;&lt;/P&gt;&lt;P&gt;CREATE TABLE kudu_db.fact_patientencounter_kudu&lt;BR /&gt;PRIMARY KEY (pk_patientencounterid, fk_agencyid)&lt;BR /&gt;PARTITION BY HASH(fk_agencyid) PARTITIONS 3&lt;BR /&gt;STORED AS KUDU&lt;BR /&gt;AS SELECT pk_patientencounterid, fk_agencyid FROM default.fact_patientencounter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above does work. Thanks for the quick replies on this.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 13:26:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-SQL-for-KUDU-does-not-work/m-p/66294#M77118</guid>
      <dc:creator>AKB</dc:creator>
      <dc:date>2018-04-12T13:26:14Z</dc:date>
    </item>
  </channel>
</rss>

