Liking cljdoc? Tell your friends :D

metabase.api.dataset

/api/dataset endpoints.

/api/dataset endpoints.
raw docstring

as-format-asyncclj

(as-format-async export-format respond raise in-chan)

Inputs: [export-format :- ExportFormat respond :- (s/pred fn?) raise :- (s/pred fn?) in-chan :- ManyToManyChannel]

Write the results of an async query to API respond or raise functions in export-format. in-chan should be a core.async channel that can be used to fetch the results of the query.

Inputs: [export-format :- ExportFormat respond :- (s/pred fn?) raise :- (s/pred fn?) in-chan :- ManyToManyChannel]

Write the results of an async query to API `respond` or `raise` functions in `export-format`. `in-chan` should be a
core.async channel that can be used to fetch the results of the query.
sourceraw docstring

export-format->contextclj

(export-format->context export-format)

Return the :context that should be used when saving a QueryExecution triggered by a request to download results in EXPORT-FORAMT.

(export-format->context :json) ;-> :json-download

Return the `:context` that should be used when saving a QueryExecution triggered by a request to download results
in EXPORT-FORAMT.

  (export-format->context :json) ;-> :json-download
sourceraw docstring

export-format-regexclj

Regex for matching valid export formats (e.g., json) for queries. Inteneded for use in an endpoint definition:

(api/defendpoint POST ["/:export-format", :export-format export-format-regex]

Regex for matching valid export formats (e.g., `json`) for queries.
Inteneded for use in an endpoint definition:

  (api/defendpoint POST ["/:export-format", :export-format export-format-regex]
sourceraw docstring

ExportFormatclj

Schema for valid export formats for downloading query results.

Schema for valid export formats for downloading query results.
sourceraw docstring

POST_clj

POST /api/dataset/

Execute a query and retrieve the results in the usual format.

PARAMS:
  • database value must be an integer.

  • query

## `POST /api/dataset/`

Execute a query and retrieve the results in the usual format.

##### PARAMS:

*  **`database`** value must be an integer.

*  **`query`** 
sourceraw docstring

POST_:export-formatclj

POST /api/dataset/:export-format

Execute a query and download the result data as a file in the specified format.

PARAMS:
  • export-format value must be one of: csv, json, xlsx.

  • query value must be a valid JSON string.

  • respond

  • raise

## `POST /api/dataset/:export-format`

Execute a query and download the result data as a file in the specified format.

##### PARAMS:

*  **`export-format`** value must be one of: `csv`, `json`, `xlsx`.

*  **`query`** value must be a valid JSON string.

*  **`respond`** 

*  **`raise`** 
sourceraw docstring

POST_durationclj

POST /api/dataset/duration

Get historical query execution duration.

PARAMS:
  • database

  • query

## `POST /api/dataset/duration`

Get historical query execution duration.

##### PARAMS:

*  **`database`** 

*  **`query`** 
sourceraw docstring

routesclj

Ring routes for api/dataset: (POST_:export-format POST_ POST_duration)

Ring routes for api/dataset:
(POST_:export-format POST_ POST_duration)
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close