<?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: Use '%sql' inside a python cmd cell? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/use-sql-inside-a-python-cmd-cell/m-p/32583#M23742</link>
    <description>&lt;P&gt;in python cell just use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;query = "SELECT 1"&lt;/P&gt;&lt;P&gt;spark.sql(query)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Dec 2021 15:29:44 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2021-12-23T15:29:44Z</dc:date>
    <item>
      <title>Use '%sql' inside a python cmd cell?</title>
      <link>https://community.databricks.com/t5/data-engineering/use-sql-inside-a-python-cmd-cell/m-p/32582#M23741</link>
      <description>&lt;P&gt;Hi so I want to essentially execute a sql query if a condition is met. So one of my cells in my python notebook is a sql query (%sql followed by the query). Is there any way to put that in an 'IF' statement ie if an environment variable = some value, run this query? &lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 14:03:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/use-sql-inside-a-python-cmd-cell/m-p/32582#M23741</guid>
      <dc:creator>pjp94</dc:creator>
      <dc:date>2021-12-23T14:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Use '%sql' inside a python cmd cell?</title>
      <link>https://community.databricks.com/t5/data-engineering/use-sql-inside-a-python-cmd-cell/m-p/32583#M23742</link>
      <description>&lt;P&gt;in python cell just use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;query = "SELECT 1"&lt;/P&gt;&lt;P&gt;spark.sql(query)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 15:29:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/use-sql-inside-a-python-cmd-cell/m-p/32583#M23742</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2021-12-23T15:29:44Z</dc:date>
    </item>
  </channel>
</rss>

