Skip to content

Instantly share code, notes, and snippets.

@saisgit
Last active July 25, 2021 16:07
Show Gist options
  • Save saisgit/0c4c7b9cbf0e788fbb34c7341a287740 to your computer and use it in GitHub Desktop.
Save saisgit/0c4c7b9cbf0e788fbb34c7341a287740 to your computer and use it in GitHub Desktop.
// table imdb_titles created and available under default database
val tableName = "default.imdb_titles"
val imdbTitles = spark.table(tableName)
// Using Spark SQL
val df = spark.sql("SELECT titleType, primaryTitle, originalTitle, startYear, endYear FROM default.imdb_titles")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment