Technology•January 19, 2022
How DataStax Enterprise Analytics simplifies Migrating to DataStax Astra DB
CREATE TABLE test_spark_migration.data_table ( id uuid, scan_date timestamp, payload text, version_number int, PRIMARY KEY (id, scan_date) );
sparkConfAstra.set("spark.cassandra.connection.config.cloud.path", [SCB zip]) sparkConfAstra.set("spark.cassandra.auth.username", "[username]") sparkConfAstra.set("spark.cassandra.auth.password", "[password]") sparkConfAstra.set("spark.dse.continuousPagingEnabled", "false") sparkConfAstra.set("spark.cassandra.connection.localDC", "[localdc]") // set value for keyspace and table val keyspace = "test_spark_migration" val table = "data_table"
sparkConfAstra.set("spark.cassandra.connection.config.cloud.path", "secure-connect-spark-migration.zip") sparkConfAstra.set("spark.cassandra.auth.username", "NSTdMgHRhzjrZSOObphkmAcv") sparkConfAstra.set("spark.cassandra.auth.password", "K.ynJ6YNk3Z6TKaKQPDhv4Q2j_1iOC8pSDv7q-bJLCspeOJ8nEzdnAhCyTUiQeZ28pr97sP8vM66qhii,aacg0GnTXfI2.KPAMfYPOyOl5mEulv-p.Evbqvf3rsnDPut") sparkConfAstra.set("spark.dse.continuousPagingEnabled", "false") sparkConfAstra.set("spark.cassandra.connection.localDC", "westus2") // set value for keyspace and table val keyspace = "test_spark_migration" val table = "data_table"
sbt clean assembly
dse-astra-spark-migration/target/scala-2.11/Migration.jar
dse -u [username] -p [password] spark-submit --class com.astra.spark.Migration --executor-cores [num cores] --num-executors [num executors] --executor-memory [GB of memory]G --files [SCB Path] Migration.jar