title: How to create an EXTERNAL Spark table from data in HDFS
body: <p>I have loaded a parquet table from HDFS into a DataFrame:</p>
  
  <p><code>val df = spark.read.parquet("hdfs://user/zeppelin/my_table")</code></p>
  
  <p>I now want to expose this table to Spark SQL but this must be a persitent table because I want to access it from a JDBC connection or other Spark Sessions.</p>
  
  <p>Quick way could be to call <code>df.write.saveAsTable</code> method, but in this case it will materialize the contents of the DataFrame and create a pointer to the data in the Hive metastore, creating another copy of the data in HDFS. </p>
  
  <p>I don't want to have two copies of the same data, so I would want create like an external table to point to existing data.</p>