Filters & Queries
A brief introduction to searches and queries
Last updated
Was this helpful?
A brief introduction to searches and queries
Last updated
Was this helpful?
The CloudQuery Asset Inventory can be filtered using a special search syntax that looks like a simplified version of SQL. Filters are great for narrowing down a dataset.
For example, this filter will find an AWS EC2 instance with a particular ARN:
The syntax is similar to a SQL WHERE clause. Unlike SQL, however, filters support wildcards using the *
symbol. This filter finds all EC2 instances with an instance type starting with t
:
This filter will return instances of type t2.micro, t3.medium, etc.
Filters can be saved, shared, used through the API, and used as the basis in other parts of the platform, such as dashboards and policies (coming soon).
For more details on how to use filters, see Filter Query Syntax.
Queries are just good ol' SQL. They can be written in the . Queries can be saved, shared and used via the API, just like Searches. However, unlike Searches, Queries can perform complex joins and answer questions that are more complex than just finding a needle in a haystack.
For example, here is a query that finds all unassigned EC2 images, by joining the aws_ec2_images
table with the aws_ec2_instances
table:
Queries use ClickHouse SQL syntax. For more on this, see the .