Share via

columnMapping attribute in AtlasProcess not taking effect

Sunita 62 Reputation points Microsoft Employee
2023-09-12T02:08:16.31+00:00

I referred this link https://datasmackdown.com/oss/pyapacheatlas/entities-with-lineage-column-mapping.htmlto setup columnMapping for an entity in purview using pycheatlas library, however, the mappings don't show up in Purview UI. All I can see is the columnMapping attribute show up in Properties section.

Below is my code snippet


type_spark_job = EntityTypeDef(
  name="synapse_spark_job_process",
  attributeDefs=[
    AtlasAttributeDef(name="columnMapping")
 superTypes = ["Process"])

col_map=[
    {"columnMapping":[
        {"Source":"QueueName", "Sink":"QName"},
        {"Source":"QueueMessage", "Sink":"QMessage"}],
     "DatasetMapping"  :{
        "Source":atlas_input_df.qualifiedName, "Sink":atlas_final_df.qualifiedName}
    }
]
process=AtlasProcess(
name="Synapse spark notebook",
typeName="synapse_spark_job_process",
qualified_name="test",
description="processes Queue Dimension",
guid=guid.get_guid(),
attributes = {"columnMapping":json.dumps(col_map)},
inputs = [{"guid":"<guid-1>"},{"guid":"<guid-2>"}],
outputs = [{"guid":"<guid-op>"}] 
)

client.upload_entities([process])
Microsoft Security | Microsoft Purview

2 answers

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 91,866 Reputation points
    2023-09-12T11:29:48.2533333+00:00

    @Sunita - I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    Issue: columnMapping attribute in AtlasProcess not taking effect

    Solution: Got this working by fixing the casing for columnMapping element(supposed to be ColumnMapping).

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    Was this answer helpful?

    0 comments No comments

  2. Sunita 62 Reputation points Microsoft Employee
    2023-09-12T04:27:59.7433333+00:00

    got this working by fixing the casing for columnMapping element(supposed to be ColumnMapping)

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.