<?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: Why does my Notebook fails if I try to load a function from another Notebook in Repos in Databricks in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/why-does-my-notebook-fails-if-i-try-to-load-a-function-from/m-p/19112#M12765</link>
    <description>&lt;P&gt;@Shubham Biswas​, so &lt;A href="https://func.py" alt="https://func.py" target="_blank"&gt;func.py&lt;/A&gt; is a plain Python file, not a Databricks notebook?&lt;/P&gt;&lt;P&gt;Can you also check the following topic?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.databricks.com/s/question/0D53f00001mUyh2CAC/limitations-with-udfs-wrapping-modules-imported-via-repos-files" alt="https://community.databricks.com/s/question/0D53f00001mUyh2CAC/limitations-with-udfs-wrapping-modules-imported-via-repos-files" target="_blank"&gt;https://community.databricks.com/s/question/0D53f00001mUyh2CAC/limitations-with-udfs-wrapping-modules-imported-via-repos-files&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jun 2022 12:25:11 GMT</pubDate>
    <dc:creator>-werners-</dc:creator>
    <dc:date>2022-06-01T12:25:11Z</dc:date>
    <item>
      <title>Why does my Notebook fails if I try to load a function from another Notebook in Repos in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/why-does-my-notebook-fails-if-i-try-to-load-a-function-from/m-p/19111#M12764</link>
      <description>&lt;P&gt;My function in func.py&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;def lower_events(df):
 return df.withColumn("event",f.lower(f.col("event")))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My main notebook &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;import pyspark.sql.functions as f
from pyspark.sql.functions import udf, col, lower
import sys
&amp;nbsp;
sys.path.append("..")
from folder.func.  import   lower_events
#from folder  import   func
&amp;nbsp;
df_clean = lower_events(df)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting this error &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;NameError: name 'f' is not defined&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 08:26:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/why-does-my-notebook-fails-if-i-try-to-load-a-function-from/m-p/19111#M12764</guid>
      <dc:creator>shubhamb</dc:creator>
      <dc:date>2022-06-01T08:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Notebook fails if I try to load a function from another Notebook in Repos in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/why-does-my-notebook-fails-if-i-try-to-load-a-function-from/m-p/19112#M12765</link>
      <description>&lt;P&gt;@Shubham Biswas​, so &lt;A href="https://func.py" alt="https://func.py" target="_blank"&gt;func.py&lt;/A&gt; is a plain Python file, not a Databricks notebook?&lt;/P&gt;&lt;P&gt;Can you also check the following topic?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.databricks.com/s/question/0D53f00001mUyh2CAC/limitations-with-udfs-wrapping-modules-imported-via-repos-files" alt="https://community.databricks.com/s/question/0D53f00001mUyh2CAC/limitations-with-udfs-wrapping-modules-imported-via-repos-files" target="_blank"&gt;https://community.databricks.com/s/question/0D53f00001mUyh2CAC/limitations-with-udfs-wrapping-modules-imported-via-repos-files&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 12:25:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/why-does-my-notebook-fails-if-i-try-to-load-a-function-from/m-p/19112#M12765</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2022-06-01T12:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Notebook fails if I try to load a function from another Notebook in Repos in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/why-does-my-notebook-fails-if-i-try-to-load-a-function-from/m-p/19115#M12768</link>
      <description>&lt;P&gt;@Kaniz Fatma​&amp;nbsp; &lt;A href="https://community.databricks.com/s/question/0D58Y00008ouo6xSAA/how-to-fetch-environmental-variables-saved-in-one-notebook-into-another-notebook-in-databricks-repos-and-notebooks" target="test_blank"&gt;https://community.databricks.com/s/question/0D58Y00008ouo6xSAA/how-to-fetch-environmental-variables-saved-in-one-notebook-into-another-notebook-in-databricks-repos-and-notebooks&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please look into this&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 05:23:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/why-does-my-notebook-fails-if-i-try-to-load-a-function-from/m-p/19115#M12768</guid>
      <dc:creator>shubhamb</dc:creator>
      <dc:date>2022-06-16T05:23:59Z</dc:date>
    </item>
  </channel>
</rss>

