<?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 Width_Bucket function is not support in ESRI Spatial Framework for Hadoop. What are the alternatives fro this function? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Width-Bucket-function-is-not-support-in-ESRI-Spatial/m-p/167913#M37139</link>
    <description>&lt;P&gt;Width_Bucket
function is not support in ESRI Spatial Framework for Hadoop. What are the
alternatives fro this function?&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2016 03:01:09 GMT</pubDate>
    <dc:creator>mahipal_ramidi</dc:creator>
    <dc:date>2016-08-08T03:01:09Z</dc:date>
    <item>
      <title>Width_Bucket function is not support in ESRI Spatial Framework for Hadoop. What are the alternatives fro this function?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Width-Bucket-function-is-not-support-in-ESRI-Spatial/m-p/167913#M37139</link>
      <description>&lt;P&gt;Width_Bucket
function is not support in ESRI Spatial Framework for Hadoop. What are the
alternatives fro this function?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 03:01:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Width-Bucket-function-is-not-support-in-ESRI-Spatial/m-p/167913#M37139</guid>
      <dc:creator>mahipal_ramidi</dc:creator>
      <dc:date>2016-08-08T03:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Width_Bucket function is not support in ESRI Spatial Framework for Hadoop. What are the alternatives fro this function?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Width-Bucket-function-is-not-support-in-ESRI-Spatial/m-p/167914#M37140</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/12061/mahipalramidi.html"&gt;Mahipal Ramidi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Best is to write a Java UDF for Hive, however, you can actually write WIDTH_BUCKET in SQL if you know your number of buckets and assume that is static for your histogram. Her is an example:&lt;/P&gt;&lt;P&gt;SELECT whatever, CASE WHEN(whatever)&amp;gt;=${hiveconf:mymin} AND (t.tiv)&amp;lt;=${hiveconf:mymax}&lt;/P&gt;&lt;P&gt;THEN CASEWHENfloor((whatever)/((${hiveconf:mymax}–&lt;/P&gt;&lt;P&gt;${hiveconf:mymin})/${ hiveconf:mybuckets} )+ 1)&amp;gt;${ hiveconf:mybuckets}&lt;/P&gt;&lt;P&gt;THEN floor((t.tiv)/((${hiveconf:mymax}-${ hiveconf:mymin})/${ hiveconf:mybuckets})) ELSE floor((whatever)/((${hiveconf:mymax}-&lt;/P&gt;&lt;P&gt;${hiveconf:mymin})/${hiveconf:mybuckets})+1) END ELSE(${hiveconf:mybuckets})+1 END AS whateverlabel FROM(whatever table or sql)&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 04:04:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Width-Bucket-function-is-not-support-in-ESRI-Spatial/m-p/167914#M37140</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-08-09T04:04:38Z</dc:date>
    </item>
  </channel>
</rss>

