Skip to content

Commit ec502bc

Browse files
ATLAS-5043 : import-hive.sh is failing when shell entity id present during import (#360)
Co-authored-by: Vinayak Marraiya <vinayak.marraiya@cloudera.com>
1 parent 570dae2 commit ec502bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,10 @@ private AtlasEntityWithExtInfo toTableEntity(AtlasEntity database, Table hiveTab
711711
private AtlasEntityWithExtInfo toTableEntity(AtlasEntity database, final Table hiveTable, AtlasEntityWithExtInfo table) throws AtlasHookException {
712712
if (table == null) {
713713
table = new AtlasEntityWithExtInfo(new AtlasEntity(HiveDataTypes.HIVE_TABLE.getName()));
714+
} else if (table.getEntity().getAttribute(ATTRIBUTE_NAME) == null) {
715+
table.getEntity().setAttribute(ATTRIBUTE_NAME, hiveTable.getTableName().toLowerCase());
714716
}
717+
table.getEntity().setIsIncomplete(false);
715718

716719
AtlasEntity tableEntity = table.getEntity();
717720
String tableQualifiedName = getTableQualifiedName(metadataNamespace, hiveTable);

0 commit comments

Comments
 (0)