Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I use excel template to bulk load experts/owners with info for entities? #257

Closed
KellyG123 opened this issue Sep 7, 2023 · 6 comments
Labels
purview question A question more about Purview and less about PyApacheAtlas

Comments

@KellyG123
Copy link

KellyG123 commented Sep 7, 2023

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)

@KellyG123 KellyG123 added the purview question A question more about Purview and less about PyApacheAtlas label Sep 7, 2023
@wjohnson
Copy link
Owner

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

@KellyG123
Copy link
Author

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"?

@wjohnson
Copy link
Owner

@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?

@KellyG123
Copy link
Author

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.

import-terms-sample (22).csv

wjohnson added a commit that referenced this issue Dec 23, 2023
…by adding a `:`

delimiter between email and info. This is similar to how Microsoft Purview suppports
info in the import of terms.

Addresses #257
@wjohnson
Copy link
Owner

@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!

wjohnson added a commit that referenced this issue Dec 23, 2023
…by adding a `:`

delimiter between email and info. This is similar to how Microsoft Purview suppports
info in the import of terms.

Addresses #257
@wjohnson
Copy link
Owner

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
purview question A question more about Purview and less about PyApacheAtlas
Projects
None yet
Development

No branches or pull requests

2 participants