<?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>topic Re: How can I somehow run spark.something in a worker? - rdd foreach spark.context in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-can-i-somehow-run-spark-something-in-a-worker-rdd-foreach/m-p/31218#M22715</link>
    <description>&lt;P&gt;Hi @alexander grajales vanegas​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Oct 2022 06:15:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-10-03T06:15:36Z</dc:date>
    <item>
      <title>How can I somehow run spark.something in a worker? - rdd foreach spark.context</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-somehow-run-spark-something-in-a-worker-rdd-foreach/m-p/31216#M22713</link>
      <description>&lt;P&gt;i am using rdd to parallelize a function, in this function i format the record i want to save, how can i store from this function the record with a dataframe? because every time i use spark..... an error is generated Caused by: org.apache.spark.api.python.PythonException: 'RuntimeError: SparkContext should only be created and accessed on the driver.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I somehow run spark. something in a worker?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code - images&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 22:52:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-somehow-run-spark-something-in-a-worker-rdd-foreach/m-p/31216#M22713</guid>
      <dc:creator>alexgv12</dc:creator>
      <dc:date>2022-09-20T22:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I somehow run spark.something in a worker? - rdd foreach spark.context</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-somehow-run-spark-something-in-a-worker-rdd-foreach/m-p/31217#M22714</link>
      <description>&lt;P&gt;You cannot. It is not serializable and not available on a worker. I would recommend that you use the &lt;A href="https://spark.apache.org/docs/latest/sql-programming-guide.html" alt="https://spark.apache.org/docs/latest/sql-programming-guide.html" target="_blank"&gt;DataFrame APIs&lt;/A&gt;. It should be much more performant and there are very limited reasons why RDDs should be used over a DataFrame. Your function looks like it could be converted to a user defined function. &lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 22:27:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-somehow-run-spark-something-in-a-worker-rdd-foreach/m-p/31217#M22714</guid>
      <dc:creator>Ryan_Chynoweth</dc:creator>
      <dc:date>2022-09-21T22:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: How can I somehow run spark.something in a worker? - rdd foreach spark.context</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-somehow-run-spark-something-in-a-worker-rdd-foreach/m-p/31218#M22715</link>
      <description>&lt;P&gt;Hi @alexander grajales vanegas​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 06:15:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-somehow-run-spark-something-in-a-worker-rdd-foreach/m-p/31218#M22715</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-03T06:15:36Z</dc:date>
    </item>
  </channel>
</rss>

