<?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: Can you default to `execution-count: none` when stripping notebook outputs? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/can-you-default-to-execution-count-none-when-stripping-notebook/m-p/138557#M50956</link>
    <description>&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Databricks does not currently allow you to default to "execution_count": null (or "none") when stripping notebook outputs during a commit. The platform sets&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;"execution_count": 0&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as the default when outputs are stripped through their Git integration, and there is no exposed configuration, setting, or admin toggle to change this to null.​&lt;/P&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;This behavior is distinct from the nbstripout tool, which sets it to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;null&lt;/CODE&gt;, aligning with the Jupyter/IPYNB standard. The inability to change this in Databricks is known (and sometimes raised as a feature request) but remains a limitation of the platform at this time.​&lt;/P&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;If you need the execution count field to be null, you will need to use a separate stripping tool (such as a post-commit hook using nbstripout or a jq script) outside of Databricks, after the commit operation, to rewrite the field as desired.​&lt;/P&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;There is no practical advantage in retaining&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;0&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;over&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;null&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for stripped cells;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;null&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is more compatible with standard tools and CI policies.​&lt;/P&gt;</description>
    <pubDate>Tue, 11 Nov 2025 10:38:06 GMT</pubDate>
    <dc:creator>mark_ott</dc:creator>
    <dc:date>2025-11-11T10:38:06Z</dc:date>
    <item>
      <title>Can you default to `execution-count: none` when stripping notebook outputs?</title>
      <link>https://community.databricks.com/t5/data-engineering/can-you-default-to-execution-count-none-when-stripping-notebook/m-p/111696#M43974</link>
      <description>&lt;P&gt;When committing to a git folder, IPYNB outputs are usually stripped, unless allowed by an admin setting and toggled by &lt;A href="https://docs.databricks.com/aws/en/repos/repos-setup#use-a-repo-config-file" target="_self"&gt;&lt;FONT face="courier new,courier"&gt;.databricks/commit_outputs&lt;/FONT&gt;&lt;/A&gt;. This sets the&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{"execution-count": 0, ... }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;within the IPYNB metadata. Is there a way to set it instead to&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;"execution-count": null&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;? This would align the behavior with&amp;nbsp;&lt;A href="https://github.com/kynan/nbstripout" target="_self"&gt;nbstripout&lt;/A&gt;. Currently, if you use nbstripout as part of pre-commit.ci , the hook is triggered every time a Databricks notebook is committed. (And I'd guess there's no particular advantage of setting it to 0?)&lt;BR /&gt;&lt;BR /&gt;(Admittedly, more of a feature request.)&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 12:29:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/can-you-default-to-execution-count-none-when-stripping-notebook/m-p/111696#M43974</guid>
      <dc:creator>spd_dat</dc:creator>
      <dc:date>2025-03-04T12:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can you default to `execution-count: none` when stripping notebook outputs?</title>
      <link>https://community.databricks.com/t5/data-engineering/can-you-default-to-execution-count-none-when-stripping-notebook/m-p/138557#M50956</link>
      <description>&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Databricks does not currently allow you to default to "execution_count": null (or "none") when stripping notebook outputs during a commit. The platform sets&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;"execution_count": 0&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as the default when outputs are stripped through their Git integration, and there is no exposed configuration, setting, or admin toggle to change this to null.​&lt;/P&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;This behavior is distinct from the nbstripout tool, which sets it to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;null&lt;/CODE&gt;, aligning with the Jupyter/IPYNB standard. The inability to change this in Databricks is known (and sometimes raised as a feature request) but remains a limitation of the platform at this time.​&lt;/P&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;If you need the execution count field to be null, you will need to use a separate stripping tool (such as a post-commit hook using nbstripout or a jq script) outside of Databricks, after the commit operation, to rewrite the field as desired.​&lt;/P&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;There is no practical advantage in retaining&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;0&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;over&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;null&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for stripped cells;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;null&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is more compatible with standard tools and CI policies.​&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2025 10:38:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/can-you-default-to-execution-count-none-when-stripping-notebook/m-p/138557#M50956</guid>
      <dc:creator>mark_ott</dc:creator>
      <dc:date>2025-11-11T10:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can you default to `execution-count: none` when stripping notebook outputs?</title>
      <link>https://community.databricks.com/t5/data-engineering/can-you-default-to-execution-count-none-when-stripping-notebook/m-p/138577#M50971</link>
      <description>&lt;P&gt;Thanks, but why do I have the hunch that you used an LLM to provide this answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand all the points, but as you yourself write:&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;EM&gt;There is no practical advantage in retaining 0 over null for stripped cells; null is more compatible with standard tools and CI policies.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Hence the feature request is to change the behavior to the one which is "more compatible with standard tools", given that the current behavior has "no practical advantage".&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2025 11:26:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/can-you-default-to-execution-count-none-when-stripping-notebook/m-p/138577#M50971</guid>
      <dc:creator>spd_dat</dc:creator>
      <dc:date>2025-11-11T11:26:05Z</dc:date>
    </item>
  </channel>
</rss>

