<?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 How to pass all dag_run.conf parameters to python_wheel_task in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-pass-all-dag-run-conf-parameters-to-python-wheel-task/m-p/11135#M6163</link>
    <description>&lt;P&gt;I want to trigger Databricks job from Airflow using DatabricksSubmitRunDeferrableOperator and I need to pass configuration params. Here is excerpt from my code (definition is not complete, only crucial properties):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;from airflow.providers.databricks.operators.databricks import DatabricksSubmitRunDeferrableOperator
&amp;nbsp;
&amp;nbsp;
class PythonWheelOperator(DatabricksSubmitRunDeferrableOperator):
   def __init__(self, action_name, **kwargs):
       DatabricksSubmitRunDeferrableOperator.__init__(self,
                                                      databricks_conn_id=dag_config_json["databricksConnId"],
                                                      task_id=action_name,
                                                      tasks=[
                                                           {
                                                               "python_wheel_task": {
                                                                   "package_name": "PName",
                                                                   "entry_point": "ReviewSuppliers",
                                                                   "named_parameters": "{{dict(dag_run.conf)}}"
                                                               },
                                                               "libraries": [
                                                                   {
                                                                       "whl": "dbfs:/FileStore/path-to-whl.whl"
                                                                   }
                                                      )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Error I got:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;airflow.exceptions.AirflowException: Response: b'{"error_code":"MALFORMED_REQUEST","message":"Could not parse request object: Expected \'START_OBJECT\' not \'VALUE_STRING\'\\n at [Source: (ByteArrayInputStream); line: 1, column: 187]\\n at [Source: java.io.ByteArrayInputStream@47fb05c6; line: 1, column: 187]"}', Status Code: 400&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How should I change line: &amp;nbsp;"named_parameters": "{{dict(dag_run.conf)}}" to properly pass this config parameters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 21:02:49 GMT</pubDate>
    <dc:creator>Bartek</dc:creator>
    <dc:date>2023-01-19T21:02:49Z</dc:date>
    <item>
      <title>How to pass all dag_run.conf parameters to python_wheel_task</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-pass-all-dag-run-conf-parameters-to-python-wheel-task/m-p/11135#M6163</link>
      <description>&lt;P&gt;I want to trigger Databricks job from Airflow using DatabricksSubmitRunDeferrableOperator and I need to pass configuration params. Here is excerpt from my code (definition is not complete, only crucial properties):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;from airflow.providers.databricks.operators.databricks import DatabricksSubmitRunDeferrableOperator
&amp;nbsp;
&amp;nbsp;
class PythonWheelOperator(DatabricksSubmitRunDeferrableOperator):
   def __init__(self, action_name, **kwargs):
       DatabricksSubmitRunDeferrableOperator.__init__(self,
                                                      databricks_conn_id=dag_config_json["databricksConnId"],
                                                      task_id=action_name,
                                                      tasks=[
                                                           {
                                                               "python_wheel_task": {
                                                                   "package_name": "PName",
                                                                   "entry_point": "ReviewSuppliers",
                                                                   "named_parameters": "{{dict(dag_run.conf)}}"
                                                               },
                                                               "libraries": [
                                                                   {
                                                                       "whl": "dbfs:/FileStore/path-to-whl.whl"
                                                                   }
                                                      )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Error I got:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;airflow.exceptions.AirflowException: Response: b'{"error_code":"MALFORMED_REQUEST","message":"Could not parse request object: Expected \'START_OBJECT\' not \'VALUE_STRING\'\\n at [Source: (ByteArrayInputStream); line: 1, column: 187]\\n at [Source: java.io.ByteArrayInputStream@47fb05c6; line: 1, column: 187]"}', Status Code: 400&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How should I change line: &amp;nbsp;"named_parameters": "{{dict(dag_run.conf)}}" to properly pass this config parameters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 21:02:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-pass-all-dag-run-conf-parameters-to-python-wheel-task/m-p/11135#M6163</guid>
      <dc:creator>Bartek</dc:creator>
      <dc:date>2023-01-19T21:02:49Z</dc:date>
    </item>
  </channel>
</rss>

