IQL is the Insight Query Language, InfoSum's specialist tool for analysing data across multiple linked datasets. IQL is loosely based on SQL, but has a number of adaptations matching the unique capabilities of InfoSum Platform.
In this and the following articles, we'll explain how to write queries in IQL.
Insight and identity queries
IQL supports two types of queries: insight queries and identity queries. It's important to understand the difference, because the syntax of the query is slightly different. You will also need to use different endpoints to submit the two types of query in the Platform API.
- An insight query returns statistical results, founded on aggregated, anonymised data. Use an insight query to analyse data without the risk of identifying individual users.
- An identity query returns a list of identifiers that relate to specific individuals. Because the results identify individuals, it is important to consider legal and regulatory requirements whenever you use an identity query.
Referencing datasets in a query
A query in IQL always references one or more datasets. A dataset is roughly analogous to a table in a conventional database system. You can use a dataset in an IQL query if you are its owner, or if you have a permission to reference it.
Within an IQL query, you refer to a dataset using its Private ID. As its name suggests, the Private ID is specific to you - if another user can also reference the same dataset, they will have their own Private ID for it.
If you own the dataset, you'll give it a Private ID when you create it; if you are granted permission to reference the dataset, Dataset Manager will generate a default Private ID. In either case, you can change the Private ID using Dataset Manager's Datasets tab.
The structure of a query
A query in IQL has two parts:
SELECTclause, which describes the statistics you want to generate (for insight queries) or the data you want to return (for identity queries)
- an optional
WHEREclause, which applies a filter to the records included in the statistics or results.
WHERE clause may also include a subquery, which is another complete IQL query in its own right. This technique is particularly useful to include or exclude records depending on whether they're present in another dataset.
The following articles describe these components in more detail.