Skip to content

Data integration ​

Neykos exposes your operational data — production orders, OEE, downtime, quality — through a set of read-only ClickHouse views. This page describes everything you need to connect: credentials, endpoints, SSL, the available view and its columns, and end-to-end examples in the most common clients.

TL;DR

You receive a dedicated read-only user, password, and one or more view names. Point any ClickHouse-compatible client at:

  • Host: 89.167.19.228 (port 8123, no SSL) — or integrations.neykos.net (port 443, SSL enabled)
  • Database: oee
  • View: oee.v_<customer>_production_orders (provided to you)

Authenticate with the user and password Neykos shared with you, then SELECT from the view.

Auto-fill

You can pre-fill the examples on this page by adding URL parameters. For instance, ?client=cca replaces the view name with oee.v_cca_production_orders. ?user=, ?password= and ?view= are also accepted as overrides.

1. Overview ​

Neykos provides read-only access to selected operational datasets through ClickHouse.

Each customer receives:

  • A dedicated read-only user.
  • Access only to the views explicitly enabled for that customer.
  • No access to internal source tables.
  • No access to other customers' data.

The available view name, username, and password may vary by customer.

2. Connection information ​

FieldValue
Database typeClickHouse
Host (direct IP)89.167.19.228
Host (HTTPS)integrations.neykos.net
Port (HTTP)8123
Port (HTTPS)443
Databaseoee
User<provided_user>
Password<provided_password>
Available view<provided_view_name> (example: oee.v_customer_production_orders)
Access moderead-only

Credentials

The placeholders <provided_user>, <provided_password>, and <provided_view_name> are filled in by Neykos at onboarding. Never commit them to version control — keep them in a secrets manager or environment variables.

3. SSL configuration ​

text
Host: 89.167.19.228
Port: 8123
SSL : disabled
text
Host: integrations.neykos.net
Port: 443
SSL : enabled

Use the HTTPS endpoint whenever your client and network allow it.

4. Available production orders view ​

The production orders view contains customer-specific production order data. The naming pattern is:

sql
oee.v_<customer>_production_orders

The view is already filtered for the corresponding customer — no additional customer / client filter is required from your side.

5. Available columns ​

text
order_number
order_code
created_at
updated_at
start_time_utc
end_time_utc
start_time_local
end_time_local
start_date_local
end_date_local
duration_seconds
line_name
line_code
product_name
product_code
target_quantity
total_produced
good_quantity
rejected_quantity
rework_quantity
scrap_quantity
units_per_box
boxes_per_pallet
status_name
status_code
is_open

6. Column description ​

ColumnDescription
order_numberProduction order number. Usually the main order identifier.
order_codeInternal order code. May be empty if the source PMS does not provide it.
created_atTimestamp when the order was created in the PMS.
updated_atLast update timestamp in the PMS.
start_time_utcOrder start timestamp in UTC.
end_time_utcOrder end timestamp in UTC. May be empty for open orders.
start_time_localOrder start timestamp in local operational time.
end_time_localOrder end timestamp in local operational time. May be empty for open orders.
start_date_localLocal start date. Recommended for daily operational analysis.
end_date_localLocal end date.
duration_secondsOrder duration in seconds.
line_nameProduction line name.
line_codeProduction line code.
product_nameProduct name.
product_codeProduct code.
target_quantityPlanned target quantity.
total_producedTotal produced quantity recorded by the system.
good_quantityGood quantity recorded by the system.
rejected_quantityRejected quantity.
rework_quantityRework quantity.
scrap_quantityScrap quantity.
units_per_boxUnits per box.
boxes_per_palletBoxes per pallet.
status_nameHuman-readable production order status.
status_codeTechnical production order status code.
is_openIndicates whether the order is open. 1 = open, 0 = closed.

7. Possible status codes ​

Status codeMeaning
PRODUCTION_ORDER_RECEIVEDOrder received / planned, not yet started.
PRODUCTION_ORDER_RUNNINGOrder currently running.
PRODUCTION_ORDER_COMPLETEDOrder completed.
PRODUCTION_ORDER_SENDEDOrder sent / closed, depending on the PMS workflow.
PRODUCTION_ORDER_DISABLEDOrder disabled.
PRODUCTION_ORDER_DELETEDOrder deleted.

8. Reference SQL queries ​

Replace <provided_view_name> with the view provided by Neykos.

Basic test query ​

sql
SELECT count()
FROM <provided_view_name>

Latest updated orders ​

sql
SELECT
    order_number,
    line_name,
    product_name,
    target_quantity,
    total_produced,
    status_code,
    is_open,
    updated_at
FROM <provided_view_name>
ORDER BY updated_at DESC
LIMIT 10

Open orders ​

sql
SELECT
    order_number,
    line_name,
    product_name,
    target_quantity,
    total_produced,
    status_code,
    start_time_local,
    updated_at
FROM <provided_view_name>
WHERE is_open = 1
ORDER BY updated_at DESC

Summary by production line ​

sql
SELECT
    line_name,
    count()                  AS orders,
    countIf(is_open = 1)     AS open_orders,
    countIf(is_open = 0)     AS closed_orders,
    sum(target_quantity)     AS target_quantity,
    sum(total_produced)      AS total_produced
FROM <provided_view_name>
GROUP BY line_name
ORDER BY orders DESC

Production by local date ​

sql
SELECT
    start_date_local,
    line_name,
    count()                  AS orders,
    sum(target_quantity)     AS target_quantity,
    sum(total_produced)      AS total_produced
FROM <provided_view_name>
GROUP BY start_date_local, line_name
ORDER BY start_date_local DESC, line_name

9. Ways to connect ​

Everything below uses the same credentials. Pick the method that matches your stack.

9.1 HTTP API (curl) ​

ClickHouse exposes an HTTP interface for queries. Send the SQL as the POST body and pick a response format such as JSON, JSONEachRow, CSV, or TSV.

bash
curl 'http://89.167.19.228:8123/?database=oee&user=<provided_user>&password=<provided_password>' \
  --data-binary '
SELECT
    order_number,
    line_name,
    product_name,
    target_quantity,
    total_produced,
    status_code
FROM <provided_view_name>
LIMIT 10
FORMAT JSON
'
bash
curl 'https://integrations.neykos.net/?database=oee&user=<provided_user>&password=<provided_password>' \
  --data-binary '
SELECT
    order_number,
    line_name,
    product_name,
    target_quantity,
    total_produced,
    status_code
FROM <provided_view_name>
LIMIT 10
FORMAT JSON
'

Best practice

Send credentials via HTTP headers instead of query parameters to keep them out of logs:

bash
curl 'https://integrations.neykos.net/?database=oee' \
  -H 'X-ClickHouse-User: <provided_user>' \
  -H 'X-ClickHouse-Key:  <provided_password>' \
  --data-binary 'SELECT count() FROM <provided_view_name> FORMAT JSON'

The official Python client supports the HTTP interface and returns native Python types, Pandas DataFrames, and Arrow tables.

bash
pip install clickhouse-connect pandas
python
import os
import clickhouse_connect

client = clickhouse_connect.get_client(
    host='integrations.neykos.net',
    port=443,
    secure=True,
    username=os.environ['NEYKOS_USER'],
    password=os.environ['NEYKOS_PASSWORD'],
    database='oee',
)

# Plain query → list of tuples
result = client.query("SELECT count() FROM v_customer_production_orders")
print(result.result_rows)

# Query as a Pandas DataFrame
df = client.query_df(
    """
    SELECT start_date_local, line_name,
           sum(target_quantity)  AS target,
           sum(total_produced)   AS produced
    FROM v_customer_production_orders
    GROUP BY start_date_local, line_name
    ORDER BY start_date_local DESC
    """
)
print(df.head())

If you must use the direct IP, set host='89.167.19.228', port=8123, secure=False.

9.3 Node.js / TypeScript — @clickhouse/client ​

bash
npm install @clickhouse/client
typescript
import { createClient } from '@clickhouse/client'

const client = createClient({
  url: 'https://integrations.neykos.net',
  username: process.env.NEYKOS_USER!,
  password: process.env.NEYKOS_PASSWORD!,
  database: 'oee',
})

const rs = await client.query({
  query: `
    SELECT order_number, line_name, total_produced, status_code
    FROM v_customer_production_orders
    WHERE is_open = 1
    ORDER BY updated_at DESC
    LIMIT 50
  `,
  format: 'JSONEachRow',
})

const orders = await rs.json<{
  order_number: string
  line_name: string
  total_produced: number
  status_code: string
}>()

console.log(orders)
await client.close()

9.4 JDBC ​

Use the official ClickHouse JDBC driver — class com.clickhouse.jdbc.ClickHouseDriver.

text
jdbc:clickhouse://89.167.19.228:8123/oee
text
jdbc:clickhouse:https://integrations.neykos.net:443/oee

Minimal Java example:

java
String url = "jdbc:clickhouse:https://integrations.neykos.net:443/oee";
Properties props = new Properties();
props.setProperty("user", System.getenv("NEYKOS_USER"));
props.setProperty("password", System.getenv("NEYKOS_PASSWORD"));

try (Connection conn = DriverManager.getConnection(url, props);
     Statement st = conn.createStatement();
     ResultSet rs = st.executeQuery("SELECT count() FROM v_customer_production_orders")) {
    while (rs.next()) System.out.println(rs.getLong(1));
}

9.5 Databricks / Spark ​

python
jdbc_url     = "jdbc:clickhouse:https://integrations.neykos.net:443/oee"
view_name    = "<provided_view_name>"
user         = dbutils.secrets.get("neykos", "user")       # or os.environ[...]
password     = dbutils.secrets.get("neykos", "password")

df = (
    spark.read
    .format("jdbc")
    .option("url", jdbc_url)
    .option("driver", "com.clickhouse.jdbc.ClickHouseDriver")
    .option("user", user)
    .option("password", password)
    .option("dbtable", view_name)
    .load()
)

display(df)

9.6 BI tools ​

Metabase ​

  1. Admin → Databases → Add database → ClickHouse.
  2. Host: integrations.neykos.net, Port: 443, SSL: ✅
  3. Database: oee, User / Password: the ones Neykos provided.
  4. Save. The provided view appears under oee.

Apache Superset ​

Install clickhouse-connect, then add a database with the SQLAlchemy URI:

text
clickhousedb+connect://<user>:<password>@integrations.neykos.net:443/oee?secure=true

Grafana ​

Install the Grafana ClickHouse data source plugin and configure:

  • Server address: integrations.neykos.net
  • Server port: 443
  • Protocol: HTTP, Secure connection: ✅
  • Default database: oee
  • User / Password from Neykos

Tableau ​

Use the ClickHouse JDBC connector with the JDBC URL from §9.4.

Power BI ​

Power BI Desktop ships with a built-in ClickHouse connector (Get Data → ClickHouse). Use integrations.neykos.net, port 443, SSL on, database oee, and the credentials Neykos shared with you. For older versions, install the ClickHouse ODBC driver and connect via ODBC.

9.7 Excel / Power Query (ODBC) ​

  1. Install the ClickHouse ODBC driver.
  2. Create a System DSN named Neykos pointing at integrations.neykos.net:443, database oee, SSL on.
  3. In Excel: Data → Get Data → From Other Sources → From ODBC → Neykos DSN.

9.8 GUI clients (DBeaver, DataGrip, TablePlus) ​

Any GUI client that supports ClickHouse works the same way:

SettingValue
DriverClickHouse (HTTP)
Hostintegrations.neykos.net
Port443
Databaseoee
SSL / TLSon
User<provided_user>
Password<provided_password>

DBeaver

Database → New Database Connection → ClickHouse → fill the fields above → Test connection → Finish. The provided view appears under oee → Views.

10. Notes and good practices ​

  • Access is read-only.
  • The provided user can only access the views explicitly enabled by Neykos.
  • The user does not have access to internal tables or to other customers' data.
  • The views already apply ClickHouse FINAL internally — you do not need to add FINAL in your queries.
  • The main production order identifier is usually order_number. order_code may be empty if the source PMS does not provide it.
  • For operational daily analysis, prefer start_date_local, start_time_local, and end_time_local. UTC timestamps are provided for technical integrations between systems.
  • Treat the password like any production secret — load it from environment variables or a secrets manager; never check it into a repository.

11. Support ​

If you don't have credentials yet, or you need a new view enabled, contact your Neykos point of contact. Bug reports and integration questions are welcome at the same address.

Industrial observability for the factory floor.