Skip to main content

Query parameter combinations

This guide explains the main parameters for CloudQuant Data Liberator queries and the expected results from different combinations.

Core parameters

Use liberator.datasets(entitled=True) to list all datasets available to you.
See the Query Parameters Reference for the full parameter list, including superquery, N-Query, and authentication options.

Query examples

All parameters included

Returns data for specified symbols within the date range.

Without symbols

Defaults to all available symbols.

Without as_of

Defaults as_of to current time, returning data from present back to specified date.

Without back_to

Returns the most recent data point per symbol as of the specified date. Look-back distance varies by dataset density.

Minimal query (name only)

Returns the latest data point for all symbols in the dataset.

Custom where filters

Use where with a standard parameter-based query to append extra SQL predicates on top of the filters CloudQuant Data Liberator generates for time range and symbols. The clause is combined with AND — do not include the WHERE keyword.
where works with time-range, LKV, and N-Query modes. Column names that match the dataset schema are automatically quoted when needed.

Multi-dataset / concordance-style filters

For datasets keyed by more than symbol (for example concordance tables with a dataset column), use where to narrow the result set:
where cannot be combined with sql. Use one approach or the other.

Raw sql queries

Pass a complete SQL SELECT statement via sql instead of name, back_to, as_of, and related parameters. When sql is present, parameter-based query construction is skipped.

SQL requirements

  • The statement must be a SELECT (including UNION / INTERSECT / EXCEPT branches).
  • Every SELECT arm must include an explicit WHERE clause.
  • By default, the WHERE clause must include a time-range predicate on muts or another configured column (=, >, >=, <, <=, or BETWEEN). Use microsecond timestamps for muts values.
  • Quote dataset names with double quotes when they contain special characters.
  • Use $$symbol$$ dollar-quoting for string literals in filters.

Parameters allowed with sql

When using sql, only connection, auth, and transfer options are permitted alongside the statement — for example user, system, token, compress, json_xfer, and batch_size. Supplying non-empty values for name, back_to, as_of, where, or other construction parameters raises an error.
Raw SQL bypasses the convenience of name / symbols / back_to / as_of. Prefer parameter-based queries unless you need full control over the generated SQL.