AQL & AFL Query Languages

Paradigm4 supports two query languages for accessing and analyzing data programmatically: a SQL-like Array Query Language (AQL), and an Array Functional Language (AFL) so you can use whichever fits your comfort zone. Each natively supports the following capabilities:

  • Data schema definition
  • Large-scale math operations embedded directly in queries
  • Array data management (filter, aggregate, join, etc.)
  • Parallel statistical & linear algebra (covariance, regression, PCA, etc.)
  • User-defined operators (Postgres-style)

AQL: Array Query Language

AQL is a declarative language, modeled after SQL, and extended for working with array data. Here is an example of what AQL looks like.

/*  a sample AQL query  */
SELECT avg ( S.v1 )
  FROM Simple_Array S
 WHERE S.v3 = ‘Odd’
 GROUP BY S.I;

For more information, visit the AQL documentation on SciDB.

AFL: Array Functional Language

AFL provides a more powerful functional language interface. Here is an example of the exact same query shown above, but written in AFL:

/*  a sample AFL query  */
aggregate(
    filter ( Simple_Array,
             v3 = ‘Odd’),
     I,
     avg ( Simple_Array.v1 )
);

For more information, visit the AFL documentation on SciDB.

 

Comments are closed.