You Can use like below: df .write() .option("mode", "DROPMALFORMED") .option("compression", "snappy") .option("path","s3://....") .mode("overwrite") .format("parquet") .bucketBy(32,"column").sortBy("column") .saveAsTable("tableName");
This will create an external table pointing to the location of S3 .option ("path", "s3: // ....") - this is the trick here
source share