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

Chaining fix #567

Merged
merged 9 commits into from
Sep 27, 2023
Merged

Chaining fix #567

merged 9 commits into from
Sep 27, 2023

Conversation

nikhilsimha
Copy link
Contributor

@nikhilsimha nikhilsimha commented Sep 25, 2023

Summary

  • Adding outputNamespace to joinSource during compile
  • Fix partition range shifting for chaining
  • Add an option historicalBackfill to allow no "catch-up" backfill but only backfill single day DS for homes use case

Why / Goal

Test Plan

  • Added Unit Tests
  • Covered by existing CI
  • Integration tested

Checklist

  • Documentation update

Reviewers

@@ -431,6 +431,7 @@ def _normalize_source(source):
elif isinstance(source, ttypes.EntitySource):
return ttypes.Source(entities=source)
elif isinstance(source, ttypes.JoinSource):
source.join.metadata = output_namespace or source.metaData.outputNamespace
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should this be

Suggested change
source.join.metadata = output_namespace or source.metaData.outputNamespace
if not source.join.metadata.isSetOutputNamespace():
source.join.metadata.setOutputNamespace(output_namespace)

Copy link
Collaborator

Choose a reason for hiding this comment

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

cc @better365 for another eye. Working locally but does not seem to be effective when trying to test with user conf.

Copy link
Contributor Author

@nikhilsimha nikhilsimha left a comment

Choose a reason for hiding this comment

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

Few comments

Copy link
Contributor Author

@nikhilsimha nikhilsimha left a comment

Choose a reason for hiding this comment

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

LGTM! I cannot stamp though

println(s"Historical backfill is set to false. Backfill single partition only: $endPartition")
Some(endPartition)
}
lazy val defaultLeftStart = Option(leftSource.query.startPartition)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a great way to avoid version checking.

@@ -431,6 +431,8 @@ def _normalize_source(source):
elif isinstance(source, ttypes.EntitySource):
return ttypes.Source(entities=source)
elif isinstance(source, ttypes.JoinSource):
if not source.join.metadata.isSetOutputNamespace():
source.join.metadata.setOutputNamespace(output_namespace)
Copy link
Collaborator

Choose a reason for hiding this comment

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

because the output namespace is empty in the join source python object. It has to be read from the teams.json similar to this method: https://github.com/airbnb/chronon/blob/master/api/py/ai/chronon/repo/compile.py#L122

@SophieYu41 SophieYu41 merged commit af47ab4 into master Sep 27, 2023
@SophieYu41 SophieYu41 deleted the chaining_fix branch September 27, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants