Questions tagged [dolphindb]

DolphinDB is a high performance time series database. It is written in C++ and optimized for fast injection, storage, retrieval and analysis of time series data in fields such as quantitative finance, Internet of Things, real-time analytics, etc. DolphinDB runs extremely fast. It is also easy to use as the syntax of the programming language of DolphinDB is similar to SQL and Python.

764 questions
1
vote
1 answer

How can I return all records in each group except the last one in DolphinDB?

I know that limit clause can limit the number of records to be returned from the beginning of the end of each group. How can I return all records except the last one in each group... Thank you in advance for the insight!!
Eva Gao
  • 402
  • 1
  • 7
1
vote
1 answer

Why the moving average in the reactive state engine is empty using a DolphinDB udf?

I defined the function get_ma3 in my code. However, when calling sma(c, 3), the output is empty. I am not sure why that is the case... def get_posneg(o, c){return iif(c > o, "pos", iif(c < o, "neg", "doji"))} def get_ma3(c){return (sma(c,…
jinwandalaohu
  • 226
  • 1
  • 7
1
vote
1 answer

Select last n rows of data from keyedTable and append to reactiveStateEngine

I made a system as follows: Realtime Tick Data coming from python --> Realtime OHLC is updated with every Tick using reactiveStateEngine(I cannot use timeSeriesEngine as it will not update data with every tick and I found its aggregation a bit…
Polly
  • 603
  • 3
  • 13
1
vote
1 answer

Convert ANY DICTIONARY type into table format in DolphinDB

I imported table A to function B and each input is of any dictionary type. I am able to construct a table with the returned fields and the labels of the original records. It returned a large table, and I can get the expected result after doing the…
Rebecca Lv
  • 13
  • 2
1
vote
1 answer

Is there any way to easily make statistics by ten days using DolphinDB?

The semiMonthBegin(X, [dayOfMonth=15], [offset], [n=1]) function works fine with the default dayOfMonth=15 day cycle. However, if I want to calculate on ten-day basis and set dayOfMonth=10, the result is wrong. Is there any way to fix it?
Polly
  • 603
  • 3
  • 13
1
vote
1 answer

Unresolved reference 'streamTable' of DolphinDB

The version I am using is 1.30.0.12. The following script cannot identify streamTable and reports. this error. Does anyone encounter this type of error before?
Polly
  • 603
  • 3
  • 13
1
vote
0 answers

DolphinDB | Any advanced way for conditional select of values?

Suppose I have two variables a and b. a and b can be a positive integer or null. I'd like to set the conditions to select the elements: If both the variables are null values, it returns -1. If one of the variables is null, it returns the other…
FFF
  • 147
  • 1
  • 8
1
vote
1 answer

How to update the first row of a table in dolphindb?

Does anyone know how to write the where conditions for the first row for dolphindb? update table set x=100 where ?
M Lewis
  • 11
  • 2
1
vote
1 answer

How to sort a field in the window for the top N values and perform aggregate calculations for the corresponding field in DolphinDB?

My question is about calculating the quote data in DolphinDB. The table contains four columns (ticker, date, close and volume) and is grouped by ticker and sorted by date. I want to do a window calculation and assume the window size to be 20. My…
dontyousee
  • 458
  • 2
  • 9
1
vote
1 answer

DolphinDB: How to obtain the first row with the max value of each sliding group?

I’m working on grouping data by whether the value in a column is greater than the given threshold. Here, a group contains continuous data no smaller than a given threshold. I would like to retrieve the first row containing the max value in a group,…
dontyousee
  • 458
  • 2
  • 9
1
vote
0 answers

Is it possible to use regularization to empower a certain database?

For example, there is "dfs://db1". I want to grant read permission by using "dsf://db1/". It is not possible to use "dsf://db1/", can I only empower all tables individually?
damie
  • 412
  • 2
  • 7
1
vote
1 answer

How to import time data in the format of “M-d-y h-m”?

The sample data from csv is shown as follows: datetime,symbol,price,volume 10/1/2020 9:00,XYZ,10.68,375 10/1/2020 9:00,XYZ,10.9,66 10/1/2020 9:00,XYZ,11.42,103 10/1/2020 9:00,XYZ,12.62,280 10/1/2020 9:00,XYZ,10.73,23 10/1/2020…
winnie
  • 183
  • 1
  • 6
1
vote
1 answer

the real-time processing from receiving tick data to generating 1-minute K-line

The structure of the tick data is different from the data structure of the K-line. When is the interception and conversion performed, can you talk about the general process? I currently receive tick data and have written it into ticks (stream data…
Polly
  • 603
  • 3
  • 13
1
vote
1 answer

How to efficiently query all records of timestamp.second == 5 in the orderbook table

How can I efficiently query all the records of timestamp.second == 5 in the orderbook table in dolphindb? For example, the records of timestamp 00:00:05, 00:01:05 00:02:05.  can the following statement work? select * from tick where timestamp.second…
damie
  • 412
  • 2
  • 7
1
vote
1 answer

About the upsert performance to updata a DFS table

I am now testing dolphindb, now I create a distributed table and want to update it. I wonder how about the performance of the "upsert" function to update this table?
user15504166