<?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: import pymssql fails on DLT Serverless in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/import-pymssql-fails-on-dlt-serverless/m-p/117616#M45533</link>
    <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/163189"&gt;@Prashant2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're encountering an important limitation of Databricks DLT pipelines on Serverless Compute: currently, custom Python package installation using pip install within the notebook is not supported in DLT Serverless.&lt;BR /&gt;This is not a bug, but rather a limitation by design.&lt;/P&gt;&lt;P&gt;In Serverless DLT, the runtime environment is managed and hardened, and it does not allow arbitrary package installations at notebook execution time for:&lt;BR /&gt;- Security&lt;BR /&gt;- Stability&lt;BR /&gt;- Faster cold start times&lt;/P&gt;&lt;P&gt;While a regular serverless cluster (like for interactive notebooks or jobs) allows pip install,&lt;BR /&gt;DLT Serverless pipelines have restricted environments and must use packages that are:&lt;BR /&gt;- Pre-installed in the serverless runtime, or&lt;BR /&gt;- Packaged via a custom wheel or installed via a requirements.txt at deployment time (not inside the notebook)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 03 May 2025 18:46:47 GMT</pubDate>
    <dc:creator>lingareddy_Alva</dc:creator>
    <dc:date>2025-05-03T18:46:47Z</dc:date>
    <item>
      <title>import pymssql fails on DLT Serverless</title>
      <link>https://community.databricks.com/t5/data-engineering/import-pymssql-fails-on-dlt-serverless/m-p/117600#M45529</link>
      <description>&lt;P&gt;I have a delta live table pipeline which works fine on normal DLT job cluster.&lt;/P&gt;&lt;P&gt;But as soon as we switch it to use serverless compute it fails.&lt;/P&gt;&lt;P&gt;The failure happens at "import pymssql" after doing pip install pymssql as first statement of the source code notebook of the DLT Pipeline.&lt;/P&gt;&lt;P&gt;The error message is not helpful at all, but i tried to narrow it down to this statement after number of executions.&lt;/P&gt;&lt;P&gt;Is it a bug in DLT Serverless runtime? the same code works on serverless spark cluster as well&lt;/P&gt;</description>
      <pubDate>Sat, 03 May 2025 02:39:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/import-pymssql-fails-on-dlt-serverless/m-p/117600#M45529</guid>
      <dc:creator>Prashant2</dc:creator>
      <dc:date>2025-05-03T02:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: import pymssql fails on DLT Serverless</title>
      <link>https://community.databricks.com/t5/data-engineering/import-pymssql-fails-on-dlt-serverless/m-p/117616#M45533</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/163189"&gt;@Prashant2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're encountering an important limitation of Databricks DLT pipelines on Serverless Compute: currently, custom Python package installation using pip install within the notebook is not supported in DLT Serverless.&lt;BR /&gt;This is not a bug, but rather a limitation by design.&lt;/P&gt;&lt;P&gt;In Serverless DLT, the runtime environment is managed and hardened, and it does not allow arbitrary package installations at notebook execution time for:&lt;BR /&gt;- Security&lt;BR /&gt;- Stability&lt;BR /&gt;- Faster cold start times&lt;/P&gt;&lt;P&gt;While a regular serverless cluster (like for interactive notebooks or jobs) allows pip install,&lt;BR /&gt;DLT Serverless pipelines have restricted environments and must use packages that are:&lt;BR /&gt;- Pre-installed in the serverless runtime, or&lt;BR /&gt;- Packaged via a custom wheel or installed via a requirements.txt at deployment time (not inside the notebook)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 May 2025 18:46:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/import-pymssql-fails-on-dlt-serverless/m-p/117616#M45533</guid>
      <dc:creator>lingareddy_Alva</dc:creator>
      <dc:date>2025-05-03T18:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: import pymssql fails on DLT Serverless</title>
      <link>https://community.databricks.com/t5/data-engineering/import-pymssql-fails-on-dlt-serverless/m-p/117622#M45534</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/163189"&gt;@Prashant2&lt;/a&gt;&amp;nbsp;I am curious to know how you installed the library in your notebook. Did you use&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%pip install pymssql&lt;/LI-CODE&gt;&lt;P&gt;If so, could you try using a shell command instead, like:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;!pip install pymssql&lt;/LI-CODE&gt;&lt;P class=""&gt;I’ve had success using !pip install in serverless compute environments + dlt serverless jobs. For example, I recently installed &lt;STRONG&gt;&lt;EM&gt;weasyprint&lt;/EM&gt;&lt;/STRONG&gt; this way and was able to use it in a UDF for my final Delta Live Table.&lt;/P&gt;&lt;P class=""&gt;Let me know if that works for you!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eniwoke_0-1746311602150.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16460i12B2CF2338CB0A0B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="eniwoke_0-1746311602150.png" alt="eniwoke_0-1746311602150.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 May 2025 22:33:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/import-pymssql-fails-on-dlt-serverless/m-p/117622#M45534</guid>
      <dc:creator>eniwoke</dc:creator>
      <dc:date>2025-05-03T22:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: import pymssql fails on DLT Serverless</title>
      <link>https://community.databricks.com/t5/data-engineering/import-pymssql-fails-on-dlt-serverless/m-p/117635#M45536</link>
      <description>&lt;P&gt;Thanks for your response Eni, appreciate it.&lt;/P&gt;&lt;P&gt;i did try both % and !&lt;BR /&gt;It seems the problem is with the compatibility of pymssql library with the DLT serverless compute specifically , as i am able to install and run import other libraries from pip but not pymssql&lt;/P&gt;&lt;P&gt;From driver logs it appears that the pip install for pymssql succeeds successfully for fails to run the import statement due to some compatibility with the DLT serverless compute runtime&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may try it in your sample pipeline as well&lt;/P&gt;</description>
      <pubDate>Sun, 04 May 2025 15:29:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/import-pymssql-fails-on-dlt-serverless/m-p/117635#M45536</guid>
      <dc:creator>Prashant2</dc:creator>
      <dc:date>2025-05-04T15:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: import pymssql fails on DLT Serverless</title>
      <link>https://community.databricks.com/t5/data-engineering/import-pymssql-fails-on-dlt-serverless/m-p/117645#M45537</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/163189"&gt;@Prashant2&lt;/a&gt;, you are right, I just tried as well in my pipeline and i get an error at the import statement after installing pymssql library&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eniwoke_0-1746378641232.png"&gt;&lt;img src="https://community.databricks.com/skins/images/5B9E6713E03BF453E43BC7928B05A59B/responsive_peak/images/image_not_found.png" alt="eniwoke_0-1746378641232.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If it is not too much, you can try with pyodbc, seems to work.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eniwoke_1-1746379627515.png"&gt;&lt;img src="https://community.databricks.com/skins/images/5B9E6713E03BF453E43BC7928B05A59B/responsive_peak/images/image_not_found.png" alt="eniwoke_1-1746379627515.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 May 2025 18:02:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/import-pymssql-fails-on-dlt-serverless/m-p/117645#M45537</guid>
      <dc:creator>eniwoke</dc:creator>
      <dc:date>2025-05-04T18:02:05Z</dc:date>
    </item>
  </channel>
</rss>

