-
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(graphql): adds container aspect for dataflow and datajob entities #12236
feat(graphql): adds container aspect for dataflow and datajob entities #12236
Conversation
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.
Let's also add in https://github.com/datahub-project/datahub/blob/master/metadata-service/servlet/src/main/java/com/datahub/gms/servlet/Config.java#L30-L39 this map so CLI can check the existence of functionality before trying to emit containers and causing exceptions in ingestion
The map does seem high-level. While adding entries like |
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.
so there's actually a few more pieces here for this to be fully wired up. tbh i'm not positive how you're seeing a container in the UI at all...
- Add
CONTAINER_ASPECT_NAME
to the list ofASPECTS_TO_RESOLVE
in bothDataJobType.java
andDataFlowType.java
- this will tell us to fetch these aspects when hydrating this entity - update
entity.graphql
for both theDataJob
andDataFlow
entity types to have acontainer
field as well asparentContainers
. you can see how this works fortype Chart
or dataset or whatever and essentially copy paste. This is our graphql schema and enables the frontend to start fetching these things - update the
.graphql
files on the frontend for datajob and dataflow to fetch container/parentContainers to display them in the UI.
let me know if you have any questions and we can hop on a call and chat about it! i'm really curious how you were able to see containers for these entities without the above 3 steps..
return dataJob.getDataPlatformInstance() != null | ||
? dataJob.getDataPlatformInstance().getUrn() |
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.
looks like a copy paste error here - we want to have dataJob.getContainer
here not getDataPlatformInstance
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 catch! fixed in commit 21e00bc
…ude parentContainers in graphql frontend schemas
Yes, I was expecting to miss some pieces. Thanks for the review!
I made the changes listed below (except for point 2) and tested them locally. The UI still looks the same as the screenshots above. Could you share what specific concerns you have? Clearly, even though I've updated the dataflow and datajob GraphQL schemas in the frontend project, I haven't modified any UI components. So unless they are being used automagically, these updates aren't in use yet.
Done in commit 49b7259
My PR already updated
Checking other entities such as dataset or chart, I've noted only Done in commit 49b7259
|
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! sorry i think i just missed the original change on entity.graphql
in my first review. but this is looking solid now
This update extends the model by adding
Container
aspects to theDataFlow
andDataJob
entities. Additionally, GraphQL resolvers are implemented, including a newparentContainers
resolver.TODO
parentContainers
?Checklist