<?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 do you define PyPi libraries on job level in Asset Bundles? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-do-you-define-pypi-libraries-on-job-level-in-asset-bundles/m-p/152485#M53829</link>
    <description>&lt;P&gt;In this community post:&amp;nbsp;&lt;A href="https://community.databricks.com/t5/data-engineering/creating-cluster-configuration-with-library-dependency-using/td-p/120838" target="_blank"&gt;https://community.databricks.com/t5/data-engineering/creating-cluster-configuration-with-library-dependency-using/td-p/120838&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It seems that job level libraries is allowed?&lt;BR /&gt;&lt;BR /&gt;Personally, both databricks bundle validate and deploy throws no erros if I deploy a bundle with job level libraries, but when I run the job, none of the libraries are actually installed.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Mar 2026 08:51:33 GMT</pubDate>
    <dc:creator>brickster13</dc:creator>
    <dc:date>2026-03-30T08:51:33Z</dc:date>
    <item>
      <title>How do you define PyPi libraries on job level in Asset Bundles?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-you-define-pypi-libraries-on-job-level-in-asset-bundles/m-p/76045#M35135</link>
      <description>&lt;P data-unlink="true"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Reading the &lt;A href="https://docs.databricks.com/en/dev-tools/bundles/library-dependencies.html" target="_self"&gt;documentation&lt;/A&gt;,&amp;nbsp;it does not state it is possible to define libraries on job level instead of on task level.&amp;nbsp;It feels really counter-intuitive putting libraries on task level in Databricks workflows provisioned by Asset Bundles. Is there a way to put libraries on job level some other way?&lt;BR /&gt;&lt;BR /&gt;I tried the following:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;tasks:
  - task_key: task1
    job_cluster_key: job_cluster
    notebook_task:
      notebook_path: ../foo.ipynb
  - task_key: task2
    depends_on:
        - task_key: task1
    job_cluster_key: job_cluster
    notebook_task:
      notebook_path: ../foo.ipynb
libraries:
- pypi:
    package: pyyaml==6.0.1
- pypi:
    package: requests==2.31.0
- pypi:
    package: typing_extensions==4.4.0&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;Validating the DAB it does not fail, but doesn't work either. It only works when I put the libraries object on the task key level, which feels weird to me. Does that mean we can have different libraries installed for each task? The documentation doesn't really shine any light on this. I can define all libraries on the first task, then I guess the second task will inherit them also, but this feels weird.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I know from DBR 15.x and onwards we can use a requirements.txt workspace, but I am on DBR 14.3 LTS.&lt;BR /&gt;&lt;BR /&gt;I hope someone is able to shine some light on this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 11:08:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-you-define-pypi-libraries-on-job-level-in-asset-bundles/m-p/76045#M35135</guid>
      <dc:creator>jacovangelder</dc:creator>
      <dc:date>2024-06-28T11:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define PyPi libraries on job level in Asset Bundles?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-you-define-pypi-libraries-on-job-level-in-asset-bundles/m-p/76264#M35171</link>
      <description>&lt;P&gt;This is actually the way how job clusters work, you specify &lt;A href="https://docs.databricks.com/en/workflows/jobs/settings.html#configure-dependent-libraries" target="_self"&gt;dependent libraries on task level&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;However, starting with &lt;A href="https://github.com/databricks/cli/releases/tag/v0.222.0" target="_self"&gt;DB CLI v0.222.0&lt;/A&gt; you could try to use &lt;A href="https://github.com/databricks/cli/pull/1467" target="_self"&gt;complex variables&lt;/A&gt; for this kind of configuration.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 10:54:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-you-define-pypi-libraries-on-job-level-in-asset-bundles/m-p/76264#M35171</guid>
      <dc:creator>Witold</dc:creator>
      <dc:date>2024-07-01T10:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define PyPi libraries on job level in Asset Bundles?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-you-define-pypi-libraries-on-job-level-in-asset-bundles/m-p/76296#M35187</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/107959"&gt;@Witold&lt;/a&gt;&amp;nbsp;! Thought so.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I decided to go with an init script where I install my dependencies rather than installing libraries.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For future reference, this is what it looks like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;job_clusters:
  - job_cluster_key: job_cluster
    new_cluster:
      spark_version: ${var.spark_version}
      node_type_id: ${var.node_type_id}
      autoscale:
          min_workers: ${var.min_workers}
          max_workers: ${var.max_workers}
      data_security_mode: SINGLE_USER
      init_scripts:
        - workspace:
            destination: ${workspace.file_path}/resources/init-scripts/init-script.sh&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 01 Jul 2024 12:27:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-you-define-pypi-libraries-on-job-level-in-asset-bundles/m-p/76296#M35187</guid>
      <dc:creator>jacovangelder</dc:creator>
      <dc:date>2024-07-01T12:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define PyPi libraries on job level in Asset Bundles?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-you-define-pypi-libraries-on-job-level-in-asset-bundles/m-p/152482#M53828</link>
      <description>&lt;P&gt;This is a massive headache for my team. We might have interpreted your documentation wrong, so please correct me if that is the case.&lt;/P&gt;&lt;P&gt;Having libraries installed at the task level results in installing the libraries for every task. That is a massive waste of compute, and results in our lakeflow jobs taking way more time than necessary.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;On the other hand, it seems that init_scripts is a workaround for this issue. However, in your docs you specify that Databricks does not suggest managing package installs this way, but with little explanation as to why this is not reccommended.&lt;BR /&gt;&lt;BR /&gt;Is there really no option of specifying libraries for a job?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2026 08:49:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-you-define-pypi-libraries-on-job-level-in-asset-bundles/m-p/152482#M53828</guid>
      <dc:creator>brickster13</dc:creator>
      <dc:date>2026-03-30T08:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define PyPi libraries on job level in Asset Bundles?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-you-define-pypi-libraries-on-job-level-in-asset-bundles/m-p/152485#M53829</link>
      <description>&lt;P&gt;In this community post:&amp;nbsp;&lt;A href="https://community.databricks.com/t5/data-engineering/creating-cluster-configuration-with-library-dependency-using/td-p/120838" target="_blank"&gt;https://community.databricks.com/t5/data-engineering/creating-cluster-configuration-with-library-dependency-using/td-p/120838&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It seems that job level libraries is allowed?&lt;BR /&gt;&lt;BR /&gt;Personally, both databricks bundle validate and deploy throws no erros if I deploy a bundle with job level libraries, but when I run the job, none of the libraries are actually installed.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2026 08:51:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-you-define-pypi-libraries-on-job-level-in-asset-bundles/m-p/152485#M53829</guid>
      <dc:creator>brickster13</dc:creator>
      <dc:date>2026-03-30T08:51:33Z</dc:date>
    </item>
  </channel>
</rss>

