-
Notifications
You must be signed in to change notification settings - Fork 3k
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(platform): Support @Searchable + @Relationship Annotations for Timeseries Aspects #6455
feat(platform): Support @Searchable + @Relationship Annotations for Timeseries Aspects #6455
Conversation
entitySpec = _entityRegistry.getEntitySpec(event.getEntityType()); | ||
} catch (IllegalArgumentException e) { | ||
log.error("Error while processing entity type {}: {}", event.getEntityType(), e.toString()); | ||
public void invoke(@Nonnull final MetadataChangeLog event) { |
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 mostly just organizing code.
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.
- adding javadocs.
|
||
// Step 0. If the aspect is timeseries, add to its timeseries index. | ||
if (aspectSpec.isTimeseries()) { | ||
updateTimeseriesFields(event.getEntityType(), event.getAspectName(), urn, aspect, aspectSpec, |
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.
Here's the important part: Only update timeseries index if its a time series aspect. Do everything else either way.
Unit Test Results (build & test)621 tests - 1 617 ✔️ - 1 16m 0s ⏱️ -3s Results for commit fd93883. ± Comparison against base commit 1fe0f01. This pull request removes 7 and adds 6 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
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.
nice! good change but especially good code cleanup (the method before you made this change was a doozy)
record DatasetProfile includes TimeseriesAspectBase { | ||
/** | ||
* The total number of rows | ||
*/ | ||
@Searchable = { | ||
"fieldType": "COUNT" | ||
} | ||
rowCount: optional long | ||
|
||
/** | ||
* The total number of columns (or schema fields) | ||
*/ | ||
@Searchable = { | ||
"fieldType": "COUNT" | ||
} | ||
columnCount: optional long | ||
|
||
/** | ||
* Profiles for each column (or schema field) | ||
*/ | ||
fieldProfiles: optional array[DatasetFieldProfile] | ||
|
||
/** | ||
* Storage size in bytes | ||
*/ | ||
@Searchable = { | ||
"fieldType": "COUNT" | ||
} | ||
sizeInBytes: optional long |
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.
is it just the diff view or does the indentation of your additions seem off here?
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.
whoa no this seems off
…imeseries Aspects (datahub-project#6455)
Summary
In this PR, we add support for marking fields in a Timeseries aspect as @searchable. This allows us to easily index the most recent value of a particular field. We also add indexing to the following fields:
We do this by simply indexing the Searchable fields during normal MCL processing. On each new Timeseries aspect, the previous value will be overwritten.
What does this enable?
This allows us to easily filter by the fields in a Timeseries aspect.
Status
Ready for review. Validated everything manually as well.
Checklist