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
2 answers

DolphinDB: Character count in a string

How to return the number of a specified character in a String, such as the number of comma in the following String: "Aasd,LLLL,xxx"
1
vote
1 answer

Nodes fail to start due to errors in loading scheduled tasks

In both standalone server and single-machine cluster modes, an error is reported when nodes are started, which is shown as follows: Failed to unmarshall the job [..]. Can't recognize function zmq::getSubJobStat. Invalid message format I used the…
winnie
  • 183
  • 1
  • 6
1
vote
1 answer

How to convert a column of a table into a tuple?

Here is a table and I want to update the column with the following script. init=array(DOUBLE, 0) val t=table(1..5 as id, `a`a`b`b`c as sym, 2022.01.01 + 1..5 as date, [1.0, 2.0, 3.0, 4.0, 5.0] as val) update t set v=accumulate(def(a,…
dbaa9948
  • 189
  • 2
  • 10
1
vote
1 answer

DophinDB Kafka plugin: cannot read data from Kafka topic

I subscribed a Kafka topic with only one partition. I want to read the data, but failed, is there something wrong? My script is as follows: brokerList = "....." groupId = "Test001" topics=["TEST1"] consumerCfg = dict(string,…
winnie
  • 183
  • 1
  • 6
1
vote
1 answer

Failed to import data to a stream table containing array vectors with DolphinDB Python API

The following script defines a stream table where the column “askPrice“ and “bidPrice“ are array vectors of DOUBLE type. share streamTable( 10000:0, `time`sym`askPrice`bidPrice, [DATETIME,SYMBOL,DOUBLE[],DOUBLE[]] ) as…
Claire
  • 238
  • 4
1
vote
1 answer

DolphinDB - Fill missing values of a sequence

I have a table t t=table(100 101 103 106 as price,take(10,4) as n) price n 100 10 101 10 103 10 106 10 For the missing values of the column price, like 102, 104, and 105, I want to fill it with n=0. price n 100 …
jinwandalaohu
  • 226
  • 1
  • 7
1
vote
1 answer

Automate function execution with a loop using metaprogramming

How can I automate the execution of a series of functions (with the names “test_1”, “test_2“, … “test_100”) using metaprogramming in DolphinDB? For example: def test_2(){ return 1 } eval()//output: 1 I want to use a loop to generate…
jinwandalaohu
  • 226
  • 1
  • 7
1
vote
1 answer

How to obtain the last n rows of high-frequency tick data in an efficient way?

I have an in-memory table with 3 million records. Part of the stock data is as follows: How can I quickly get the last n rows of this table, say 35,000 rows?
Polly
  • 603
  • 3
  • 13
1
vote
1 answer

Generate a sequence of records from a base record

Is there a way to expand table 1 into table 2? It is to output each integer between start_no and end_no as a seq_no field, and take the other fields of the original table to form a new table (table 2). Table 1: date source market channel_no…
Polly
  • 603
  • 3
  • 13
1
vote
1 answer

Timestamp inserted in DolphinDB does not match expectations

The timestamp I insert is timestamp(1656898205942), which should be 2022/7/4 9:30:5.942. However, in DolphinDB it shows 2022/7/4 1:30:5.942. It looks like a time zone problem. Can anyone tell me how to obtain the expected timestamp?
YaN
  • 407
  • 1
  • 6
1
vote
1 answer

How does sortKeyMappingFunction works in DolphinDB?

As I learn from DolphinDB help, parameter sortKeyMappingFunction of function createPartitionedTable is used to reduce the dimensionality of sort keys. I wonder when and why is the dimensionality reduction needed?
Polly
  • 603
  • 3
  • 13
1
vote
1 answer

assign the READ privilege to userGroup1 of 4 tables in a DolphinDB database

I have many databases created. I want to assign to userGroup1 the READ privilege to 4 tables out of the total of 6 tables in the database db1. How can I use grant to specify the usergroup and tables?
Polly
  • 603
  • 3
  • 13
1
vote
1 answer

convert the time columns to DolphinDB TIME when importing live market data

When importing a CSV file containing live market data to DolphinDB, how to convert the time columns to the DolphinDB TIME type time in DolphinDB? For example, the csv file contains a time value 093000000 which will be parsed as a string if I import…
Eva Gao
  • 402
  • 1
  • 7
1
vote
1 answer

Get the records with a certain name from hash partitions in DolphinDB

My table is hash partitioned on the “name” column. I want to retrieve all records with a certain name value from all the partitions. Any DolphinDB functions to fulfill it?
Polly
  • 603
  • 3
  • 13
1
vote
1 answer

DolphinDB error report: Connection refused

The error is raised every time when I try to select based on multiple conditions. The code I'm using is: tb=loadTable("dfs://min","min_kline") m=select date, code, "m_h_0931_1451" as name, max(high_min) from tb where date(dt)>=2008.01.01 and…