Skip to content

Instantly share code, notes, and snippets.

@welly87
Created October 1, 2020 06:34
Show Gist options
  • Save welly87/d8e3c8a36e83807549ba06330ad197e5 to your computer and use it in GitHub Desktop.
Save welly87/d8e3c8a36e83807549ba06330ad197e5 to your computer and use it in GitHub Desktop.
https://github.com/welly87/spark-load
@welly87
Copy link
Author

welly87 commented Oct 1, 2020

val sfmta_raw = spark.read.format("jdbc").option("url", "jdbc:mysql://relational.fit.cvut.cz/Student_loan?serverTimezone=UTC").option("dbtable", "person").option("user", "guest").option("password", "relational").load()

@welly87
Copy link
Author

welly87 commented Oct 1, 2020

  sfmta_raw.createOrReplaceTempView("person")
  var df = spark.sql(s"SELECT * FROM people")

@welly87
Copy link
Author

welly87 commented Oct 1, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment