evadb.EvaDBQuery.cross_apply#

EvaDBQuery.cross_apply(expr: str, alias: str) EvaDBQuery[source]#

Execute a expr on all the rows of the relation

Parameters:
  • expr (str) – sql expression

  • alias (str) – alias of the output of the expr

Returns:

relation

Return type:

EvaDBQuery

Examples

Runs Yolo on all the frames of the input table

>>> relation = conn.table("videos")
>>> relation.cross_apply("Yolo(data)", "objs(labels, bboxes, scores)")

Runs Yolo on all the frames of the input table and unnest each object as separate row.

>>> relation.cross_apply("unnest(Yolo(data))", "obj(label, bbox, score)")