Skip to content

Commit

Permalink
Set prefix for athena externa table if the table belongs to a namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
berna396 committed Mar 27, 2024
1 parent c5de1b1 commit 7932028
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ class AthenaAction extends AfterAction with Logging {

val options = config.environment

val s3Path = config.sink.asInstanceOf[FileSink].path
.replace("version=1/", "")
val region = options.region
val dbName = options.dbName
val tableName = ConfigUtilsService.getTableName(config)
val prefix = ConfigUtilsService.getTablePrefix(options.namespaces, s3Path)
val tableName = prefix+ConfigUtilsService.getTableName(config)

val athena = new AthenaCatalogueService()(region)

Expand Down

0 comments on commit 7932028

Please sign in to comment.