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

feat(ingest): powerbi # store powerbi entity descriptions #7154

Merged
merged 20 commits into from
Mar 13, 2023

Conversation

looppi
Copy link
Contributor

@looppi looppi commented Jan 27, 2023

Store description fields of Datasets, Reports and Dashboards from PowerBI REST API to ingested data. Showing the possible description of the entity in Datahub improves visibility and adds value to Datahub as there's no need to jump to other system just to see the documentation.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Jan 27, 2023
@anshbansal anshbansal added the community-contribution PR or Issue raised by member(s) of DataHub Community label Jan 28, 2023
@jjoyce0510
Copy link
Collaborator

(Rebased on latest master)

if display_name:
return display_name

return ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we return None from here ? and make return type as optional[str]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DashboardInfoClass expects description to be str and not Optional[str], if I change the return value to be optional, then all the descriptions change to description=formulate_description(....) or "" which doesn't look too good to my eye. I'd like to keep the behavior as is just because it looks cleaner, what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that is the case then use str() , it returns empty string. and this is the default value for description in DashboardInfoClass

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether I fixed it with my change, but I tried! :)



def formulate_description(
display_name: Optional[str], description: Optional[str]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't quite get why we are changing the description to include the display name like this?

Feels like we should only take the raw description, not the display name

At min, we should leave a comment over this method describing why this is even necessary

@jjoyce0510
Copy link
Collaborator

I like that we are correctly extracting descriptions - totally jive with that. But why are we inserting the display name at the top? Feels a bit odd to change the description at all prior to ingestion? Hoping to gain answer before we merge this

@jjoyce0510
Copy link
Collaborator

After syncing with @mohdsiddique , we agree that we should first remove any additional formatting from the description before merging this PR.

Thanks
John

@looppi
Copy link
Contributor Author

looppi commented Mar 3, 2023

Originally I kept the entity name in the description field just because it was there before my changes. Now I think the common consensus lies in the fact that there shouldn't be entity name in the description field. I think that's the only way to not use any formatting in the description field and keep the data readable. Certainly that makes a lot of sense. So, thinking from this point of view, would the PR be more mergeable if I just remove the formulate_description function and use only the description field content everywhere?

@jjoyce0510 jjoyce0510 merged commit 2383042 into datahub-project:master Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants