<?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 Job , Task, Stage Creation in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/job-task-stage-creation/m-p/113749#M44621</link>
    <description>&lt;P&gt;I am running below code -&lt;BR /&gt;df = spark.read.json('xyz.json')&lt;BR /&gt;df.count&lt;BR /&gt;&lt;BR /&gt;I want to understand the actual working of the spark. How many jobs &amp;amp; stages will be created. I want to understand the detailed &amp;amp; easier concept of how it works?&lt;/P&gt;</description>
    <pubDate>Wed, 26 Mar 2025 19:01:32 GMT</pubDate>
    <dc:creator>Rajt1</dc:creator>
    <dc:date>2025-03-26T19:01:32Z</dc:date>
    <item>
      <title>Job , Task, Stage Creation</title>
      <link>https://community.databricks.com/t5/data-engineering/job-task-stage-creation/m-p/113749#M44621</link>
      <description>&lt;P&gt;I am running below code -&lt;BR /&gt;df = spark.read.json('xyz.json')&lt;BR /&gt;df.count&lt;BR /&gt;&lt;BR /&gt;I want to understand the actual working of the spark. How many jobs &amp;amp; stages will be created. I want to understand the detailed &amp;amp; easier concept of how it works?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 19:01:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/job-task-stage-creation/m-p/113749#M44621</guid>
      <dc:creator>Rajt1</dc:creator>
      <dc:date>2025-03-26T19:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Job , Task, Stage Creation</title>
      <link>https://community.databricks.com/t5/data-engineering/job-task-stage-creation/m-p/113794#M44638</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/155369"&gt;@Rajt1&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;When you execute &lt;EM&gt;df = spark.read.json('xyz.json’)&lt;/EM&gt;, Spark does not read the file immediately. Data is only read when an action like &lt;EM&gt;count()&lt;/EM&gt; is triggered.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Job:&amp;nbsp;&lt;EM&gt;df.count()&lt;/EM&gt; triggers one job because it's an action.&lt;/LI&gt;
&lt;LI&gt;Stage:&amp;nbsp;Reading JSON and counting don't require data shuffling, so Spark optimises them into a single stage.&lt;/LI&gt;
&lt;LI&gt;Task: Number of tasks depends on how the data is partitioned.&amp;nbsp;Here, it depends on the JSON mode (by default,&amp;nbsp;spark expects JSON files to be in single-line mode): Single-line mode (Spark will create multiple tasks if the file is larger than the default partition size) and&amp;nbsp;Multi-line mode (the entire file is treated as a single JSON object, making it non-splittable, so only 1 task runs).&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 27 Mar 2025 11:55:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/job-task-stage-creation/m-p/113794#M44638</guid>
      <dc:creator>Advika</dc:creator>
      <dc:date>2025-03-27T11:55:26Z</dc:date>
    </item>
  </channel>
</rss>

