<?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: Access notebooks parameters from a bash cell in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/access-notebooks-parameters-from-a-bash-cell/m-p/125890#M47564</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/175975"&gt;@jollymon&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I believe there is no direct way to do this. But maybe there are some workarounds though. You can try to read widgets in python and set those values as envrionment variables. Then you can use shell to read that variables. Something like below (except in python try to read widget value)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%python
import os
l =['A','B','C','D']
os.environ['LIST']=' '.join(l)print(os.getenv('LIST'))&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;%sh
for i in $LIST
do
  echo $i
done&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jul 2025 16:17:48 GMT</pubDate>
    <dc:creator>szymon_dybczak</dc:creator>
    <dc:date>2025-07-21T16:17:48Z</dc:date>
    <item>
      <title>Access notebooks parameters from a bash cell</title>
      <link>https://community.databricks.com/t5/data-engineering/access-notebooks-parameters-from-a-bash-cell/m-p/125888#M47563</link>
      <description>&lt;P&gt;How can I access a notebook parameter from a bash cell (%sh)? For python I use&amp;nbsp;dbutils.widgets.get('param'), and for SQL I can use :param. Is there a something similar for bash?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 15:42:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/access-notebooks-parameters-from-a-bash-cell/m-p/125888#M47563</guid>
      <dc:creator>jollymon</dc:creator>
      <dc:date>2025-07-21T15:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Access notebooks parameters from a bash cell</title>
      <link>https://community.databricks.com/t5/data-engineering/access-notebooks-parameters-from-a-bash-cell/m-p/125890#M47564</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/175975"&gt;@jollymon&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I believe there is no direct way to do this. But maybe there are some workarounds though. You can try to read widgets in python and set those values as envrionment variables. Then you can use shell to read that variables. Something like below (except in python try to read widget value)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%python
import os
l =['A','B','C','D']
os.environ['LIST']=' '.join(l)print(os.getenv('LIST'))&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;%sh
for i in $LIST
do
  echo $i
done&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 16:17:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/access-notebooks-parameters-from-a-bash-cell/m-p/125890#M47564</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-07-21T16:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Access notebooks parameters from a bash cell</title>
      <link>https://community.databricks.com/t5/data-engineering/access-notebooks-parameters-from-a-bash-cell/m-p/125895#M47567</link>
      <description>&lt;P&gt;That works. I suppose that's what I'll need to do then.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 17:46:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/access-notebooks-parameters-from-a-bash-cell/m-p/125895#M47567</guid>
      <dc:creator>jollymon</dc:creator>
      <dc:date>2025-07-21T17:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Access notebooks parameters from a bash cell</title>
      <link>https://community.databricks.com/t5/data-engineering/access-notebooks-parameters-from-a-bash-cell/m-p/125897#M47568</link>
      <description>&lt;P&gt;No problem, glad that it worked for you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 19:00:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/access-notebooks-parameters-from-a-bash-cell/m-p/125897#M47568</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-07-21T19:00:25Z</dc:date>
    </item>
  </channel>
</rss>

