<?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: I'm not able to create data frame with the info from link . I'm seeing error as NonviableAltException(26@[ ]) in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-m-not-able-to-create-data-frame-with-the-info-from-link-I/m-p/136151#M43809</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13804/vijaykanth.html" nodeid="13804"&gt;@Vijay Kanth&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;I assume you are running scala/spark code? Also, just as an FYI, the link that you shared above is for the latest version of Spark (which is currently 2.0.1). HDP 2.3 is an older version of the Hortonworks platform and it runs Spark 1.4.1. If you want to use the latest version of Spark, you can upgrade to &lt;A href="http://hortonworks.com/downloads/#data-platform"&gt;HDP 2.5&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;But you should not need to upgrade to create a dataframe within Spark. Here's spark/scala code that I used within HDP 2.3 to generate a sample dataframe:&lt;/P&gt;&lt;PRE&gt;val df = sqlContext.createDataFrame(Seq(
    ("1111", 10000,"M"),
    ("2222", 20000,"F"),
    ("3333", 30000,"M"),
    ("4444", 40000,"F")
    )).toDF("id", "income","gender")

df.show()&lt;/PRE&gt;&lt;P&gt;Try this out and let me know if it works. &lt;/P&gt;</description>
    <pubDate>Tue, 18 Oct 2016 20:29:07 GMT</pubDate>
    <dc:creator>dzaratsian</dc:creator>
    <dc:date>2016-10-18T20:29:07Z</dc:date>
    <item>
      <title>I'm not able to create data frame with the info from link . I'm seeing error as NonviableAltException(26@[ ])</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-m-not-able-to-create-data-frame-with-the-info-from-link-I/m-p/136150#M43808</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm not able to create data frames with the information provided in the
below link &lt;A href="http://spark.apache.org/docs/latest/sql-programming-guide.html#data-sources"&gt;http://spark.apache.org/docs/latest/sql-programming-guide.html#data-sources&lt;/A&gt;
I'm using HDP2.3-Pig &amp;amp; Hive Rev6 zip latest version may i know what is the
other way to create data frames checked different forums but unable to get it
done need your support to come over the issue.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2016 15:38:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-m-not-able-to-create-data-frame-with-the-info-from-link-I/m-p/136150#M43808</guid>
      <dc:creator>vijay_kanth</dc:creator>
      <dc:date>2016-10-18T15:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: I'm not able to create data frame with the info from link . I'm seeing error as NonviableAltException(26@[ ])</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-m-not-able-to-create-data-frame-with-the-info-from-link-I/m-p/136151#M43809</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13804/vijaykanth.html" nodeid="13804"&gt;@Vijay Kanth&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;I assume you are running scala/spark code? Also, just as an FYI, the link that you shared above is for the latest version of Spark (which is currently 2.0.1). HDP 2.3 is an older version of the Hortonworks platform and it runs Spark 1.4.1. If you want to use the latest version of Spark, you can upgrade to &lt;A href="http://hortonworks.com/downloads/#data-platform"&gt;HDP 2.5&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;But you should not need to upgrade to create a dataframe within Spark. Here's spark/scala code that I used within HDP 2.3 to generate a sample dataframe:&lt;/P&gt;&lt;PRE&gt;val df = sqlContext.createDataFrame(Seq(
    ("1111", 10000,"M"),
    ("2222", 20000,"F"),
    ("3333", 30000,"M"),
    ("4444", 40000,"F")
    )).toDF("id", "income","gender")

df.show()&lt;/PRE&gt;&lt;P&gt;Try this out and let me know if it works. &lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2016 20:29:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-m-not-able-to-create-data-frame-with-the-info-from-link-I/m-p/136151#M43809</guid>
      <dc:creator>dzaratsian</dc:creator>
      <dc:date>2016-10-18T20:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: I'm not able to create data frame with the info from link . I'm seeing error as NonviableAltException(26@[ ])</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-m-not-able-to-create-data-frame-with-the-info-from-link-I/m-p/136152#M43810</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11915/dzaratsian.html" nodeid="11915"&gt;@Dan Zaratsian&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks for the above it worked for me I was able to create the dataframe.  My approach to access .json file is wrong or any thing that I need to try with. &lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2016 21:03:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-m-not-able-to-create-data-frame-with-the-info-from-link-I/m-p/136152#M43810</guid>
      <dc:creator>vijay_kanth</dc:creator>
      <dc:date>2016-10-18T21:03:04Z</dc:date>
    </item>
  </channel>
</rss>

