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/sync-data-to-catalog/cloud-providers/azure/azure-resource-graph.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,39 @@ resources:
121
121
```
122
122
</details>
123
123
124
+
### The `graphQuery` selector
125
+
126
+
The `graphQuery` selector is a powerful feature that allows you to specify a custom query to fetch the exact Azure resources you need. It uses the [**Kusto Query Language (KQL)**](https://learn.microsoft.com/en-us/azure/governance/resource-graph/concepts/query-language).
127
+
128
+
With `graphQuery`, you can:
129
+
- **Filter resources** based on their properties, tags, or any other attribute.
130
+
- **Select specific properties** to reduce the amount of data ingested.
131
+
- **Join different resource tables** to enrich the data.
132
+
- **Perform aggregations** and other advanced operations.
133
+
134
+
:::tip Optimizing your `graphQuery`
135
+
It is highly recommended to optimize your `graphQuery` to fetch only the data you need. A well-crafted query can significantly improve the performance of the integration and ensure that your software catalog is not cluttered with unnecessary information.
136
+
137
+
For example, instead of fetching all resources and then filtering them in the mapping, you can use the `where` clause in your query to filter the resources at the source.
138
+
:::
139
+
140
+
Here is an example of a broad query versus an optimized query:
The optimized query fetches only virtual machines and storage accounts that have the `environment` tag set to `production`, which is much more efficient.
156
+
124
157
## Setup
125
158
126
159
To set up the Azure Resource Graph exporter, you'll need to configure both Port credentials and Azure app registration.
0 commit comments