288 questions
-2
votes
0
answers
21
views
How to optimize partition table queries with OR conditions in DolphinDB?
I'm working with IoT sensor data using DolphinDB's TSDB engine. The table structure is as follows (composite partitioned by date and device):
schema = table(
1:0,
`ts`device_id`plant`...
1
vote
1
answer
58
views
How to write a JSON string into an in-memory table in DolphinDB?
I am trying to fetch JSON data from an HTTP API and convert it into an in‑memory table in DolphinDB. The JSON response is an array of objects, and I want to store it as a table where each object ...
-2
votes
0
answers
23
views
How to correctly identify consecutive anomalous segments in time-series data in DolphinDB? [closed]
I'm working with IoT device sensor data. The table structure is as follows (TSDB engine, partitioned by date and device):
// Sensor real-time data table
db_date = database("", VALUE, 2024....
0
votes
0
answers
19
views
How to merge two equal-length arrays in DolphinDB and aggregate another array according to a specific rule?
I have two arrays ap and ap2, along with their corresponding value arrays av and av2. All four arrays have the same length.
ap = 23 24 25 26
av = 10 20 30 40
ap2 = 24 25 26 27
av2 = 32 32 32 32
I ...
1
vote
0
answers
34
views
Maintaining real-time device status with DolphinDB stream tables (append-only limitation)
I'm working on equipment status management for a smart building project in DolphinDB, and I'm trying to figure out how to maintain real-time device status with stream tables. What can I try next?
I'm ...
0
votes
0
answers
23
views
How to implement consecutive threshold exceedance detection in DolphinDB stream processing to filter out noise spikes?
I'm having an issue with false alarms in my stream processing code for threshold monitoring, and I'd like some advice on optimization.
Here's the scenario: A pH sensor at a wastewater treatment plant ...
1
vote
1
answer
69
views
How to get the actual number of inserted rows when writing to a table in a DolphinDB plugin function?
I am developing a DolphinDB plugin and need to write data to either an in-memory table or a distributed table. In the plugin, I call the built-in function append! to perform the write, and I want to ...
0
votes
0
answers
31
views
Reading DuckDB TIMESTAMP_NS column returns zero or NULL values via C API in DolphinDB plugin
I am developing a DolphinDB plugin for DuckDB and encountered an issue when reading data of type TIMESTAMP_NS. For example, I have an allTypes table in DuckDB. Executing the following statements:
...
0
votes
0
answers
51
views
How to write DolphinDB's nanotimestamp column into DuckDB's TIMESTAMP_NS column?
I am working on a plugin to transfer data from DolphinDB to DuckDB. I have a test case that tries to append a table containing various DolphinDB types to DuckDB. The table includes a nanotimestamp ...
3
votes
1
answer
32
views
CrossSectionalEngine outputs multiple rows per timestamp - how to trigger only after all devices report
I'm working on a smart manufacturing project with 10 CNC machines, each reporting spindle temperature every 5 seconds. I want to monitor in real-time which machine has the fastest temperature rise ...
0
votes
0
answers
18
views
Achieving Time-Based Proximity Matching for Real-Time Sensor Data Streams
I am using DolphinDB for real-time stream processing. The scenario is: There is a motor in the factory equipped with two sensors, one for temperature and one for vibration. Temperature is collected ...
-1
votes
1
answer
44
views
Issue with 1-Minute Aggregation: Missing Trading Volume Data
The scenario involves aggregating L1 tick data for individual stocks (approximately 5,200) into 1-minute candlestick data.
The current data source continues to push data after key time points (such as ...
3
votes
1
answer
53
views
DolphinDB Plugin Function Fails to Write Data to DFS
I am developing a DuckDB plugin for DolphinDB and have the following test case:
@testing:case="test_duckdb_load_to_dfs_with_transform"
-- A. Prepare DFS table
dbPath = "dfs://...
0
votes
1
answer
42
views
How to preserve row indices when converting an indexed matrix to a table?
I currently have an index matrix that I want to convert into a data table, and store the corresponding indices as fields in the data table. I tried using the table() function to achieve this, but when ...
-2
votes
1
answer
86
views
How to Perform Rolling Window Regression on Three Panel Data Tables?
I have three panel data tables A, B, and C with the following structure:
Index: date
Columns: stock codes (e.g., S1, S2, ...)
Example structure of each table:
date
S1
S2
20100101
1
2
20100102
3
4
...