-
Notifications
You must be signed in to change notification settings - Fork 0
Dataplattform: Reports
Documentation for creating, understanding, and maintaining reports in Dataplattform.
A Dataplattform report is a stored SQL query string with an assigned endpoint to run and return the query result. It can be viewed as a materialized view, as the query result is stored in a csv-file and updated when then source data is updated
dev.dataplattform.knowit.no contains a Swagger UI that you can use to query reports.
All existing reports can be found by querying dev-api.dataplattform.knowit.no/data/report in the Swagger doc or with a GET request (and a valid accessToken).
To make queries from the Swagger UI you must have a valid access token, which you can get by pressing the "Authorize" button.
By using the Swagger UI, or by crafting your own, POST request to /data/report.
Request structure:
{
"name": "string",
"queryString": "string"
}queryString is an SQL query that uses the SQL syntax and Presto functions supported by AWS Athena.
Define the report name and query string. The query string MUST NOT include database names and MUST be written as one-line.
To find the relevant data for your report see the Catalogue requests available in the Swagger UI.
You can find the available databases and tables there.
{
"name": "myUniqueTestReport",
"queryString": "select * from cv_partner_employees where age = '25'"
}