eager-florist-67924
03/16/2022, 11:27 PMMetadataChangeProposalWrapper mcpw = MetadataChangeProposalWrapper.builder()
.entityType("dataflow")
.entityUrn("urn:li:dataflow:(urn:li:dataPlatform:kafka,trace-pipeline,PROD)")
.upsert()
.aspect(new DataFlowInfo()
.setName("Trace pipeline")
.setDescription("Pipeline for trace service")
)
.build();
i am able to successfully emit it
emitter.emit(mcpw, new Callback()
but then when executing graphql query:
graphql query
{
search(input: { type: DATA_FLOW, query: "*", start: 0, count: 10 }) {
start
count
total
searchResults {
entity{
urn
type
...on DataFlow {
cluster
}
}
}
}
}
i get following error:
response
{
"errors": [
{
"message": "The field at path '/search/searchResults[0]/entity' was declared as a non null type, but the code involved in retrieving data has wrongly returned a null value. The graphql specification requires that the parent field be set to null, or if that is non nullable that it bubble up null to its parent and so on. The non-nullable type is 'Entity' within parent type 'SearchResult'",
"path": [
"search",
"searchResults",
0,
"entity"
],
"extensions": {
"classification": "NullValueInNonNullableField"
}
}
],
"data": {
"search": null
}
}
so basically how such dataflow entity should look like? Did i miss some required fields? And how from entities documentation i can know which fields are optional and which are mandatory? thxloud-island-88694
eager-florist-67924
03/17/2022, 2:46 PMeager-florist-67924
03/18/2022, 4:03 PMprivate static void createDataPipeline() throws IOException, ExecutionException, InterruptedException {
MetadataChangeProposalWrapper mcpw = MetadataChangeProposalWrapper.builder()
.entityType("dataflow")
.entityUrn("urn:li:dataFlow:(kafka,trace-pipeline,PROD)")
.upsert()
.aspect(new DataFlowInfo()
.setName("Trace pipeline")
.setDescription("Pipeline for trace service")
)
.build();
however i would like to highlight that its easy to break the ui since the validation of proposed entity is not sufficient....loud-island-88694
big-carpet-38439
03/18/2022, 9:17 PMbig-carpet-38439
03/18/2022, 9:18 PM