<?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: Databricks SDK for Python: Errors with parameters for Statement Execution in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-sdk-for-python-errors-with-parameters-for-statement/m-p/69038#M33794</link>
    <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp;This does not help resolve the issue. I am experiencing the same issue when following the above pointers. Here is the statement:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;response = w.statement_execution.execute_statement(
    statement='ALTER TABLE users ALTER COLUMN :col_name SET NOT NULL', 
    warehouse_id='&amp;lt;warehouseID&amp;gt;',
    parameters=[{'name': 'col_name', 'value': 'user', 'type': 'STRING'}]
)&lt;/LI-CODE&gt;&lt;P&gt;This results in the same AttributeError outlined by&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/103619"&gt;@Phuonganh&lt;/a&gt;&amp;nbsp;above.&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2024 20:14:09 GMT</pubDate>
    <dc:creator>DonkeyKong</dc:creator>
    <dc:date>2024-05-14T20:14:09Z</dc:date>
    <item>
      <title>Databricks SDK for Python: Errors with parameters for Statement Execution</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sdk-for-python-errors-with-parameters-for-statement/m-p/66301#M33077</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;Im using Databricks SDK for python to run SQL queries. I created a variable as below:&lt;/P&gt;&lt;P&gt;param = [{'name' : 'a', 'value' :x'}, {'name' : 'b', 'value' : 'y'}]&lt;/P&gt;&lt;P&gt;and passed it the statement as below&lt;/P&gt;&lt;P&gt;_ = w.statement_execution.execute_statement( warehouse_id = "123", catalog = "aaa", statement = "SELECT * FROM table_a WHERE name = :a and age = :b", parameters = param)&lt;/P&gt;&lt;P&gt;and I get an attribute error: 'dict' object has no attribute 'as_dict'&lt;/P&gt;&lt;P&gt;But this is exactly how databricks instructed on their website. Thank you for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 02:49:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sdk-for-python-errors-with-parameters-for-statement/m-p/66301#M33077</guid>
      <dc:creator>Phuonganh</dc:creator>
      <dc:date>2024-04-16T02:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks SDK for Python: Errors with parameters for Statement Execution</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sdk-for-python-errors-with-parameters-for-statement/m-p/69038#M33794</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp;This does not help resolve the issue. I am experiencing the same issue when following the above pointers. Here is the statement:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;response = w.statement_execution.execute_statement(
    statement='ALTER TABLE users ALTER COLUMN :col_name SET NOT NULL', 
    warehouse_id='&amp;lt;warehouseID&amp;gt;',
    parameters=[{'name': 'col_name', 'value': 'user', 'type': 'STRING'}]
)&lt;/LI-CODE&gt;&lt;P&gt;This results in the same AttributeError outlined by&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/103619"&gt;@Phuonganh&lt;/a&gt;&amp;nbsp;above.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 20:14:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sdk-for-python-errors-with-parameters-for-statement/m-p/69038#M33794</guid>
      <dc:creator>DonkeyKong</dc:creator>
      <dc:date>2024-05-14T20:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks SDK for Python: Errors with parameters for Statement Execution</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sdk-for-python-errors-with-parameters-for-statement/m-p/95733#M39164</link>
      <description>&lt;P&gt;Has anyone found the solution to this? I am running into the same error&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 14:15:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sdk-for-python-errors-with-parameters-for-statement/m-p/95733#M39164</guid>
      <dc:creator>jessica3</dc:creator>
      <dc:date>2024-10-23T14:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks SDK for Python: Errors with parameters for Statement Execution</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-sdk-for-python-errors-with-parameters-for-statement/m-p/105235#M42055</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;The following works:&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;response = w.statement_execution.execute_statement(
    statement='ALTER TABLE users ALTER COLUMN :col_name SET NOT NULL', 
    warehouse_id='&amp;lt;warehouseID&amp;gt;',
    parameters=[sql.StatementParameterListItem(name='col_name' value='user', type='STRING')]
) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 18:17:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-sdk-for-python-errors-with-parameters-for-statement/m-p/105235#M42055</guid>
      <dc:creator>vfrcode</dc:creator>
      <dc:date>2025-01-10T18:17:47Z</dc:date>
    </item>
  </channel>
</rss>

