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

Update MF to support breaking changes in DSI for custom calendar #1522

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

WilliamDee
Copy link
Contributor

@WilliamDee WilliamDee commented Nov 11, 2024

Context

We merged 2 breaking changes in DSI dbt-labs/dbt-semantic-interfaces#363 and dbt-labs/dbt-semantic-interfaces#365 which changed most spec typing that used time granularity to be a str instead of TimeGranularity to enable support for custom granularity. Similarly, there were additional breaking changes to the objects that requires passing in custom_granularity_names. This PR updates all those callsites to be compatible with the new version of DSI (to be released)

Resolves SL-3097

Copy link

linear bot commented Nov 11, 2024

Copy link
Contributor

@courtneyholcomb courtneyholcomb left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for handling so quickly!!

@@ -151,5 +155,7 @@ def create(self, name: str, entity_path: Sequence[str] = ()) -> WhereFilterDimen
rendered_spec_tracker=self._rendered_spec_tracker,
element_name=structured_name.element_name,
entity_links=tuple(EntityReference(entity_link_name.lower()) for entity_link_name in entity_path)
+ structured_name.entity_links,
+ tuple(
Copy link
Contributor

Choose a reason for hiding this comment

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

this change is just to support case insensitivity right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, we switched from using DunderedNameFormatter to StructuredLinkableSpecName and that didn't have entity_links: Tuple[EntityReference, ...], but only entity_link_names: Tuple[str, ...]. Now that I think about it, i'll just add a property to make entity_links work in StructuredLinkableSpecName so that we don't need this change

Copy link
Contributor

Choose a reason for hiding this comment

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

Ooo ok sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants