<?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: Databricks Asset Bundles + Artifacts + Poetry in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/databricks-asset-bundles-artifacts-poetry/m-p/94665#M2111</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/117376"&gt;@filipniziol&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you very much for answering me.&lt;/P&gt;&lt;P&gt;Yes, I do (wheel_prod.png).&lt;/P&gt;&lt;P&gt;I could also install it locally too&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Fiabane_4-1729198294643.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/12046i8C306A23DFE835B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fiabane_4-1729198294643.png" alt="Fiabane_4-1729198294643.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The only part that was missing was to call it on the job.&lt;/P&gt;&lt;P&gt;The sad news is although the package was successfully deployed and called the command &lt;STRONG&gt;dbutils.widget.get('catalog')&lt;/STRONG&gt; did not work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def load_env():
    """
    Load configuration based on the environment.
    """
    try: 
        catalog = dbutils.widgets.get("catalog")
    except:
        catalog = 'development'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the&amp;nbsp;&lt;STRONG&gt;catalog&lt;/STRONG&gt; variable was ingested successfully:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Fiabane_6-1729206194180.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/12048iA7E69C9E111AD2AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fiabane_6-1729206194180.png" alt="Fiabane_6-1729206194180.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you once again for your attention and kindness.&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Thu, 17 Oct 2024 23:32:19 GMT</pubDate>
    <dc:creator>Fiabane</dc:creator>
    <dc:date>2024-10-17T23:32:19Z</dc:date>
    <item>
      <title>Databricks Asset Bundles + Artifacts + Poetry</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-asset-bundles-artifacts-poetry/m-p/94345#M2087</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've configured the DABs on our project successfully. Moreover, I could switch from setuptools to poetry almost successfully. In the project's databricks.yml I configured it as the &lt;A href="https://docs.databricks.com/en/dev-tools/bundles/python-wheel.html#step-4-update-the-projects-bundle-to-use-poetry" target="_self"&gt;documentation&lt;/A&gt; suggested, I've just changed the name of the artifact:&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;artifacts&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;config&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;type&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;whl&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;build&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;poetry build&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;path&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;The class that I want to 'compile' as a package/module is in the&amp;nbsp;&lt;STRONG&gt;project's root/config&lt;/STRONG&gt; folder:&lt;/P&gt;&lt;LI-SPOILER&gt;project/&lt;BR /&gt;├── config/&lt;BR /&gt;│&amp;nbsp; &amp;nbsp; &amp;nbsp;├── __init__.py&lt;BR /&gt;│&amp;nbsp; &amp;nbsp; &amp;nbsp;└── env_manager.py&lt;BR /&gt;├── pyproject.toml&lt;BR /&gt;├── poetry.lock&lt;/LI-SPOILER&gt;&lt;P&gt;Also, in the codepipeline template (AWS), I needed to add the following commands (which were not mentioned in the documentation):&lt;/P&gt;&lt;LI-SPOILER&gt;- sudo apt update&lt;BR /&gt;- sudo apt install -y pipx&lt;BR /&gt;- pipx install poetry&lt;BR /&gt;- pipx ensurepath&lt;BR /&gt;- export PATH="$PATH:/root/.local/bin"&lt;BR /&gt;- poetry --version&lt;/LI-SPOILER&gt;&lt;P&gt;The deployment was done (shown in the Figure below).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fiabane_0-1729111836436.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/12001i77C10ADBD4DB2A32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fiabane_0-1729111836436.png" alt="Fiabane_0-1729111836436.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, when I tried to run the job I got&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;ModuleNotFoundError: No module named 'config'&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;error message.&lt;/P&gt;&lt;P&gt;The way I am calling it on the files is: &lt;EM&gt;&lt;STRONG&gt;import config.env_manager as workspace&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 20:56:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-asset-bundles-artifacts-poetry/m-p/94345#M2087</guid>
      <dc:creator>Fiabane</dc:creator>
      <dc:date>2024-10-16T20:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundles + Artifacts + Poetry</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-asset-bundles-artifacts-poetry/m-p/94412#M2089</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/118390"&gt;@Fiabane&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Could you first check:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Do you see your .whl file in your artifacts folder?&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Could you try to install the package by running the code &lt;SPAN&gt;in your notebook &lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%pip install&amp;nbsp; &amp;lt;path to your wheel&amp;gt;&lt;/P&gt;&lt;P&gt;As far as I understand you want to have a job with a notebook that is using this package.&lt;BR /&gt;There is a whole video that covers this scenario:&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=dbuSAdcagEk" target="_blank"&gt;https://www.youtube.com/watch?v=dbuSAdcagEk&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Could you check if your job task has dependent libraries set with the path tyou your .whl file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 07:11:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-asset-bundles-artifacts-poetry/m-p/94412#M2089</guid>
      <dc:creator>filipniziol</dc:creator>
      <dc:date>2024-10-17T07:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundles + Artifacts + Poetry</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-asset-bundles-artifacts-poetry/m-p/94665#M2111</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/117376"&gt;@filipniziol&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you very much for answering me.&lt;/P&gt;&lt;P&gt;Yes, I do (wheel_prod.png).&lt;/P&gt;&lt;P&gt;I could also install it locally too&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Fiabane_4-1729198294643.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/12046i8C306A23DFE835B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fiabane_4-1729198294643.png" alt="Fiabane_4-1729198294643.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The only part that was missing was to call it on the job.&lt;/P&gt;&lt;P&gt;The sad news is although the package was successfully deployed and called the command &lt;STRONG&gt;dbutils.widget.get('catalog')&lt;/STRONG&gt; did not work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def load_env():
    """
    Load configuration based on the environment.
    """
    try: 
        catalog = dbutils.widgets.get("catalog")
    except:
        catalog = 'development'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the&amp;nbsp;&lt;STRONG&gt;catalog&lt;/STRONG&gt; variable was ingested successfully:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Fiabane_6-1729206194180.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/12048iA7E69C9E111AD2AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fiabane_6-1729206194180.png" alt="Fiabane_6-1729206194180.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you once again for your attention and kindness.&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Oct 2024 23:32:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-asset-bundles-artifacts-poetry/m-p/94665#M2111</guid>
      <dc:creator>Fiabane</dc:creator>
      <dc:date>2024-10-17T23:32:19Z</dc:date>
    </item>
  </channel>
</rss>

