From b7b15d279a5babc8011d0c5577ed8185bd502f9b Mon Sep 17 00:00:00 2001 From: Yanbo Zhao Date: Mon, 5 Aug 2024 10:47:13 -0700 Subject: [PATCH] feat: add query filter models for gRPC API (#392) * feat: add query filter models * fix * minor fix --- .../metadata/query/EntityQueryFilter.pdl | 17 +++++++++++++++++ .../metadata/query/RelationshipQueryFilter.pdl | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 dao-api/src/main/pegasus/com/linkedin/metadata/query/EntityQueryFilter.pdl create mode 100644 dao-api/src/main/pegasus/com/linkedin/metadata/query/RelationshipQueryFilter.pdl diff --git a/dao-api/src/main/pegasus/com/linkedin/metadata/query/EntityQueryFilter.pdl b/dao-api/src/main/pegasus/com/linkedin/metadata/query/EntityQueryFilter.pdl new file mode 100644 index 000000000..3ad0ed9d2 --- /dev/null +++ b/dao-api/src/main/pegasus/com/linkedin/metadata/query/EntityQueryFilter.pdl @@ -0,0 +1,17 @@ +namespace com.linkedin.metadata.query + +/** + * Filter for finding source/destination entity(s) + */ +record EntityQueryFilter { + + /** + * dataset/azkabanJob/corpUser/etc. + */ + entityType: optional string = "" + + /** + * Filter for finding an record or a collection of records + */ + filter: optional LocalRelationshipFilter +} \ No newline at end of file diff --git a/dao-api/src/main/pegasus/com/linkedin/metadata/query/RelationshipQueryFilter.pdl b/dao-api/src/main/pegasus/com/linkedin/metadata/query/RelationshipQueryFilter.pdl new file mode 100644 index 000000000..34897e420 --- /dev/null +++ b/dao-api/src/main/pegasus/com/linkedin/metadata/query/RelationshipQueryFilter.pdl @@ -0,0 +1,17 @@ +namespace com.linkedin.metadata.query + +/** + * Filter for relationship in query + */ +record RelationshipQueryFilter { + + /** + * ownedBy/downstreamOf/etc. + */ + relationshipType: optional string = "" + + /** + * Filter for finding an record or a collection of records + */ + filter: optional LocalRelationshipFilter +} \ No newline at end of file