<?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: detect runtime in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4622233#M8170</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/24978"&gt;@smpa01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;May I ask if you have resolved this issue? If so, please mark the helpful reply and &lt;STRONG&gt;accept it as the solution.&lt;/STRONG&gt; This will be helpful for other community members who have similar problems to solve it faster.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thank You.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Mar 2025 11:24:43 GMT</pubDate>
    <dc:creator>V-yubandi-msft</dc:creator>
    <dc:date>2025-03-24T11:24:43Z</dc:date>
    <item>
      <title>detect runtime</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4607112#M7871</link>
      <description>&lt;P&gt;Is there any way for a code to return the environment in notebook;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;//pseudocode

print(os.environ)
// detects either Fabric or Databricks runtime&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you in advance&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 14:33:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4607112#M7871</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2025-03-12T14:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: detect runtime</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4607750#M7881</link>
      <description>&lt;P&gt;This might be useful&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://bradleyschacht.com/gathering-useful-notebook-and-environment-details-at-runtime" target="_blank"&gt;Gathering useful notebook and environment details at runtime&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 01:30:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4607750#M7881</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-03-13T01:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: detect runtime</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4608376#M7898</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/24978"&gt;@smpa01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can utilize &amp;nbsp;&amp;nbsp;‘notebookutils.runtime.context’ &amp;nbsp;&amp;nbsp;in Microsoft Fabric to obtain information about the current session, such as the notebook name, workspace details, and lakehouse information.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt; notebookutils.runtime.context&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Helpful Reference:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-utilities#additional-information" target="_blank"&gt;NotebookUtils (former MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I hope this information is helpful to you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 10:06:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4608376#M7898</guid>
      <dc:creator>V-yubandi-msft</dc:creator>
      <dc:date>2025-03-13T10:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: detect runtime</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4608664#M7905</link>
      <description>&lt;P&gt;I need a code that can run both in databricks and fabric notebooks &lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 12:59:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4608664#M7905</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2025-03-13T12:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: detect runtime</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4618076#M8092</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/24978"&gt;@smpa01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Detecting the environment in a notebook whether it's running on Microsoft Fabric or Databricks requires different methods since both platforms handle runtime details differently. Unfortunately, there's no universal way to do this across both environments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each platform has its own way of providing system information:&lt;/P&gt;
&lt;P&gt;1. Microsoft Fabric Notebooks -&amp;nbsp; Microsoft Fabric relies on notebookutils.runtime.context to fetch session, notebook, and workspace details. However, this API is specific to Fabric and isn't available in Databricks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Databricks provides the DATABRICKS_RUNTIME_VERSION environment variable, which shows the runtime version. This variable is specific to Databricks and is not available in Microsoft Fabric.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;FYI&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vyubandimsft_0-1742470807485.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1252352i1D388705C7D57545/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vyubandimsft_0-1742470807485.png" alt="Vyubandimsft_0-1742470807485.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vyubandimsft_1-1742470807489.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1252353i4ADD714F09EEC362/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vyubandimsft_1-1742470807489.png" alt="Vyubandimsft_1-1742470807489.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 11:42:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4618076#M8092</guid>
      <dc:creator>V-yubandi-msft</dc:creator>
      <dc:date>2025-03-20T11:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: detect runtime</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4622233#M8170</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/24978"&gt;@smpa01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;May I ask if you have resolved this issue? If so, please mark the helpful reply and &lt;STRONG&gt;accept it as the solution.&lt;/STRONG&gt; This will be helpful for other community members who have similar problems to solve it faster.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thank You.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 11:24:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4622233#M8170</guid>
      <dc:creator>V-yubandi-msft</dc:creator>
      <dc:date>2025-03-24T11:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: detect runtime</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4628122#M8267</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/24978"&gt;@smpa01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;Has your issue been resolved, or do you require any further information? Your feedback is valuable to us. If the solution was effective, please mark it as '&lt;STRONG&gt;Accepted Solution' &lt;/STRONG&gt;to assist other community members experiencing the same issue.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2025 18:46:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4628122#M8267</guid>
      <dc:creator>V-yubandi-msft</dc:creator>
      <dc:date>2025-03-27T18:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: detect runtime</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4630976#M8306</link>
      <description>&lt;P&gt;The problem requires a code that runs across platforms&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;sys.modules&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;and returns unique values related to 'fabric' or 'databricks' or a key that contains&amp;nbsp; 'fabric' or 'databricks' .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am still open for a better solution but for now I can survive with this.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Mar 2025 19:38:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4630976#M8306</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2025-03-30T19:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: detect runtime</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4634201#M8353</link>
      <description>&lt;P&gt;You managed to find a temporary solution, so it's best to mark it as accepted. This will be helpful for others facing the same issue for now.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 04:05:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/detect-runtime/m-p/4634201#M8353</guid>
      <dc:creator>V-yubandi-msft</dc:creator>
      <dc:date>2025-04-02T04:05:12Z</dc:date>
    </item>
  </channel>
</rss>

