<?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: Python Notebook does not respect pipeline input parameter in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4767995#M11027</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/857905"&gt;@AmiGarala&lt;/a&gt;&amp;nbsp;and thank you for your quick response.&lt;BR /&gt;Placing the configured cell at the very top fixed my issue, there was also a misnamed parameter. Thanks again.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jul 2025 07:38:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-07-18T07:38:30Z</dc:date>
    <item>
      <title>Python Notebook does not respect pipeline input parameter</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4767598#M11017</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm encountering an issue when running a Python notebook through a Fabric pipeline. When I run the notebook manually in the workspace, everything works fine: it correctly loads the Excel file from SharePoint using the sheet name I provide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I run the same notebook via a pipeline, the execution fails with this error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ValueError: Worksheet named 'Sheet1' not found&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This shows that the sheet parameter is not correctly passed to the notebook inside the pipeline context — it seems to default to "Sheet1", even though "Sheet2" is clearly defined in the pipeline input parameters (see attached screenshots).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected behavior:&lt;BR /&gt;The notebook in the pipeline should honor the runtime parameter and use "Sheet2" as provided, instead of defaulting to "Sheet1".&lt;/P&gt;&lt;P&gt;Environment:&lt;BR /&gt;- Microsoft Fabric (Trial version)&lt;BR /&gt;- Python 3.11 notebook&amp;nbsp;&lt;BR /&gt;- Excel file hosted on SharePoint&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2025 22:20:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4767598#M11017</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-07-17T22:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Python Notebook does not respect pipeline input parameter</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4767793#M11025</link>
      <description>&lt;P&gt;1. Check Notebook Parameter Cell Format&lt;BR /&gt;Your notebook must have a parameter cell defined like this at the top:&lt;/P&gt;&lt;P&gt;# Parameters&lt;BR /&gt;sheet_name = "Sheet1" # default value&lt;BR /&gt;Fabric uses this cell to inject pipeline parameters. If this is missing or misnamed, the pipeline cannot override it.&lt;/P&gt;&lt;P&gt;Make sure:&lt;/P&gt;&lt;P&gt;The variable name (sheet_name) matches exactly with the name used in the pipeline.&lt;/P&gt;&lt;P&gt;The cell is tagged with "parameters" (Fabric auto-detects this if you're using the right format).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Ensure the Pipeline Is Passing the Parameter&lt;BR /&gt;In your pipeline:&lt;/P&gt;&lt;P&gt;Go to the notebook activity block.&lt;/P&gt;&lt;P&gt;Click on the "Settings" pane.&lt;/P&gt;&lt;P&gt;Confirm:&lt;/P&gt;&lt;P&gt;Input parameter name is sheet_name (case-sensitive match).&lt;/P&gt;&lt;P&gt;Value is set to Sheet2.&lt;/P&gt;&lt;P&gt;Optional sanity check: Add a debug cell to your notebook to log it:&lt;BR /&gt;print(f"Using sheet name: {sheet_name}")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Double-Check Parameter Mapping in JSON Behind the Scenes (Optional)&lt;BR /&gt;If you're comfortable editing JSON:&lt;/P&gt;&lt;P&gt;Open the pipeline JSON (if accessible via export or dev mode).&lt;/P&gt;&lt;P&gt;Look for something like:&lt;/P&gt;&lt;P&gt;"notebookActivity": {&lt;BR /&gt;"parameters": {&lt;BR /&gt;"sheet_name": "Sheet2"&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;4. Avoid Hardcoded Values in Notebook&lt;BR /&gt;Sometimes developers accidentally override the parameter later in the notebook:&lt;/P&gt;&lt;P&gt;sheet_name = "Sheet1" #&amp;nbsp; This will override pipeline input&lt;BR /&gt;Make sure this line appears only in the parameter cell and not anywhere else.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2025 05:33:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4767793#M11025</guid>
      <dc:creator>AmiGarala</dc:creator>
      <dc:date>2025-07-18T05:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Python Notebook does not respect pipeline input parameter</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4767995#M11027</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/857905"&gt;@AmiGarala&lt;/a&gt;&amp;nbsp;and thank you for your quick response.&lt;BR /&gt;Placing the configured cell at the very top fixed my issue, there was also a misnamed parameter. Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2025 07:38:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4767995#M11027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-07-18T07:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Python Notebook does not respect pipeline input parameter</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4768016#M11028</link>
      <description>&lt;P&gt;&amp;nbsp;For that, You should use Dataflow Gen 2 rather than Fabric Data Factory.&lt;/P&gt;&lt;P&gt;Here is a quick view&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BhaveshPatel_0-1752824719313.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1284249iED7C56FADC46BBA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BhaveshPatel_0-1752824719313.png" alt="BhaveshPatel_0-1752824719313.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Easy to implement and all is available:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BhaveshPatel_2-1752824888434.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1284253i26C200EACDF1E8E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BhaveshPatel_2-1752824888434.png" alt="BhaveshPatel_2-1752824888434.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;</description>
      <pubDate>Fri, 18 Jul 2025 07:50:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4768016#M11028</guid>
      <dc:creator>BhaveshPatel</dc:creator>
      <dc:date>2025-07-18T07:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Python Notebook does not respect pipeline input parameter</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4770566#M11103</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/857905"&gt;@AmiGarala&lt;/a&gt;&amp;nbsp;&amp;nbsp; Your step-by-step breakdown was spot-on. Highlighting the need for the correctly named parameter cell at the top and ensuring no overriding later in the notebook really clarified the root cause. Appreciate the depth and clarity of your solution.&lt;/P&gt;
&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;&amp;nbsp;Glad to hear the issue is now resolved! Out of curiosity, do you see potential for applying this pattern more broadly in your notebooks to help future-proof parameter handling in pipelines?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If this response helps, consider marking it as &lt;STRONG&gt;“Accept as solution”&lt;/STRONG&gt; and giving a &lt;STRONG&gt;“kudos”&lt;/STRONG&gt; to assist other community members.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Akhil.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 11:30:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4770566#M11103</guid>
      <dc:creator>v-agajavelly</dc:creator>
      <dc:date>2025-07-21T11:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Python Notebook does not respect pipeline input parameter</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4773356#M11171</link>
      <description>&lt;P data-start="80" data-end="103"&gt;Hey&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P data-start="105" data-end="232"&gt;Just wanted to follow up and see as super users suggested&amp;nbsp; if you’ve had a chance to explore using that parameter pattern in any of your other notebooks? It could be a nice little win for making things more pipeline-friendly down the line curious to hear if you're thinking about applying it more broadly.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Akhil.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 08:56:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Python-Notebook-does-not-respect-pipeline-input-parameter/m-p/4773356#M11171</guid>
      <dc:creator>v-agajavelly</dc:creator>
      <dc:date>2025-07-23T08:56:35Z</dc:date>
    </item>
  </channel>
</rss>

