Run SQL on files directly
Instead of using read API to load a file into DataFrame and query it, you can also query that file directly with SQL.
1
val sqlDF = spark.sql("SELECT * FROM parquet.`file:///home/dv6/spark/spark/examples/src/main/resources/users.parquet`")
Copied!
Last modified 1yr ago
Copy link