Skip to content

Instantly share code, notes, and snippets.

@kristoff-it
Created January 30, 2019 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kristoff-it/c6fa4133ac6cff1872b1f27d1596139a to your computer and use it in GitHub Desktop.
Save kristoff-it/c6fa4133ac6cff1872b1f27d1596139a to your computer and use it in GitHub Desktop.
>>> df = spark.read.format("org.apache.spark.sql.redis").option("table", "people").option("key.column", "en_curid").load()
>>> df.show(2)
+--------+-----------+----------+
|en_curid|countryCode|occupation|
+--------+-----------+----------+
| 915950| ZW| SWIMMER|
| 726159| UY|POLITICIAN|
+--------+-----------+----------+
only showing top 2 rows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment