semantique.QueryRecipe

semantique.QueryRecipe#

class semantique.QueryRecipe(results=None)[source]#

Dict-like container to store instructions of a query recipe.

Parameters:

results (dict of ArrayProxy) – Dictionary containing result names as keys and result instructions as values. If None, an empty recipe is constructed.

Returns:

dict of ArrayProxy – The query recipe as a dictionary containing result names as keys and result instructions as values.

Examples

>>> import semantique as sq
>>> recipe = sq.QueryRecipe()
>>> recipe["map"] = sq.entity("water").reduce("time", "count")
>>> recipe["series"] = sq.entity("water").reduce("space", "count")
__init__(results=None)[source]#

Methods

__init__([results])

execute(datacube, mapping, space, time[, ...])

Execute a query recipe.