Skip to content

Commit

Permalink
Merge pull request #43 from metabolicdata/feature/recreate_delta
Browse files Browse the repository at this point in the history
Recreate delta table always
  • Loading branch information
berna396 authored Jun 25, 2024
2 parents 6de00bb + ec75a86 commit 8a790a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AthenaAction extends AfterAction with Logging {
ConfigUtilsService.getTablePrefix(options.namespaces, s3Path)
val tableName = prefix + ConfigUtilsService.getTableName(config)
athena.dropView(dbName, tableName)
athena.createDeltaTable(dbName, tableName, s3Path)
athena.createDeltaTable(dbName, tableName, s3Path, recreate = true)

case _ =>
logger.warn(f"After Action: Skipping $name for ${config.name} as it is not a DeltaSink")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AthenaCatalogueService(implicit val region: Regions) extends Logging {
private def dropTableStatement(dbName: String, tableName: String) = {

s"DROP TABLE IF EXISTS " +
s"$dbName.$tableName"
s"`$dbName`.`$tableName`"
}

def dropView(dbName: String, viewName: String) = {
Expand Down

0 comments on commit 8a790a3

Please sign in to comment.