Cubex.Rest (cubex v0.2.1)

Cube REST client implementation. Common options applicable to many functions:

:request_id - A request identifier ideally corresponding to a user interaction. Defaults to a generated uuid.

:sequence_id - A sequence number corresponding to the sequence of requests for this user interation. Defaults to 1.

Link to this section Summary

Functions

Load data from cube. Options

Fetch metadata from cube.

Creates a new client. Parameters

Fetch sql from cube.

Link to this section Functions

Link to this function

load(client, query, opts \\ [])

Load data from cube. Options:

:continue_wait - Boolean value which indicates if the request should continue waiting until data is returned or an error occurs. defaults to true.

Link to this function

meta(client, opts \\ [])

Fetch metadata from cube.

Link to this function

new(opts \\ [])

Creates a new client. Parameters:

:url - Optional base url. Required if not configured globally

:user_agent - Optional user agent string. Overrides global config if specified.

:token - Optional jwt parameter. Required if :secret is not configured.

:secret - Optional secret for generating JWTs. When generating JWTs from a secret, keep in mind that they are only generated during client initialization. Long lived clients could out live the :exp claim.

:claims - Optional map of claims to include in generated JWTs. Can also be configured globally.

Link to this function

sql(client, query, opts \\ [])

Fetch sql from cube.