eaxdev / simple-report-system-otus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Report System

Build Status

Connections

  • Create new connection:
POST /connections

{
  "connectionName": "ClickHouse#1",
  "description": "get data from clickhouse",
  "host": "localhost",
  "port": 8123,
  "database": "test",
  "userName": "default",
  "password": "",
  "connectionProperties": []
}
  • Show all connections with pagination:
GET /connections?page=0&size=10
  • Add new data model:
POST /models

{
  "name": "ontime",
  "description": "Flight data",
  "connectionId": 1,
  "tableName": "ontime",
  "criteria": {
    "eq": {
       "fieldName": "Origin",
       "value": "JFK"
    }
  }
}
  • Show all data models with pagination:
GET /models?page=0&size=10
  • Get data model by id:
GET /models/1
  • Create report:
POST /reports

{
  "name": "report1",
  "description": "The number of flights per day",
  "modelId": 1,
  "outputs": [
    "DayOfWeek",
    "count(*)"
  ],
  "groupBy": "DayOfWeek",
  "criteria": {
    "and": [
      {
        "ge": {
          "fieldName": "Year",
          "value": "1988"
        }
      },
      {
        "le": {
          "fieldName": "Year",
          "value": "1990"
        }
      }
    ]
  }
}
  • Show all reports:
GET /reports?page=0&size=10

About

License:Apache License 2.0


Languages

Language:Java 98.6%Language:Dockerfile 1.2%Language:Shell 0.2%