Created
August 9, 2015 21:53
-
-
Save rustyrazorblade/d4b2b048c4bd88e538ce to your computer and use it in GitHub Desktop.
working migration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyspark.sql import SQLContext | |
sql = SQLContext(sc) | |
mysql_movies = sql.read.jdbc("jdbc:mysql://127.0.0.1:3307/movielens?user=root", "movielens.movies") | |
mysql_movies.write.format("org.apache.spark.sql.cassandra").options(table="movies", keyspace="lens").save(mode="append") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment