This is an automated email from the ASF dual-hosted git repository. sidmishra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push: new 3bdc51e ATLAS-4303: [Business Metadata Bulk Import] Incorrect Error "invalid business attribute name" thrown while trying to assign BM attribute to non-applicable type 3bdc51e is described below commit 3bdc51ea1e1ed463f8c2c35c8bfc1fbb4b792cab Author: Radhika Kundam <rkun...@cloudera.com> AuthorDate: Wed May 26 09:59:59 2021 -0700 ATLAS-4303: [Business Metadata Bulk Import] Incorrect Error "invalid business attribute name" thrown while trying to assign BM attribute to non-applicable type Signed-off-by: sidmishra <sidmis...@apache.org> --- .../apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java index 65b92ab..0f12bd3 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java @@ -1592,7 +1592,7 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore { String bmAttributeValue = record[FileUtils.BM_ATTR_VALUE_COLUMN_INDEX]; String uniqueAttrName = AtlasTypeUtil.ATTRIBUTE_QUALIFIED_NAME; - if (record.length > FileUtils.UNIQUE_ATTR_NAME_COLUMN_INDEX) { + if (record.length > FileUtils.UNIQUE_ATTR_NAME_COLUMN_INDEX && StringUtils.isNotBlank(record[FileUtils.UNIQUE_ATTR_NAME_COLUMN_INDEX])) { uniqueAttrName = record[FileUtils.UNIQUE_ATTR_NAME_COLUMN_INDEX]; } @@ -1628,7 +1628,7 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore { AtlasBusinessAttribute businessAttribute = entityType.getBusinesAAttribute(bmAttribute); if (businessAttribute == null) { - failedMsgList.add("Line #" + (lineIndex + 1) + ": invalid business attribute name '" + bmAttribute + "'"); + failedMsgList.add("Line #" + (lineIndex + 1) + ": invalid business-metadata '"+ bmAttribute + "' for entity type '" + entityType.getTypeName() + "'"); continue; }