-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #SB-24793: Response Exhaust V2 job to support assessment blob data #451
base: release-4.4.0
Are you sure you want to change the base?
Conversation
...-products/src/main/scala/org/sunbird/analytics/exhaust/collection/ResponseExhaustJobV2.scala
Outdated
Show resolved
Hide resolved
...-products/src/main/scala/org/sunbird/analytics/exhaust/collection/ResponseExhaustJobV2.scala
Outdated
Show resolved
Hide resolved
...-products/src/main/scala/org/sunbird/analytics/exhaust/collection/ResponseExhaustJobV2.scala
Show resolved
Hide resolved
...-products/src/main/scala/org/sunbird/analytics/exhaust/collection/ResponseExhaustJobV2.scala
Outdated
Show resolved
Hide resolved
val azureFetcherConfig = config.modelParams.get("assessmentFetcherConfig").asInstanceOf[Map[String, AnyRef]] | ||
|
||
val store = azureFetcherConfig("store") | ||
val format:String = azureFetcherConfig.getOrElse("format", "csv").asInstanceOf[String] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the multiple archived data has created and data has been duplicated for a batch then how are we handling it here? If not could you please handle this scenario?
SonarCloud Quality Gate failed. |
val url = store match { | ||
case "local" => | ||
filePath + s"${batchid}-*.${format}" | ||
// $COVERAGE-OFF$ for azure testing | ||
case "s3" | "azure" => | ||
val key = AppConf.getConfig("azure_storage_key") | ||
val file = s"${filePath}${batchid}-*.${format}" | ||
s"wasb://$bucket@$key.blob.core.windows.net/$file." | ||
// $COVERAGE-ON$ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to a commonutil method
val assessAggregateData = loadData(assessmentAggDBSettings, cassandraFormat, new StructType()) | ||
|
||
val joinedDF = try { | ||
val assessBlobData = getAssessmentBlobDF(batchid, config) | ||
|
||
val joinDF = assessAggregateData.join(assessBlobData, Seq("batch_id", "course_id", "user_id"), "left") | ||
.select(assessAggregateData.col("*")) | ||
joinDF | ||
} catch { | ||
case e => JobLogger.log("Blob does not contain any file for batchid: " + batchid) | ||
assessAggregateData | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we still creating one single CSV file of few GBs?
https://project-sunbird.atlassian.net/browse/SB-24793
Type of change
Please choose appropriate options.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes in the below checkboxes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: