<?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 Widgets - Way to validate config parameters in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/widgets-way-to-validate-config-parameters/m-p/25371#M17639</link>
    <description>&lt;P&gt;Yes, you can use the widgets api to have some control to validate the input before you pass the values to the rest of your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;folder = dbutils.widgets.get("Folder")
if folder == "":
    raise Exception("Folder missing")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or to get spark settings you can use:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.conf.get("my_property")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Learn more about them here - &lt;A href="https://docs.databricks.com/notebooks/widgets.html" target="test_blank"&gt;https://docs.databricks.com/notebooks/widgets.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jun 2021 20:47:03 GMT</pubDate>
    <dc:creator>Digan_Parikh</dc:creator>
    <dc:date>2021-06-09T20:47:03Z</dc:date>
    <item>
      <title>Widgets - Way to validate config parameters</title>
      <link>https://community.databricks.com/t5/data-engineering/widgets-way-to-validate-config-parameters/m-p/25371#M17639</link>
      <description>&lt;P&gt;Yes, you can use the widgets api to have some control to validate the input before you pass the values to the rest of your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;folder = dbutils.widgets.get("Folder")
if folder == "":
    raise Exception("Folder missing")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or to get spark settings you can use:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.conf.get("my_property")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Learn more about them here - &lt;A href="https://docs.databricks.com/notebooks/widgets.html" target="test_blank"&gt;https://docs.databricks.com/notebooks/widgets.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 20:47:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/widgets-way-to-validate-config-parameters/m-p/25371#M17639</guid>
      <dc:creator>Digan_Parikh</dc:creator>
      <dc:date>2021-06-09T20:47:03Z</dc:date>
    </item>
  </channel>
</rss>

