Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.43 KB

query-formats.md

File metadata and controls

51 lines (34 loc) · 1.43 KB

Query Formats

The Data Export Tool supports two query formats: Excel and JSON. Both are compiled to MiniLinq for execution.

For detailed guidance on creating queries, including field mappings, filter examples, and tips, see the User Documentation.

Excel Queries

An Excel query is any .xlsx workbook. Each sheet represents one output table. Columns are grouped as follows:

  • Data Source: form for form data, or case for case data
  • Filter Name / Filter Value: Paired columns to filter the data
  • Field: The destination column name in your output
  • Source Field: The JSON path to extract from the form or case

It is recommended to use the Excel format as it is more user-friendly and stable across library versions.

JSON Queries

JSON queries represent MiniLinq expressions directly. To get started with JSON, create an Excel query and convert it:

commcare-export --query my-query.xlsx --dump-query

Examples

Example query files in both formats are provided in the examples/ directory.

See Also