Skip to content

Commit

Permalink
Merge pull request #19 from civitaspo/develop
Browse files Browse the repository at this point in the history
v0.0.4
  • Loading branch information
civitaspo authored Aug 13, 2018
2 parents e35e83c + 5ba1d48 commit 96a3b96
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.0.4 (2018-08-13)
==================

* [Fix] Make `output` not uri encoded

0.0.3 (2018-08-13)
==================

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _export:
repositories:
- https://jitpack.io
dependencies:
- pro.civitaspo:digdag-operator-athena:0.0.3
- pro.civitaspo:digdag-operator-athena:0.0.4
athena:
auth_method: profile

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group = 'pro.civitaspo'
version = '0.0.3'
version = '0.0.4'

def digdagVersion = '0.9.27'
def awsSdkVersion = "1.11.372"
Expand Down
2 changes: 1 addition & 1 deletion example/example.dig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _export:
- file://${repos}
# - https://jitpack.io
dependencies:
- pro.civitaspo:digdag-operator-athena:0.0.3
- pro.civitaspo:digdag-operator-athena:0.0.4
athena:
auth_method: profile
query:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import scala.util.hashing.MurmurHash3
class AthenaQueryOperator(operatorName: String, context: OperatorContext, systemConfig: Config, templateEngine: TemplateEngine)
extends AbstractAthenaOperator(operatorName, context, systemConfig, templateEngine) {

object AmazonS3URI {
def apply(path: String): AmazonS3URI = new AmazonS3URI(path, false)
}

sealed abstract class SaveMode

object SaveMode {
Expand Down Expand Up @@ -68,8 +72,8 @@ class AthenaQueryOperator(operatorName: String, context: OperatorContext, system
id = qe.getQueryExecutionId,
database = Try(Option(qe.getQueryExecutionContext.getDatabase)).getOrElse(None),
query = qe.getQuery,
outputCsvUri = new AmazonS3URI(qe.getResultConfiguration.getOutputLocation, false),
outputCsvMetadataUri = new AmazonS3URI(s"${qe.getResultConfiguration.getOutputLocation}.metadata", false),
outputCsvUri = AmazonS3URI(qe.getResultConfiguration.getOutputLocation),
outputCsvMetadataUri = AmazonS3URI(s"${qe.getResultConfiguration.getOutputLocation}.metadata"),
scanBytes = Try(Option(qe.getStatistics.getDataScannedInBytes.toLong)).getOrElse(None),
execMillis = Try(Option(qe.getStatistics.getEngineExecutionTimeInMillis.toLong)).getOrElse(None),
state = QueryExecutionState.fromValue(qe.getStatus.getState),
Expand All @@ -85,7 +89,7 @@ class AthenaQueryOperator(operatorName: String, context: OperatorContext, system
protected val database: Optional[String] = params.getOptional("database", classOf[String])
protected val output: AmazonS3URI = {
val o = params.get("output", classOf[String])
new AmazonS3URI(if (o.endsWith("/")) o else s"$o/")
AmazonS3URI(if (o.endsWith("/")) o else s"$o/")
}
protected val keepMetadata: Boolean = params.get("keep_metadata", classOf[Boolean], false)
protected val saveMode: SaveMode = SaveMode(params.get("save_mode", classOf[String], "overwrite"))
Expand Down

0 comments on commit 96a3b96

Please sign in to comment.