---
updatedAt: 2026-08-27T14:41:47.000Z
agentTools:
  projectIndex: https://documentation.picsellia.com/llms.txt
---

# Query Language

Now that we are able to visualize, structure, and order `Data` from the `Datalake`, the next step would be to **retrieve** it in an efficient way.

When your `Datalake` holds thousands or millions of images and videos, manually browsing is not an option: the *Query Language* lets you combine properties, `Metadata`, and linked objects (like `Tag` or `DatasetVersion`) into a single query, so you can instantly carve out a precise, reproducible subset of `Data`, for instance every image or video shot in low light on a given site, to build a `Dataset`, run a targeted `Processing`, or test a model against a specific edge case.

## 1. *Search Bar*

To do so, the best tool is the *Search Bar* and its associated *Query Language*, used by default in the *Query Language* exploration mode detailed [here](https://documentation.picsellia.com/docs/datalake-overview#3-exploration-modes-and-filtering).

<Image src="https://files.readme.io/a6a867818b7518872f4ac32c5abddcd1da8954644b4c215f49ebac796527fd54-image.png" align="center" caption="Search bar" border={true} />

<Callout icon="👍" theme="okay">
  This _Search Bar_ is accessible in each image or video overview of the Picsellia platform.
</Callout>

<Callout icon="📘" theme="info">
  ### Other ways to filter

  Alongside the _Query Language_, `Data` can also be filtered by date or by `Custom Metadata` using the _Select Date_ and _Add filter_ buttons, detailed [here](https://documentation.picsellia.com/docs/datalake-overview#3-exploration-modes-and-filtering).
</Callout>

## 2. *Query Language*

The *Query Language* is used in the *Search Bar* to filter among `Data` from the `Datalake`.

It allows users to access all `Data` properties, `DataTag`, and `Metadata` to search on them to find `Data` satisfying the query.

### A. Properties & `Metadata` available for searching

As for now, we are dealing with the search bar available in the `Datalake`, you will be able to search on all the objects and properties associated with Picsellia `Data`, including its [`object_name`](https://documentation.picsellia.com/docs/datalake-overview) directly by name, and its fixed [`Metadata`](https://documentation.picsellia.com/docs/datalake-metadata) schema using the `metadata.<key>` notation (for instance `metadata.latitude > 43.5` or `metadata.reference = "7NGOMI"`):

<Image src="https://files.readme.io/6d3963575809cab28d4b6f10d6dddd0098b53bbae9e3398fae0ccb8f6167e997-image.png" align="center" caption="Fields available to create your Query" border={true} />

Please note that in this list some fields are other Picsellia objects that are linked to Picsellia `Data`. It means that from the `Datalake` *Search Bar*, you can go deeper into the Picsellia Object Schema to filter on `Data` that are linked to another Picsellia Object.

For instance, we can retrieve all the `Data` from the `Datalake` that are part of a specific `DatasetVersion` with the following query:

> datasets.version = "MyDatasetVersion"

<Callout icon="📘" theme="info">
  ### Filtering by Custom Metadata

  `Custom Metadata` (your own arbitrary key/value fields) are not searched through the _Query Language_. Instead, use the _Add filter_ button next to the _Search Bar_ to filter `Data` by `Custom Metadata`, detailed [here](https://documentation.picsellia.com/docs/datalake-overview#3-exploration-modes-and-filtering).
</Callout>

To browse through the *Query Language* across the Picsellia Object Schema, **it is highly recommended to use the auto-completion proposed by the *Search Bar*.**

In the end, the last element you are filtering on must be a property of either `Data` or of an object linked to `Data`.

In the previous example, *datasets* is the object linked to `Data`, and *version* is the property of this object linked to `Data`. However, *filename* is a property of `Data` so you can directly search for it:

> filename = "FileNameOfMyData"

### B. Comparison

Depending on the format of the object property you are filtering on, several comparison signs are proposed by the auto-completion engine:

* For string:

<Image src="https://files.readme.io/e1c99de-Capture_decran_2023-07-25_a_18.31.33.png" caption="String Comparison" align="center" border={true} />

* For integers or floats:

<Image src="https://files.readme.io/b180639-Capture_decran_2023-07-25_a_18.32.28.png" caption="Int or Float Comparison" align="center" border={true} />

### C. Logical connector

In order to perform the most accurate filtering possible among your `Datalake`, you can create complex queries leveraging the *and* & *or* logical connectors.

At the end of the first query element, after leaving one space, the auto-completion engine will propose you the logical connector to your query.

## 3. `Data` satisfying the query

After having written your query, you just need to press the *Enter* key to run the query. The `Data` from your `Datalake` satisfying the query will then be displayed.

<Callout icon="📘" theme="info">
  ### To delete a query from the _Search Bar_

  you just need to click the cross icon to the right of the _Search Bar_.
</Callout>

It means that after having filtered through the *Search Bar* on your `Datalake`, the only `Data` displayed in your `Datalake` overview are the ones matching the query. The number of `Data` matching is displayed on top of the `Datalake` as shown below:

<Image src="https://files.readme.io/7778289401518e4705df91f94da3761e5674c126f6a15a5a70b0a715121e3d19-image.png" align="center" caption="Data satisfying the query" border={true} />

<Callout icon="👍" theme="okay">
  ### What's next

  Now that you can filter among the `Datalake` to retrieve the `Data` you're interested in, you can leverage the ordering and selecting features of Picsellia to manipulate your `Data` and create your `Dataset`.
</Callout>