How do I use excel template to bulk load experts/owners with info for entities?
Closed this issue · 6 comments
The excel bulk load template works great. I can use "BulkEntities" spreadsheet and below code to upload experts/owners for entities. Does it support to upload experts/owners with info? If yes, could you share the example format of experts/owners with info (format) in excel template? Thanks a lot!
entities = reader.parse_bulk_entities(file_path,contacts_func = client.msgraph.email_to_id)
results = client.upload_entities(entities)
Hi, @KellyG123 ! Thank you for using PyApacheAtlas!
I need to do a better job of linking to my docs! You can use the built in ms-graph functionality of PyApacheAtlas to convert email addresses to the right structure in the Atlas payload.
Ultimately, your spreadsheet would look like:
typeName | qualifiedName | name | experts |
---|---|---|---|
DataSet | custom://my/custom/ds | expert ds | bill@example.com;will@example.com |
And your parse_bulk_entities
command would include an argument for contacts_func
.
entities = reader.parse_bulk_entities(
'path/to/spreadsheet.xlsx',
contacts_func = client.msgraph.email_to_id
)
You can learn more about the msgraph features on the docs
Thanks Will. Uploading expert and owners is straightforward. But if I want to upload info (business areas or departments, etc.) for expert and owner, how should prepare the template? Thanks.
example:
Will is the expert of "Supply Chain" (info), Kelly is expert of "Finance" for "expert ds" table. How to upload info "Supply Chain" and "Finance"?
@KellyG123 - I am so sorry for the massive delay here. Currently, I don't support adding to the info field. You could do that post the parse_* method with an additional file / lookup table.
If I were to support it, how would you want to represent it in Excel? For other fields, I've had to introduce a sort of pseudo-JSON like {property:value property2:value2}
would a format like that be tolerable to add both email and info fields?
Thanks Will! We can upload Expert/Steward with info for glossary term like attached excel via Purview UI. It would be great if we can prepare Owner/Expert with info for technical assets/entities in excel similarly.
@KellyG123 thank you so much for sharing that sample! It was extremely helpful and I am implementing it in that way for the next release!
@KellyG123 Thank you for your extreme patience. I just published a new release and it is now available on PyPi with the fix. With time off for the holidays I was finally able to get this out. Thank you for your continued use of PyApacheAtlas!