OpenBI Docs Buy

BQL.Query

The earlier name of Bloomberg.Query: a BQL query's answer as a table.

Group: Online services. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

BQL.Query(query as text, optional options as nullable record) as table
ParameterTypeDescription
querytextThe BQL query.
optionsnullable record
optional
Host and Port of the Terminal or server.

Returns

table. ID, the columns BQL adds, and a column per field.

Remarks

  • Everything Bloomberg.Query says holds for it: kept so that older queries keep working.
  • It asks a Bloomberg Terminal running on this computer, signed in, through its Desktop API; the computer's Python, with Bloomberg's blpapi and pandas, sends the request. Host and Port in the options point to a Terminal elsewhere, or a B-PIPE server (localhost and 8194 unless you say).

Compared with Power Query

As for Bloomberg.Query: BQL only, read through your Terminal.

Examples

A query written with the older name

BQL.Query("get(px_last) for(['SPX Index'])")

Result: not shown here: it needs a Bloomberg Terminal, running and signed in.

Bloomberg.Query, Bloomberg.ReferenceData.

Last updated · OpenBI Studio 0.3.79