Skip to content

Commit

Permalink
fix: CQDG-00 fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
adipaul1981 committed May 31, 2024
1 parent 5544e92 commit 73e4e16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ val spark_version = "3.4.2"
val deltaCoreVersion = "2.4.0"
/* Runtime */
libraryDependencies += "org.apache.spark" %% "spark-sql" % spark_version % Provided
libraryDependencies += "org.apache.spark" %% "spark-hive" % spark_version % Provided
libraryDependencies += "org.apache.hadoop" % "hadoop-aws" % "3.3.6" % Provided
libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "3.3.6" % Provided
libraryDependencies += "io.delta" %% "delta-core" % deltaCoreVersion % Provided
libraryDependencies += "io.delta" %% "delta-spark" % "3.1.0" % Provided
libraryDependencies += "com.github.pureconfig" %% "pureconfig" % "0.15.0"
libraryDependencies += "org.apache.poi" % "poi-ooxml" % "5.0.0"
/* Test */
Expand Down
8 changes: 5 additions & 3 deletions src/main/scala/bio/ferlab/HPOMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package bio.ferlab
import bio.ferlab.config.Config
import bio.ferlab.ontology.{ICDTerm, OntologyTerm}
import bio.ferlab.transform.{DownloadTransformer, WriteJson, WriteParquet}
import org.apache.spark.SparkConf
import org.apache.spark.sql.internal.SQLConf.LegacyBehaviorPolicy.CORRECTED
import org.apache.spark.sql.{SaveMode, SparkSession}
import pureconfig.ConfigReader.Result
import pureconfig._
Expand All @@ -17,10 +19,10 @@ object HPOMain extends App {
.getOrElse(throw new Exception("Wrong Configuration"))

implicit val spark: SparkSession = SparkSession.builder
.appName("HPO")
.appName("HPOMain")
.master("local[*]")
// .config("fs.s3a.path.style.access", s"${config.aws.pathStyleAccess}")
// .config("fs.s3a.endpoint", s"${config.aws.endpoint}")
.config("fs.s3a.path.style.access", s"${config.aws.pathStyleAccess}")
.config("fs.s3a.endpoint", s"${config.aws.endpoint}")
.getOrCreate()

val Array(inputOboFileUrl, bucket, ontologyType, isICD, desiredTopNode) = args
Expand Down

0 comments on commit 73e4e16

Please sign in to comment.