dolphindb 2.0.532 → 2.0.601
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.d.ts +8 -1
- package/browser.js +62 -1
- package/browser.js.map +1 -1
- package/docs.en.json +858 -129
- package/docs.zh.json +3080 -256
- package/index.d.ts +3 -0
- package/index.js +61 -0
- package/index.js.map +1 -1
- package/language.d.ts +1 -1
- package/language.js +5 -2
- package/language.js.map +1 -1
- package/package.json +1 -1
package/docs.en.json
CHANGED
|
@@ -2022,17 +2022,17 @@
|
|
|
2022
2022
|
{
|
|
2023
2023
|
"type": "text",
|
|
2024
2024
|
"value": [
|
|
2025
|
-
"
|
|
2025
|
+
"`obj` is a local variable, and it must a vector/matrix/table/set.",
|
|
2026
2026
|
"",
|
|
2027
|
-
"
|
|
2027
|
+
"`newData` is a scalar/vector/table/set.",
|
|
2028
2028
|
"",
|
|
2029
|
-
"
|
|
2030
|
-
"",
|
|
2031
|
-
"
|
|
2032
|
-
"",
|
|
2033
|
-
"
|
|
2034
|
-
"",
|
|
2035
|
-
"If obj
|
|
2029
|
+
" - If *obj* is a vector, *newData* is a scalar or vector. The result is a vector longer than *obj*.",
|
|
2030
|
+
" ",
|
|
2031
|
+
" - If *obj* is a matrix, *newData* is a vector whose length must be a multiple of the number of rows of *obj*. The result is a matrix with the same number of rows as *obj* but with more columns.",
|
|
2032
|
+
" ",
|
|
2033
|
+
" - If *obj* is a table, *newData* is a table with the same number of columns as *obj*. The result is a table with the same number and name of columns as *obj* but with more rows.",
|
|
2034
|
+
" ",
|
|
2035
|
+
" - If *newData* and *obj* are of different data forms, ``append!`` will attempt to convert *newData* to the same data form as *obj*. If it is not possible, return an error message."
|
|
2036
2036
|
]
|
|
2037
2037
|
}
|
|
2038
2038
|
]
|
|
@@ -2044,7 +2044,9 @@
|
|
|
2044
2044
|
{
|
|
2045
2045
|
"type": "text",
|
|
2046
2046
|
"value": [
|
|
2047
|
-
"Append newData to obj
|
|
2047
|
+
"Append *newData* to *obj*. The exclamation mark (!) means in-place change in DolphinDB.",
|
|
2048
|
+
"",
|
|
2049
|
+
"Note: In most cases, the column names and orders in the tables should be consistent. Please first check whether the corresponding columns in *obj* and *newData* have the same names and are arranged in the same order before executing ``append!``. The function does not check the consistency of column names or align the columns if they are not arranged in the same order. It is executed as long as the corresponding columns are of the same data types. "
|
|
2048
2050
|
]
|
|
2049
2051
|
}
|
|
2050
2052
|
]
|
|
@@ -2220,7 +2222,6 @@
|
|
|
2220
2222
|
"type": "text",
|
|
2221
2223
|
"value": [
|
|
2222
2224
|
"* Use append! to add data to a table in the local file system:",
|
|
2223
|
-
"",
|
|
2224
2225
|
""
|
|
2225
2226
|
]
|
|
2226
2227
|
},
|
|
@@ -2240,7 +2241,7 @@
|
|
|
2240
2241
|
{
|
|
2241
2242
|
"type": "text",
|
|
2242
2243
|
"value": [
|
|
2243
|
-
"Please note that the last line of script is only executed on the
|
|
2244
|
+
"Please note that the last line of script is only executed on the hard disk, and we need to load the table into memory to work with it. ",
|
|
2244
2245
|
""
|
|
2245
2246
|
]
|
|
2246
2247
|
},
|
|
@@ -2292,7 +2293,27 @@
|
|
|
2292
2293
|
" $ Trades=loadTable(db, `Trades)",
|
|
2293
2294
|
" $ size(Trades);",
|
|
2294
2295
|
"",
|
|
2295
|
-
" 1500000"
|
|
2296
|
+
" 1500000",
|
|
2297
|
+
""
|
|
2298
|
+
]
|
|
2299
|
+
},
|
|
2300
|
+
{
|
|
2301
|
+
"type": "text",
|
|
2302
|
+
"value": [
|
|
2303
|
+
"* An error is raised if the corresponding columns in obj and newData are of different data types.",
|
|
2304
|
+
""
|
|
2305
|
+
]
|
|
2306
|
+
},
|
|
2307
|
+
{
|
|
2308
|
+
"type": "code",
|
|
2309
|
+
"language": "console",
|
|
2310
|
+
"value": [
|
|
2311
|
+
"",
|
|
2312
|
+
" $ t1=table(`x`y`z as name,10 12 16 as val)",
|
|
2313
|
+
" $ t2=table(5 7 9 as val,`b`n`m as name)",
|
|
2314
|
+
" //columns in t1 and t2 are of different data types",
|
|
2315
|
+
" $ t2.append!(t1)",
|
|
2316
|
+
" Failed to append data to column 'val' "
|
|
2296
2317
|
]
|
|
2297
2318
|
}
|
|
2298
2319
|
]
|
|
@@ -2554,7 +2575,7 @@
|
|
|
2554
2575
|
{
|
|
2555
2576
|
"type": "text",
|
|
2556
2577
|
"value": [
|
|
2557
|
-
"asfreq(X,
|
|
2578
|
+
"asfreq(X, rule, [closed], [label], [origin='start_day'])"
|
|
2558
2579
|
]
|
|
2559
2580
|
}
|
|
2560
2581
|
]
|
|
@@ -2568,7 +2589,7 @@
|
|
|
2568
2589
|
"value": [
|
|
2569
2590
|
"`X` is an indexed matrix or indexed series. The index must be of temporal type. ",
|
|
2570
2591
|
"",
|
|
2571
|
-
"rule is a string that can take the following values:",
|
|
2592
|
+
"`rule` is a string that can take the following values:",
|
|
2572
2593
|
"",
|
|
2573
2594
|
"========================== ================================",
|
|
2574
2595
|
"Values of parameter \"rule\" Corresponding DolphinDB function",
|
|
@@ -2602,7 +2623,27 @@
|
|
|
2602
2623
|
"",
|
|
2603
2624
|
"The strings above can also be used with integers for parameter \"rule\". For example, \"2M\" means month end every two months.",
|
|
2604
2625
|
"",
|
|
2605
|
-
"rule can also be a vector of temporal type. "
|
|
2626
|
+
"rule can also be a vector of temporal type. ",
|
|
2627
|
+
"",
|
|
2628
|
+
"`closed` is a string indicating which boundary of the interval is closed.",
|
|
2629
|
+
"",
|
|
2630
|
+
"- The default value is 'left' for all values of *rule* except for 'M', 'A', 'Q', 'BM', 'BA', 'BQ', and 'W' which all have a default of 'right'.",
|
|
2631
|
+
"- The default is 'right' if *origin* is 'end' or 'end_day'.",
|
|
2632
|
+
"- For version 1.30.18/2.00.6, when the time precision of *rule* is less than day, only the default value can be used.",
|
|
2633
|
+
"",
|
|
2634
|
+
"`label` is a string indicating which boundary is used to label the interval.",
|
|
2635
|
+
"",
|
|
2636
|
+
"- The default value is 'left' for all values of *rule* except for 'M', 'A', 'Q', 'BM', 'BA', 'BQ', and 'W' which all have a default of 'right'.",
|
|
2637
|
+
"- The default is 'right' if *origin* is 'end' or 'end_day'.",
|
|
2638
|
+
"- For version 1.30.18/2.00.6, when the time precision of *rule* is less than day, only the default value can be used.",
|
|
2639
|
+
"",
|
|
2640
|
+
"`origin` is a string or a scalar of the same data type as *X*, indicating the timestamp where the intervals start. It can be 'epoch', start', 'start_day', 'end', 'end_day' or a user-defined time object. The default value is 'start_day'.",
|
|
2641
|
+
"",
|
|
2642
|
+
"- 'epoch': *origin* is 1970-01-01",
|
|
2643
|
+
"- 'start': *origin* is the first value of the timeseries",
|
|
2644
|
+
"- 'start_day': *origin* is 00:00 of the first day of the timeseries",
|
|
2645
|
+
"- 'end': *origin* is the last value of the timeseries",
|
|
2646
|
+
"- 'end_day': *origin* is 24:00 of the last day of the timeseries"
|
|
2606
2647
|
]
|
|
2607
2648
|
}
|
|
2608
2649
|
]
|
|
@@ -2614,7 +2655,7 @@
|
|
|
2614
2655
|
{
|
|
2615
2656
|
"type": "text",
|
|
2616
2657
|
"value": [
|
|
2617
|
-
"Convert X to specified frequency. "
|
|
2658
|
+
"Convert X to specified frequency. Different from :doc:`../r/resample`, aggregate functions cannot be used in ``asfreq``."
|
|
2618
2659
|
]
|
|
2619
2660
|
}
|
|
2620
2661
|
]
|
|
@@ -2769,7 +2810,90 @@
|
|
|
2769
2810
|
"2020.01.01 1",
|
|
2770
2811
|
"2020.01.03 2",
|
|
2771
2812
|
"2020.01.05 ",
|
|
2772
|
-
"=========== =="
|
|
2813
|
+
"=========== ==",
|
|
2814
|
+
""
|
|
2815
|
+
]
|
|
2816
|
+
},
|
|
2817
|
+
{
|
|
2818
|
+
"type": "code",
|
|
2819
|
+
"language": "console",
|
|
2820
|
+
"value": [
|
|
2821
|
+
"",
|
|
2822
|
+
" $ index = temporalAdd(2022.10.01 23:30:00,7*(0..8),`m)",
|
|
2823
|
+
" $ s = indexedSeries(index, 3*(0..8))",
|
|
2824
|
+
" $ s.asfreq(\"8min\")",
|
|
2825
|
+
""
|
|
2826
|
+
]
|
|
2827
|
+
},
|
|
2828
|
+
{
|
|
2829
|
+
"type": "text",
|
|
2830
|
+
"value": [
|
|
2831
|
+
"=================== ====",
|
|
2832
|
+
"label\t col1",
|
|
2833
|
+
"=================== ====",
|
|
2834
|
+
"2022.10.01T23:28:00\t",
|
|
2835
|
+
"2022.10.01T23:36:00\t",
|
|
2836
|
+
"2022.10.01T23:44:00\t6",
|
|
2837
|
+
"2022.10.01T23:52:00\t",
|
|
2838
|
+
"2022.10.02T00:00:00\t",
|
|
2839
|
+
"2022.10.02T00:08:00\t",
|
|
2840
|
+
"2022.10.02T00:16:00\t",
|
|
2841
|
+
"2022.10.02T00:24:00",
|
|
2842
|
+
"=================== ====",
|
|
2843
|
+
""
|
|
2844
|
+
]
|
|
2845
|
+
},
|
|
2846
|
+
{
|
|
2847
|
+
"type": "code",
|
|
2848
|
+
"language": "console",
|
|
2849
|
+
"value": [
|
|
2850
|
+
"",
|
|
2851
|
+
" $ s.asfreq(rule=`8min,closed=`right)",
|
|
2852
|
+
""
|
|
2853
|
+
]
|
|
2854
|
+
},
|
|
2855
|
+
{
|
|
2856
|
+
"type": "text",
|
|
2857
|
+
"value": [
|
|
2858
|
+
"=================== ====",
|
|
2859
|
+
"label\t col1",
|
|
2860
|
+
"=================== ====",
|
|
2861
|
+
"2022.10.01T23:36:00\t",
|
|
2862
|
+
"2022.10.01T23:44:00\t6",
|
|
2863
|
+
"2022.10.01T23:52:00\t",
|
|
2864
|
+
"2022.10.02T00:00:00\t",
|
|
2865
|
+
"2022.10.02T00:08:00\t",
|
|
2866
|
+
"2022.10.02T00:16:00\t",
|
|
2867
|
+
"2022.10.02T00:24:00\t",
|
|
2868
|
+
"2022.10.02T00:32:00",
|
|
2869
|
+
"=================== ====",
|
|
2870
|
+
""
|
|
2871
|
+
]
|
|
2872
|
+
},
|
|
2873
|
+
{
|
|
2874
|
+
"type": "code",
|
|
2875
|
+
"language": "console",
|
|
2876
|
+
"value": [
|
|
2877
|
+
"",
|
|
2878
|
+
" $ s.asfreq(rule=`8min,closed=`right,origin=`end)",
|
|
2879
|
+
""
|
|
2880
|
+
]
|
|
2881
|
+
},
|
|
2882
|
+
{
|
|
2883
|
+
"type": "text",
|
|
2884
|
+
"value": [
|
|
2885
|
+
"=================== ====",
|
|
2886
|
+
"label\t col1",
|
|
2887
|
+
"=================== ====",
|
|
2888
|
+
"2022.10.01T23:30:00\t0",
|
|
2889
|
+
"2022.10.01T23:38:00\t",
|
|
2890
|
+
"2022.10.01T23:46:00\t",
|
|
2891
|
+
"2022.10.01T23:54:00\t",
|
|
2892
|
+
"2022.10.02T00:02:00\t",
|
|
2893
|
+
"2022.10.02T00:10:00\t",
|
|
2894
|
+
"2022.10.02T00:18:00\t",
|
|
2895
|
+
"2022.10.02T00:26:00\t24",
|
|
2896
|
+
"=================== ===="
|
|
2773
2897
|
]
|
|
2774
2898
|
}
|
|
2775
2899
|
]
|
|
@@ -6317,7 +6441,9 @@
|
|
|
6317
6441
|
{
|
|
6318
6442
|
"type": "text",
|
|
6319
6443
|
"value": [
|
|
6320
|
-
"Cancel a submitted but unfinished batch job."
|
|
6444
|
+
"Cancel a submitted but unfinished batch job.",
|
|
6445
|
+
"",
|
|
6446
|
+
"Starting from version 1.30.19/2.00.7, if a jobId does not exist when ``cancelJob`` is executed, the system no longer throws an exception. Instead, it outputs the error message with jobId to the log."
|
|
6321
6447
|
]
|
|
6322
6448
|
}
|
|
6323
6449
|
]
|
|
@@ -6350,8 +6476,26 @@
|
|
|
6350
6476
|
" $ myJobId=\"writeData\"+temporalFormat(datetime(now()),\"yyyyMMddHHmmss\")",
|
|
6351
6477
|
" $ submitJob(myJobId,\"write data to dfs table\",writeData,120);",
|
|
6352
6478
|
" $ cancelJob(myJobId);",
|
|
6479
|
+
""
|
|
6480
|
+
]
|
|
6481
|
+
},
|
|
6482
|
+
{
|
|
6483
|
+
"type": "text",
|
|
6484
|
+
"value": [
|
|
6485
|
+
"Cancel the unfinished jobs in a cluster:",
|
|
6486
|
+
""
|
|
6487
|
+
]
|
|
6488
|
+
},
|
|
6489
|
+
{
|
|
6490
|
+
"type": "code",
|
|
6491
|
+
"language": "console",
|
|
6492
|
+
"value": [
|
|
6353
6493
|
"",
|
|
6354
|
-
"",
|
|
6494
|
+
" $ def cancelAllBatchJob(){",
|
|
6495
|
+
" $ jobids=exec jobid from getRecentJobs() where endTime=NULL",
|
|
6496
|
+
" $ cancelJob(jobids)\t",
|
|
6497
|
+
" $ }",
|
|
6498
|
+
" $ pnodeRun(cancelAllBatchJob)",
|
|
6355
6499
|
""
|
|
6356
6500
|
]
|
|
6357
6501
|
}
|
|
@@ -13169,11 +13313,11 @@
|
|
|
13169
13313
|
"",
|
|
13170
13314
|
"The following state functions in DolphinDB's reactive state engine has been optimized. Currently, unoptimized state functions are not supported by this engine. And aggregate functions should be avoid.",
|
|
13171
13315
|
"",
|
|
13172
|
-
"* cumulative function: cumavg, cumsum, cumprod, cumcount, cummin, cummax, cumvar, cumvarp, cumstd, cumstdp, cumcorr, cumcovar, cumbeta, cumwsum, cumwavg, cumfirstNot, cumlastNot",
|
|
13316
|
+
"* cumulative function: cumavg, cumsum, cumprod, cumcount, cummin, cummax, cumvar, cumvarp, cumstd, cumstdp, cumcorr, cumcovar, cumbeta, cumwsum, cumwavg, cumfirstNot, cumlastNot, cummed, cumpercentile ",
|
|
13173
13317
|
"* moving function: ema, mavg, msum, mcount, mprod, mvar, mvarp, mstd, mstdp, mskew, mkurtosis, mmin, mmax, mimin, mimax, mmed, mpercentile, mrank, mcorr, mcovar, mbeta, mwsum, mwavg, mmad, mfirst, mlast, mslr, tmove, tmfirst, tmlast, tmsum, tmavg, tmcount, tmvar, tmvarp, tmstd, tmstdp, tmprod, tmskew, tmkurtosis, tmmin, tmmax, tmmed, tmpercentile, tmrank, tmcovar, tmbeta, tmcorr, tmwavg, tmwsum, tmoving, moving, sma,wma, dema, tema, trima, linearTimeTrend, talib, t3, ma",
|
|
13174
13318
|
"* order-sensitive function: deltas, ratios, ffill, move, prev, iterate, ewmMean, ewmVar, ewmStd, ewmCov, ewmCorr",
|
|
13175
|
-
"* topN
|
|
13176
|
-
"* other: talibNull",
|
|
13319
|
+
"* topN function: msumTopN, mavgTopN, mstdpTopN, mstdTopN, mvarpTopN, mvarTopN, mcorrTopN, mbetaTopN, mcovarTopN, mwsumTopN",
|
|
13320
|
+
"* other: talibNull, talibNull, fixedLengthArrayVector, dynamicGroupCumsum, dynamicGroupCumcount",
|
|
13177
13321
|
"",
|
|
13178
13322
|
"Note: The parameter *func* in the state function ``talib`` can only be a state function supported by the reactive state engine.",
|
|
13179
13323
|
"",
|
|
@@ -24020,7 +24164,7 @@
|
|
|
24020
24164
|
{
|
|
24021
24165
|
"type": "text",
|
|
24022
24166
|
"value": [
|
|
24023
|
-
"existsPartition(path)"
|
|
24167
|
+
"existsPartition(path, [tableName])"
|
|
24024
24168
|
]
|
|
24025
24169
|
}
|
|
24026
24170
|
]
|
|
@@ -24032,7 +24176,13 @@
|
|
|
24032
24176
|
{
|
|
24033
24177
|
"type": "text",
|
|
24034
24178
|
"value": [
|
|
24035
|
-
"`path` is a string indicating the path of a partition folder."
|
|
24179
|
+
"`path` is a string indicating the path of a partition folder.",
|
|
24180
|
+
"",
|
|
24181
|
+
"`tableName` is a string indicating the table name. If *chunkGranularity* is set to \"DATABASE\" when creating the database, *tableName* is not required. If *chunkGranularity* is set to \"TABLE\":",
|
|
24182
|
+
"",
|
|
24183
|
+
"- If the parameter path contains the physical index of the table (which can be retrieved with the function ``listTables``), *tableName* is not required.",
|
|
24184
|
+
"",
|
|
24185
|
+
"- Otherwise, *tableName* must be specified."
|
|
24036
24186
|
]
|
|
24037
24187
|
}
|
|
24038
24188
|
]
|
|
@@ -24053,11 +24203,18 @@
|
|
|
24053
24203
|
"title": "Examples",
|
|
24054
24204
|
"type": "example",
|
|
24055
24205
|
"children": [
|
|
24206
|
+
{
|
|
24207
|
+
"type": "text",
|
|
24208
|
+
"value": [
|
|
24209
|
+
"Check if the specified partition exists. The following scripts must be executed on a data node or compute node.",
|
|
24210
|
+
""
|
|
24211
|
+
]
|
|
24212
|
+
},
|
|
24056
24213
|
{
|
|
24057
24214
|
"type": "code",
|
|
24058
24215
|
"language": "console",
|
|
24059
24216
|
"value": [
|
|
24060
|
-
"",
|
|
24217
|
+
" ",
|
|
24061
24218
|
" $ n=1000000",
|
|
24062
24219
|
" $ ID=rand(10, n)",
|
|
24063
24220
|
" $ dates=2017.08.07..2017.08.11",
|
|
@@ -24069,21 +24226,18 @@
|
|
|
24069
24226
|
" $ pt = db.createPartitionedTable(t, `pt, `date);",
|
|
24070
24227
|
" $ pt.append!(t);",
|
|
24071
24228
|
"",
|
|
24072
|
-
" $
|
|
24073
|
-
" 1",
|
|
24074
|
-
"",
|
|
24075
|
-
" $ existsPartition(\"C:/DolphinDB/Data/valueDB\");",
|
|
24076
|
-
" 0",
|
|
24077
|
-
"",
|
|
24078
|
-
" $ existsPartition(\"C:/DolphinDB/Data\");",
|
|
24079
|
-
" 0",
|
|
24229
|
+
" $ listTables(\"dfs://valueDB\")",
|
|
24080
24230
|
""
|
|
24081
24231
|
]
|
|
24082
24232
|
},
|
|
24083
24233
|
{
|
|
24084
24234
|
"type": "text",
|
|
24085
24235
|
"value": [
|
|
24086
|
-
"
|
|
24236
|
+
"+----------+--------------+",
|
|
24237
|
+
"|tableName |physicalIndex |",
|
|
24238
|
+
"+==========+==============+",
|
|
24239
|
+
"|pt |s |",
|
|
24240
|
+
"+----------+--------------+",
|
|
24087
24241
|
""
|
|
24088
24242
|
]
|
|
24089
24243
|
},
|
|
@@ -24091,26 +24245,31 @@
|
|
|
24091
24245
|
"type": "code",
|
|
24092
24246
|
"language": "console",
|
|
24093
24247
|
"value": [
|
|
24094
|
-
" ",
|
|
24095
|
-
" $ n=1000000",
|
|
24096
|
-
" $ ID=rand(10, n)",
|
|
24097
|
-
" $ dates=2017.08.07..2017.08.11",
|
|
24098
|
-
" $ date=rand(dates, n)",
|
|
24099
|
-
" $ x=rand(10.0, n)",
|
|
24100
|
-
" $ t=table(ID, date, x)",
|
|
24101
24248
|
"",
|
|
24102
|
-
" $
|
|
24103
|
-
"
|
|
24104
|
-
"
|
|
24249
|
+
" $ existsPartition(\"dfs://valueDB/20170807/s\");",
|
|
24250
|
+
" true",
|
|
24251
|
+
"",
|
|
24252
|
+
" //When the chunk granularity of the database is at TABLE level and the parameter path doesn't contain table physicalIndex, the parameter tableName must be specified or the partition cannot be found.",
|
|
24253
|
+
"",
|
|
24254
|
+
" $ existsPartition(\"dfs://valueDB/20170807\", `pt) ",
|
|
24255
|
+
" true",
|
|
24105
24256
|
"",
|
|
24106
24257
|
" $ existsPartition(\"dfs://valueDB/20170807\");",
|
|
24107
|
-
"
|
|
24258
|
+
" false",
|
|
24108
24259
|
"",
|
|
24109
24260
|
" $ existsPartition(\"dfs://valueDB\");",
|
|
24110
|
-
"
|
|
24261
|
+
" false",
|
|
24111
24262
|
"",
|
|
24112
|
-
" $ existsPartition(\"dfs://valueDB/20170807/pt\");",
|
|
24113
|
-
"
|
|
24263
|
+
" $ existsPartition(\"dfs://valueDB/20170807/s/pt\");",
|
|
24264
|
+
" false",
|
|
24265
|
+
""
|
|
24266
|
+
]
|
|
24267
|
+
},
|
|
24268
|
+
{
|
|
24269
|
+
"type": "text",
|
|
24270
|
+
"value": [
|
|
24271
|
+
".. meta:: ",
|
|
24272
|
+
" :keywords: exist"
|
|
24114
24273
|
]
|
|
24115
24274
|
}
|
|
24116
24275
|
]
|
|
@@ -27311,6 +27470,84 @@
|
|
|
27311
27470
|
}
|
|
27312
27471
|
]
|
|
27313
27472
|
},
|
|
27473
|
+
"getCacheEngineStat": {
|
|
27474
|
+
"title": "getCacheEngineStat",
|
|
27475
|
+
"type": "function",
|
|
27476
|
+
"children": [
|
|
27477
|
+
{
|
|
27478
|
+
"title": "Syntax",
|
|
27479
|
+
"type": "grammer",
|
|
27480
|
+
"children": [
|
|
27481
|
+
{
|
|
27482
|
+
"type": "text",
|
|
27483
|
+
"value": [
|
|
27484
|
+
"getCacheEngineStat()"
|
|
27485
|
+
]
|
|
27486
|
+
}
|
|
27487
|
+
]
|
|
27488
|
+
},
|
|
27489
|
+
{
|
|
27490
|
+
"title": "Arguments",
|
|
27491
|
+
"type": "parameters",
|
|
27492
|
+
"children": [
|
|
27493
|
+
{
|
|
27494
|
+
"type": "text",
|
|
27495
|
+
"value": [
|
|
27496
|
+
"None"
|
|
27497
|
+
]
|
|
27498
|
+
}
|
|
27499
|
+
]
|
|
27500
|
+
},
|
|
27501
|
+
{
|
|
27502
|
+
"title": "Details",
|
|
27503
|
+
"type": "detail",
|
|
27504
|
+
"children": [
|
|
27505
|
+
{
|
|
27506
|
+
"type": "text",
|
|
27507
|
+
"value": [
|
|
27508
|
+
"Get the status of the OLAP cache engine on the current node. The function can only be called on the data node.",
|
|
27509
|
+
"",
|
|
27510
|
+
"Return a table containing the following columns:",
|
|
27511
|
+
"",
|
|
27512
|
+
"- chunkId: the chunk ID",
|
|
27513
|
+
"- physicalName: the physical name of the table to which the chunk belongs",
|
|
27514
|
+
"- timeSinceLastWrite: the time elapsed (in milliseconds) since last write",
|
|
27515
|
+
"- cachedRowsOfCompletedTxn: the number of cached records of completed transactions",
|
|
27516
|
+
"- cachedRowsOfUncompletedTxn: the number of cached records of uncompleted transactions. Note: For each chunk, only the last transaction may not have been completed.",
|
|
27517
|
+
"- cachedMemOfCompletedTxn: the memory usage (in Bytes) of completed transactions",
|
|
27518
|
+
"- cachedMemOfUncompletedTxn: the memory usage (in Bytes) of uncompleted transactions",
|
|
27519
|
+
"- cachedTids: list of transaction IDs (tid)"
|
|
27520
|
+
]
|
|
27521
|
+
}
|
|
27522
|
+
]
|
|
27523
|
+
},
|
|
27524
|
+
{
|
|
27525
|
+
"title": "Examples",
|
|
27526
|
+
"type": "example",
|
|
27527
|
+
"children": [
|
|
27528
|
+
{
|
|
27529
|
+
"type": "code",
|
|
27530
|
+
"language": "console",
|
|
27531
|
+
"value": [
|
|
27532
|
+
"",
|
|
27533
|
+
" $ getCacheEngineStat()",
|
|
27534
|
+
""
|
|
27535
|
+
]
|
|
27536
|
+
},
|
|
27537
|
+
{
|
|
27538
|
+
"type": "text",
|
|
27539
|
+
"value": [
|
|
27540
|
+
"======================================== ============= =================== ========================== =========================== ======================== =========================== ==============",
|
|
27541
|
+
"chunkId physicalName timeSinceLastWrite cachedRowsOfCompletedTxn cachedRowsOfUncompletedTxn cachedMemOfCompletedTxn cachedMemOfUncompletedTxn cachedTids",
|
|
27542
|
+
"======================================== ============= =================== ========================== =========================== ======================== =========================== ==============",
|
|
27543
|
+
"e4558d3c-fa41-52b5-418b-94e26cb70a75 pt_2 1056 222,386 0 3,558,176 0 2052",
|
|
27544
|
+
"======================================== ============= =================== ========================== =========================== ======================== =========================== =============="
|
|
27545
|
+
]
|
|
27546
|
+
}
|
|
27547
|
+
]
|
|
27548
|
+
}
|
|
27549
|
+
]
|
|
27550
|
+
},
|
|
27314
27551
|
"getChunkPath": {
|
|
27315
27552
|
"title": "getChunkPath",
|
|
27316
27553
|
"type": "function",
|
|
@@ -27506,7 +27743,32 @@
|
|
|
27506
27743
|
{
|
|
27507
27744
|
"type": "text",
|
|
27508
27745
|
"value": [
|
|
27509
|
-
"
|
|
27746
|
+
"Return the metadata about all database chunks (file chunks and tablet chunks) on the data nodes in a cluster. It can be executed only on a controller. ",
|
|
27747
|
+
"",
|
|
27748
|
+
"Return a table containing the following columns:",
|
|
27749
|
+
"",
|
|
27750
|
+
"- chunkId: the chunk ID",
|
|
27751
|
+
"- file: the chunk path",
|
|
27752
|
+
"- size: The disk space occupied by the file chunk (in Bytes). Return 0 for a tablet chunk. Use ``getTabletsMeta`` to check the disk usage of a tablet chunk.",
|
|
27753
|
+
"- version: version number",
|
|
27754
|
+
"- vcLength: length of the version chain",
|
|
27755
|
+
"- versionChain: the version chain",
|
|
27756
|
+
"- state: the status of the chunk. It can be ",
|
|
27757
|
+
"",
|
|
27758
|
+
" - CONSTRUCTING: in transaction;",
|
|
27759
|
+
" - RECOVERING: recovering;",
|
|
27760
|
+
" - COMPLETE: transaction completed",
|
|
27761
|
+
"",
|
|
27762
|
+
"- replicas: distribution of replicas",
|
|
27763
|
+
"- replicaCount: the number of replicas",
|
|
27764
|
+
"- lastUpdated: the timestamp of the latest update",
|
|
27765
|
+
"- permission: the chunk permission. It can be READ_ONLY and READ_WRITE (default). Chunks that are being transferred or stored in S3 are READ_ONLY.",
|
|
27766
|
+
"",
|
|
27767
|
+
"For READ_ONLY chunks:",
|
|
27768
|
+
"",
|
|
27769
|
+
"\\(1) Data cannot be appended or updated. Only drop operations can be performed to delete records. Transaction is supported in the READ_ONLY chunks (except for those stored in S3).",
|
|
27770
|
+
"",
|
|
27771
|
+
"\\(2) Operations such as recovery, rebalance and TSDB level file compaction cannot be performed."
|
|
27510
27772
|
]
|
|
27511
27773
|
}
|
|
27512
27774
|
]
|
|
@@ -27519,7 +27781,7 @@
|
|
|
27519
27781
|
"type": "code",
|
|
27520
27782
|
"language": "console",
|
|
27521
27783
|
"value": [
|
|
27522
|
-
"
|
|
27784
|
+
"",
|
|
27523
27785
|
" $ rpc(getControllerAlias(), getClusterChunksStatus);",
|
|
27524
27786
|
""
|
|
27525
27787
|
]
|
|
@@ -27527,22 +27789,16 @@
|
|
|
27527
27789
|
{
|
|
27528
27790
|
"type": "text",
|
|
27529
27791
|
"value": [
|
|
27530
|
-
"=================== =============== ==== ======= ========
|
|
27531
|
-
"chunkId file size version
|
|
27532
|
-
"=================== =============== ==== ======= ========
|
|
27533
|
-
"
|
|
27534
|
-
"
|
|
27535
|
-
"
|
|
27536
|
-
"
|
|
27537
|
-
"
|
|
27538
|
-
"
|
|
27539
|
-
"
|
|
27540
|
-
"ee31c878-347a-44... /db1/domain 59 1 1 1:59:1 -> COMPLETE local8848:1:0 1",
|
|
27541
|
-
"df7299c4-bbe5-72... /db1/20120103 0 1 1 3:0:1 -> COMPLETE local8848:1:0 1",
|
|
27542
|
-
"24b55425-9dfd-71... /testDB/domain 55 1 1 10:55:1 -> COMPLETE local8848:1:0 1",
|
|
27543
|
-
"091db33a-0bfa-1a... /db1/20120104 0 1 1 3:0:1 -> COMPLETE local8848:1:0 1",
|
|
27544
|
-
"e6635a2b-53c9-37... /db1/20120105 0 1 1 3:0:1 -> COMPLETE local8848:1:0 1",
|
|
27545
|
-
"=================== =============== ==== ======= ======== ============ ======== ============= ============",
|
|
27792
|
+
"=================== =============== ==== ======= ======== =================== ======== ==================== ============== ======================== ===========",
|
|
27793
|
+
"chunkId file size version vcLength versionChain state replicas replicaCount lastUpdated permission",
|
|
27794
|
+
"=================== =============== ==== ======= ======== =================== ======== ==================== ============== ======================== ===========",
|
|
27795
|
+
"092d5e12-e595-6f... /testDB/pt2.tbl 49 1 1 2052:49:1 -> COMPLETE P1-node1:1:0,P2-... 2 2022.03.31T18:09:41.138 READ_WRITE",
|
|
27796
|
+
"42936e31-8be0-fa... /testDB/9/i 0 2 2 2053:0:2 -> 2051... COMPLETE P3-node1:2:0,P1-... 2 2022.03.31T18:09:41.138 READ_WRITE",
|
|
27797
|
+
"d31e6b47-18f0-37... /testDB/7/i 0 2 2 2053:0:2 -> 2051... COMPLETE P1-node1:2:0,P2-... 2 2022.03.31T18:09:41.138 READ_WRITE",
|
|
27798
|
+
"647a5fd6-cd85-3b... /testDB/6/i 0 2 2 2053:0:2 -> 2051... COMPLETE P1-node1:2:0,P3-... 2 2022.03.31T18:09:41.138 READ_WRITE",
|
|
27799
|
+
"8bec6445-bc6d-36... /testDB/5/i 0 2 2 2053:0:2 -> 2051... COMPLETE P2-node1:2:0,P3-... 2 2022.03.31T18:09:41.138 READ_WRITE",
|
|
27800
|
+
"ca690ba5-be73-a6... /testDB/4/i 0 2 2 2053:0:2 -> 2051... COMPLETE P3-node1:2:0,P1-... 2 2022.03.31T18:09:41.138 READ_WRITE",
|
|
27801
|
+
"=================== =============== ==== ======= ======== =================== ======== ==================== ============== ======================== ===========",
|
|
27546
27802
|
"",
|
|
27547
27803
|
".. meta:: ",
|
|
27548
27804
|
" :keywords: get"
|
|
@@ -30076,25 +30332,28 @@
|
|
|
30076
30332
|
{
|
|
30077
30333
|
"type": "text",
|
|
30078
30334
|
"value": [
|
|
30079
|
-
"Get the status of
|
|
30080
|
-
"
|
|
30335
|
+
"Get the status of recovery tasks. This function can only be executed on a controller.",
|
|
30336
|
+
"",
|
|
30337
|
+
"Return a table containing the following columns:",
|
|
30081
30338
|
"",
|
|
30082
|
-
"* TaskId: The job ID of the
|
|
30083
|
-
"* TaskType: The type of the recovery task. It can be
|
|
30339
|
+
"* TaskId: The job ID of the recovery task",
|
|
30340
|
+
"* TaskType: The type of the recovery task. It can be \"LoadRebalance\" and \"ChunkRecovery\".",
|
|
30084
30341
|
"* ChunkId: The chunk ID",
|
|
30085
30342
|
"* ChunkPath: The DFS path of the chunk",
|
|
30086
30343
|
"* Source: The source node for data recovery",
|
|
30087
30344
|
"* Dest: The destination node for data recovery",
|
|
30088
|
-
"* Status: The status of the recovery task. It can be
|
|
30345
|
+
"* Status: The status of the recovery task. It can be \"Waiting\", \"In-Progress\", and \"Finish/Abort\".",
|
|
30089
30346
|
"* AttemptCount: The number of recovery attempts that have been made",
|
|
30090
|
-
"* DeleteSource: Whether to delete the
|
|
30091
|
-
"* StartTime: The time when the recovery task is created",
|
|
30092
|
-
"* LastDequeueTime: The last time when the recovery task is dequeued",
|
|
30093
|
-
"* LastStartTime: The last time when the recovery task started",
|
|
30094
|
-
"* FinishTime: The time when the recovery task was finished",
|
|
30095
|
-
"* IsIncrementalRecovery: Whether incremental replication is enabled",
|
|
30096
|
-
"* IsAsyncRecovery: Whether asynchronous replication is enabled",
|
|
30097
|
-
"* ChangeFromIncrementalToFull: Whether incremental replication has been changed to full replication"
|
|
30347
|
+
"* DeleteSource: Whether to delete the replica on the source node. When TaskType is \"ChunkRecovery\", it is false. When TaskType is \"LoadRebalance\", it can be true or false.",
|
|
30348
|
+
"* StartTime: The time when the recovery task is created.",
|
|
30349
|
+
"* LastDequeueTime: The last time when the recovery task is dequeued.",
|
|
30350
|
+
"* LastStartTime: The last time when the recovery task started.",
|
|
30351
|
+
"* FinishTime: The time when the recovery task was finished.",
|
|
30352
|
+
"* IsIncrementalRecovery: Whether incremental replication is enabled.",
|
|
30353
|
+
"* IsAsyncRecovery: Whether asynchronous replication is enabled.",
|
|
30354
|
+
"* ChangeFromIncrementalToFull: Whether incremental replication has been changed to full replication. The recovery will be automatically changed to full recovery after multiple attempts for incremental recovery fail.",
|
|
30355
|
+
"* ChangeToSyncTime: The time when the online recovery is changed from asynchronous to synchronous.",
|
|
30356
|
+
"* FailureReason: The reason for the failure of the recovery tasks."
|
|
30098
30357
|
]
|
|
30099
30358
|
}
|
|
30100
30359
|
]
|
|
@@ -30168,6 +30427,84 @@
|
|
|
30168
30427
|
}
|
|
30169
30428
|
]
|
|
30170
30429
|
},
|
|
30430
|
+
"getRedoLogGCStat": {
|
|
30431
|
+
"title": "getRedoLogGCStat",
|
|
30432
|
+
"type": "function",
|
|
30433
|
+
"children": [
|
|
30434
|
+
{
|
|
30435
|
+
"title": "Syntax",
|
|
30436
|
+
"type": "grammer",
|
|
30437
|
+
"children": [
|
|
30438
|
+
{
|
|
30439
|
+
"type": "text",
|
|
30440
|
+
"value": [
|
|
30441
|
+
"getRedoLogGCStat()"
|
|
30442
|
+
]
|
|
30443
|
+
}
|
|
30444
|
+
]
|
|
30445
|
+
},
|
|
30446
|
+
{
|
|
30447
|
+
"title": "Arguments",
|
|
30448
|
+
"type": "parameters",
|
|
30449
|
+
"children": [
|
|
30450
|
+
{
|
|
30451
|
+
"type": "text",
|
|
30452
|
+
"value": [
|
|
30453
|
+
"None"
|
|
30454
|
+
]
|
|
30455
|
+
}
|
|
30456
|
+
]
|
|
30457
|
+
},
|
|
30458
|
+
{
|
|
30459
|
+
"title": "Details",
|
|
30460
|
+
"type": "detail",
|
|
30461
|
+
"children": [
|
|
30462
|
+
{
|
|
30463
|
+
"type": "text",
|
|
30464
|
+
"value": [
|
|
30465
|
+
"Get the status of garbage collection of the redo log. Return a table containing the following columns:",
|
|
30466
|
+
"",
|
|
30467
|
+
"- physicalName: physical name of the table in the format of \"/<databaseName>/<physicalName>\"",
|
|
30468
|
+
"- txnCount: the number of transactions that have not been garbage-collected",
|
|
30469
|
+
"- numOfTxnPendingGC: the number of transactions that can be garbage-collected",
|
|
30470
|
+
"- minTidPendingGC: the minimum tid (transaction ID) of the transactions that can be garbage-collected",
|
|
30471
|
+
"- numOfTxnPendingFlush: the number of transactions that can be flushed to disk from the cache engine",
|
|
30472
|
+
"- minTidPendingFlush: the minimum tid of the transactions that can be flushed to disk from the cache engine"
|
|
30473
|
+
]
|
|
30474
|
+
}
|
|
30475
|
+
]
|
|
30476
|
+
},
|
|
30477
|
+
{
|
|
30478
|
+
"title": "Examples",
|
|
30479
|
+
"type": "example",
|
|
30480
|
+
"children": [
|
|
30481
|
+
{
|
|
30482
|
+
"type": "code",
|
|
30483
|
+
"language": "console",
|
|
30484
|
+
"value": [
|
|
30485
|
+
"",
|
|
30486
|
+
" getRedoLogGCStat()",
|
|
30487
|
+
""
|
|
30488
|
+
]
|
|
30489
|
+
},
|
|
30490
|
+
{
|
|
30491
|
+
"type": "text",
|
|
30492
|
+
"value": [
|
|
30493
|
+
"============== ============ ==================== ================== ===================== ====================",
|
|
30494
|
+
"physicalName txnCount numOfTxnPendingGC minTidPendingGC numOfTxnPendingFlush minTidPendingFlush",
|
|
30495
|
+
"============== ============ ==================== ================== ===================== ====================",
|
|
30496
|
+
"/test/pt_2 2 0 2 1031",
|
|
30497
|
+
"/listdb/pt_2 1 1 1033 0",
|
|
30498
|
+
"============== ============ ==================== ================== ===================== ====================",
|
|
30499
|
+
"",
|
|
30500
|
+
".. meta:: ",
|
|
30501
|
+
" :keywords: get"
|
|
30502
|
+
]
|
|
30503
|
+
}
|
|
30504
|
+
]
|
|
30505
|
+
}
|
|
30506
|
+
]
|
|
30507
|
+
},
|
|
30171
30508
|
"getRightStream": {
|
|
30172
30509
|
"title": "getRightStream",
|
|
30173
30510
|
"type": "function",
|
|
@@ -31274,6 +31611,7 @@
|
|
|
31274
31611
|
"value": [
|
|
31275
31612
|
" $ getStreamingStat().pubConns;",
|
|
31276
31613
|
" $ getStreamingStat().subConns;",
|
|
31614
|
+
" $ getStreamingStat().pubTables; ",
|
|
31277
31615
|
" $ getStreamingStat().persistWorkers;",
|
|
31278
31616
|
" $ getStreamingStat().subWorkers;",
|
|
31279
31617
|
"",
|
|
@@ -31366,6 +31704,109 @@
|
|
|
31366
31704
|
}
|
|
31367
31705
|
]
|
|
31368
31706
|
},
|
|
31707
|
+
"getSupportBundle": {
|
|
31708
|
+
"title": "getSupportBundle",
|
|
31709
|
+
"type": "function",
|
|
31710
|
+
"children": [
|
|
31711
|
+
{
|
|
31712
|
+
"title": "Syntax",
|
|
31713
|
+
"type": "grammer",
|
|
31714
|
+
"children": [
|
|
31715
|
+
{
|
|
31716
|
+
"type": "text",
|
|
31717
|
+
"value": [
|
|
31718
|
+
"getSupportBundle([dir])"
|
|
31719
|
+
]
|
|
31720
|
+
}
|
|
31721
|
+
]
|
|
31722
|
+
},
|
|
31723
|
+
{
|
|
31724
|
+
"title": "Arguments",
|
|
31725
|
+
"type": "parameters",
|
|
31726
|
+
"children": [
|
|
31727
|
+
{
|
|
31728
|
+
"type": "text",
|
|
31729
|
+
"value": [
|
|
31730
|
+
"`dir` the directory to store the support bundle. It is an optional parameter. The default path is <HomeDir> (which can be obtained with :doc:`getHomeDir`) for a standalone mode, and the sibling directory of <HomeDir> for a cluster mode. "
|
|
31731
|
+
]
|
|
31732
|
+
}
|
|
31733
|
+
]
|
|
31734
|
+
},
|
|
31735
|
+
{
|
|
31736
|
+
"title": "Details",
|
|
31737
|
+
"type": "detail",
|
|
31738
|
+
"children": [
|
|
31739
|
+
{
|
|
31740
|
+
"type": "text",
|
|
31741
|
+
"value": [
|
|
31742
|
+
"Generate a file of support bundle containing all configuration information and return the file path. The function can only be called on a data node or compute node.",
|
|
31743
|
+
"",
|
|
31744
|
+
"The file contains the following information:",
|
|
31745
|
+
"",
|
|
31746
|
+
"+----------------------+--------------------------------------------------------------------------------+-----------------------------------------+",
|
|
31747
|
+
"| Block | Description | Info Source |",
|
|
31748
|
+
"+======================+================================================================================+=========================================+",
|
|
31749
|
+
"| VERSION | the server version | ``version()`` |",
|
|
31750
|
+
"+----------------------+--------------------------------------------------------------------------------+-----------------------------------------+",
|
|
31751
|
+
"| CONFIGS | the configuration information. Return the configuration information for a | standalone mode: dolphindb.cfg |",
|
|
31752
|
+
"| | cluster | cluster mode: cluster.cfg, |",
|
|
31753
|
+
"| | | cluster.nodes, controller.cfg |",
|
|
31754
|
+
"+----------------------+--------------------------------------------------------------------------------+-----------------------------------------+",
|
|
31755
|
+
"| DB AND TABLE SCHEMA | the schema of each database and table | ``schema`` |",
|
|
31756
|
+
"+----------------------+--------------------------------------------------------------------------------+-----------------------------------------+",
|
|
31757
|
+
"| LICENSE AND MACHINE | license, CPU cores and memory usage | license: Dolphindb.lic |",
|
|
31758
|
+
"| INFO | | |",
|
|
31759
|
+
"+----------------------+--------------------------------------------------------------------------------+-----------------------------------------+",
|
|
31760
|
+
"| OLAP CACHE ENGINE | The status of OLAP cache engine on the current node and the memory usage of | ``pnodeRun(getCacheEngineMemSize)`` |",
|
|
31761
|
+
"| STATUS | each node | ``pnodeRun(getOLAPCacheEngineStat)`` |",
|
|
31762
|
+
"+----------------------+--------------------------------------------------------------------------------+-----------------------------------------+",
|
|
31763
|
+
"| TSDB META | the metadata of all chunks in the TSDB database | ``pnodeRun(getTSDBMetaData)`` |",
|
|
31764
|
+
"+----------------------+--------------------------------------------------------------------------------+-----------------------------------------+",
|
|
31765
|
+
"| REDO LOG GC STATUS | the redo log status | ``pnodeRun(getRedoLogGCStat)`` |",
|
|
31766
|
+
"+----------------------+--------------------------------------------------------------------------------+-----------------------------------------+",
|
|
31767
|
+
"| TRANSACTION STATUS | the transaction status | ``pnodeRun(getTransactionStatus)`` |",
|
|
31768
|
+
"+----------------------+--------------------------------------------------------------------------------+-----------------------------------------+",
|
|
31769
|
+
"| TABLETS META | the metadata of the 100 chunks in the cluster with the most rows | select top 100 \\* from pnodeRun(getTabl |",
|
|
31770
|
+
"| | | etsMeta{\"%\",\"%\",false,-1}) order by |",
|
|
31771
|
+
"| | | rowNum desc |",
|
|
31772
|
+
"+----------------------+--------------------------------------------------------------------------------+-----------------------------------------+",
|
|
31773
|
+
"| ANOMALOUS CHUNK | the status of anomalous chunks. Anomaly means chunks in recovery, with | ``getClusterChunksStatus()`` |",
|
|
31774
|
+
"| STATUS | different version or replica counts. | |",
|
|
31775
|
+
"+----------------------+--------------------------------------------------------------------------------+-----------------------------------------+",
|
|
31776
|
+
""
|
|
31777
|
+
]
|
|
31778
|
+
}
|
|
31779
|
+
]
|
|
31780
|
+
},
|
|
31781
|
+
{
|
|
31782
|
+
"title": "Examples",
|
|
31783
|
+
"type": "example",
|
|
31784
|
+
"children": [
|
|
31785
|
+
{
|
|
31786
|
+
"type": "code",
|
|
31787
|
+
"language": "console",
|
|
31788
|
+
"value": [
|
|
31789
|
+
"",
|
|
31790
|
+
" $ getSupportBundle()",
|
|
31791
|
+
" /home/dolphindb/server/getSupportBundle.1655869793424",
|
|
31792
|
+
"",
|
|
31793
|
+
" $ getSupportBundle(\"/home/dolphindb/sup\")",
|
|
31794
|
+
" /home/dolphindb/sup/getSupportBundle.1655869853178",
|
|
31795
|
+
"",
|
|
31796
|
+
""
|
|
31797
|
+
]
|
|
31798
|
+
},
|
|
31799
|
+
{
|
|
31800
|
+
"type": "text",
|
|
31801
|
+
"value": [
|
|
31802
|
+
".. meta:: ",
|
|
31803
|
+
" :keywords: get"
|
|
31804
|
+
]
|
|
31805
|
+
}
|
|
31806
|
+
]
|
|
31807
|
+
}
|
|
31808
|
+
]
|
|
31809
|
+
},
|
|
31369
31810
|
"getSystemCpuUsage": {
|
|
31370
31811
|
"title": "getSystemCpuUsage",
|
|
31371
31812
|
"type": "function",
|
|
@@ -31919,6 +32360,85 @@
|
|
|
31919
32360
|
}
|
|
31920
32361
|
]
|
|
31921
32362
|
},
|
|
32363
|
+
"getTransactionStatus": {
|
|
32364
|
+
"title": "getTransactionStatus",
|
|
32365
|
+
"type": "function",
|
|
32366
|
+
"children": [
|
|
32367
|
+
{
|
|
32368
|
+
"title": "Syntax",
|
|
32369
|
+
"type": "grammer",
|
|
32370
|
+
"children": [
|
|
32371
|
+
{
|
|
32372
|
+
"type": "text",
|
|
32373
|
+
"value": [
|
|
32374
|
+
"getTransactionStatus()"
|
|
32375
|
+
]
|
|
32376
|
+
}
|
|
32377
|
+
]
|
|
32378
|
+
},
|
|
32379
|
+
{
|
|
32380
|
+
"title": "Arguments",
|
|
32381
|
+
"type": "parameters",
|
|
32382
|
+
"children": [
|
|
32383
|
+
{
|
|
32384
|
+
"type": "text",
|
|
32385
|
+
"value": [
|
|
32386
|
+
"None"
|
|
32387
|
+
]
|
|
32388
|
+
}
|
|
32389
|
+
]
|
|
32390
|
+
},
|
|
32391
|
+
{
|
|
32392
|
+
"title": "Details",
|
|
32393
|
+
"type": "detail",
|
|
32394
|
+
"children": [
|
|
32395
|
+
{
|
|
32396
|
+
"type": "text",
|
|
32397
|
+
"value": [
|
|
32398
|
+
"Get the status of transactions. Return a table containing the following columns:",
|
|
32399
|
+
"",
|
|
32400
|
+
"- tid: The transaction ID",
|
|
32401
|
+
"- startTime: The time when the transaction started",
|
|
32402
|
+
"- type: The type of operations involved in the transaction, including APPEND, DROP, SQLUPDATE, SQLUPSERT, SQLDELETE, FILEOPERATE, or UNKNOWN.",
|
|
32403
|
+
"- status: The transaction status. It can be BEGIN, COMMIT, COMPLETE, or ROLLBACK.",
|
|
32404
|
+
"- partitionCount: The number of partitions involved in the transaction",
|
|
32405
|
+
"- endTime: The time when the transaction ended",
|
|
32406
|
+
"- elapsedTime: The elapsed time of the transaction"
|
|
32407
|
+
]
|
|
32408
|
+
}
|
|
32409
|
+
]
|
|
32410
|
+
},
|
|
32411
|
+
{
|
|
32412
|
+
"title": "Examples",
|
|
32413
|
+
"type": "example",
|
|
32414
|
+
"children": [
|
|
32415
|
+
{
|
|
32416
|
+
"type": "code",
|
|
32417
|
+
"language": "console",
|
|
32418
|
+
"value": [
|
|
32419
|
+
"",
|
|
32420
|
+
" getTransactionStatus() ",
|
|
32421
|
+
""
|
|
32422
|
+
]
|
|
32423
|
+
},
|
|
32424
|
+
{
|
|
32425
|
+
"type": "text",
|
|
32426
|
+
"value": [
|
|
32427
|
+
"============= ========================== ======= ====== ============== ============================ ============",
|
|
32428
|
+
"tid startTime type status partitionCount endTime elapsedTime",
|
|
32429
|
+
"============= ========================== ======= ====== ============== ============================ ============",
|
|
32430
|
+
"3135 2022.06.07 16:19:48.477 APPEND BEGIN 4 584",
|
|
32431
|
+
"3143 2022.06.07 16:11:27.489 APPEND COMMIT 4 \t2022.06.07 16:11:33.100 484",
|
|
32432
|
+
"============= ========================== ======= ====== ============== ============================ ============",
|
|
32433
|
+
"",
|
|
32434
|
+
".. meta:: ",
|
|
32435
|
+
" :keywords: get"
|
|
32436
|
+
]
|
|
32437
|
+
}
|
|
32438
|
+
]
|
|
32439
|
+
}
|
|
32440
|
+
]
|
|
32441
|
+
},
|
|
31922
32442
|
"getUserAccess": {
|
|
31923
32443
|
"title": "getUserAccess",
|
|
31924
32444
|
"type": "function",
|
|
@@ -61549,7 +62069,26 @@
|
|
|
61549
62069
|
{
|
|
61550
62070
|
"type": "text",
|
|
61551
62071
|
"value": [
|
|
61552
|
-
"replay(inputTables, outputTables, [dateColumn], [timeColumn], [replayRate], [absoluteRate=true], [parallelLevel=1])"
|
|
62072
|
+
"replay(inputTables, outputTables, [dateColumn], [timeColumn], [replayRate], [absoluteRate=true], [parallelLevel=1])",
|
|
62073
|
+
""
|
|
62074
|
+
]
|
|
62075
|
+
}
|
|
62076
|
+
]
|
|
62077
|
+
},
|
|
62078
|
+
{
|
|
62079
|
+
"title": "Details",
|
|
62080
|
+
"type": "detail",
|
|
62081
|
+
"children": [
|
|
62082
|
+
{
|
|
62083
|
+
"type": "text",
|
|
62084
|
+
"value": [
|
|
62085
|
+
"Replay one or more tables or data sources to a table in chronological order to simulate real-time ingestion of streaming data. To replay historical data, use function :doc:`replayDS` to generate a data source as an input of replay.",
|
|
62086
|
+
"",
|
|
62087
|
+
"There are 3 mapping types between the *inputTables* and *outputTables*: one-to-one, N-to-one, and N-to-N. For N-to-one replay, before version 1.30.17 / 2.00.5, the schemata of the input tables must be the same, which is called homogeneous replay. Starting from version 1.30.17/2.00.5, replay supports inputting tables with different schemata in the format of a dictionary, which is called heterogeneous replay. In heterogeneous replay, the output table can be deserialized and data can be filtered and processed by ``streamFilter``. ",
|
|
62088
|
+
"",
|
|
62089
|
+
"Note: In N-to-one replay, if *inputTables* are data sources, the size of each data source and the time range of dateColumn must be consistent.",
|
|
62090
|
+
"",
|
|
62091
|
+
"To terminate the replay, use commands :doc:`../../CommandsReferences/c/cancelJob` or :doc:`../../CommandsReferences/c/cancelConsoleJob`. "
|
|
61553
62092
|
]
|
|
61554
62093
|
}
|
|
61555
62094
|
]
|
|
@@ -61561,56 +62100,44 @@
|
|
|
61561
62100
|
{
|
|
61562
62101
|
"type": "text",
|
|
61563
62102
|
"value": [
|
|
61564
|
-
"`inputTables`
|
|
62103
|
+
"`inputTables` are non-partitioned in-memory tables or data sources generated by function :doc:`replayDS`. It is",
|
|
61565
62104
|
"",
|
|
61566
|
-
"
|
|
61567
|
-
"The
|
|
61568
|
-
"If it is a vector, it is a list of the names of the shared streaming tables where the replayed data of the corresponding tables of `inputTables` are saved. ",
|
|
61569
|
-
"If it is a tuple, each element is a shared stream table where the replayed data of the corresponding table in `inputTables` are saved. ",
|
|
61570
|
-
"The schema of each table in `outputTables` must be identical as the schema of the corresponding table in `inputTables` . ",
|
|
61571
|
-
"If `outputTables` already exist, the replayed data is ingested into the tables; ",
|
|
61572
|
-
"if `outputTables` do not exist, they are not generated automatically and must be created in advance. ",
|
|
62105
|
+
"- a scalar or tuple for one or more table objects or data sources with the same schema.",
|
|
62106
|
+
"- a dictionary for multiple table objects or data sources with different schemata. The key of the dictionary is a user-defined string indicating the unique identifier of the input table, and the value is the table object or data source.",
|
|
61573
62107
|
"",
|
|
61574
|
-
"`
|
|
61575
|
-
"If dateColumn and(or) timeColumn are specified, data in the same date or in the same time is replayed in the same batch. ",
|
|
62108
|
+
"`outputTables` are in-memory tables or stream tables. If *outputTables* are shared tables, they can also be specified as sharedNames. ",
|
|
61576
62109
|
"",
|
|
61577
|
-
"
|
|
61578
|
-
"
|
|
61579
|
-
"
|
|
61580
|
-
"If there is only one temporal column in `inputTables` (most likely TIMESTAMP), we can use it for either `dateColumn` or `timeColumn`. ",
|
|
62110
|
+
"- In one-to-one replay or homogeneous replay: the *outputTables* is a table object or string scalar with the same schema of the input table.",
|
|
62111
|
+
"- In N-to-N replay: the *outputTables* is a string vector or tuple of table objects with the same length as that of *inputTables*. The *outputTables* and *inputTables* are mapped one-to-one, and each pair has the same schema.",
|
|
62112
|
+
"- In heterogeneous replay: the *outputTables* is a table containing at least three columns:",
|
|
61581
62113
|
"",
|
|
61582
|
-
"
|
|
62114
|
+
" - The first column is of TIMESTAMP type indicating the timestamp specified by *dateColumn/timeColumn*;",
|
|
62115
|
+
" - The second column is of SYMBOL or STRING type indicating the key of the dictionary specified in the *inputTables*;",
|
|
62116
|
+
" - The third column must be of BLOB type that stores the serialized result of each replayed record.",
|
|
62117
|
+
" - In addition, you can output the columns with the same column names and data types in the input tables.",
|
|
61583
62118
|
"",
|
|
61584
|
-
"
|
|
61585
|
-
" * All of them contain dates. The data types can be DATETIME, TIMESTAMP or NANOTIMESTAMP.",
|
|
62119
|
+
"`dateColumn` / `timeColumn` is the column name of the temporal column. At least one of them must be specified. ",
|
|
61586
62120
|
"",
|
|
61587
|
-
"
|
|
62121
|
+
"- In one-to-one replay or homogeneous replay: The time columns in the *inputTables* and *outputTables* must use the same name and the parameter is a string scalar.",
|
|
62122
|
+
"- In N-to-N replay: The time columns in the *inputTables* and *outputTables* use differentnames and the parameter is a string vector.",
|
|
62123
|
+
"- In N-to-one replay: The time columns in the *inputTables* and *outputTables* use different names and the parameter is a dictionary. The key of the dictionary is a user-defined string indicating the unique identifier of the input table, and the value is *dateColumn/timeColumn*.",
|
|
61588
62124
|
"",
|
|
61589
|
-
"
|
|
62125
|
+
"If *dateColumn* and *timeColum* are specified as the same column or only one of them is specified, there is no restriction on the type of the specified temporal column.",
|
|
62126
|
+
"",
|
|
62127
|
+
"If *dateColumn* and *timeColum* are specified as different columns, *dateColumn* must be DATE and *timeColum* can only be SECOND, TIME or NANOTIME.",
|
|
62128
|
+
"",
|
|
62129
|
+
"`replayRate` is an integer. Together with the parameter *absoluteRate* it determines the speed of replaying data.",
|
|
61590
62130
|
"",
|
|
61591
|
-
"
|
|
62131
|
+
"`absoluteRate` is a Boolean value. The default value is true.",
|
|
61592
62132
|
"",
|
|
61593
|
-
"
|
|
61594
|
-
"
|
|
61595
|
-
"
|
|
62133
|
+
"- If *replayRate* is a positive integer and *absoluteRate* = true, replay the specified *replayRate* records per second. Assuming that the number of records of the *inputTables* is “total” (which takes the maximum number of records in a table when replaying multiple tables), then the elapsed time of replay is roughly equal to *total/replayRate* (in seconds).",
|
|
62134
|
+
"- If *replayRate* is a positive integer, and *absoluteRate* = false, replay at *replayRate* times the original speed of the data. For example, if the difference between the maximum and the minimum values of *dateColumn* or *timeColum* is n seconds and the number of records is s, then the system replays at the speed of *replayRate * s / n* records per second (at least 1 record per second), i.e., it takes *n/replayRate* seconds to finish the replay.",
|
|
62135
|
+
"- If *replayRate* is negative or unspecified, replay at the maximum speed. The elapsed time for replay is related to the performance of the DolphinDB server.",
|
|
61596
62136
|
"",
|
|
62137
|
+
"The elapsed time of above replay modes is estimated based on homogeneous replay, whereas the elapsed time of heterogeneous replay will be slightly longer.",
|
|
61597
62138
|
"",
|
|
61598
62139
|
"`parallelLevel` is a positive integer indicating the number of threads loading data into memory from data sources simultaneously. ",
|
|
61599
|
-
"The default value is 1. If
|
|
61600
|
-
""
|
|
61601
|
-
]
|
|
61602
|
-
}
|
|
61603
|
-
]
|
|
61604
|
-
},
|
|
61605
|
-
{
|
|
61606
|
-
"title": "Details",
|
|
61607
|
-
"type": "detail",
|
|
61608
|
-
"children": [
|
|
61609
|
-
{
|
|
61610
|
-
"type": "text",
|
|
61611
|
-
"value": [
|
|
61612
|
-
"Ingest data from specified tables or data sources into streaming tables. The replayed data is sorted on `dateColumn` and `timeColumn` . ",
|
|
61613
|
-
"To terminate the replay, use commands `cancelJob` or `cancelConsoleJob` . "
|
|
62140
|
+
"The default value is 1. If *inputTables* is not a data source, there is no need to specify."
|
|
61614
62141
|
]
|
|
61615
62142
|
}
|
|
61616
62143
|
]
|
|
@@ -61792,7 +62319,62 @@
|
|
|
61792
62319
|
" $ share streamTable(200:0,`sym`date`time`volume,[SYMBOL,DATE,TIME,INT]) as st3",
|
|
61793
62320
|
" $ replay(inputTables=[ds1,ds2],outputTables=st3,dateColumn=`date,timeColumn=`time); //Replay both ds1 and ds2 to st3.",
|
|
61794
62321
|
" $ select count(*) from st3",
|
|
61795
|
-
" 2000000"
|
|
62322
|
+
" 2000000",
|
|
62323
|
+
"",
|
|
62324
|
+
"Ex 3. heterogeneous replay",
|
|
62325
|
+
""
|
|
62326
|
+
]
|
|
62327
|
+
},
|
|
62328
|
+
{
|
|
62329
|
+
"type": "code",
|
|
62330
|
+
"language": "console",
|
|
62331
|
+
"value": [
|
|
62332
|
+
""
|
|
62333
|
+
]
|
|
62334
|
+
},
|
|
62335
|
+
{
|
|
62336
|
+
"type": "text",
|
|
62337
|
+
"value": [
|
|
62338
|
+
" $ n=1000",
|
|
62339
|
+
" $ sym = take(take(`IBM,n).join(take(`GS,n)), n)",
|
|
62340
|
+
" $ myDate=take(2021.01.02..2021.01.06, n).sort!()",
|
|
62341
|
+
" $ myTime=take(09:30:00..15:59:59,n)",
|
|
62342
|
+
" $ vol = rand(100, n)",
|
|
62343
|
+
" $ t=table(sym,myDate,myTime,vol)",
|
|
62344
|
+
"",
|
|
62345
|
+
"",
|
|
62346
|
+
" $ n=1000",
|
|
62347
|
+
" $ sym = take(take(`IBM,n).join(take(`GS,n)), n)",
|
|
62348
|
+
" $ date=take(2021.01.02..2021.01.06, n).sort!()",
|
|
62349
|
+
" $ time=take(09:30:00..15:59:59,n)",
|
|
62350
|
+
" $ vol = rand(100, n)",
|
|
62351
|
+
" $ t1=table(sym, date,time,vol)",
|
|
62352
|
+
"",
|
|
62353
|
+
" $ if(existsDatabase(\"dfs://test_stock\")){",
|
|
62354
|
+
" $ dropDatabase(\"dfs://test_stock\")",
|
|
62355
|
+
" $ }",
|
|
62356
|
+
" $ db1=database(\"\",RANGE, 2021.01.01..2021.01.12)",
|
|
62357
|
+
" $ db2=database(\"\",VALUE,`IBM`GS)",
|
|
62358
|
+
" $ db=database(\"dfs://test_stock\",COMPO,[db1, db2])",
|
|
62359
|
+
" $ trades=db.createPartitionedTable(t,`trades,`myDate`sym)",
|
|
62360
|
+
" $ trades.append!(t);",
|
|
62361
|
+
" $ trades1=db.createPartitionedTable(t1,`trades1,`date`sym)",
|
|
62362
|
+
" $ trades1.append!(t1);",
|
|
62363
|
+
"",
|
|
62364
|
+
" //get the data source",
|
|
62365
|
+
"",
|
|
62366
|
+
" $ ds = replayDS(sqlObj=<select * from loadTable(db, `trades)>, dateColumn=`myDate, timeColumn=`myTime)",
|
|
62367
|
+
" $ ds.size();",
|
|
62368
|
+
"",
|
|
62369
|
+
" $ ds1 = replayDS(sqlObj=<select * from loadTable(db, `trades1)>, dateColumn=`date, timeColumn=`time)",
|
|
62370
|
+
" $ ds1.size();",
|
|
62371
|
+
"",
|
|
62372
|
+
" $ input_dict = dict([\"msg1\", \"msg2\"], [ds, ds1])",
|
|
62373
|
+
" $ date_dict = dict([\"msg1\", \"msg2\"], [`myDate, `date])",
|
|
62374
|
+
" $ time_dict = dict([\"msg1\", \"msg2\"], [`myTime, `time])",
|
|
62375
|
+
" $ opt = streamTable(100:0,`timestamp`sym`blob`vol, [DATETIME,SYMBOL, BLOB, INT])",
|
|
62376
|
+
" $ replay(inputTables=input_dict, outputTables=opt, dateColumn = date_dict, timeColumn=time_dict, replayRate=1000, absoluteRate=false);",
|
|
62377
|
+
" $ select top 10 * from opt;"
|
|
61796
62378
|
]
|
|
61797
62379
|
}
|
|
61798
62380
|
]
|
|
@@ -61826,9 +62408,7 @@
|
|
|
61826
62408
|
"",
|
|
61827
62409
|
"`dateColumn` and `timeColumn` are strings indicating the names of date and time columns of the DFS table. A data source is generated for each day of dateColumn. If neither is specified, the first column of the table object is chosen as dateColumn. If dateColumn is specified, it must be one of the partitioning columns of the DFS table. If only timeColumn is specified, it must be one of the partitioning columns of the DFS table.",
|
|
61828
62410
|
"",
|
|
61829
|
-
"`timeRepartitionSchema` is a TIME or NANOTIME type vector.
|
|
61830
|
-
"",
|
|
61831
|
-
"`timeRepartitionSchema` =[t1, t2], then there are 3 data sources within each day: [00:00:00.000,t1), [t1,t2), and [t2,23:59:59.999)."
|
|
62411
|
+
"`timeRepartitionSchema` is a TIME or NANOTIME type vector. `timeRepartitionSchema` deliminates multiple data sources based on timeColumn within each date. For example, if `timeRepartitionSchema` =[t1, t2], then there are 3 data sources within each day: [00:00:00.000,t1), [t1,t2), and [t2,23:59:59.999)."
|
|
61832
62412
|
]
|
|
61833
62413
|
}
|
|
61834
62414
|
]
|
|
@@ -61998,7 +62578,7 @@
|
|
|
61998
62578
|
{
|
|
61999
62579
|
"type": "text",
|
|
62000
62580
|
"value": [
|
|
62001
|
-
"resample(X, rule, func)"
|
|
62581
|
+
"resample(X, rule, func, [closed], [label], [origin='start_day'])"
|
|
62002
62582
|
]
|
|
62003
62583
|
}
|
|
62004
62584
|
]
|
|
@@ -62046,7 +62626,27 @@
|
|
|
62046
62626
|
"",
|
|
62047
62627
|
"The strings above can also be used with integers for parameter `rule` . For example, \"2M\" means month end every two months. ",
|
|
62048
62628
|
"",
|
|
62049
|
-
"`func` is an aggregate function. "
|
|
62629
|
+
"`func` is an aggregate function. ",
|
|
62630
|
+
"",
|
|
62631
|
+
"`closed` is a string indicating which boundary of the interval is closed.",
|
|
62632
|
+
"",
|
|
62633
|
+
"- The default value is 'left' for all values of *rule* except for 'M', 'A', 'Q', 'BM', 'BA', 'BQ', and 'W' which all have a default of 'right'.",
|
|
62634
|
+
"- The default is 'right' if *origin* is 'end' or 'end_day'.",
|
|
62635
|
+
"- For version 1.30.18/2.00.6, when the time precision of *rule* is less than day, only the default value can be used.",
|
|
62636
|
+
"",
|
|
62637
|
+
"`label` is a string indicating which boundary is used to label the interval.",
|
|
62638
|
+
"",
|
|
62639
|
+
"- The default value is 'left' for all values of *rule* except for 'M', 'A', 'Q', 'BM', 'BA', 'BQ', and 'W' which all have a default of 'right'.",
|
|
62640
|
+
"- The default is 'right' if *origin* is 'end' or 'end_day'.",
|
|
62641
|
+
"- For version 1.30.18/2.00.6, when the time precision of *rule* is less than day, only the default value can be used.",
|
|
62642
|
+
"",
|
|
62643
|
+
"`origin` is a string or a scalar of the same data type as *X*, indicating the timestamp where the intervals start. It can be 'epoch', start', 'start_day', 'end', 'end_day' or a user-defined time object. The default value is 'start_day'.",
|
|
62644
|
+
"",
|
|
62645
|
+
"- 'epoch': *origin* is 1970-01-01",
|
|
62646
|
+
"- 'start': *origin* is the first value of the timeseries",
|
|
62647
|
+
"- 'start_day': *origin* is 00:00 of the first day of the timeseries",
|
|
62648
|
+
"- 'end': *origin* is the last value of the timeseries",
|
|
62649
|
+
"- 'end_day': *origin* is 24:00 of the last day of the timeseries"
|
|
62050
62650
|
]
|
|
62051
62651
|
}
|
|
62052
62652
|
]
|
|
@@ -62129,7 +62729,98 @@
|
|
|
62129
62729
|
"|2000.07.31| | ",
|
|
62130
62730
|
"+----------+----+",
|
|
62131
62731
|
"|2000.09.30|8 |",
|
|
62132
|
-
"+----------+----+"
|
|
62732
|
+
"+----------+----+",
|
|
62733
|
+
""
|
|
62734
|
+
]
|
|
62735
|
+
},
|
|
62736
|
+
{
|
|
62737
|
+
"type": "code",
|
|
62738
|
+
"language": "console",
|
|
62739
|
+
"value": [
|
|
62740
|
+
"",
|
|
62741
|
+
" $ index = temporalAdd(2022.01.01 00:00:00,1..8,`m)",
|
|
62742
|
+
" $ s = indexedSeries(index, 1..8)",
|
|
62743
|
+
" $ s.resample(rule=`3min, func=sum);",
|
|
62744
|
+
""
|
|
62745
|
+
]
|
|
62746
|
+
},
|
|
62747
|
+
{
|
|
62748
|
+
"type": "text",
|
|
62749
|
+
"value": [
|
|
62750
|
+
"=================== ====",
|
|
62751
|
+
"label\t col1",
|
|
62752
|
+
"=================== ====",
|
|
62753
|
+
"2022.01.01T00:00:00\t3",
|
|
62754
|
+
"2022.01.01T00:03:00\t12",
|
|
62755
|
+
"2022.01.01T00:06:00\t21 ",
|
|
62756
|
+
"=================== ====",
|
|
62757
|
+
""
|
|
62758
|
+
]
|
|
62759
|
+
},
|
|
62760
|
+
{
|
|
62761
|
+
"type": "code",
|
|
62762
|
+
"language": "console",
|
|
62763
|
+
"value": [
|
|
62764
|
+
"",
|
|
62765
|
+
" $ s.resample(rule=`3min, func=sum, closed=`right);",
|
|
62766
|
+
""
|
|
62767
|
+
]
|
|
62768
|
+
},
|
|
62769
|
+
{
|
|
62770
|
+
"type": "text",
|
|
62771
|
+
"value": [
|
|
62772
|
+
"=================== ====",
|
|
62773
|
+
"label\t col1",
|
|
62774
|
+
"=================== ====",
|
|
62775
|
+
"2022.01.01T00:00:00\t6",
|
|
62776
|
+
"2022.01.01T00:03:00\t15",
|
|
62777
|
+
"2022.01.01T00:06:00\t15",
|
|
62778
|
+
"=================== ====",
|
|
62779
|
+
""
|
|
62780
|
+
]
|
|
62781
|
+
},
|
|
62782
|
+
{
|
|
62783
|
+
"type": "code",
|
|
62784
|
+
"language": "console",
|
|
62785
|
+
"value": [
|
|
62786
|
+
"",
|
|
62787
|
+
" $ s.resample(rule=`3min, func=sum, closed=`right,origin=`end);",
|
|
62788
|
+
""
|
|
62789
|
+
]
|
|
62790
|
+
},
|
|
62791
|
+
{
|
|
62792
|
+
"type": "text",
|
|
62793
|
+
"value": [
|
|
62794
|
+
"=================== ====",
|
|
62795
|
+
"label\t col1",
|
|
62796
|
+
"=================== ====",
|
|
62797
|
+
"2022.01.01T00:02:00\t1",
|
|
62798
|
+
"2022.01.01T00:05:00\t9",
|
|
62799
|
+
"2022.01.01T00:08:00\t18",
|
|
62800
|
+
"2022.01.01T00:11:00\t8",
|
|
62801
|
+
"=================== ====",
|
|
62802
|
+
""
|
|
62803
|
+
]
|
|
62804
|
+
},
|
|
62805
|
+
{
|
|
62806
|
+
"type": "code",
|
|
62807
|
+
"language": "console",
|
|
62808
|
+
"value": [
|
|
62809
|
+
"",
|
|
62810
|
+
" $ s.resample(rule=`3min, func=sum,origin=2022.10.01 00:00:10)",
|
|
62811
|
+
""
|
|
62812
|
+
]
|
|
62813
|
+
},
|
|
62814
|
+
{
|
|
62815
|
+
"type": "text",
|
|
62816
|
+
"value": [
|
|
62817
|
+
"=================== ====",
|
|
62818
|
+
"label col1",
|
|
62819
|
+
"=================== ====",
|
|
62820
|
+
"2022.01.01T00:00:10\t6",
|
|
62821
|
+
"2022.01.01T00:03:10\t15",
|
|
62822
|
+
"2022.01.01T00:06:10\t15",
|
|
62823
|
+
"=================== ===="
|
|
62133
62824
|
]
|
|
62134
62825
|
}
|
|
62135
62826
|
]
|
|
@@ -77868,7 +78559,7 @@
|
|
|
77868
78559
|
{
|
|
77869
78560
|
"type": "text",
|
|
77870
78561
|
"value": [
|
|
77871
|
-
"transFreq(X, rule)"
|
|
78562
|
+
"transFreq(X, rule, [closed], [label], [origin='start_day'])"
|
|
77872
78563
|
]
|
|
77873
78564
|
}
|
|
77874
78565
|
]
|
|
@@ -77914,7 +78605,27 @@
|
|
|
77914
78605
|
"\"N\" nanosecond",
|
|
77915
78606
|
"=========================== =================================",
|
|
77916
78607
|
"",
|
|
77917
|
-
"The strings above can also be used with integers for parameter `rule`. For example, \"2M\" means month end every two months."
|
|
78608
|
+
"The strings above can also be used with integers for parameter `rule`. For example, \"2M\" means month end every two months.",
|
|
78609
|
+
"",
|
|
78610
|
+
"`closed` is a string indicating which boundary of the interval is closed.",
|
|
78611
|
+
"",
|
|
78612
|
+
"- The default value is 'left' for all values of *rule* except for 'M', 'A', 'Q', 'BM', 'BA', 'BQ', and 'W' which all have a default of 'right'.",
|
|
78613
|
+
"- The default is 'right' if *origin* is 'end' or 'end_day'.",
|
|
78614
|
+
"- For version 1.30.18/2.00.6, when the time precision of *rule* is less than day, only the default value can be used.",
|
|
78615
|
+
"",
|
|
78616
|
+
"`label` is a string indicating which boundary is used to label the interval.",
|
|
78617
|
+
"",
|
|
78618
|
+
"- The default value is 'left' for all values of *rule* except for 'M', 'A', 'Q', 'BM', 'BA', 'BQ', and 'W' which all have a default of 'right'.",
|
|
78619
|
+
"- The default is 'right' if *origin* is 'end' or 'end_day'.",
|
|
78620
|
+
"- For version 1.30.18/2.00.6, when the time precision of *rule* is less than day, only the default value can be used.",
|
|
78621
|
+
"",
|
|
78622
|
+
"`origin` is a string or a scalar of the same data type as *X*, indicating the timestamp where the intervals start. It can be 'epoch', start', 'start_day', 'end', 'end_day' or a user-defined time object. The default value is 'start_day'.",
|
|
78623
|
+
"",
|
|
78624
|
+
"- 'epoch': *origin* is 1970-01-01",
|
|
78625
|
+
"- 'start': *origin* is the first value of the timeseries",
|
|
78626
|
+
"- 'start_day': *origin* is 00:00 of the first day of the timeseries",
|
|
78627
|
+
"- 'end': *origin* is the last value of the timeseries",
|
|
78628
|
+
"- 'end_day': *origin* is 24:00 of the last day of the timeseries"
|
|
77918
78629
|
]
|
|
77919
78630
|
}
|
|
77920
78631
|
]
|
|
@@ -77947,7 +78658,25 @@
|
|
|
77947
78658
|
" [2020.09.30,2020.12.31]",
|
|
77948
78659
|
"",
|
|
77949
78660
|
" $ transFreq(2020.08.08 2020.11.18, \"2Q\");",
|
|
77950
|
-
" [2020.09.30,2021.03.31]"
|
|
78661
|
+
" [2020.09.30,2021.03.31]",
|
|
78662
|
+
""
|
|
78663
|
+
]
|
|
78664
|
+
},
|
|
78665
|
+
{
|
|
78666
|
+
"type": "code",
|
|
78667
|
+
"language": "console",
|
|
78668
|
+
"value": [
|
|
78669
|
+
"",
|
|
78670
|
+
" $ s = temporalAdd(2022.01.01 00:00:00,1..8,`m);",
|
|
78671
|
+
"",
|
|
78672
|
+
" $ s.transFreq(rule=\"3min\");",
|
|
78673
|
+
" [2022.01.01T00:00:00,2022.01.01T00:00:00,2022.01.01T00:03:00,2022.01.01T00:03:00,2022.01.01T00:03:00,2022.01.01T00:06:00,2022.01.01T00:06:00,2022.01.01T00:06:00]",
|
|
78674
|
+
"",
|
|
78675
|
+
" $ s.transFreq(rule=`3min,closed=`right);",
|
|
78676
|
+
" [2022.01.01T00:00:00,2022.01.01T00:00:00,2022.01.01T00:00:00,2022.01.01T00:03:00,2022.01.01T00:03:00,2022.01.01T00:03:00,2022.01.01T00:06:00,2022.01.01T00:06:00]",
|
|
78677
|
+
" ",
|
|
78678
|
+
" $ s.transFreq(rule=`3min,closed=`right,origin=`end);",
|
|
78679
|
+
" [2021.12.31T23:59:00,2021.12.31T23:59:00,2022.01.01T00:02:00,2022.01.01T00:02:00,2022.01.01T00:02:00,2022.01.01T00:05:00,2022.01.01T00:05:00,2022.01.01T00:05:00]"
|
|
77951
78680
|
]
|
|
77952
78681
|
}
|
|
77953
78682
|
]
|