TechnologyJanuary 19, 2022

How DataStax Enterprise Analytics simplifies Migrating to DataStax Astra DB

Madhavan Sridharan
Madhavan Sridharan
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
Share

One-stop Data API for Production GenAI

Astra DB gives JavaScript developers a complete data API and out-of-the-box integrations that make it easier to build production RAG apps with high relevancy and low latency.