diff --git a/src/main/scala/com/metabolic/data/core/services/athena/AthenaAction.scala b/src/main/scala/com/metabolic/data/core/services/athena/AthenaAction.scala index d4f5f51..cd6ad39 100644 --- a/src/main/scala/com/metabolic/data/core/services/athena/AthenaAction.scala +++ b/src/main/scala/com/metabolic/data/core/services/athena/AthenaAction.scala @@ -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)