<?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 Querying columns with special characters in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/querying-columns-with-special-characters/m-p/23316#M16067</link>
    <description>&lt;P&gt;I'm trying to do a select on a column with special characters in Databricks sql.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried the following&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sql
select ex$col 
from database.table
limit 10;
&amp;nbsp;
%sql
select `ex$col `
from database.table
limit 10;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;They both don't work and will return "ex does not exist.  Did you mean the following/ .... "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do this? or is the functionality not currently supported?&lt;/P&gt;</description>
    <pubDate>Mon, 07 Nov 2022 22:43:34 GMT</pubDate>
    <dc:creator>JamieN</dc:creator>
    <dc:date>2022-11-07T22:43:34Z</dc:date>
    <item>
      <title>Querying columns with special characters</title>
      <link>https://community.databricks.com/t5/data-engineering/querying-columns-with-special-characters/m-p/23316#M16067</link>
      <description>&lt;P&gt;I'm trying to do a select on a column with special characters in Databricks sql.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried the following&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sql
select ex$col 
from database.table
limit 10;
&amp;nbsp;
%sql
select `ex$col `
from database.table
limit 10;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;They both don't work and will return "ex does not exist.  Did you mean the following/ .... "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do this? or is the functionality not currently supported?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 22:43:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/querying-columns-with-special-characters/m-p/23316#M16067</guid>
      <dc:creator>JamieN</dc:creator>
      <dc:date>2022-11-07T22:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Querying columns with special characters</title>
      <link>https://community.databricks.com/t5/data-engineering/querying-columns-with-special-characters/m-p/23317#M16068</link>
      <description>&lt;P&gt;It might depend on how your table was created. I was able to get the below to work:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CREATE OR REPLACE TABLE database.special_chars (`ex$col` int);
INSERT INTO database.special_chars VALUES (1);
&amp;nbsp;
SELECT `ex$col`
FROM database.special_chars
LIMIT 10;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 03:33:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/querying-columns-with-special-characters/m-p/23317#M16068</guid>
      <dc:creator>LandanG</dc:creator>
      <dc:date>2022-11-08T03:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Querying columns with special characters</title>
      <link>https://community.databricks.com/t5/data-engineering/querying-columns-with-special-characters/m-p/23319#M16070</link>
      <description>&lt;P&gt;Many thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ah, we are creating the table using a delta location&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;nbsp;
s = f"create table {database}.{dataset_name} using delta location '{location}'"
spark.sql(s)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I can still query the special character using pyspark which good for me now, but a lot of our users will want to use sql.  The only option seems to be to change the schema.  &lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 04:21:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/querying-columns-with-special-characters/m-p/23319#M16070</guid>
      <dc:creator>JamieN</dc:creator>
      <dc:date>2022-11-09T04:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Querying columns with special characters</title>
      <link>https://community.databricks.com/t5/data-engineering/querying-columns-with-special-characters/m-p/23320#M16071</link>
      <description>&lt;P&gt;Hi @Jamie Nathan​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or &lt;B&gt;mark an answer as best&lt;/B&gt;? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 06:18:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/querying-columns-with-special-characters/m-p/23320#M16071</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-21T06:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Querying columns with special characters</title>
      <link>https://community.databricks.com/t5/data-engineering/querying-columns-with-special-characters/m-p/23321#M16072</link>
      <description>&lt;P&gt;@&lt;A href="https://community.databricks.com/s/profile/0053f000000WphBAAS" alt="https://community.databricks.com/s/profile/0053f000000WphBAAS" target="_blank"&gt;LandanG&lt;/A&gt; . The issue is with %sql . &lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 14:10:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/querying-columns-with-special-characters/m-p/23321#M16072</guid>
      <dc:creator>arun_pamulapati</dc:creator>
      <dc:date>2023-03-23T14:10:25Z</dc:date>
    </item>
  </channel>
</rss>

