diff --git a/tempto-core/src/main/java/com/teradata/tempto/internal/fulfillment/table/TableNameGenerator.java b/tempto-core/src/main/java/com/teradata/tempto/internal/fulfillment/table/TableNameGenerator.java index ee56ee6a..ee9c95fe 100644 --- a/tempto-core/src/main/java/com/teradata/tempto/internal/fulfillment/table/TableNameGenerator.java +++ b/tempto-core/src/main/java/com/teradata/tempto/internal/fulfillment/table/TableNameGenerator.java @@ -14,7 +14,7 @@ package com.teradata.tempto.internal.fulfillment.table; -import java.util.UUID; +import static org.apache.commons.lang3.RandomStringUtils.random; public class TableNameGenerator { @@ -22,17 +22,11 @@ public class TableNameGenerator public String generateMutableTableNameInDatabase(String baseTableName) { - String tableSuffix = randomUUID().replace("-", ""); - return MUTABLE_TABLE_NAME_PREFIX + baseTableName + "_" + tableSuffix; + return MUTABLE_TABLE_NAME_PREFIX + baseTableName + "_" + random(8); } public boolean isMutableTableName(String tableNameInDatabase) { return tableNameInDatabase.startsWith(MUTABLE_TABLE_NAME_PREFIX); } - - private String randomUUID() - { - return UUID.randomUUID().toString(); - } }