title: 'Can not create a Path from an empty string' Error for 'CREATE TABLE AS' in hive using S3 path
body: <p>I am trying to create a table in Glue catalog with s3 path location from spark running in EMR using hive. I have tried the following commands, but getting the error:</p>
  <blockquote>
  <p><em>pyspark.sql.utils.AnalysisException: u'java.lang.IllegalArgumentException: Can not create a Path from an
  empty string;'</em></p>
  </blockquote>
  <p><code>sparksession.sql(&quot;CREATE TABLE IF NOT EXISTS abc LOCATION 's3://my-bucket/test/' as (SELECT * from my_table)&quot;)</code></p>
  <p><code>sparksession.sql(&quot;CREATE TABLE abcSTORED AS PARQUET LOCATION 's3://my-bucket/test/' AS select * from my_table&quot;)</code></p>
  <p><code>sparksession.sql(&quot;CREATE TABLE abcas SELECT * from my_table USING PARQUET LOCATION 's3://my-bucket/test/'&quot;)</code></p>
  <p>Can someone please suggest the parameters that I am missing?</p>