Type
Data Process.
Behaviour
It executes a query on a datacube. The SQL query must contain only the needed primitive (or nested primitives) without SQL clauses like SELECT or FROM. All the examples provided in the primitives manual report the SQL query that could be used when directly connected to the database. In order to properly use them in the Ophidia analytics framework, the user must extract only the SELECT filters, between SELECT and FROM. The result of the query execution will be saved in a new datacube. The type of the resulting measure must be equal to the input measure one. In case of inequalities, it is necessary to call the primitive “oph_cast”, in order to save the results with the appropriate type.
Parameters
System parameters
Examples
Use primitive “oph_reduce” on datacube identified by the PID “URL/1/1” with oph_double input data:
[OPH_TERM] >> oph_apply cube=URL/1/1;query=oph_reduce(measure,'OPH_AVG',25);
Use primitive “oph_mul_array” on datacube identified by the PID “URL/1/1” with oph_double input data:
[OPH_TERM] >> oph_apply cube=URL/1/1;query=oph_mul_array('oph_double|oph_double','oph_double',measure,measure);check_type=no;
Argument name | Type | Mandatory | Values | Default | Min/Max-value |
---|---|---|---|---|---|
sessionid | “string” | “no” | “null” | ||
ncores | “int” | “no” | “1” | “1” / | |
exec_mode | “string” | “no” | “async|sync” | “async” | |
cube | “string” | “yes” | |||
query | “string” | “no” | “measure” | ||
dim_query | “string” | “no” | “null” | ||
measure | “string” | “no” | “null” | ||
measure_type | “string” | “no” | “auto|manual” | “manual” | |
dim_type | “string” | “no” | “auto|manual” | “manual” | |
check_type | “string” | “no” | “yes|no” | “yes” | |
compressed | “string” | “no” | “yes|no|auto” | “auto” | |
schedule | “int” | “no” | “0” | “0” | |
container | “string” | “no” | “-“ | ||
description | “string” | “no” | “-“ | ||
objkey_filter | “string” | “no” | “all|none|apply” | “all” |