<?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 How do I import class/functions so it work in Databricks and in my IDE in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34372#M25127</link>
    <description>&lt;P&gt;I already saw this &lt;A href="https://community.databricks.com/s/question/0D53f00001HKHk8CAH/how-to-import-one-databricks-python-notebook-into-another" alt="https://community.databricks.com/s/question/0D53f00001HKHk8CAH/how-to-import-one-databricks-python-notebook-into-another" target="_blank"&gt;post&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want my code to work on both platforms (Databricks and PyCharm), is there any way to do it? &lt;/P&gt;</description>
    <pubDate>Thu, 25 Nov 2021 13:31:29 GMT</pubDate>
    <dc:creator>avnerrhh</dc:creator>
    <dc:date>2021-11-25T13:31:29Z</dc:date>
    <item>
      <title>How do I import class/functions so it work in Databricks and in my IDE</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34372#M25127</link>
      <description>&lt;P&gt;I already saw this &lt;A href="https://community.databricks.com/s/question/0D53f00001HKHk8CAH/how-to-import-one-databricks-python-notebook-into-another" alt="https://community.databricks.com/s/question/0D53f00001HKHk8CAH/how-to-import-one-databricks-python-notebook-into-another" target="_blank"&gt;post&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want my code to work on both platforms (Databricks and PyCharm), is there any way to do it? &lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 13:31:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34372#M25127</guid>
      <dc:creator>avnerrhh</dc:creator>
      <dc:date>2021-11-25T13:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import class/functions so it work in Databricks and in my IDE</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34373#M25128</link>
      <description>&lt;P&gt;yes.&lt;/P&gt;&lt;P&gt;one way is to develop everything locally on your pc, so you also need to have spark installed.&lt;/P&gt;&lt;P&gt;This is of course not ideal as you will not have some interesting stuff that databricks provides.&lt;/P&gt;&lt;P&gt;But it can be done. What you have to do is create a whl and put that on databricks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A much better way imo is to use databricks-connect. This tool enables you to use your IDE (pycharm) and let the code run on databricks, not locally:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/azure/databricks/dev-tools/databricks-connect" alt="https://docs.microsoft.com/en-us/azure/databricks/dev-tools/databricks-connect" target="_blank"&gt;https://docs.microsoft.com/en-us/azure/databricks/dev-tools/databricks-connect&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mind that the databricks-connect devs don't follow the ultrafast release schedule of the databricks platform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since a short while you can also use Databricks repos for modules and functions:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/azure/databricks/repos#work-with-python-and-r-modules" target="test_blank"&gt;https://docs.microsoft.com/en-us/azure/databricks/repos#work-with-python-and-r-modules&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 13:37:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34373#M25128</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2021-11-25T13:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import class/functions so it work in Databricks and in my IDE</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34374#M25129</link>
      <description>&lt;P&gt;Yes I've used Databricks-connect to do so.&lt;/P&gt;&lt;P&gt;When I work with pychram '%run' doesn't work but 'import' do, when I work with Databricks 'import' doesn't but '%run' do. &lt;/P&gt;&lt;P&gt; How can I resolve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 13:53:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34374#M25129</guid>
      <dc:creator>avnerrhh</dc:creator>
      <dc:date>2021-11-25T13:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import class/functions so it work in Databricks and in my IDE</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34375#M25130</link>
      <description>&lt;P&gt;Never mind I found that I need to use 'Files' to do so, Thanks &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;  &lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 13:56:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34375#M25130</guid>
      <dc:creator>avnerrhh</dc:creator>
      <dc:date>2021-11-25T13:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import class/functions so it work in Databricks and in my IDE</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34376#M25131</link>
      <description>&lt;P&gt;Hi @Avner Huri​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you mind elaborating on what you mean by using 'Files'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems I have the same challenge:&lt;/P&gt;&lt;P&gt;1) I already use databricks-connect&lt;/P&gt;&lt;P&gt;2) I still have an issue exploring some notebooks in Pycharm because %run magic is not treated as an import&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 08:00:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34376#M25131</guid>
      <dc:creator>Bruno_Lannoo</dc:creator>
      <dc:date>2022-09-19T08:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import class/functions so it work in Databricks and in my IDE</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34377#M25132</link>
      <description>&lt;P&gt;Files - if you want to 'import' command to Import code to your notebook, your code must be in a 'File'(this is his name on the Databricks UI) if you want to import a notebook you have to use %run&lt;/P&gt;&lt;P&gt;yes the %run command is a problem, I didn't try to solve it just didn't use it in places that must have it.&lt;/P&gt;&lt;P&gt;but I thunk you can just create a wrapper class that use %run when you are on Databricks and import otherwise.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 08:14:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34377#M25132</guid>
      <dc:creator>avnerrhh</dc:creator>
      <dc:date>2022-09-19T08:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import class/functions so it work in Databricks and in my IDE</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34378#M25133</link>
      <description>&lt;P&gt;Oh k, thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That wrapper idea is interesting, maybe I could do something like that.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 17:08:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-import-class-functions-so-it-work-in-databricks-and-in/m-p/34378#M25133</guid>
      <dc:creator>Bruno_Lannoo</dc:creator>
      <dc:date>2022-09-19T17:08:51Z</dc:date>
    </item>
  </channel>
</rss>

