<?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 Serverless Compute - How to determine if being used programatically in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/serverless-compute-how-to-determine-if-being-used/m-p/92620#M38479</link>
    <description>&lt;P&gt;Hi,&amp;nbsp; We use a common notebook for all our "common" settings, this notebook is called in the first cell of each notebook we develop.&amp;nbsp; This issue we are now having is that we need 2 common notebooks, one for a normal shared compute and one for serverless as serverless does not allow (need) the same spark config commands.&amp;nbsp; What I'd like to do is determine in our common notebook whether it is running on serverless compute or not so I can have just one common notebook, any ideas if and how I can do this.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2024 06:39:14 GMT</pubDate>
    <dc:creator>Dave1967</dc:creator>
    <dc:date>2024-10-03T06:39:14Z</dc:date>
    <item>
      <title>Serverless Compute - How to determine if being used programatically</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-compute-how-to-determine-if-being-used/m-p/92620#M38479</link>
      <description>&lt;P&gt;Hi,&amp;nbsp; We use a common notebook for all our "common" settings, this notebook is called in the first cell of each notebook we develop.&amp;nbsp; This issue we are now having is that we need 2 common notebooks, one for a normal shared compute and one for serverless as serverless does not allow (need) the same spark config commands.&amp;nbsp; What I'd like to do is determine in our common notebook whether it is running on serverless compute or not so I can have just one common notebook, any ideas if and how I can do this.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 06:39:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-compute-how-to-determine-if-being-used/m-p/92620#M38479</guid>
      <dc:creator>Dave1967</dc:creator>
      <dc:date>2024-10-03T06:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless Compute - How to determine if being used programatically</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-compute-how-to-determine-if-being-used/m-p/92631#M38483</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/117042"&gt;@Dave1967&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;If you know any spark config command that is not supported in serverless, then build your logic around this command using try, catch:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def is_config_supported():
    try:
        spark.sparkContext.getConf()
        return True
    except:
        return False

print(is_config_supported())&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 03 Oct 2024 07:41:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-compute-how-to-determine-if-being-used/m-p/92631#M38483</guid>
      <dc:creator>filipniziol</dc:creator>
      <dc:date>2024-10-03T07:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless Compute - How to determine if being used programatically</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-compute-how-to-determine-if-being-used/m-p/92638#M38487</link>
      <description>&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did think about doing it this was, just wondered if there was something neater but actually this is fine.&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 11:12:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-compute-how-to-determine-if-being-used/m-p/92638#M38487</guid>
      <dc:creator>Dave1967</dc:creator>
      <dc:date>2024-10-03T11:12:48Z</dc:date>
    </item>
  </channel>
</rss>

