Docker Analytics Interface

Docker analytics interface executes Kestrel analytics via docker.

An analytics using this interface should follow the rules:

  • The analytics is built into a docker container reachable by the Python docker package.

  • The name of the container should start with kestrel-analytics-.

  • The container will be launched with a mounted volumn /data/ for exchanging input/output.

  • The input Kestrel variables (all records) are put in /data/input/ as 0.parquet.gz, 1.parquet.gz, …, in the same order as they are passed to the APPLY command.

  • The output (updated variable data) should be yielded by the analytics to /data/output/ as 0.parquet.gz, 1.parquet.gz, …, in the same order of the input variables. If a variable is unchanged, the output parquet file of it can be omitted.

  • If a display object is yielded, the analytics should write it into /data/display/.

class kestrel_analytics_docker.interface.DockerInterface[source]

Bases: AbstractAnalyticsInterface

static schemes()[source]

Docker analytics interface only supports docker:// scheme.

static list_analytics(config=None)[source]

Check docker for the list of Kestrel analytics.

static execute(uri, argument_variables, config=None, session_id=None, parameters=None)[source]

Execute an analytics.