<?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: Databricks scala project in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-scala-project/m-p/177740#M57357</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/193260"&gt;@isso&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The job side works the same way. You only change how the code is packaged.&amp;nbsp;You don't need a separate JAR for each layer. Build a single JAR for the whole project and provide an entry point for each medallion step. For example, you could have&amp;nbsp;com.mycompany.pipeline.BronzeIngest,&amp;nbsp;SilverTransform&amp;nbsp;and&amp;nbsp;GoldAggregate, each with its own&amp;nbsp;main&amp;nbsp;method. Another option is a single main class that reads a parameter like&amp;nbsp;--layer silver&amp;nbsp;and sends it to the right logic. Your shared code (readers, writers, schema definitions, data quality checks) stays within the same project and is reused at every step.&lt;/P&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;In Lakeflow Jobs, each layer then becomes its own&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="du-bois-light-typography css-1yqesw9" role="link" href="https://learn.microsoft.com/en-us/azure/databricks/jobs/tasks/jar/" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;JAR task&lt;/A&gt;. Every task points to the same JAR as a dependent library but uses a different main class, and you chain them with task dependencies so silver runs after bronze and gold runs after silver. One thing to watch for: your code should get its session with&amp;nbsp;SparkSession.builder().getOrCreate()&amp;nbsp;rather than creating a new context, otherwise the run will fail.&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&lt;SPAN&gt;The cleane&lt;/SPAN&gt;st way to handle the build and deploy cycle is with bundles. The Databricks CLI ships with a Scala template (databricks bundle init default-scala) that builds the JAR, uploads it to a Unity Catalog volume, and creates the job for you when you run&amp;nbsp;Databricks bundle deploy. The&amp;nbsp;&lt;A role="link" href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/scala-jar/" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;Scala JAR bundle tutorial&lt;/A&gt;&amp;nbsp;walks through it step by step.&amp;nbsp;&lt;SPAN&gt;The page on&amp;nbsp;&lt;/SPAN&gt;&lt;A class="du-bois-light-typography css-1yqesw9" role="link" href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/job-task-types/" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;adding tasks to jobs in bundles&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;lists all the JAR task options, including how to pass parameters to your main method.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&lt;SPAN&gt;Most Scala teams keep their pipeline logic in the JAR so they get proper unit tests, versioning and CI/CD through sbt or Maven. Notebooks are still very handy for exploring data and prototyping a transformation before moving it into the project. You can also attach the JAR to a cluster and call your classes from a Scala notebook to debug them interactively. Jobs can run both&amp;nbsp;&lt;/SPAN&gt;&lt;A class="du-bois-light-typography css-1yqesw9" role="link" href="https://learn.microsoft.com/en-us/azure/databricks/languages/scala/" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;notebooks and JARs&lt;/A&gt;&lt;SPAN&gt;, so mixing them is fine if your team is used to that, but compiled code is usually easier to maintain over time.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;Run&amp;nbsp;databricks bundle init default-scala, get the sample job deploying in your dev target, and then split the sample main class into your bronze, silver and gold entry points. Once that works, add the&amp;nbsp;depends_on&amp;nbsp;chain and you'll have the full medallion flow running from a single build. If you run into problems with JAR compatibility or compute access modes, the&amp;nbsp;&lt;A role="link" href="https://learn.microsoft.com/en-us/azure/databricks/jobs/tasks/jar/" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;JAR task page&lt;/A&gt;&amp;nbsp;links to the build requirements, and that's the first place I'd check.&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;Hope this helps.&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 26 Nov 2026 19:57:25 GMT</pubDate>
    <dc:creator>Ashwin_DSA</dc:creator>
    <dc:date>2026-11-26T19:57:25Z</dc:date>
    <item>
      <title>Databricks scala project</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-scala-project/m-p/177727#M57355</link>
      <description>&lt;P&gt;Hello Guys,&lt;BR /&gt;I'm confusions, I'm come from python world, but today I work scala databricks projects.&lt;BR /&gt;&lt;BR /&gt;When you work with scala, you have to build your .jar file and deploy it.&lt;BR /&gt;When it come to build the medaillon architecture with many task in your lakeflow job, how buildin that in scala project?&lt;BR /&gt;&lt;BR /&gt;Do you use nootebook for that?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2026 16:12:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-scala-project/m-p/177727#M57355</guid>
      <dc:creator>isso</dc:creator>
      <dc:date>2026-11-26T16:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks scala project</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-scala-project/m-p/177740#M57357</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/193260"&gt;@isso&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The job side works the same way. You only change how the code is packaged.&amp;nbsp;You don't need a separate JAR for each layer. Build a single JAR for the whole project and provide an entry point for each medallion step. For example, you could have&amp;nbsp;com.mycompany.pipeline.BronzeIngest,&amp;nbsp;SilverTransform&amp;nbsp;and&amp;nbsp;GoldAggregate, each with its own&amp;nbsp;main&amp;nbsp;method. Another option is a single main class that reads a parameter like&amp;nbsp;--layer silver&amp;nbsp;and sends it to the right logic. Your shared code (readers, writers, schema definitions, data quality checks) stays within the same project and is reused at every step.&lt;/P&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;In Lakeflow Jobs, each layer then becomes its own&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="du-bois-light-typography css-1yqesw9" role="link" href="https://learn.microsoft.com/en-us/azure/databricks/jobs/tasks/jar/" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;JAR task&lt;/A&gt;. Every task points to the same JAR as a dependent library but uses a different main class, and you chain them with task dependencies so silver runs after bronze and gold runs after silver. One thing to watch for: your code should get its session with&amp;nbsp;SparkSession.builder().getOrCreate()&amp;nbsp;rather than creating a new context, otherwise the run will fail.&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&lt;SPAN&gt;The cleane&lt;/SPAN&gt;st way to handle the build and deploy cycle is with bundles. The Databricks CLI ships with a Scala template (databricks bundle init default-scala) that builds the JAR, uploads it to a Unity Catalog volume, and creates the job for you when you run&amp;nbsp;Databricks bundle deploy. The&amp;nbsp;&lt;A role="link" href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/scala-jar/" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;Scala JAR bundle tutorial&lt;/A&gt;&amp;nbsp;walks through it step by step.&amp;nbsp;&lt;SPAN&gt;The page on&amp;nbsp;&lt;/SPAN&gt;&lt;A class="du-bois-light-typography css-1yqesw9" role="link" href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/job-task-types/" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;adding tasks to jobs in bundles&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;lists all the JAR task options, including how to pass parameters to your main method.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&lt;SPAN&gt;Most Scala teams keep their pipeline logic in the JAR so they get proper unit tests, versioning and CI/CD through sbt or Maven. Notebooks are still very handy for exploring data and prototyping a transformation before moving it into the project. You can also attach the JAR to a cluster and call your classes from a Scala notebook to debug them interactively. Jobs can run both&amp;nbsp;&lt;/SPAN&gt;&lt;A class="du-bois-light-typography css-1yqesw9" role="link" href="https://learn.microsoft.com/en-us/azure/databricks/languages/scala/" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;notebooks and JARs&lt;/A&gt;&lt;SPAN&gt;, so mixing them is fine if your team is used to that, but compiled code is usually easier to maintain over time.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="du-bois-light-typography css-mdu5st" data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;Run&amp;nbsp;databricks bundle init default-scala, get the sample job deploying in your dev target, and then split the sample main class into your bronze, silver and gold entry points. Once that works, add the&amp;nbsp;depends_on&amp;nbsp;chain and you'll have the full medallion flow running from a single build. If you run into problems with JAR compatibility or compute access modes, the&amp;nbsp;&lt;A role="link" href="https://learn.microsoft.com/en-us/azure/databricks/jobs/tasks/jar/" rel="noopener noreferrer" data-component-type="typography_link" data-component-id="codegen_webapp_js_genai_util_markdown.tsx_71" aria-disabled="false" target="_blank"&gt;JAR task page&lt;/A&gt;&amp;nbsp;links to the build requirements, and that's the first place I'd check.&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;Hope this helps.&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV data-genai-markdown-block="true"&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Nov 2026 19:57:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-scala-project/m-p/177740#M57357</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-11-26T19:57:25Z</dc:date>
    </item>
  </channel>
</rss>

