How do I add Column Mapping to a Hierarchal Form?
harryaultdev opened this issue · 2 comments
Hey there!
love the library. I have a bit of a unique problem. I’m mapping a JSON like object to a flat tabular object, I.e {‘hello’:{‘Test’: 1}} to a table with one column ‘Test’. How would I represent this in the column mapping?
source: [‘hello’][‘test’], target: Test?
Hi, @harryaultdev Thank you for you using PyApacheAtlas!
Column mapping in Purview can have any text you want as the column field. Personally, I would do something like this:
[
{
"DatasetMapping": {
"Source": "mySourceTableFQN", "Sink": "mySinkTableFQN",}
"ColumnMapping": [
{"Source": "hello.test", "Sink": "test"},
]
}
]
I think the dot notation of JSON makes more sense and it's less characters to display in the Purview lineage graph.
You can see more example code here:
https://datasmackdown.com/oss/pyapacheatlas/entities-with-lineage-column-mapping.html
I hope that helps!
Thank you, that's perfect!