diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java index e5171fde92..de42d0ae1a 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java @@ -70,6 +70,7 @@ public class PreProcessorUtils { public static final String INPUT_PORT_GUIDS_ATTR = "daapInputPortGuids"; public static final String DAAP_STATUS_ATTR = "daapStatus"; public static final String DAAP_ARCHIVED_STATUS = "Archived"; + public static final String DAAP_ASSET_DSL_ATTR = "dataProductAssetsDSL"; //Migration Constants public static final String MIGRATION_TYPE_PREFIX = "MIGRATION:"; diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/datamesh/DataProductPreProcessor.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/datamesh/DataProductPreProcessor.java index d8aee05974..6d2a122217 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/datamesh/DataProductPreProcessor.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/datamesh/DataProductPreProcessor.java @@ -83,6 +83,10 @@ private void processCreateProduct(AtlasEntity entity,AtlasVertex vertex) throws entity.removeAttribute(OUTPUT_PORT_GUIDS_ATTR); entity.removeAttribute(INPUT_PORT_GUIDS_ATTR); + if(!entity.hasAttribute(DAAP_ASSET_DSL_ATTR) || entity.getAttribute(DAAP_ASSET_DSL_ATTR) == null){ + throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "DataProductAssetDSL attribute is mandatory for DataProduct creation"); + } + if (parentDomainObject == null) { throw new AtlasBaseException(OPERATION_NOT_SUPPORTED, "Cannot create a Product without a Domain Relationship"); } else {