<?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 python task in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/python-task/m-p/122706#M46845</link>
    <description>&lt;P&gt;Hello Guys,&lt;BR /&gt;&lt;BR /&gt;I have define asset bundle which have rule to run a python task. This task have some parameters, So how can i interract with this using argparse ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Cordially,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jun 2025 14:55:39 GMT</pubDate>
    <dc:creator>seefoods</dc:creator>
    <dc:date>2025-06-24T14:55:39Z</dc:date>
    <item>
      <title>python task</title>
      <link>https://community.databricks.com/t5/data-engineering/python-task/m-p/122706#M46845</link>
      <description>&lt;P&gt;Hello Guys,&lt;BR /&gt;&lt;BR /&gt;I have define asset bundle which have rule to run a python task. This task have some parameters, So how can i interract with this using argparse ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Cordially,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 14:55:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/python-task/m-p/122706#M46845</guid>
      <dc:creator>seefoods</dc:creator>
      <dc:date>2025-06-24T14:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: python task</title>
      <link>https://community.databricks.com/t5/data-engineering/python-task/m-p/122830#M46881</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/65591"&gt;@seefoods&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;In your asset bundle YAML, define the parameters using the named_parameters field, for example like this:&lt;/P&gt;&lt;P&gt;tasks:&lt;BR /&gt;&amp;nbsp; - task_key: python_task&lt;BR /&gt;&amp;nbsp; &amp;nbsp; python_wheel_task:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; entry_point: main&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; named_parameters:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input_path: "/data/input"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output_table: "results"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; debug_mode: "true"&lt;/P&gt;&lt;P&gt;Then, in your Python script, use argparse to read those parameters:&lt;/P&gt;&lt;P&gt;import argparse&lt;/P&gt;&lt;P&gt;def main():&lt;BR /&gt;&amp;nbsp; &amp;nbsp; parser = argparse.ArgumentParser()&lt;BR /&gt;&amp;nbsp; &amp;nbsp; parser.add_argument("--input_path", required=True)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; parser.add_argument("--output_table", required=True)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; parser.add_argument("--debug_mode", default="false")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; args = parser.parse_args()&lt;/P&gt;&lt;P&gt;When the job runs, Databricks automatically passes the values as command-line arguments, and argparse picks them up in your script.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 14:12:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/python-task/m-p/122830#M46881</guid>
      <dc:creator>SP_6721</dc:creator>
      <dc:date>2025-06-25T14:12:08Z</dc:date>
    </item>
  </channel>
</rss>

