<?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 please explain how does this join work in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-explain-how-does-this-join-work/m-p/184304#M68019</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;can someone please explain how does the below join work in the bottom query. Its from thisl &lt;A target="_blank" href="https://hortonworks.com/tutorial/loading-and-querying-data-with-hadoop/"&gt;tutorial&lt;/A&gt;. I don't get the bit after "concat". thanks&lt;/P&gt;&lt;PRE&gt;ON o.swid = concat('{', u.swid ,'}');&lt;/PRE&gt;
&lt;PRE&gt;CREATE TABLE webloganalytics as
SELECT to_date(o.ts) logdate, o.url, o.ip, o.city, upper(o.state) state,
o.country, p.category, CAST(datediff(from_unixtime(unix_timestamp()), from_unixtime(unix_timestamp(u.birth_dt,'dd-MMM-yy')))/365 AS INT) age, u.gender_cd
FROM omniture o
INNER JOIN products p
ON o.url = p.url
LEFT OUTER JOIN users u 
ON o.swid = concat('{', u.swid ,'}');&lt;/PRE&gt;</description>
    <pubDate>Thu, 14 Sep 2017 16:48:26 GMT</pubDate>
    <dc:creator>brar5353</dc:creator>
    <dc:date>2017-09-14T16:48:26Z</dc:date>
    <item>
      <title>please explain how does this join work</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-explain-how-does-this-join-work/m-p/184304#M68019</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;can someone please explain how does the below join work in the bottom query. Its from thisl &lt;A target="_blank" href="https://hortonworks.com/tutorial/loading-and-querying-data-with-hadoop/"&gt;tutorial&lt;/A&gt;. I don't get the bit after "concat". thanks&lt;/P&gt;&lt;PRE&gt;ON o.swid = concat('{', u.swid ,'}');&lt;/PRE&gt;
&lt;PRE&gt;CREATE TABLE webloganalytics as
SELECT to_date(o.ts) logdate, o.url, o.ip, o.city, upper(o.state) state,
o.country, p.category, CAST(datediff(from_unixtime(unix_timestamp()), from_unixtime(unix_timestamp(u.birth_dt,'dd-MMM-yy')))/365 AS INT) age, u.gender_cd
FROM omniture o
INNER JOIN products p
ON o.url = p.url
LEFT OUTER JOIN users u 
ON o.swid = concat('{', u.swid ,'}');&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Sep 2017 16:48:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-explain-how-does-this-join-work/m-p/184304#M68019</guid>
      <dc:creator>brar5353</dc:creator>
      <dc:date>2017-09-14T16:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: please explain how does this join work</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-explain-how-does-this-join-work/m-p/184305#M68020</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/19423/brar5353.html" nodeid="19423"&gt;@Harjinder Brar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;concat('{', u.swid ,'}') will concatenate bracs with the value from u.swid. For Example if the value of u.swid is TEST then it will be converted to {TEST} which will be used to join with o.swid column. Hope it Helps!!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 18:06:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/please-explain-how-does-this-join-work/m-p/184305#M68020</guid>
      <dc:creator>balavignesh_nag</dc:creator>
      <dc:date>2017-09-14T18:06:45Z</dc:date>
    </item>
  </channel>
</rss>

