Skip to content

Dataplattform: Reports

Vegard Egge Schau edited this page Dec 12, 2022 · 2 revisions

Documentation for creating, understanding, and maintaining reports in Dataplattform.

What is a "report"

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

Where can I find existing reports

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.

How can I create my own report

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.

Example | How can I create my own report

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'"
}

Clone this wiki locally