Created
August 13, 2022 08:58
-
-
Save mohak1712/d480263c2b6d0dd5d76deedc8c865922 to your computer and use it in GitHub Desktop.
This file contains 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
getRedshiftDBData(spark, bmReturns).withColumn("benchmark_vs_fund_returns", | |
from_json(col("benchmark_vs_fund_returns"), MapType(StringType, | |
ArrayType(DoubleType)))).coalesce(1) | |
.write | |
.option("es.nodes.wan.only", "true") | |
.option("es.mapping.id", "id") | |
.format("org.elasticsearch.spark.sql") | |
.option("es.write.operation", "upsert") | |
.mode(SaveMode.Append) | |
.save("fund-details") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment