<?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: How to pass variables to a python file job in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/how-to-pass-variables-to-a-python-file-job/m-p/47667#M7223</link>
    <description>&lt;P&gt;You don't need to use dbutils for this type of parameters. You can get the arguments using sys.argv. This is an example using a python wheel, but you can use it as reference:&amp;nbsp;&lt;A href="https://docs.databricks.com/en/workflows/jobs/how-to/use-python-wheels-in-workflows.html" target="_blank"&gt;https://docs.databricks.com/en/workflows/jobs/how-to/use-python-wheels-in-workflows.html&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;"""
The entry point of the Python Wheel
"""

import sys

def main():
  # This method will print the provided arguments
  print('Hello from my func')
  print('Got arguments:')
  print(sys.argv)

if __name__ == '__main__':
  main()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2023 21:23:54 GMT</pubDate>
    <dc:creator>btafur</dc:creator>
    <dc:date>2023-10-02T21:23:54Z</dc:date>
    <item>
      <title>How to pass variables to a python file job</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-pass-variables-to-a-python-file-job/m-p/47616#M7222</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;It's relatively straight forward to pass a value to a key-value pair in notebook job. But for the python file job however, I couldn't figure out how to do it. Does anyone have any idea?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ducng_0-1696256847837.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/4193i80C3B4ED2E0F4D8E/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="ducng_0-1696256847837.png" alt="ducng_0-1696256847837.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Have been tried out different variations for a job with python file like below for example. Theoretically, I think we can add a notebook task initially in the job flow to work around. But it would be great to know a straightforward way to do this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ducng_1-1696256883016.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/4194i2B5B479E9E628F62/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="ducng_1-1696256883016.png" alt="ducng_1-1696256883016.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 14:30:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-pass-variables-to-a-python-file-job/m-p/47616#M7222</guid>
      <dc:creator>ducng</dc:creator>
      <dc:date>2023-10-02T14:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass variables to a python file job</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-pass-variables-to-a-python-file-job/m-p/47667#M7223</link>
      <description>&lt;P&gt;You don't need to use dbutils for this type of parameters. You can get the arguments using sys.argv. This is an example using a python wheel, but you can use it as reference:&amp;nbsp;&lt;A href="https://docs.databricks.com/en/workflows/jobs/how-to/use-python-wheels-in-workflows.html" target="_blank"&gt;https://docs.databricks.com/en/workflows/jobs/how-to/use-python-wheels-in-workflows.html&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;"""
The entry point of the Python Wheel
"""

import sys

def main():
  # This method will print the provided arguments
  print('Hello from my func')
  print('Got arguments:')
  print(sys.argv)

if __name__ == '__main__':
  main()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 21:23:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-pass-variables-to-a-python-file-job/m-p/47667#M7223</guid>
      <dc:creator>btafur</dc:creator>
      <dc:date>2023-10-02T21:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass variables to a python file job</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-pass-variables-to-a-python-file-job/m-p/48220#M7224</link>
      <description>&lt;P&gt;ah, thank you, completely forgot about that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 17:06:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-pass-variables-to-a-python-file-job/m-p/48220#M7224</guid>
      <dc:creator>ducng</dc:creator>
      <dc:date>2023-10-04T17:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass variables to a python file job</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-pass-variables-to-a-python-file-job/m-p/68540#M7225</link>
      <description>&lt;P&gt;Thanks so much for this! By the way, is there a way to do it with the JSON interface? I am struggling to get the parameters if entered in this way &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrunoCastro_0-1715153819097.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7475iF5B87FB4275C6865/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="BrunoCastro_0-1715153819097.png" alt="BrunoCastro_0-1715153819097.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrunoCastro_1-1715153834096.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7476iE09828506C7DCF8B/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="BrunoCastro_1-1715153834096.png" alt="BrunoCastro_1-1715153834096.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 07:37:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-pass-variables-to-a-python-file-job/m-p/68540#M7225</guid>
      <dc:creator>Bruno-Castro</dc:creator>
      <dc:date>2024-05-08T07:37:57Z</dc:date>
    </item>
  </channel>
</rss>

