Query Language

Now that you are able to visualize, structure, and order Data from the Datalake, the next step is 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 DataTag 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.

This page is the reference for the syntax of the Query Language. The same syntax is used in a DatasetVersion, where the fields you can query differ, as detailed here.

1. Search Bar

The best tool to retrieve Data is the Search Bar and its associated Query Language, used by default in the Query Language exploration mode detailed here.

Search bar

👍

This Search Bar is accessible in each image or video overview of the Picsellia platform.

📘

Alongside the Query Language, Data can also be filtered by date, by DataTag, or by Custom Metadata using the Select Date, Select Tags, and Add filter buttons, detailed here.

2. Query Language

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

It gives you access to all Data properties, DataTag, and Metadata, so you can search on them and find the Data satisfying the query.

A. Properties & Metadata available for searching

From the Search Bar of the Datalake, you can search on all the objects and properties associated with Picsellia Data, including its object_name directly by name, and its fixed Metadata schema using the metadata.<key> notation (for instance metadata.altitude > 0 or metadata.reference = "7NGOMI"). latitude and longitude are top-level fields of the Data, queried without the prefix, for instance latitude > 43.5:

Fields available to create your Query

Some fields in this list are other Picsellia objects linked to 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, you can retrieve all the Data from the Datalake that are part of a specific DatasetVersion with the following query:

datasets.version = "MyDatasetVersion"
📘

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.

To browse through the Query Language across the Picsellia Object Schema, it is highly recommended to use the auto-completion offered 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 linked object. However, filename is a property of Data, so you can search on it directly:

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 strings:

    String Comparison

  • For integers or floats:

    Int or Float Comparison

C. Logical connector

To filter your Datalake as accurately as possible, you can create complex queries with the and & or logical connectors.

At the end of the first query element, after leaving one space, the auto-completion engine suggests the logical connectors for your query. For instance, the following query combines a Metadata condition with a DatasetVersion condition:

metadata.altitude > 0 and datasets.version = "MyDatasetVersion"

3. Data satisfying the query

After writing your query, press Enter to run it. The Data from your Datalake satisfying the query are then displayed.

📘

To delete a query, click the cross icon to the right of the Search Bar.

After filtering through the Search Bar, 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:

Data satisfying the query

👍

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.

4. Where else the Query Language is used

The syntax described on this page (objects linked with a ., comparison signs, and & or connectors, auto-completion) is the same everywhere a Search Bar is available on the platform. Only the fields you can query depend on the objects listed:

  • The Assets overview of a DatasetVersion, with Annotation, Shape, Label, and AssetTag fields, detailed here.
  • The Shapes view of a DatasetVersion, with a reduced set of fields scoped to the Shape and its Label, detailed here.
  • The PredictedAsset of a Deployment, detailed here.
  • The Advanced filtering of a Datalake Chart, detailed here.

Did this page help you?