<?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 SparkSession configuration at the Job level is not getting applied in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/sparksession-configuration-at-the-job-level-is-not-getting/m-p/37062#M26252</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I am trying to get the spark default metrics from the application to statsd sink at &lt;STRONG&gt;Job level not cluster level&lt;/STRONG&gt;. So I configured the necessary configuration in the Spark context and spark session in code. And in a local system, which means a single node, while it is running, I am able to receive all the UDP packets. While in the AWS DataBricks (SingleNode or MultiNode) cluster, I deployed the same jar. But there, I am not getting any metrics. But if I override the Spark config in Advance Options -&amp;gt; Compute in Databricks. I am able to receive metrics. And configurations are reflected in the Environment Variables. Below i have attached the job level configuration code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dhinesh_balaji_3-1688629795475.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2777iCFCDBB672387E0DD/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="dhinesh_balaji_3-1688629795475.png" alt="dhinesh_balaji_3-1688629795475.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Databricks spark cluster config&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 554px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2775iD4C067E9E4A96DA9/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried updating "metrics.properties" using InitScript in the databricks cluster.I am able to receive metrics&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dhinesh_balaji_6-1688630322016.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2780i6159303356B31BAC/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="dhinesh_balaji_6-1688630322016.png" alt="dhinesh_balaji_6-1688630322016.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;. And also overrode the spark session configuration again after the spark session creation. And I am printing the spark configuration values in the console.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 960px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2776i400D0774A86A31CC/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2023 08:01:41 GMT</pubDate>
    <dc:creator>dhinesh_balaji</dc:creator>
    <dc:date>2023-07-06T08:01:41Z</dc:date>
    <item>
      <title>SparkSession configuration at the Job level is not getting applied</title>
      <link>https://community.databricks.com/t5/data-engineering/sparksession-configuration-at-the-job-level-is-not-getting/m-p/37062#M26252</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am trying to get the spark default metrics from the application to statsd sink at &lt;STRONG&gt;Job level not cluster level&lt;/STRONG&gt;. So I configured the necessary configuration in the Spark context and spark session in code. And in a local system, which means a single node, while it is running, I am able to receive all the UDP packets. While in the AWS DataBricks (SingleNode or MultiNode) cluster, I deployed the same jar. But there, I am not getting any metrics. But if I override the Spark config in Advance Options -&amp;gt; Compute in Databricks. I am able to receive metrics. And configurations are reflected in the Environment Variables. Below i have attached the job level configuration code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dhinesh_balaji_3-1688629795475.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2777iCFCDBB672387E0DD/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="dhinesh_balaji_3-1688629795475.png" alt="dhinesh_balaji_3-1688629795475.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Databricks spark cluster config&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 554px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2775iD4C067E9E4A96DA9/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried updating "metrics.properties" using InitScript in the databricks cluster.I am able to receive metrics&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dhinesh_balaji_6-1688630322016.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2780i6159303356B31BAC/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="dhinesh_balaji_6-1688630322016.png" alt="dhinesh_balaji_6-1688630322016.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;. And also overrode the spark session configuration again after the spark session creation. And I am printing the spark configuration values in the console.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 960px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2776i400D0774A86A31CC/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 08:01:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sparksession-configuration-at-the-job-level-is-not-getting/m-p/37062#M26252</guid>
      <dc:creator>dhinesh_balaji</dc:creator>
      <dc:date>2023-07-06T08:01:41Z</dc:date>
    </item>
  </channel>
</rss>

