You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build-your-software-catalog/customize-integrations/configure-data-model/setup-blueprint/properties/aggregation-property.md
|`pathFilter.path`| An array containing the full path of relation identifiers to traverse. |
916
-
|`pathFilter.fromBlueprint`|*(Optional)* The blueprint to start the path traversal from. If omitted, traversal starts from the source blueprint. |
916
+
|`pathFilter.fromBlueprint`|*(Optional)* The blueprint to start the path traversal from. Can be the target blueprint or omitted. If omitted, traversal starts from the source blueprint. |
917
917
918
918
919
919
<h4> For upstream paths </h4>
@@ -944,56 +944,32 @@ When a `pathFilter` is defined, Port will include only entities that can be reac
Count Jira issues directly related to a Microservice:
960
+
Count how many deployments are directly related to a cluster:
957
961
958
962
```json
959
963
{
960
-
"identifier": "microservice",
961
-
"title": "Microservice",
962
-
"aggregationProperties": {
963
-
"directJiraIssuesCount": {
964
-
"title": "Direct Jira Issues Count",
965
-
"target": "jiraIssue",
966
-
"pathFilter": [
967
-
{
968
-
"path": ["jira_issue_rel"]
969
-
}
970
-
],
971
-
"calculationSpec": {
972
-
"calculationBy": "entities",
973
-
"func": "count"
974
-
}
975
-
}
976
-
}
977
-
}
978
-
```
979
-
980
-
The `"path": ["jira_issue_rel"]` ensures that only Jira issues directly related to the microservice through the `jira_issue_rel` relation are counted.
981
-
982
-
<h4> Example 2: Multi-hop Relationship Path</h4>
983
-
984
-
Count deployments through Service → Microservice → Deployment
985
-
986
-
```json
987
-
{
988
-
"identifier": "service",
989
-
"title": "Service",
964
+
"identifier": "cluster",
965
+
"title": "Cluster",
990
966
"aggregationProperties": {
991
967
"deploymentCount": {
992
968
"title": "Deployment Count",
993
969
"target": "deployment",
994
970
"pathFilter": [
995
971
{
996
-
"path": ["microservice_rel", "deployment_rel"]
972
+
"path": ["deployment_rel"]
997
973
}
998
974
],
999
975
"calculationSpec": {
@@ -1005,23 +981,23 @@ Count deployments through Service → Microservice → Deployment
1005
981
}
1006
982
```
1007
983
1008
-
The `pathFilter` with `"path": ["microservice_rel", "deployment_rel"]` counts deployments that are connected through the `microservice_rel` relation first, then to the `deployment_rel` relation.
984
+
The `pathFilter` with `"path": ["deployment_rel"]` counts deployments that are directly related to the cluster through the `deployment_rel` relation.
1009
985
1010
-
<h4>Example 3: Starting Path from Specific Blueprint</h4>
986
+
<h4>Example 2: Using fromBlueprint</h4>
1011
987
1012
-
Count deployments by starting path traversal from the target blueprint:
988
+
Count how many clusters are related to a deployment:
1013
989
1014
990
```json
1015
991
{
1016
-
"identifier": "service",
1017
-
"title": "Service",
992
+
"identifier": "deployment",
993
+
"title": "Deployment",
1018
994
"aggregationProperties": {
1019
-
"deploymentCountFromService": {
1020
-
"title": "Deployment Count from Service",
1021
-
"target": "deployment",
995
+
"clusterCount": {
996
+
"title": "Cluster Count",
997
+
"target": "cluster",
1022
998
"pathFilter": [
1023
999
{
1024
-
"path": ["microservice_rel", "deployment_rel"],
1000
+
"path": ["deployment_rel"],
1025
1001
"fromBlueprint": "deployment"
1026
1002
}
1027
1003
],
@@ -1034,67 +1010,29 @@ Count deployments by starting path traversal from the target blueprint:
1034
1010
}
1035
1011
```
1036
1012
1037
-
The `fromBlueprint: "deployment"` specifies that the path traversal should start from the deployment blueprint (the target), then follow the path backwards through `microservice_rel` to service.
1013
+
The `fromBlueprint: "deployment"` specifies that the path traversal should start from the deployment blueprint (the target), then follow the path backwards through `deployment_rel` to cluster.
1038
1014
1039
1015
</TabItem>
1040
1016
1041
1017
<TabItemvalue="tf">
1042
1018
1043
-
<h4> Example 1: Direct Relationship Path</h4>
1044
-
1045
-
Count Jira issues directly related to a Microservice:
The `path = ["microservice_rel", "deployment_rel"]` counts deployments that are connected through the `microservice_rel` relation first, then to the `deployment_rel` relation.
1055
+
The `path = ["deployment_rel"]` counts deployments that are directly related to the cluster through the `deployment_rel` relation.
1118
1056
1119
-
<h4>Example 3: Starting Path from Specific Blueprint</h4>
1057
+
<h4>Example 2: Using fromBlueprint</h4>
1120
1058
1121
-
Count deployments by starting path traversal from the target blueprint:
1059
+
Count how many clusters are related to a deployment:
The `from_blueprint = "deployment"` specifies that the path traversal should start from the deployment blueprint (the target), then follow the path backwards through `microservice_rel` to service.
1094
+
The `from_blueprint = "deployment"` specifies that the path traversal should start from the deployment blueprint (the target), then follow the path backwards through `deployment_rel` to cluster.
0 commit comments