Hi, I tried the following combinations.
{"version":{"version":"1.0.0"},"message":{"type":"*ENTITY_CREATE_V2* ","entities":[{"typeName":"hive_table","*values* ":{"tableType":"MANAGED_TABLE","name":"table@cl8 ","createTime":"2016-12-28T09:34:53.000Z","temporary":false,"db":{"guid":"96393f8b-4b1c-4d10-b35f-b72eea0bb0a8","typeName":"hive_db"},"qualifiedName":"default.table1@cl8 "},"id":{"id":"-1467290565135246000"}}]}} {"version":{"version":"1.0.0"},"message":{"type":"*ENTITY_CREATE_V2* ","entities":[{"typeName":"hive_table","*attributes* ":{"tableType":"MANAGED_TABLE","name":"table@cl8 ","createTime":"2016-12-28T09:34:53.000Z","temporary":false,"db":{"guid":"96393f8b-4b1c-4d10-b35f-b72eea0bb0a8","typeName":"hive_db"},"qualifiedName":"default.table1@cl8 "},"id":{"id":"-1467290565135246000"}}]}} *In both cases, it gives the same error:-* ERROR - [NotificationHookConsumer thread-0:] ~ AtlasType.fromJson() (AtlasJson:151) com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `org.apache.atlas.model.instance.AtlasEntity$AtlasEntitiesWithExtInfo` out of START_ARRAY token at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: org.apache.atlas.model.notification.AtlasNotificationMessage["message"]->org.apache.atlas.model.notification.HookNotification$EntityCreateRequestV2["entities"]) at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63) at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1342) at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1138) On Fri, Jun 7, 2019 at 9:56 PM Madhan Neethiraj <mad...@apache.org> wrote: > Anshu, > > > > In the message given in your email, ‘type’ should be set to > ‘ENTITY_CREATE_V2’ (and not ‘ENTITY_CREATE’). > > > > More details on hook notification message contents can be found at > HookNotification.java > <https://github.com/apache/atlas/blob/master/intg/src/main/java/org/apache/atlas/model/notification/HookNotification.java> > . > > > > Hope this helps. > > > > Madhan > > > > > > *From: *anshu shukla <anshushuk...@gmail.com> > *Reply-To: *"u...@atlas.apache.org" <u...@atlas.apache.org> > *Date: *Friday, June 7, 2019 at 8:36 AM > *To: *"u...@atlas.apache.org" <u...@atlas.apache.org>, " > dev@atlas.apache.org" <dev@atlas.apache.org> > *Cc: *"sar...@apache.org" <sar...@apache.org> > *Subject: *Using Atlas Hook for entity creation > > > > Hi, > > > > I am using atlas hook for creation of entities. But for creating entities > with remote vertex connection like creating Table with DB as a remote > entity is not working. > > > > 1- Is there any latest documentation for finding the exact message format > to be used for altas Hook. > > 2- Does Hooks support creating of complex entities. > > > > Error: > > On publishing this msg on Hook: > > > *{"version":{"version":"1.0.0"},"message":{"type":"ENTITY_CREATE","entities":[{"typeName":"hive_table","values":{"tableType":"MANAGED_TABLE","name":"table@cl8","createTime":"2016-12-28T09:34:53.000Z","temporary":false,"db":{"guid":"96393f8b-4b1c-4d10-b35f-b72eea0bb0a8","typeName":"hive_db"},"qualifiedName":"default.table1@cl8"},"id":{"id":"-1467290565135246000"}}]}}* > > > > > *AtlasBaseException: Invalid instance creation/updation parameters passed > : db={guid=96393f8b-4b1c-4d10-b35f-b72eea0bb0a8, typeName=hive_db}*at > org.apache.atlas.repository.converters.AtlasStructFormatConverter.fromV1ToV2(AtlasStructFormatConverter.java:267) > at > org.apache.atlas.repository.converters.AtlasEntityFormatConverter.fromV1ToV2(AtlasEntityFormatConverter.java:76) > at > org.apache.atlas.repository.converters.AtlasInstanceConverter.fromV1toV2Entity(AtlasInstanceConverter.java:215) > > > > -- > > Thanks & Regards, > Anshu Shukla > -- Thanks & Regards, Anshu Shukla