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
| Parameter | Type | Description |
|---|---|---|
query | text | The BQL query. |
options | nullable 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.Querysays 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.