Create and inspect timeseries

This offline workflow starts with a host-file query and creates a deterministic dynamic table in a new pond. Prerequisites: Bash and pond on PATH. Keep original sensor/source data independently recoverable.

Query a host file

Run the complete CSV script. It requires no pond and selects the two readings at or above 25 degrees.

pond cat -d "${SOURCE_DIR}" 'host+csv:///readings.csv' --format=table \
    --sql 'SELECT timestamp, temperature, humidity FROM source WHERE temperature >= 25 ORDER BY timestamp' \
    > "${WORK}/selected.txt"
pond cat -d "${SOURCE_DIR}" 'host+csv:///readings.csv' --format=table \
    --sql 'SELECT COUNT(*) AS rows, SUM(temperature) AS total, AVG(humidity) AS mean_humidity FROM source' \
    > "${WORK}/summary.txt"
pond cat -d "${SOURCE_DIR}" 'host+csv:///semicolon.csv?delimiter=;' --format=table \
    --sql 'SELECT SUM(temperature) AS parameter_total FROM source' \
    > "${WORK}/parameter.txt"

This is a region, not a standalone script: the complete script initializes SOURCE_DIR to its fixture directory and WORK to a new scratch directory. The CSV options explain the semicolon parameter example.

Creating a timeseries

Run the complete synthetic example to initialize a new scratch pond and install its dynamic table. The input is fixed at four hourly samples on January 1, 2024.

pond init --birthplace documentation-example
pond mkdir /sensors
pond mknod synthetic-timeseries /sensors/synthetic --config-path "${SOURCE_DIR}/config.yaml"
pond cat /sensors/synthetic --format=table --sql \
    'SELECT COUNT(*) AS rows, MIN(timestamp) AS first_ts, MAX(timestamp) AS last_ts FROM source' \
    > "${WORK}/summary.txt"
pond cat /sensors/synthetic --format=table --sql \
    'SELECT timestamp, temperature FROM source ORDER BY timestamp' \
    > "${WORK}/values.txt"

Setup is required: the complete script sets POND inside a newly created workspace and defines SOURCE_DIR and WORK. Never point this setup at a pond containing data you need.

Inspect

The numbered test asserts exactly four rows from 2024-01-01T00:00:00Z through 2024-01-01T03:00:00Z. The line component has offset 20 and slope 0.001 per second, so the ordered temperatures are 20, 23.6, 27.2, and 30.8.

Inspect

Repeated heading names have unique anchors. This second inspect section and the factory inspection section resolve independently.

The result is a computed table, not a durable append-only series. Export, timeseries-to-site, and blog workflows follow this pilot and are not yet migrated into this manual.