<?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 Init Scripts Error When Deploying a Delta Live Table Pipeline with Databricks Asset Bundles in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/init-scripts-error-when-deploying-a-delta-live-table-pipeline/m-p/111120#M9300</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;Let me give you some context. I am trying to deploy a Delta Live Table pipeline using Databricks Asset Bundles, which requires a private library hosted in Azure DevOps.&lt;/P&gt;&lt;P&gt;As far as I understand, this can be resolved in three ways:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Installing it directly in the notebook using %install,... (recommended by Databricks).&lt;/LI&gt;&lt;LI&gt;Using init scripts.&lt;/LI&gt;&lt;LI&gt;Using cluster policies with init scripts.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The first option works fine. Now, I am testing options 2 and 3, but I am encountering errors in both.&lt;/P&gt;&lt;P&gt;Focusing on option 2 (init scripts), here is what I have done:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;I created an init script in a Unity Catalog volume.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;I added it to the allowlist to avoid permission errors.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;To test its execution, I simplified the script to the following content:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;bash&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#!/bin/bash
echo "The initialization script is running correctly."&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;After uploading it to the bundle, in the clusters section, I defined the following:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;yaml&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;clusters:
  - label: default
    node_type_id: Standard_DS3_v2
    autoscale:
      min_workers: 1
      max_workers: 1
      mode: ENHANCED
    spark_env_vars:
      PIP_INDEX_URL: xxx
    init_scripts:
      - volumes:
          destination: /Volumes/system_metadata/init_scripts/cluster_dependencies.sh
libraries:
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The deployment completes successfully, but when executing, I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;com.databricks.pipelines.common.errors.deployment.DeploymentException: Failed to launch pipeline cluster xxx: Init scripts failed. instance_id: xxx, databricks_error_message: Cluster scoped init script /Volumes/system_metadata/init_scripts/cluster_dependencies... This error is likely due to a misconfiguration in the pipeline. Check the pipeline cluster configuration and associated cluster policy.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The pipeline does not have any associated cluster policy. However, in the compute section, there are several policies created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resources:
  pipelines:
    pipeline_dev_x:
      name: "x pipeline"
      clusters:
        - label: default
          node_type_id: Standard_DS3_v2
          spark_env_vars:
            PIP_INDEX_URL: xxx
          init_scripts:
            - volumes:
                destination: /Volumes/system_metadata/init_scripts/cluster_dependencies.sh
          autoscale:
            min_workers: 1
            max_workers: 1
            mode: ENHANCED
      libraries:
        - notebook:
            path: xxx
      schema: xxx
      development: true
      channel: PREVIEW
      catalog: xxx
      deployment:
        kind: BUNDLE
        metadata_file_path: xxx&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Can these cluster policies be applied automatically to the pipeline without explicitly referencing them?&lt;/LI&gt;&lt;LI&gt;I have reviewed the policies, and I don’t see any that could interfere, but has anyone faced this error before?&lt;/LI&gt;&lt;LI&gt;Has anyone tackled this issue using init scripts or cluster policies (executing the init script from a policy)?&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Tue, 25 Feb 2025 11:17:55 GMT</pubDate>
    <dc:creator>jorperort</dc:creator>
    <dc:date>2025-02-25T11:17:55Z</dc:date>
    <item>
      <title>Init Scripts Error When Deploying a Delta Live Table Pipeline with Databricks Asset Bundles</title>
      <link>https://community.databricks.com/t5/get-started-discussions/init-scripts-error-when-deploying-a-delta-live-table-pipeline/m-p/111120#M9300</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;Let me give you some context. I am trying to deploy a Delta Live Table pipeline using Databricks Asset Bundles, which requires a private library hosted in Azure DevOps.&lt;/P&gt;&lt;P&gt;As far as I understand, this can be resolved in three ways:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Installing it directly in the notebook using %install,... (recommended by Databricks).&lt;/LI&gt;&lt;LI&gt;Using init scripts.&lt;/LI&gt;&lt;LI&gt;Using cluster policies with init scripts.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The first option works fine. Now, I am testing options 2 and 3, but I am encountering errors in both.&lt;/P&gt;&lt;P&gt;Focusing on option 2 (init scripts), here is what I have done:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;I created an init script in a Unity Catalog volume.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;I added it to the allowlist to avoid permission errors.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;To test its execution, I simplified the script to the following content:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;bash&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#!/bin/bash
echo "The initialization script is running correctly."&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;After uploading it to the bundle, in the clusters section, I defined the following:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;yaml&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;clusters:
  - label: default
    node_type_id: Standard_DS3_v2
    autoscale:
      min_workers: 1
      max_workers: 1
      mode: ENHANCED
    spark_env_vars:
      PIP_INDEX_URL: xxx
    init_scripts:
      - volumes:
          destination: /Volumes/system_metadata/init_scripts/cluster_dependencies.sh
libraries:
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The deployment completes successfully, but when executing, I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;com.databricks.pipelines.common.errors.deployment.DeploymentException: Failed to launch pipeline cluster xxx: Init scripts failed. instance_id: xxx, databricks_error_message: Cluster scoped init script /Volumes/system_metadata/init_scripts/cluster_dependencies... This error is likely due to a misconfiguration in the pipeline. Check the pipeline cluster configuration and associated cluster policy.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The pipeline does not have any associated cluster policy. However, in the compute section, there are several policies created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resources:
  pipelines:
    pipeline_dev_x:
      name: "x pipeline"
      clusters:
        - label: default
          node_type_id: Standard_DS3_v2
          spark_env_vars:
            PIP_INDEX_URL: xxx
          init_scripts:
            - volumes:
                destination: /Volumes/system_metadata/init_scripts/cluster_dependencies.sh
          autoscale:
            min_workers: 1
            max_workers: 1
            mode: ENHANCED
      libraries:
        - notebook:
            path: xxx
      schema: xxx
      development: true
      channel: PREVIEW
      catalog: xxx
      deployment:
        kind: BUNDLE
        metadata_file_path: xxx&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Can these cluster policies be applied automatically to the pipeline without explicitly referencing them?&lt;/LI&gt;&lt;LI&gt;I have reviewed the policies, and I don’t see any that could interfere, but has anyone faced this error before?&lt;/LI&gt;&lt;LI&gt;Has anyone tackled this issue using init scripts or cluster policies (executing the init script from a policy)?&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 25 Feb 2025 11:17:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/init-scripts-error-when-deploying-a-delta-live-table-pipeline/m-p/111120#M9300</guid>
      <dc:creator>jorperort</dc:creator>
      <dc:date>2025-02-25T11:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Init Scripts Error When Deploying a Delta Live Table Pipeline with Databricks Asset Bundles</title>
      <link>https://community.databricks.com/t5/get-started-discussions/init-scripts-error-when-deploying-a-delta-live-table-pipeline/m-p/111125#M9301</link>
      <description>&lt;P&gt;I detected the error; it was due to the path defined in the bundle where the init script was located.&lt;/P&gt;&lt;P&gt;I'm closing the post.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 12:06:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/init-scripts-error-when-deploying-a-delta-live-table-pipeline/m-p/111125#M9301</guid>
      <dc:creator>jorperort</dc:creator>
      <dc:date>2025-02-25T12:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Init Scripts Error When Deploying a Delta Live Table Pipeline with Databricks Asset Bundles</title>
      <link>https://community.databricks.com/t5/get-started-discussions/init-scripts-error-when-deploying-a-delta-live-table-pipeline/m-p/114503#M9302</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I also face the same issue. Can you elaborate how the path defined is a root cause?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 11:01:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/init-scripts-error-when-deploying-a-delta-live-table-pipeline/m-p/114503#M9302</guid>
      <dc:creator>116680</dc:creator>
      <dc:date>2025-04-04T11:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Init Scripts Error When Deploying a Delta Live Table Pipeline with Databricks Asset Bundles</title>
      <link>https://community.databricks.com/t5/get-started-discussions/init-scripts-error-when-deploying-a-delta-live-table-pipeline/m-p/114584#M9303</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/3624"&gt;@116680&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The problem I had was with the name of the startup script that I had uploaded to the volume and had the correct permissions. The name didn't match the one defined in the DAB resource that creates the DLT pipeline.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Apr 2025 09:36:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/init-scripts-error-when-deploying-a-delta-live-table-pipeline/m-p/114584#M9303</guid>
      <dc:creator>jorperort</dc:creator>
      <dc:date>2025-04-05T09:36:29Z</dc:date>
    </item>
  </channel>
</rss>

