Queries Google Professional Data Engineer GCP

  1. Home
  2. Queries Google Professional Data Engineer GCP
  • A query retrieves entities that meet a specified set of conditions.
  • The query operates on entities of a given kind
  • Can specify filters on the entities’ property values, keys, and ancestors, and can return zero or more entities as results.
  • sort orders can also be specified to sequence the results by their property values.
  • query can return entire entities, projected entities, or just entity keys.
  • Every query computes its results using one or more indexes
  • When executed, the query retrieves all entities of the given kind satisfying given filters, sorted in specified order.
  • Queries execute as read-only.


A typical query includes the following:

  • An entity kind to which the query applies
  • Zero or more filters based on the entities’ property values, keys, and ancestors
  • Zero or more sort orders to sequence the results



Filters are applied on

  • Properties
  • Keys
  • ancestors of the entities

Property filter – A property filter specifies property name, comparison operator and property value. The property value must be supplied by the application and is not a computed value. For array-valued property, filter matching any of its value, the entity is considered.

A composite filter consists of more than one property filter.

Comparison operators –

  • EQUAL – Equal to
  • LESS_THAN – Less than
  • LESS_THAN_OR_EQUAL – Less than or equal to
  • GREATER_THAN – Greater than
  • GREATER_THAN_OR_EQUAL – Greater than or equal to

A query sort order specifies a property name and a sort direction (ascending or descending). By default the sort order is ascending. For multiple sort orders in a query, they are applied in the sequence specified.