From c024bdb93c8baf8c3c83430e045e73e51edb771e Mon Sep 17 00:00:00 2001 From: Varsha Mahuli Date: Fri, 17 May 2024 12:24:54 +0530 Subject: [PATCH] storing nps feeds to a backup table for analysis --- .../ekstep/analytics/dashboard/survey/nps/NpsModel.scala | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/batch-models/src/main/scala/org/ekstep/analytics/dashboard/survey/nps/NpsModel.scala b/batch-models/src/main/scala/org/ekstep/analytics/dashboard/survey/nps/NpsModel.scala index f6058a22..31056753 100644 --- a/batch-models/src/main/scala/org/ekstep/analytics/dashboard/survey/nps/NpsModel.scala +++ b/batch-models/src/main/scala/org/ekstep/analytics/dashboard/survey/nps/NpsModel.scala @@ -63,6 +63,13 @@ object NpsModel extends AbsDashboardModel { .options(Map("keyspace" -> conf.cassandraUserFeedKeyspace , "table" -> conf.cassandraUserFeedTable)) .mode("append") .save() + + // write the dataframe to cassandra user_feed_backup table + additionalDF.write + .format("org.apache.spark.sql.cassandra") + .options(Map("keyspace" -> "sunbird_notifications" , "table" -> "notification_feed_backup")) + .mode("append") + .save() } }