generated from teamclairvoyant/scala3-application-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from teamclairvoyant/REST-155
[REST-155] Modifying type class hierarchy
- Loading branch information
Showing
33 changed files
with
473 additions
and
308 deletions.
There are no files selected for viewing
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
14 changes: 8 additions & 6 deletions
14
...src/main/scala/com/clairvoyant/data/scalaxy/writer/aws/s3/DataFrameToS3BucketWriter.scala
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
package com.clairvoyant.data.scalaxy.writer.aws.s3 | ||
|
||
import com.clairvoyant.data.scalaxy.writer.aws.s3.formats.FileFormat | ||
import com.clairvoyant.data.scalaxy.writer.aws.s3.instances.DataFrameToS3FileWriter | ||
import org.apache.spark.sql.{DataFrame, SaveMode} | ||
|
||
object DataFrameToS3BucketWriter { | ||
trait DataFrameToS3BucketWriter[T]: | ||
|
||
def write[T <: FileFormat]( | ||
def write( | ||
dataFrame: DataFrame, | ||
fileFormat: T, | ||
bucketName: String, | ||
path: String, | ||
saveMode: SaveMode = SaveMode.Overwrite | ||
)(using dataFrameToS3FileWriter: DataFrameToS3FileWriter[T]): Unit = | ||
dataFrameToS3FileWriter.write(dataFrame, fileFormat, bucketName, path, saveMode) | ||
): Unit | ||
|
||
} | ||
object DataFrameToS3BucketWriter: | ||
|
||
def apply[T <: FileFormat]( | ||
using dataFrameToS3BucketWriter: DataFrameToS3BucketWriter[T] | ||
): DataFrameToS3BucketWriter[T] = dataFrameToS3BucketWriter |
3 changes: 2 additions & 1 deletion
3
...scala/com/clairvoyant/data/scalaxy/writer/aws/s3/instances/DataFrameToCSVFileWriter.scala
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
3 changes: 2 additions & 1 deletion
3
...cala/com/clairvoyant/data/scalaxy/writer/aws/s3/instances/DataFrameToJSONFileWriter.scala
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
3 changes: 2 additions & 1 deletion
3
...a/com/clairvoyant/data/scalaxy/writer/aws/s3/instances/DataFrameToParquetFileWriter.scala
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
13 changes: 0 additions & 13 deletions
13
.../scala/com/clairvoyant/data/scalaxy/writer/aws/s3/instances/DataFrameToS3FileWriter.scala
This file was deleted.
Oops, something went wrong.
3 changes: 2 additions & 1 deletion
3
...scala/com/clairvoyant/data/scalaxy/writer/aws/s3/instances/DataFrameToXMLFileWriter.scala
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
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
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
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
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
Oops, something went wrong.