<?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: Fetch distinct values of a column in Dataframe using Spark in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Fetch-distinct-values-of-a-column-in-Dataframe-using-Spark/m-p/174638#M136901</link>
    <description>&lt;P&gt;Its the same code as above without collect()&lt;/P&gt;&lt;PRE&gt;      preProcessedDataFrame.registerTempTable("tApplicationid")
      preProcessedDataFrame.select(ApplicationId).distinct().foreach(record =&amp;gt; {
      val applicationId = record.getAs[String](ApplicationId)
      val selectedApplicationDataFrame = sqlContext.sql("SELECT * FROM tApplicationId WHERE ApplicationId = " + applicationId)
      logger.info("selectedApplicationId: " +  applicationId)
      //DO FURTHER PROCESSSING on selectedApplicationDataFrame.....
      })

&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 Aug 2016 02:05:56 GMT</pubDate>
    <dc:creator>kaz_narasimhan</dc:creator>
    <dc:date>2016-08-16T02:05:56Z</dc:date>
  </channel>
</rss>

