AQL formalism

I noticed CKM v1.20 now supports AQL queries as an artefact. Afaik there’s no specified formalism for such an artefact. I think we should specify one. Recently it also came up in the resource expression for authorisation discussion.
The release notes specify multiple file formats are supported for AQL artefact, so @sebastian.garde I’m curious for the details around those file formats. Would you be willing to share?

It can be “just” an example aql, or e.g. with a json wrapper around it for some metadata, and maybe defining some placeholders/ variables to be used.
I think @ian.mcnicoll had some more ideas (or more detailed ideas on this)

And, yes I agree this should be standardised in due course, would be very useful for sharing them more widely.

Ah check makes sense, and there no schema for the metadata? So no metadata will be presented in CKM?

That’s correct as of now (except that you can view the file inline with some syntax highlighting applied and that there is a description field on the form in ckm)

If we agree on something displaying that nicely would be a natural addition.

1 Like

I am afraid that here we’ll end up with same debate as on YAML for archetypes: publishing a query on a API definition endpoint can be text/plain (i.e. de AQL), but retrieval is in JSON (on a GET, with some metadata), and most likely when you discuss/review/manualy-edit AQL (in CKM) you would like to have it as text/plain AQL, or something like ODIN/YAML when more metadata is included, so that is human readable, right?
I think I also saw at some point somewhere a query ADL-like file, to include all metadata like the authorship, other details, unique indentification, etc… :upside_down_face: