<?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: Inline comment next to un-tickmarked SET statement = Syntax error in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/inline-comment-next-to-un-tickmarked-set-statement-syntax-error/m-p/24380#M16932</link>
    <description>&lt;P&gt;This works! Thank you! however, it should still work without tick marks, so I'm leaving this question up here. Again, thanks for your find.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Nov 2022 17:15:57 GMT</pubDate>
    <dc:creator>Graham</dc:creator>
    <dc:date>2022-11-09T17:15:57Z</dc:date>
    <item>
      <title>Inline comment next to un-tickmarked SET statement = Syntax error</title>
      <link>https://community.databricks.com/t5/data-engineering/inline-comment-next-to-un-tickmarked-set-statement-syntax-error/m-p/24377#M16929</link>
      <description>&lt;P&gt;Running this code in databricks SQL works great:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SET USE_CACHED_RESULT = FALSE;
&amp;nbsp;
-- Result:
-- key                                      value
-- USE_CACHED_RESULT     FALSE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If I add an inline comment, however, I get a syntax error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SET USE_CACHED_RESULT = FALSE; -- this comment causes issues
&amp;nbsp;
-- Result:
-- Expected format is 'SET', 'SET key', or 'SET key=value'. If you want to include special characters in key, or include semicolon in value, please use quotes, e.g., SET `key`=`value`.line 1, pos 0&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Edit: it's been helpfully mentioned that adding tickmarks resolves the issue. That's great to know. However, tickmarks are optional for this kind of statement--in other words, default behavior is that it should still work without tickmarks! This issue is, simply stated, a bug in the Databricks SQL runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are other similar solutions: &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Just remove the inline comment&lt;/LI&gt;&lt;LI&gt;Convert the inline comment to a block comment&lt;/LI&gt;&lt;LI&gt;Don't run this SET statement and find another way to avoid caching&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;No matter which of these we try (with great results!), this bug will persist in the Databricks SQL runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This post, then, is less of a request for workarounds--and more of a bug alert. If there is a better place for this kind of feedback, please let me know so I can put it there!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 18:38:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inline-comment-next-to-un-tickmarked-set-statement-syntax-error/m-p/24377#M16929</guid>
      <dc:creator>Graham</dc:creator>
      <dc:date>2022-11-01T18:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Inline comment next to un-tickmarked SET statement = Syntax error</title>
      <link>https://community.databricks.com/t5/data-engineering/inline-comment-next-to-un-tickmarked-set-statement-syntax-error/m-p/24378#M16930</link>
      <description>&lt;P&gt;Hi Graham,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does using backticks (`) like below fix the issue?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SET `USE_CACHED_RESULT` = `FALSE`; --this comment causes issues
&amp;nbsp;
-- Result:
-- key                                      value
-- USE_CACHED_RESULT     FALSE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 23:05:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inline-comment-next-to-un-tickmarked-set-statement-syntax-error/m-p/24378#M16930</guid>
      <dc:creator>LandanG</dc:creator>
      <dc:date>2022-11-01T23:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Inline comment next to un-tickmarked SET statement = Syntax error</title>
      <link>https://community.databricks.com/t5/data-engineering/inline-comment-next-to-un-tickmarked-set-statement-syntax-error/m-p/24380#M16932</link>
      <description>&lt;P&gt;This works! Thank you! however, it should still work without tick marks, so I'm leaving this question up here. Again, thanks for your find.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 17:15:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inline-comment-next-to-un-tickmarked-set-statement-syntax-error/m-p/24380#M16932</guid>
      <dc:creator>Graham</dc:creator>
      <dc:date>2022-11-09T17:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inline comment next to un-tickmarked SET statement = Syntax error</title>
      <link>https://community.databricks.com/t5/data-engineering/inline-comment-next-to-un-tickmarked-set-statement-syntax-error/m-p/24381#M16933</link>
      <description>&lt;P&gt;Thanks Kaniz! I sent a reply to Landan for his insightful answer. His is a great workaround. However, it should still work without his workaround (adding tickmarks). So I'm leaving this up here for now; I think this is just a bug that needs to be brought before the appropriate internal Databricks team.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 17:19:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inline-comment-next-to-un-tickmarked-set-statement-syntax-error/m-p/24381#M16933</guid>
      <dc:creator>Graham</dc:creator>
      <dc:date>2022-11-09T17:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Inline comment next to un-tickmarked SET statement = Syntax error</title>
      <link>https://community.databricks.com/t5/data-engineering/inline-comment-next-to-un-tickmarked-set-statement-syntax-error/m-p/89176#M37714</link>
      <description>&lt;P&gt;Hi, I'm getting the same error when trying to execute statement through API&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"statement": "SET `USE_CACHED_RESULT` = FALSE; SELECT COUNT(*) FROM TABLE"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Every combination fail&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    "status": {
        "state": "FAILED",
        "error": {
            "error_code": "BAD_REQUEST",
            "message": "\n[INVALID_PROPERTY_VALUE] \"FALSE; SELECT COUNT(*) FROM TABLE\" is an invalid property value, please use quotes, e.g. SET \"USE_CACHED_RESULT\"=\"FALSE; SELECT COUNT(*) FROM TABLE\" SQLSTATE: 42602 (line 1, pos 0)\n\n== SQL ==\nSET `USE_CACHED_RESULT` = FALSE; SELECT COUNT(*) FROM TABLE \n^^^\n"
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 12:00:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inline-comment-next-to-un-tickmarked-set-statement-syntax-error/m-p/89176#M37714</guid>
      <dc:creator>rafal_walisko</dc:creator>
      <dc:date>2024-09-09T12:00:45Z</dc:date>
    </item>
  </channel>
</rss>

