Overview and Connection Guide
Connect to your Maecos reporting database and build custom dashboards, reports, and integrations using standard SQL.
Every Maecos customer receives a dedicated, read-only PostgreSQL database containing a curated set of reporting views. These views expose your operational data in a clean, query-friendly format — hiding internal complexity while giving you full flexibility for analytics, dashboards, and system integrations.
The reporting schema is designed for technical users who are comfortable with SQL. Whether you connect from Power BI, Excel, Grafana, or your own application code, the interface is the same: standard PostgreSQL.
Connecting
Your Maecos administrator can provide the connection credentials. You will need:
Host
Your dedicated database hostname (provided by Maecos)
Port
5432 (default PostgreSQL port)
Database
Your tenant database name
Schema
reporting
Username
Your reporting user (read-only)
Password
Provided by your Maecos administrator
All views live in the reporting schema. When writing queries, prefix view names with reporting. — for example:
SELECT * FROM reporting.issues LIMIT 10;Connection examples
Use the PostgreSQL connector in Power BI Desktop:
Go to Get Data → Database → PostgreSQL database
Enter your Server (hostname) and Database name
Under Advanced options, set the SQL statement to scope to the reporting schema, or use fully qualified view names
Authenticate with your reporting credentials
In Power BI, you can import entire views as tables or write custom SQL under Advanced options for more control.
Use Get Data → From Database → From PostgreSQL Database:
Enter your Server and Database
Provide your reporting credentials
Select the views you want to import from the
reportingschema
Data refreshes can be scheduled if you publish the workbook to Power BI Service.
Any PostgreSQL client works — psql, DBeaver, DataGrip, pgAdmin, or your application's database driver.
psql "host=<your-host> port=5432 dbname=<your-db> user=<your-user> sslmode=require"Once connected:
SET search_path TO reporting;
\dt -- list all available viewsSetting the search_path lets you omit the reporting. prefix in your queries.
Use any PostgreSQL driver. Connection string format:
postgresql://<user>:<password>@<host>:5432/<database>?sslmode=require&options=-csearch_path%3DreportingPopular drivers: psycopg2 (Python), pg (Node.js), Npgsql (.NET), JDBC (Java).
The reporting user is read-only. Write operations will be rejected.
Schema conventions
Understanding these patterns will help you navigate the views efficiently:
Identifiers — Primary keys use the format <entity>_id and are always uuid values. For example: issue_id, action_id, user_id.
Timestamps — All _at fields (created_at, updated_at, deleted_at) are timestamp values. These are stored in UTC.
Audit columns — Most views include created_at, created_by, updated_at, and updated_by. The _by fields reference user_id in the reporting.users view.
Soft deletes — Some views include a deleted_at field. A non-null value means the record has been deleted in the application. Many views already filter out deleted records, but where deleted_at is exposed, you can use it for auditing or recovery analysis.
Labels — Maecos uses a flexible labeling system. Many entities have a companion _labels view (e.g., equipment_labels, users_labels) with a consistent structure: the entity's ID, a label_category (e.g., "department", "area"), and a label_value. These are essential for filtering and grouping.
Assignees — Actions and issues support assignment to either a user or a workstation. The _assignees views normalize this into assignee_type ('user' or 'workstation') and assignee_id.
Status transitions — Actions and issues track workflow state changes via _transitions and _latest_transitions views.
View groups
The reporting views are organized into five groups. Click through to the group overview for context on how the views relate, or jump directly to a specific domain.
See also: Example Queries for practical SQL patterns across multiple view groups.
Stability and versioning
The structure of these views is stable and maintained for customer use. When changes are introduced, they are communicated in advance and designed with backward compatibility in mind. If a view needs to change in a breaking way, a new version will be provided alongside the existing one during a transition period.
For questions or support, contact your Maecos representative.
Last updated