Skip to main content
A query is a read over what a tenant’s audits keep, plus a JEXL script that turns the rows into a summary and CSV files. It runs on the moqui-jexl component inside Darpan’s server. For the workflow, see Queries.

What a query may read

A query never reads a system live, never widens what a dataset keeps, and never reads another tenant’s dataset, run or audit. Dates reach the script as ISO-8601 text.

The read

The Read tab holds the read as JSON: up to 10 inputs, each input.<name> in the script.
The read in words above the code (for example “Reads dataset 100200, last 30 days, status = BACKORDERED, 2 fields”) comes from this JSON.

What a script returns

A script returns nothing (nothing is sent), or:
A bare text or number is a summary. Files are sent as CSV. The script language and its fn: functions are on Query functions.

Schedules

Deliveries

Each delivery succeeds or fails on its own. Notifications lists a query schedule that posts to chat as one row; moving it needs a Tenant admin, and it cannot be moved to no space (switch it off instead).

Run statuses

Limits

Every query run has these limits. Passing one stops the run with the limit named.

Access

The Darpan CLI may call the query and schedule methods with the same rules. See Auth and access.