<?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 Do the Spark REPLs have a way to list current variables? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Do-the-Spark-REPLs-have-a-way-to-list-current-variables/m-p/96901#M10445</link>
    <description>&lt;P&gt;I'm specifically using pyspark and I'm wondering if there is something similar to Pig's "aliases" command that shows all currently available variables.  If there is something like that in pyspark, I'm just missing it and I hope someone straightens me out! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;  I'm not using spark-shell much, but knowing how to do this in that REPL would be useful, too.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Nov 2015 21:21:46 GMT</pubDate>
    <dc:creator>LesterMartin</dc:creator>
    <dc:date>2015-11-11T21:21:46Z</dc:date>
    <item>
      <title>Do the Spark REPLs have a way to list current variables?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Do-the-Spark-REPLs-have-a-way-to-list-current-variables/m-p/96901#M10445</link>
      <description>&lt;P&gt;I'm specifically using pyspark and I'm wondering if there is something similar to Pig's "aliases" command that shows all currently available variables.  If there is something like that in pyspark, I'm just missing it and I hope someone straightens me out! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;  I'm not using spark-shell much, but knowing how to do this in that REPL would be useful, too.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 21:21:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Do-the-Spark-REPLs-have-a-way-to-list-current-variables/m-p/96901#M10445</guid>
      <dc:creator>LesterMartin</dc:creator>
      <dc:date>2015-11-11T21:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Do the Spark REPLs have a way to list current variables?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Do-the-Spark-REPLs-have-a-way-to-list-current-variables/m-p/96902#M10446</link>
      <description>&lt;P&gt;The pyspark shell is just Python too. So using dir() should show all existing python variables (although it also shows all imports and a bunch of things you may not be looking for).&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 00:05:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Do-the-Spark-REPLs-have-a-way-to-list-current-variables/m-p/96902#M10446</guid>
      <dc:creator>ofermend</dc:creator>
      <dc:date>2015-11-12T00:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Do the Spark REPLs have a way to list current variables?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Do-the-Spark-REPLs-have-a-way-to-list-current-variables/m-p/96903#M10447</link>
      <description>&lt;P&gt;$intp.definedTerms.foreach(println)&lt;/P&gt;&lt;P&gt;That will print all the variables.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 12:18:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Do-the-Spark-REPLs-have-a-way-to-list-current-variables/m-p/96903#M10447</guid>
      <dc:creator>jwiden</dc:creator>
      <dc:date>2015-11-18T12:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Do the Spark REPLs have a way to list current variables?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Do-the-Spark-REPLs-have-a-way-to-list-current-variables/m-p/96904#M10448</link>
      <description>&lt;P&gt;&lt;STRONG&gt;pyspark&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;dir(): the list of in scope variables&lt;/LI&gt;&lt;LI&gt;globals(): the dictionary of global variables&lt;/LI&gt;&lt;LI&gt;locals(): the dictionary of local variables&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;spark-shell&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;$intp.allDefinedNames: the list of all defined variables&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 08 Dec 2015 09:42:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Do-the-Spark-REPLs-have-a-way-to-list-current-variables/m-p/96904#M10448</guid>
      <dc:creator>afomenko</dc:creator>
      <dc:date>2015-12-08T09:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Do the Spark REPLs have a way to list current variables?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Do-the-Spark-REPLs-have-a-way-to-list-current-variables/m-p/96905#M10449</link>
      <description>&lt;P&gt;If you keep using `globals()` you will eventually get an error, as it keeps adding itself to itself and you eventually get one of the following errors:&lt;/P&gt;&lt;PRE&gt;RuntimeError: maximum recursion depth exceeded while getting the repr of a list&lt;/PRE&gt;&lt;P&gt;or&lt;/P&gt;&lt;PRE&gt;RuntimeError: dictionary changed size during iteration&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Nov 2017 05:06:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Do-the-Spark-REPLs-have-a-way-to-list-current-variables/m-p/96905#M10449</guid>
      <dc:creator>clay_stevens</dc:creator>
      <dc:date>2017-11-15T05:06:33Z</dc:date>
    </item>
  </channel>
</rss>

