title: ParseExpection: no viable alternative at input
body: <p>I was trying to run the below query in Azure data bricks.</p>
  <pre class="lang-py prettyprint-override"><code>query=s&quot;&quot;&quot;WITH pre_file_user AS(
              SELECT id,
              typeid,
            CASE when dttm is null or dttm='' then cast('1900-01-01 00:00:00.000' as timestamp)
            else cast(dttm as timestamp)
            end as dttm
            from dde_pre_file_user_supp
  )&quot;&quot;&quot;
  
  spark.sql(query)
  </code></pre>
  <p>then I was getting the following error</p>
  <blockquote>
  <p>ParseException:no viable alternative at input 'with pre_file_users AS
  (\n select id, \n typid, in case\n when dttm is null or dttm = '' then
  cast('1900-01-01 00:00:00.000 as timestamp)\n end as dttm\n from
  dde_pre_file_user_supp\n  )'</p>
  </blockquote>
  <p>Can I use WITH clause in data bricks or is there any alternative?</p>