title: How to escape a special character in Hive shell/JDBC statement?
body: <p>I'm trying to create an external table from a JSON file, which looks like this:</p>
  
  <pre><code>{"id": "0010001", "my$entities": [{"a": "foo", "b": "bar"}]}
  </code></pre>
  
  <p>this is a file on HDFS and I don't have control on it.</p>
  
  <p>I was using <a href="https://github.com/rcongiu/Hive-JSON-Serde" rel="nofollow">rcongiu's JSON serde</a> and wrote my statement like this:</p>
  
  <pre><code>create external table json3(  id STRING,
  my$entities STRING ) 
  ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
  LOCATION '/my/path/to/dir/';
  </code></pre>
  
  <p>But then the hive shell kept complaining: </p>
  
  <blockquote>
    <p>cannot recognize the input near 'ities' 'STRING' ')' in column type</p>
  </blockquote>
  
  <p>I assume that it's the dollar sign "$" causing the problem. For right now I've tried using a backtick(`) and backward, forward slash to escape it but with no luck. I would like to know if there's a way to get around this without changing the original data?</p>