<?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>topic Re: Concat/cast function while using Impala in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Concat-cast-function-while-using-Impala/m-p/939181#M6533</link>
    <description>&lt;P&gt;What do you get in SAS when you do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xx ... /* connection to the DB */;

data abc;
set xx.db;
keep id dt tm;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What types and formats do dt and tm have, and please show some values.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2024 06:09:36 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2024-08-14T06:09:36Z</dc:date>
    <item>
      <title>Concat/cast function while using Impala</title>
      <link>https://communities.sas.com/t5/Developers/Concat-cast-function-while-using-Impala/m-p/939145#M6532</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm querying a DB in Hadoop and need to combine the date and time fields within the query itself. I will then use the combined field to join to another Hadoop table but I'm not able to use cast and concat correctly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data available in DB:&lt;/P&gt;&lt;P&gt;Dt(string): 2024-06-14&lt;/P&gt;&lt;P&gt;Tm (string): 040507669747&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output that I'm trying to create:&lt;/P&gt;&lt;P&gt;Dat_time: 20240614040507669747&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My query:&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;connect to impala (dsn=abc user="&amp;amp;sysuserid." pw="&amp;amp;password.");&lt;/P&gt;&lt;P&gt;create table abc as (&lt;/P&gt;&lt;P&gt;select id, dt, tm,&lt;/P&gt;&lt;P&gt;concat(cast(date_format(dt,'yyyymmdd') as string), tm) as dat_time&amp;nbsp; /*I tried creating this from what I've learned so far but it's giving error*/&lt;/P&gt;&lt;P&gt;from DB);&lt;/P&gt;&lt;P&gt;disconnect from impala;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error: [Cloudera][Impala ODBC (370) Query analysis error occurred during query execution:&amp;nbsp; [HY000]: AnalysisException: default.date_format() unknown for database default. Currently this db has 0 functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm unable to figure the correct syntax to make this happen. Would appreciate any guidance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 21:26:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Concat-cast-function-while-using-Impala/m-p/939145#M6532</guid>
      <dc:creator>AJ16</dc:creator>
      <dc:date>2024-08-13T21:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Concat/cast function while using Impala</title>
      <link>https://communities.sas.com/t5/Developers/Concat-cast-function-while-using-Impala/m-p/939181#M6533</link>
      <description>&lt;P&gt;What do you get in SAS when you do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xx ... /* connection to the DB */;

data abc;
set xx.db;
keep id dt tm;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What types and formats do dt and tm have, and please show some values.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 06:09:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Concat-cast-function-while-using-Impala/m-p/939181#M6533</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-08-14T06:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Concat/cast function while using Impala</title>
      <link>https://communities.sas.com/t5/Developers/Concat-cast-function-while-using-Impala/m-p/939391#M6535</link>
      <description>Since it sems that you have problems with Hadoop/Impala syntax, it would make sense to reach out to such a forum instead.</description>
      <pubDate>Thu, 15 Aug 2024 11:11:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Concat-cast-function-while-using-Impala/m-p/939391#M6535</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2024-08-15T11:11:45Z</dc:date>
    </item>
  </channel>
</rss>

