ebms_export
Exports an entire EBMS collection to CSV, Excel, or JSONL for large datasets and returns the file path, row count, columns, sample rows, and numeric aggregates instead of all rows.
Instructions
Read a whole EBMS collection to a file (CSV, Excel or JSONL) instead of into the conversation, for anything more than a few hundred rows: sales history, every product, all open lines. The server pages through it itself and returns only the file's path, the row count, the columns, five sample rows and min/max/sum of each numeric column — never the rows. Analyse the file with a script (pandas, duckdb) and read back only the aggregates; never write a script that calls EBMS. Count first with ebms_get (top 1). Select only the fields you need. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Required. An entity set, e.g. ARINVDET, INVENTRY. Not a keyed path. | |
| expand | No | $expand, with a select inside, e.g. Details($select=INVEN,O_QUAN_VIS). Line _VIS fields read 0 unless read through the parent like this. | |
| filter | No | $filter, unencoded. | |
| folder | No | Only a folder the user named: an existing one, not hidden and not koble's settings. Default: KOBLE_EXPORT_DIR, or 'Koble Exports' in the user's Documents (created if missing). | |
| format | No | Default csv. | |
| select | Yes | Required. $select, comma-separated. AUTOID is added if missing. | |
| company | No | Company, by ID or name as ebms_companies lists them. May be omitted only when one company is available. | |
| explode | No | An expanded collection, e.g. Details: one row per child, with the parent's fields repeated and the child's as Details.<FIELD>. Without it an expanded collection is JSON text in one cell. | |
| maxRows | No | Refuse an export larger than this. Default 250000. | |
| orderby | No | Default AUTOID, so pages do not shift while being read; where EBMS refuses that sort, the server's own order is used and repeats are still removed by AUTOID (the result says ordered: false). | |
| filename | No | File name only. Default <company>-<entity>-<timestamp>. An existing file is never overwritten. | |
| pageSize | No | Rows per request. Default 500, or 25 with an expand. Lower it if a page times out. |