<?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 Function not found when running from another Notebook using %run command. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/function-not-found-when-running-from-another-notebook-using-run/m-p/31793#M23163</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm trying to run some functions from another notebook (data_process_notebook) in my main notebook, using the &lt;A href="https://docs.databricks.com/notebooks/notebooks-use.html?&amp;amp;_ga=2.209065426.1352778893.1662990158-2025117235.1660944628#run" alt="https://docs.databricks.com/notebooks/notebooks-use.html?&amp;amp;_ga=2.209065426.1352778893.1662990158-2025117235.1660944628#run" target="_blank"&gt;%run&lt;/A&gt;&amp;nbsp;command command. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the command: %run ../path/to/data_process_notebook, it is able to complete successfully, no path, permission or code errors.  Since run command ran successfully, I'm assuming the functions have been defined correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However later in my original notebook, I'm calling a function from the data_process_notebook.&lt;/P&gt;&lt;P&gt;I'm getting this error: "name 'myFunc' is not defined". I'm getting this output from the standard output logs from the driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm also running code from other notebooks, using the same %run command. I'm also calling the functions from these notebooks in my main notebook and they seem to be working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've re-started the cluster and I still get the same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to resolve this? Would I have to copy the code from data_process_notebook into my main notebook in order to get it to run?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2022 19:43:56 GMT</pubDate>
    <dc:creator>jay_sharma</dc:creator>
    <dc:date>2022-09-13T19:43:56Z</dc:date>
    <item>
      <title>Function not found when running from another Notebook using %run command.</title>
      <link>https://community.databricks.com/t5/data-engineering/function-not-found-when-running-from-another-notebook-using-run/m-p/31793#M23163</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm trying to run some functions from another notebook (data_process_notebook) in my main notebook, using the &lt;A href="https://docs.databricks.com/notebooks/notebooks-use.html?&amp;amp;_ga=2.209065426.1352778893.1662990158-2025117235.1660944628#run" alt="https://docs.databricks.com/notebooks/notebooks-use.html?&amp;amp;_ga=2.209065426.1352778893.1662990158-2025117235.1660944628#run" target="_blank"&gt;%run&lt;/A&gt;&amp;nbsp;command command. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the command: %run ../path/to/data_process_notebook, it is able to complete successfully, no path, permission or code errors.  Since run command ran successfully, I'm assuming the functions have been defined correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However later in my original notebook, I'm calling a function from the data_process_notebook.&lt;/P&gt;&lt;P&gt;I'm getting this error: "name 'myFunc' is not defined". I'm getting this output from the standard output logs from the driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm also running code from other notebooks, using the same %run command. I'm also calling the functions from these notebooks in my main notebook and they seem to be working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've re-started the cluster and I still get the same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to resolve this? Would I have to copy the code from data_process_notebook into my main notebook in order to get it to run?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 19:43:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/function-not-found-when-running-from-another-notebook-using-run/m-p/31793#M23163</guid>
      <dc:creator>jay_sharma</dc:creator>
      <dc:date>2022-09-13T19:43:56Z</dc:date>
    </item>
  </channel>
</rss>

