<?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 Asset Bundles: issue with python_file path in spark_python_task in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-issue-with-python-file-path-in-spark/m-p/134876#M50216</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for you reply. The issue is related to the fact if am also providing git_source parameters in this job (even though the source parameter of my task is set to WORKSPACE). When I comment the git_source part, specifying the path in a relative way works: python_file: ./../src/get_git_credentials.py&lt;/P&gt;&lt;P data-unlink="true"&gt;On &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/job-task-types" target="_self"&gt;this page&lt;/A&gt; I found this: "The job&lt;SPAN&gt;&amp;nbsp;git_source&lt;SPAN&gt;&amp;nbsp;field and task&lt;SPAN&gt;&amp;nbsp;source&lt;SPAN&gt;&amp;nbsp;field set to&lt;SPAN&gt;&amp;nbsp;GIT&lt;SPAN&gt;&amp;nbsp;are not recommended for bundles, because local relative paths may not point to the same content in the Git repository. Bundles expect that a deployed job has the same files as the local copy from where it was deployed."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead, clone the repository locally and set up your bundle project within this repository, so that the source for tasks are the workspace."&lt;/P&gt;&lt;P&gt;I would like to configure this git_source parameters only for the task that requires it but it seems like it can only be defined at job level.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Oct 2025 15:10:39 GMT</pubDate>
    <dc:creator>ext07_rvoort</dc:creator>
    <dc:date>2025-10-14T15:10:39Z</dc:date>
    <item>
      <title>Databricks Asset Bundles: issue with python_file path in spark_python_task</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-issue-with-python-file-path-in-spark/m-p/134322#M50090</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to run a python file which is stored in src folder. However, I am getting the following error:&amp;nbsp;&lt;EM&gt;Error: cannot update job: Invalid python file reference: src/get_git_credentials.py. Please visit the Databricks user guide for supported python references&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Here is my task definition:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resources:
  jobs:
    clicksend_elt:
      name: clicksend_elt
      schedule:
        quartz_cron_expression: 0 0 9-18 ? * MON-FRI *
        timezone_id: Europe/Luxembourg
        pause_status: ${var.clicksend_schedule_status}
      tasks:
        - task_key: get_git_credentials
          job_cluster_key: clicksend_job_cluster
          email_notifications: {}
          run_if: ALL_SUCCESS
          spark_python_task:
            python_file: src/get_git_credentials.py&lt;/LI-CODE&gt;&lt;P&gt;And the absolute path of the file I am trying to run is (my DAB project being data_lakehouse):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ext07_rvoort_2-1759997838194.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20598i9A0924C1CE380E8B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ext07_rvoort_2-1759997838194.png" alt="ext07_rvoort_2-1759997838194.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the databricks.yml file I include resources with:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;include:
  - resources/*.yml&lt;/LI-CODE&gt;&lt;P&gt;How should I input the path of the file? Somehow the only was that it works is by providing the absolute path:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;python_file: "${workspace.root_path}/files/src/get_git_credentials.py"&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 08:18:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-issue-with-python-file-path-in-spark/m-p/134322#M50090</guid>
      <dc:creator>ext07_rvoort</dc:creator>
      <dc:date>2025-10-09T08:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundles: issue with python_file path in spark_python_task</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-issue-with-python-file-path-in-spark/m-p/134329#M50092</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/189911"&gt;@ext07_rvoort&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Could you try specify it in relative way:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;python_file: ../src/get_git_credentials.py&lt;/LI-CODE&gt;&lt;P&gt;So, in my setup I have following directory structure:&lt;/P&gt;&lt;P&gt;root folder:&lt;BR /&gt;&amp;nbsp; - databricks.yml file&lt;BR /&gt;&amp;nbsp; - src/&lt;BR /&gt;&amp;nbsp; - resources/job.yml&lt;/P&gt;&lt;P&gt;And then to refer in job.yml to source files that reside in src in need to provide path in following way:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;../src/ingestion/extraction.py&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 09 Oct 2025 08:46:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-issue-with-python-file-path-in-spark/m-p/134329#M50092</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-10-09T08:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundles: issue with python_file path in spark_python_task</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-issue-with-python-file-path-in-spark/m-p/134876#M50216</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for you reply. The issue is related to the fact if am also providing git_source parameters in this job (even though the source parameter of my task is set to WORKSPACE). When I comment the git_source part, specifying the path in a relative way works: python_file: ./../src/get_git_credentials.py&lt;/P&gt;&lt;P data-unlink="true"&gt;On &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/job-task-types" target="_self"&gt;this page&lt;/A&gt; I found this: "The job&lt;SPAN&gt;&amp;nbsp;git_source&lt;SPAN&gt;&amp;nbsp;field and task&lt;SPAN&gt;&amp;nbsp;source&lt;SPAN&gt;&amp;nbsp;field set to&lt;SPAN&gt;&amp;nbsp;GIT&lt;SPAN&gt;&amp;nbsp;are not recommended for bundles, because local relative paths may not point to the same content in the Git repository. Bundles expect that a deployed job has the same files as the local copy from where it was deployed."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead, clone the repository locally and set up your bundle project within this repository, so that the source for tasks are the workspace."&lt;/P&gt;&lt;P&gt;I would like to configure this git_source parameters only for the task that requires it but it seems like it can only be defined at job level.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2025 15:10:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-issue-with-python-file-path-in-spark/m-p/134876#M50216</guid>
      <dc:creator>ext07_rvoort</dc:creator>
      <dc:date>2025-10-14T15:10:39Z</dc:date>
    </item>
  </channel>
</rss>

