<?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: Delta Live Table Pipeline with Multiple Notebooks in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/23335#M16086</link>
    <description>&lt;P&gt;Hi @Dave Wilson​&amp;nbsp;%run or dbutils is not supported in DLT. This is intentionally disabled because DLT is declarative and we cannot perform data movement on our own.&lt;/P&gt;&lt;P&gt;To answer your first query, there is unfortunately no option to make the utils notebook run first. The only option is to combine utils and your main notebooks together. This does not address the reusability aspect in DLT and we have raised this feature request with the product team. The engineering team is working internally to address this issue. We can soon expect a feature that would address this usecase. &lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 19:54:52 GMT</pubDate>
    <dc:creator>Vivian_Wilfred</dc:creator>
    <dc:date>2022-11-08T19:54:52Z</dc:date>
    <item>
      <title>Delta Live Table Pipeline with Multiple Notebooks</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/23333#M16084</link>
      <description>&lt;P&gt;I have two notebooks created for my Delta Live Table pipeline. The first is a utils notebook with functions I will be reusing for other pipelines. The second contains my actual creation of the delta live tables. I added both notebooks to the pipeline settings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1232i411BD1B10CBA8CB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;But the pipeline fails with the error 'Failed to execute python command for notebook' pointing to the function I created in my utils notebook. Alternatively, I attempted to use a %run magic command to force the utils notebook to run first, but it did not work. I was given the warning that magic commands are not supported. Is there any way to force the Delta Live Table Pipeline to load my utils notebook first so that its functions can be referenced while building the pipeline?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 21:53:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/23333#M16084</guid>
      <dc:creator>Dave_Nithio</dc:creator>
      <dc:date>2022-11-07T21:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Delta Live Table Pipeline with Multiple Notebooks</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/23334#M16085</link>
      <description>&lt;P&gt;Per &lt;A href="https://community.databricks.com/s/question/0D58Y00009J5slUSAR/can-you-use-run-or-dbutilsnotebookrun-in-a-delta-live-table-pipeline" alt="https://community.databricks.com/s/question/0D58Y00009J5slUSAR/can-you-use-run-or-dbutilsnotebookrun-in-a-delta-live-table-pipeline" target="_blank"&gt;another question&lt;/A&gt; we are unable to use either magic commands or dbutils.notebook.run with the pro level databricks account or Delta Live Tables. Are there any other solutions for utilizing generic functions from other notebooks within a Delta Live Table pipeline?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 14:43:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/23334#M16085</guid>
      <dc:creator>Dave_Nithio</dc:creator>
      <dc:date>2022-11-08T14:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Delta Live Table Pipeline with Multiple Notebooks</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/23335#M16086</link>
      <description>&lt;P&gt;Hi @Dave Wilson​&amp;nbsp;%run or dbutils is not supported in DLT. This is intentionally disabled because DLT is declarative and we cannot perform data movement on our own.&lt;/P&gt;&lt;P&gt;To answer your first query, there is unfortunately no option to make the utils notebook run first. The only option is to combine utils and your main notebooks together. This does not address the reusability aspect in DLT and we have raised this feature request with the product team. The engineering team is working internally to address this issue. We can soon expect a feature that would address this usecase. &lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 19:54:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/23335#M16086</guid>
      <dc:creator>Vivian_Wilfred</dc:creator>
      <dc:date>2022-11-08T19:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Delta Live Table Pipeline with Multiple Notebooks</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/23336#M16087</link>
      <description>&lt;P&gt;Hi @Vivian Wilfred​&amp;nbsp;and @Dave Wilson​&amp;nbsp;we solved our reusability code with repos and pointing the code to our main code:&lt;/P&gt;&lt;P&gt;sys.path.append(os.path.abspath('/Workspace/Repos/[your repo]/[folder with the python scripts'))&lt;/P&gt;&lt;P&gt;from your_class import *&lt;/P&gt;&lt;P&gt;It just works if your reusable code is in python. Also depending on what you want to do we noticed that DLT is always executed as the last piece of the code no matter what is the position in the script&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 14:36:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/23336#M16087</guid>
      <dc:creator>fecavalc08</dc:creator>
      <dc:date>2023-01-23T14:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delta Live Table Pipeline with Multiple Notebooks</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/23337#M16088</link>
      <description>&lt;P&gt;Could you help me with explain this in detail? &lt;/P&gt;&lt;P&gt;Lets i have notebook abc which is reusable and pqr is the one i will be mentioning in dlt pipeline.&lt;/P&gt;&lt;P&gt;how do i call functions from abc pipeline in pqr?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 14:43:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/23337#M16088</guid>
      <dc:creator>ssudhakarpatil</dc:creator>
      <dc:date>2023-05-02T14:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Delta Live Table Pipeline with Multiple Notebooks</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/74266#M34735</link>
      <description>&lt;P&gt;I changed in my notebooks the magic commands using the sys and os library but when I run the code in a cluster it works correctly, but when I do it from the delta live table pipeline it does not work, when I try to see the current directory data it is something different, what additional configuration should I do?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(os.&lt;/SPAN&gt;&lt;SPAN&gt;getcwd&lt;/SPAN&gt;&lt;SPAN&gt;()) -&amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;/databricks/driver&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 15 Jun 2024 17:35:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/74266#M34735</guid>
      <dc:creator>alexgv12</dc:creator>
      <dc:date>2024-06-15T17:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Delta Live Table Pipeline with Multiple Notebooks</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/84245#M37171</link>
      <description>&lt;P&gt;Hi Dave,&lt;/P&gt;&lt;P&gt;You can solve this by putting your utils into a python file and referencing your .py file in the DLT notebook. I provided a template for the python file below:&lt;/P&gt;&lt;P&gt;STEP 1:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#import functions
from pyspark.sql import SparkSession
import IPython

dbutils = IPython.get_ipython().user_ns["dbutils"]
spark = SparkSession.builder.getOrCreate()

def myfunc1():
test = 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;STEP 2: You will need to create a __init__.py file in the same directory your utils.py file lives.&lt;/P&gt;&lt;P&gt;STEP 3:&lt;/P&gt;&lt;P&gt;In your DLT notebook, you'll need to append your sys path and then import your utils file as a library.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# set path
import sys
sys.path.append("/Workspace/utils_folder")

# import libraries
import dlt
import my_utils&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I suggest to avoid naming your package with existing packages, e,g; pandas as a file name. I also suggest you put your utils file in a separate path from all your other files. This will make appending your path less risky.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 20:29:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-table-pipeline-with-multiple-notebooks/m-p/84245#M37171</guid>
      <dc:creator>JackyL</dc:creator>
      <dc:date>2024-08-26T20:29:48Z</dc:date>
    </item>
  </channel>
</rss>

