-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[RFC] in BI integration docs, move from translators to map_asset_specs #24802
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
base: master
Are you sure you want to change the base?
Conversation
branch-name: literal-tag-set
branch-name: power-bi-asset-type-tag
branch-name: customize-map-asset-specs
|
||
def get_dashboard_spec(self, data: PowerBIContentData) -> AssetSpec: | ||
return super().get_dashboard_spec(data)._replace(owners=["my_team"]) | ||
def customize_powerbi_asset(spec: AssetSpec) -> AssetSpec: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is even more glorious than I anticipated
# We prefix all dashboard asset keys with "powerbi" for organizational | ||
# purposes | ||
return super().get_dashboard_asset_key(data).with_prefix("powerbi") | ||
return spec._replace(key=key, owners="my_team") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an interesting decision point where we leak the implementation detail that we inherit from NamedTuple
in a heavy way. We probably can't change things at this point, but worth nothing that we are telling users to use _replace
when the might expect dataclass
or pydantic
variants of object copies.
Graphite Automations"Label and add CE on all Docs" took an action on this PR • (09/28/24)3 reviewers were added to this PR based on Pedram Navid's automation. |
Summary & Motivation
How I Tested These Changes
Changelog
NOCHANGELOG