dolphindb 2.0.974 → 2.0.976
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.js +2 -4
- package/browser.js.map +1 -1
- package/docs.en.json +60 -821
- package/docs.zh.json +65 -286
- package/index.js +2 -4
- package/index.js.map +1 -1
- package/language.js +1 -21
- package/language.js.map +1 -1
- package/package.json +8 -8
- package/shared/constants.js +5 -5
- package/shared/constants.js.map +1 -1
package/docs.en.json
CHANGED
|
@@ -13950,7 +13950,10 @@
|
|
|
13950
13950
|
"",
|
|
13951
13951
|
"`partitionColumns` a string or a string vector indicating the partitioning column(s). For a composite partition, partitionColumns is a string vector.",
|
|
13952
13952
|
"",
|
|
13953
|
-
"`compressMethods` a dictionary indicating which compression methods are used for specified columns. The keys are columns name and the values are compression methods (\"lz4\" or \"delta\"). If unspecified, use LZ4 compression method. Please note
|
|
13953
|
+
"`compressMethods` a dictionary indicating which compression methods are used for specified columns. The keys are columns name and the values are compression methods (\"lz4\" or \"delta\"). If unspecified, use LZ4 compression method. Please note: ",
|
|
13954
|
+
"",
|
|
13955
|
+
"* The delta compression method can be used for DECIMAL, SHORT, INT, LONG or temporal data types.",
|
|
13956
|
+
"* Save strings as SYMBOL type to enable compression of strings. ",
|
|
13954
13957
|
"",
|
|
13955
13958
|
"`sortColumns` is a STRING scalar/vector that specifies the columns to sort the ingested data within each partition. The sort columns must be of integral, temporal, string, or symbol type. Note that *sortColumns* is not necessarily consistent with the partitioning column.",
|
|
13956
13959
|
"",
|
|
@@ -63814,88 +63817,6 @@
|
|
|
63814
63817
|
}
|
|
63815
63818
|
]
|
|
63816
63819
|
},
|
|
63817
|
-
"publishTable": {
|
|
63818
|
-
"title": "publishTable",
|
|
63819
|
-
"type": "function",
|
|
63820
|
-
"children": [
|
|
63821
|
-
{
|
|
63822
|
-
"title": "Syntax",
|
|
63823
|
-
"type": "grammer",
|
|
63824
|
-
"children": [
|
|
63825
|
-
{
|
|
63826
|
-
"type": "text",
|
|
63827
|
-
"value": [
|
|
63828
|
-
"publishTable(host, port, tableName, [actionName], [offset=-1], [filter], [allowExists=false])"
|
|
63829
|
-
]
|
|
63830
|
-
}
|
|
63831
|
-
]
|
|
63832
|
-
},
|
|
63833
|
-
{
|
|
63834
|
-
"title": "Details",
|
|
63835
|
-
"type": "detail",
|
|
63836
|
-
"children": [
|
|
63837
|
-
{
|
|
63838
|
-
"type": "text",
|
|
63839
|
-
"value": [
|
|
63840
|
-
"This function is executed on the server where the stream table is located. It instructs the server to publish data from a stream table to a client. The client may or may not be a DolphinDB data node or API. In comparison, when we use function :doc:`../s/subscribeTable`, the client must be a DolphinDB data node.",
|
|
63841
|
-
"",
|
|
63842
|
-
"This function returns a string vector, including the list of column names of the stream table.",
|
|
63843
|
-
"",
|
|
63844
|
-
"The function throws an exception if the specified table doesn't exist or it is not a stream table, or if the subscription already exists on the client and allowExists=false.",
|
|
63845
|
-
"",
|
|
63846
|
-
"Use command :doc:`/FunctionsandCommands/CommandsReferences/s/stopPublishTable` to stop publishing data. ",
|
|
63847
|
-
""
|
|
63848
|
-
]
|
|
63849
|
-
}
|
|
63850
|
-
]
|
|
63851
|
-
},
|
|
63852
|
-
{
|
|
63853
|
-
"title": "Arguments",
|
|
63854
|
-
"type": "parameters",
|
|
63855
|
-
"children": [
|
|
63856
|
-
{
|
|
63857
|
-
"type": "text",
|
|
63858
|
-
"value": [
|
|
63859
|
-
"`host` the host name of the client node.",
|
|
63860
|
-
"",
|
|
63861
|
-
"`port` the subscription port number of the client. If the client is the DolphinDB data node, *port* is specified by the parameter *subPort*. If the client is an API, *port* is subscription port number enabled by the client.",
|
|
63862
|
-
"",
|
|
63863
|
-
"`tableName` a string indicating the name of the shared stream table on the local server.",
|
|
63864
|
-
"",
|
|
63865
|
-
"`actionName` a string indicating the name assigned to the subscription task. It can have letters, digits and underscores.",
|
|
63866
|
-
"",
|
|
63867
|
-
"`offset` the position of the first message to subscribe. A message is row of the stream table. If offset is unspecified, or negative, or above the number of rows of the stream table, the subscription starts from the next incoming record. The offset is relative to the first row of the stream table when it is created. If some rows were cleared from memory due to cache size limit, they are still considered in determining where the subscription starts.",
|
|
63868
|
-
"",
|
|
63869
|
-
"`filter` a vector of selected values in the filtering column. Only the messages with specified filtering column values are published. The filtering column is set with function :doc:`/FunctionsandCommands/CommandsReferences/s/setStreamTableFilterColumn`. filter does not support Boolean types.",
|
|
63870
|
-
"",
|
|
63871
|
-
"`allowExists` a Boolean value. When `allowExists`\\=true, if the subscription already exists before function ``publishTable`` is executed, the system will not throw an exception. ",
|
|
63872
|
-
"",
|
|
63873
|
-
"`resetOffset` a Boolean value indicating whether to reset the *offset* to -1, the default value is false. When resetOffset = true, the *offset* will be reset if the row specified by the *offset* in the stream table has no data and the subscription will start from the next incoming record."
|
|
63874
|
-
]
|
|
63875
|
-
}
|
|
63876
|
-
]
|
|
63877
|
-
},
|
|
63878
|
-
{
|
|
63879
|
-
"title": "Examples",
|
|
63880
|
-
"type": "example",
|
|
63881
|
-
"children": [
|
|
63882
|
-
{
|
|
63883
|
-
"type": "code",
|
|
63884
|
-
"language": "console",
|
|
63885
|
-
"value": [
|
|
63886
|
-
"",
|
|
63887
|
-
" $ n=100000",
|
|
63888
|
-
" $ t=streamTable(rand(100,n) as id, rand(100.0,n) as val)",
|
|
63889
|
-
" $ share t as st;",
|
|
63890
|
-
"",
|
|
63891
|
-
" $ publishTable(\"localhost\",8848,\"st\");",
|
|
63892
|
-
" [\"id\",\"val\"]"
|
|
63893
|
-
]
|
|
63894
|
-
}
|
|
63895
|
-
]
|
|
63896
|
-
}
|
|
63897
|
-
]
|
|
63898
|
-
},
|
|
63899
63820
|
"push!": {
|
|
63900
63821
|
"title": "push!",
|
|
63901
63822
|
"type": "function",
|
|
@@ -69593,8 +69514,8 @@
|
|
|
69593
69514
|
}
|
|
69594
69515
|
]
|
|
69595
69516
|
},
|
|
69596
|
-
"
|
|
69597
|
-
"title": "
|
|
69517
|
+
"replayDS": {
|
|
69518
|
+
"title": "replayDS",
|
|
69598
69519
|
"type": "function",
|
|
69599
69520
|
"children": [
|
|
69600
69521
|
{
|
|
@@ -69604,26 +69525,7 @@
|
|
|
69604
69525
|
{
|
|
69605
69526
|
"type": "text",
|
|
69606
69527
|
"value": [
|
|
69607
|
-
"
|
|
69608
|
-
""
|
|
69609
|
-
]
|
|
69610
|
-
}
|
|
69611
|
-
]
|
|
69612
|
-
},
|
|
69613
|
-
{
|
|
69614
|
-
"title": "Details",
|
|
69615
|
-
"type": "detail",
|
|
69616
|
-
"children": [
|
|
69617
|
-
{
|
|
69618
|
-
"type": "text",
|
|
69619
|
-
"value": [
|
|
69620
|
-
"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.",
|
|
69621
|
-
"",
|
|
69622
|
-
"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``. ",
|
|
69623
|
-
"",
|
|
69624
|
-
"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.",
|
|
69625
|
-
"",
|
|
69626
|
-
"To terminate the replay, use commands :doc:`../../CommandsReferences/c/cancelJob` or :doc:`../../CommandsReferences/c/cancelConsoleJob`. "
|
|
69528
|
+
"replayDS(sqlObj, [dateColumn], [timeColumn], [timeRepartitionSchema])"
|
|
69627
69529
|
]
|
|
69628
69530
|
}
|
|
69629
69531
|
]
|
|
@@ -69635,318 +69537,25 @@
|
|
|
69635
69537
|
{
|
|
69636
69538
|
"type": "text",
|
|
69637
69539
|
"value": [
|
|
69638
|
-
"`
|
|
69639
|
-
"",
|
|
69640
|
-
"- a scalar or tuple for one or more table objects or data sources with the same schema.",
|
|
69641
|
-
"- 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.",
|
|
69642
|
-
"",
|
|
69643
|
-
"`outputTables` are in-memory tables or stream tables. If *outputTables* are shared tables, they can also be specified as sharedNames. ",
|
|
69644
|
-
"",
|
|
69645
|
-
"- 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.",
|
|
69646
|
-
"- 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.",
|
|
69647
|
-
"- In heterogeneous replay: the *outputTables* is a table containing at least three columns:",
|
|
69648
|
-
"",
|
|
69649
|
-
" - The first column is of TIMESTAMP type indicating the timestamp specified by *dateColumn/timeColumn*;",
|
|
69650
|
-
" - The second column is of SYMBOL or STRING type indicating the key of the dictionary specified in the *inputTables*;",
|
|
69651
|
-
" - The third column must be of BLOB type that stores the serialized result of each replayed record.",
|
|
69652
|
-
" - In addition, you can output the columns with the same column names and data types in the input tables.",
|
|
69653
|
-
"",
|
|
69654
|
-
"`dateColumn` / `timeColumn` is the column name of the temporal column. At least one of them must be specified. ",
|
|
69655
|
-
"",
|
|
69656
|
-
"- 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.",
|
|
69657
|
-
"- In N-to-N replay: The time columns in the *inputTables* and *outputTables* use differentnames and the parameter is a string vector.",
|
|
69658
|
-
"- 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*.",
|
|
69659
|
-
"",
|
|
69660
|
-
"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.",
|
|
69661
|
-
"",
|
|
69662
|
-
"If *dateColumn* and *timeColum* are specified as different columns, *dateColumn* must be DATE and *timeColum* can only be SECOND, TIME or NANOTIME.",
|
|
69663
|
-
"",
|
|
69664
|
-
"`replayRate` is an integer. Together with the parameter *absoluteRate* it determines the speed of replaying data.",
|
|
69665
|
-
"",
|
|
69666
|
-
"`absoluteRate` is a Boolean value. The default value is true.",
|
|
69667
|
-
"",
|
|
69668
|
-
"- 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).",
|
|
69669
|
-
"- 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.",
|
|
69670
|
-
"- 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.",
|
|
69671
|
-
"",
|
|
69672
|
-
"The elapsed time of above replay modes is estimated based on homogeneous replay, whereas the elapsed time of heterogeneous replay will be slightly longer.",
|
|
69673
|
-
"",
|
|
69674
|
-
"`parallelLevel` is a positive integer indicating the number of threads loading data into memory from data sources simultaneously. ",
|
|
69675
|
-
"The default value is 1. If *inputTables* is not a data source, there is no need to specify."
|
|
69676
|
-
]
|
|
69677
|
-
}
|
|
69678
|
-
]
|
|
69679
|
-
},
|
|
69680
|
-
{
|
|
69681
|
-
"title": "Examples",
|
|
69682
|
-
"type": "example",
|
|
69683
|
-
"children": [
|
|
69684
|
-
{
|
|
69685
|
-
"type": "text",
|
|
69686
|
-
"value": [
|
|
69687
|
-
"Ex 1. Replay a table:",
|
|
69688
|
-
""
|
|
69689
|
-
]
|
|
69690
|
-
},
|
|
69691
|
-
{
|
|
69692
|
-
"type": "code",
|
|
69693
|
-
"language": "console",
|
|
69694
|
-
"value": [
|
|
69695
|
-
""
|
|
69696
|
-
]
|
|
69697
|
-
},
|
|
69698
|
-
{
|
|
69699
|
-
"type": "text",
|
|
69700
|
-
"value": [
|
|
69701
|
-
" $ n=1000",
|
|
69702
|
-
" $ sym = take(`IBM,n)",
|
|
69703
|
-
" $ timestamp= take(temporalAdd(2012.12.06T09:30:12.000,1..500,'s'),n)",
|
|
69704
|
-
" $ volume = rand(100,n)",
|
|
69705
|
-
" $ trades=table(sym,timestamp,volume)",
|
|
69706
|
-
" $ trades.sortBy!(`timestamp)",
|
|
69707
|
-
" $ share streamTable(100:0,`sym`timestamp`volume,[SYMBOL,TIMESTAMP,INT]) as st",
|
|
69708
|
-
"",
|
|
69709
|
-
"Replay 100 records per second:",
|
|
69710
|
-
""
|
|
69711
|
-
]
|
|
69712
|
-
},
|
|
69713
|
-
{
|
|
69714
|
-
"type": "code",
|
|
69715
|
-
"language": "console",
|
|
69716
|
-
"value": [
|
|
69717
|
-
""
|
|
69718
|
-
]
|
|
69719
|
-
},
|
|
69720
|
-
{
|
|
69721
|
-
"type": "text",
|
|
69722
|
-
"value": [
|
|
69723
|
-
" $ timer replay(inputTables=trades, outputTables=st, dateColumn=`timestamp, timeColumn=`timestamp,replayRate=100, absoluteRate=true);",
|
|
69724
|
-
" Time elapsed: 10001.195 ms",
|
|
69725
|
-
"",
|
|
69726
|
-
"Replay at 100 times of the original speed of the data:",
|
|
69727
|
-
""
|
|
69728
|
-
]
|
|
69729
|
-
},
|
|
69730
|
-
{
|
|
69731
|
-
"type": "code",
|
|
69732
|
-
"language": "console",
|
|
69733
|
-
"value": [
|
|
69734
|
-
""
|
|
69735
|
-
]
|
|
69736
|
-
},
|
|
69737
|
-
{
|
|
69738
|
-
"type": "text",
|
|
69739
|
-
"value": [
|
|
69740
|
-
" $ timer replay(inputTables=trades,outputTables=st,dateColumn=`timestamp,timeColumn=`timestamp,replayRate=100,absoluteRate=false);",
|
|
69741
|
-
" Time elapsed: 5001.909 ms",
|
|
69742
|
-
"",
|
|
69743
|
-
"Replay at the maximum speed:",
|
|
69744
|
-
""
|
|
69745
|
-
]
|
|
69746
|
-
},
|
|
69747
|
-
{
|
|
69748
|
-
"type": "code",
|
|
69749
|
-
"language": "console",
|
|
69750
|
-
"value": [
|
|
69751
|
-
""
|
|
69752
|
-
]
|
|
69753
|
-
},
|
|
69754
|
-
{
|
|
69755
|
-
"type": "text",
|
|
69756
|
-
"value": [
|
|
69757
|
-
" $ timer replay(inputTables=trades,outputTables=st,dateColumn=`timestamp,timeColumn=`timestamp);",
|
|
69758
|
-
" Time elapsed: 2.026 ms",
|
|
69759
|
-
"",
|
|
69760
|
-
"Ex 2. Replay multiple data sources to one or more output tables.",
|
|
69761
|
-
""
|
|
69762
|
-
]
|
|
69763
|
-
},
|
|
69764
|
-
{
|
|
69765
|
-
"type": "code",
|
|
69766
|
-
"language": "console",
|
|
69767
|
-
"value": [
|
|
69768
|
-
""
|
|
69769
|
-
]
|
|
69770
|
-
},
|
|
69771
|
-
{
|
|
69772
|
-
"type": "text",
|
|
69773
|
-
"value": [
|
|
69774
|
-
" $ n=5000000",
|
|
69775
|
-
" $ sym = rand(symbol(`IBM`APPL`MSFT`GOOG`GS),n)",
|
|
69776
|
-
" $ date=take(2012.06.12..2012.06.16,n)",
|
|
69777
|
-
" $ time=rand(13:30:11.008..13:30:11.012,n)",
|
|
69778
|
-
" $ volume = rand(100,n)",
|
|
69779
|
-
" $ t=table(sym,date,time,volume)",
|
|
69780
|
-
" $ if(existsDatabase(\"dfs://test_stock\")){",
|
|
69781
|
-
" $ dropDatabase(\"dfs://test_stock\")",
|
|
69782
|
-
" $ }",
|
|
69783
|
-
" $ db=database(\"dfs://test_stock\",VALUE,2012.06.12..2012.06.16)",
|
|
69784
|
-
" $ trades=db.createPartitionedTable(t,`trades,`date)",
|
|
69785
|
-
" $ trades.append!(t)",
|
|
69786
|
-
"",
|
|
69787
|
-
" $ share streamTable(100:0,`sym`date`time`volume,[SYMBOL,DATE,TIME,INT]) as st1",
|
|
69788
|
-
" $ share streamTable(100:0,`sym`date`time`volume,[SYMBOL,DATE,TIME,INT]) as st2",
|
|
69789
|
-
"",
|
|
69790
|
-
" $ ds1=replayDS(sqlObj=<select * from trades where date=2012.06.12>,dateColumn=`date,timeColumn=`time,timeRepartitionSchema=[13:30:11.008,13:30:11.010,13:30:11.013])",
|
|
69791
|
-
" $ ds2=replayDS(sqlObj=<select * from trades where date=2012.06.16>,dateColumn=`date,timeColumn=`time,timeRepartitionSchema=[13:30:11.008,13:30:11.010,13:30:11.013])",
|
|
69792
|
-
"",
|
|
69793
|
-
" $ replay(inputTables=[ds1,ds2],outputTables=[st1,st2],dateColumn=`date,timeColumn=`time); //Replay ds1 and ds2 to st1 and st2 respectively.",
|
|
69794
|
-
" $ select * from st1;",
|
|
69795
|
-
"",
|
|
69796
|
-
"===== ========== ============ =========",
|
|
69797
|
-
"sym date time price ",
|
|
69798
|
-
"===== ========== ============ =========",
|
|
69799
|
-
"GOOG 2012.06.12 13:30:11.008 80.257105",
|
|
69800
|
-
"MSFT 2012.06.12 13:30:11.008 19.509125",
|
|
69801
|
-
"MSFT 2012.06.12 13:30:11.008 16.856134",
|
|
69802
|
-
"GS 2012.06.12 13:30:11.008 77.784879",
|
|
69803
|
-
"MSFT 2012.06.12 13:30:11.008 33.182977",
|
|
69804
|
-
"GOOG 2012.06.12 13:30:11.008 0.411022",
|
|
69805
|
-
"IBM 2012.06.12 13:30:11.008 64.201467",
|
|
69806
|
-
"GS 2012.06.12 13:30:11.008 2.961122",
|
|
69807
|
-
"GOOG 2012.06.12 13:30:11.008 19.06283",
|
|
69808
|
-
"IBM 2012.06.12 13:30:11.008 9.793819",
|
|
69809
|
-
"...",
|
|
69810
|
-
"===== ========== ============ =========",
|
|
69811
|
-
""
|
|
69812
|
-
]
|
|
69813
|
-
},
|
|
69814
|
-
{
|
|
69815
|
-
"type": "code",
|
|
69816
|
-
"language": "console",
|
|
69817
|
-
"value": [
|
|
69818
|
-
""
|
|
69819
|
-
]
|
|
69820
|
-
},
|
|
69821
|
-
{
|
|
69822
|
-
"type": "text",
|
|
69823
|
-
"value": [
|
|
69824
|
-
" $ select * from st2;",
|
|
69825
|
-
"",
|
|
69826
|
-
"===== ========== ============ =========",
|
|
69827
|
-
"sym date time price ",
|
|
69828
|
-
"===== ========== ============ =========",
|
|
69829
|
-
"GS 2012.06.16 13:30:11.008 65.34449",
|
|
69830
|
-
"GS 2012.06.16 13:30:11.008 69.313035",
|
|
69831
|
-
"GOOG 2012.06.16 13:30:11.008 83.343602",
|
|
69832
|
-
"IBM 2012.06.16 13:30:11.008 1.09428 ",
|
|
69833
|
-
"APPL 2012.06.16 13:30:11.008 37.420217",
|
|
69834
|
-
"APPL 2012.06.16 13:30:11.008 29.142734",
|
|
69835
|
-
"IBM 2012.06.16 13:30:11.008 81.364092",
|
|
69836
|
-
"GS 2012.06.16 13:30:11.008 94.248142",
|
|
69837
|
-
"GS 2012.06.16 13:30:11.008 35.037498",
|
|
69838
|
-
"GS 2012.06.16 13:30:11.008 19.514272",
|
|
69839
|
-
"...",
|
|
69840
|
-
"===== ========== ============ =========",
|
|
69841
|
-
""
|
|
69842
|
-
]
|
|
69843
|
-
},
|
|
69844
|
-
{
|
|
69845
|
-
"type": "code",
|
|
69846
|
-
"language": "console",
|
|
69847
|
-
"value": [
|
|
69848
|
-
""
|
|
69849
|
-
]
|
|
69850
|
-
},
|
|
69851
|
-
{
|
|
69852
|
-
"type": "text",
|
|
69853
|
-
"value": [
|
|
69854
|
-
" $ share streamTable(200:0,`sym`date`time`volume,[SYMBOL,DATE,TIME,INT]) as st3",
|
|
69855
|
-
" $ replay(inputTables=[ds1,ds2],outputTables=st3,dateColumn=`date,timeColumn=`time); //Replay both ds1 and ds2 to st3.",
|
|
69856
|
-
" $ select count(*) from st3",
|
|
69857
|
-
" 2000000",
|
|
69858
|
-
"",
|
|
69859
|
-
"",
|
|
69860
|
-
"Ex 3. heterogeneous replay",
|
|
69861
|
-
""
|
|
69862
|
-
]
|
|
69863
|
-
},
|
|
69864
|
-
{
|
|
69865
|
-
"type": "code",
|
|
69866
|
-
"language": "console",
|
|
69867
|
-
"value": [
|
|
69868
|
-
""
|
|
69869
|
-
]
|
|
69870
|
-
},
|
|
69871
|
-
{
|
|
69872
|
-
"type": "text",
|
|
69873
|
-
"value": [
|
|
69874
|
-
" $ n=1000",
|
|
69875
|
-
" $ sym = take(take(`IBM,n).join(take(`GS,n)), n)",
|
|
69876
|
-
" $ myDate=take(2021.01.02..2021.01.06, n).sort!()",
|
|
69877
|
-
" $ myTime=take(09:30:00..15:59:59,n)",
|
|
69878
|
-
" $ vol = array(INT[], 0, 10)",
|
|
69879
|
-
" $ for(i in 0:n){vol.append!([rand(100,3)])}",
|
|
69880
|
-
" $ t=table(sym,myDate,myTime,vol)",
|
|
69881
|
-
"",
|
|
69882
|
-
"",
|
|
69883
|
-
" $ n=1000",
|
|
69884
|
-
" $ sym = take(take(`IBM,n).join(take(`GS,n)), n)",
|
|
69885
|
-
" $ date=take(2021.01.02..2021.01.06, n).sort!()",
|
|
69886
|
-
" $ time=take(09:30:00..15:59:59,n)",
|
|
69887
|
-
" $ vol = array(INT[], 0, 10)",
|
|
69888
|
-
" $ for(i in 0:n){vol.append!([rand(100,3)])}",
|
|
69889
|
-
" $ t1=table(sym, date,time,vol)",
|
|
69890
|
-
"",
|
|
69891
|
-
" $ if(existsDatabase(\"dfs://test_stock\")){",
|
|
69892
|
-
" $ dropDatabase(\"dfs://test_stock\")",
|
|
69893
|
-
" $}",
|
|
69894
|
-
" $ db1=database(\"\",RANGE, 2021.01.01..2021.01.12)",
|
|
69895
|
-
" $ db2=database(\"\",VALUE,`IBM`GS)",
|
|
69896
|
-
" $ db=database(\"dfs://test_stock\",COMPO,[db1, db2], engine=\"TSDB\")",
|
|
69897
|
-
" $ trades=db.createPartitionedTable(t,`trades,`myDate`sym, sortColumns=`sym`myDate`myTime)",
|
|
69898
|
-
" $ trades.append!(t);",
|
|
69899
|
-
" $ trades1=db.createPartitionedTable(t1,`trades1,`date`sym, sortColumns=`sym`date`time)",
|
|
69900
|
-
" $ trades1.append!(t1);",
|
|
69901
|
-
"",
|
|
69902
|
-
" //get the data source",
|
|
69903
|
-
"",
|
|
69904
|
-
" $ ds = replayDS(sqlObj=<select * from loadTable(db, `trades)>, dateColumn=`myDate, timeColumn=`myTime)",
|
|
69905
|
-
" $ ds.size();",
|
|
69540
|
+
"`sqlObj` is metacode with SQL statements. The table object in the SQL statement is a DFS table and must use a DATE type column as one of the partitioning columns. ",
|
|
69906
69541
|
"",
|
|
69907
|
-
"
|
|
69908
|
-
" $ ds1.size();",
|
|
69542
|
+
"`dateColumn` must be a time column of the table queried by the SQL statement, based on which the data is sorted. It can be of DATE (most commonly used), MONTH or other temporal types. If *dateColumn* is specified, it must be one of the partitioning columns of the DFS table. Data sources are generated based on the time precision of the *dateColumn*, e.g., if the *dateColumn* is partitioned by day, the data source is also divided by day.",
|
|
69909
69543
|
"",
|
|
69910
|
-
"
|
|
69911
|
-
" $ date_dict = dict([\"msg1\", \"msg2\"], [`myDate, `date])",
|
|
69912
|
-
" $ time_dict = dict([\"msg1\", \"msg2\"], [`myTime, `time])",
|
|
69913
|
-
" $ opt = streamTable(100:0,`timestamp`sym`blob`vol, [DATETIME,SYMBOL, BLOB, INT[]])",
|
|
69914
|
-
" $ replay(inputTables=input_dict, outputTables=opt, dateColumn = date_dict, timeColumn=time_dict, replayRate=1000, absoluteRate=false);",
|
|
69915
|
-
" $ select top 10 * from opt;"
|
|
69916
|
-
]
|
|
69917
|
-
}
|
|
69918
|
-
]
|
|
69919
|
-
}
|
|
69920
|
-
]
|
|
69921
|
-
},
|
|
69922
|
-
"replayDS": {
|
|
69923
|
-
"title": "replayDS",
|
|
69924
|
-
"type": "function",
|
|
69925
|
-
"children": [
|
|
69926
|
-
{
|
|
69927
|
-
"title": "Syntax",
|
|
69928
|
-
"type": "grammer",
|
|
69929
|
-
"children": [
|
|
69930
|
-
{
|
|
69931
|
-
"type": "text",
|
|
69932
|
-
"value": [
|
|
69933
|
-
"replayDS(sqlObj, [dateColumn], [timeColumn], [timeRepartitionSchema])"
|
|
69544
|
+
"`timeColumn` must be a time column of the table queried by the SQL statement, based on which the data is sorted. If *dateColumn* is of DATE type, you can further deliminate data sources by specifying *timeColumn* as SECOND, TIME or NANOTIME type."
|
|
69934
69545
|
]
|
|
69935
69546
|
}
|
|
69936
69547
|
]
|
|
69937
69548
|
},
|
|
69938
69549
|
{
|
|
69939
|
-
"title": "
|
|
69940
|
-
"type": "parameters",
|
|
69550
|
+
"title": "Note",
|
|
69941
69551
|
"children": [
|
|
69942
69552
|
{
|
|
69943
69553
|
"type": "text",
|
|
69944
69554
|
"value": [
|
|
69945
|
-
"
|
|
69555
|
+
"- Currently, parameters *dateColumn* and *timeColumn* do not support DATEHOUR type.",
|
|
69556
|
+
"- If *dateColumn* is not specified, the first column of the table object is treated as the date column.",
|
|
69946
69557
|
"",
|
|
69947
|
-
"`
|
|
69948
|
-
"",
|
|
69949
|
-
"`timeRepartitionSchema` is a vector of temporal type. *timeRepartitionSchema* deliminates multiple data sources based on timeColumn within each date. For example, if *timeRepartitionSchema* =[t1, t2, t3], then there are 4 data sources within each day: [00:00:00.000,t1), [t1,t2), [t2,t3), and [t3,23:59:59.999)."
|
|
69558
|
+
"`timeRepartitionSchema` is a vector of temporal type. If *timeColumn* is specified, *timeRepartitionSchema* deliminates multiple data sources based on *timeColumn*. For example, if timeRepartitionSchema =[t1, t2, t3], then there are 4 data sources within each day: [00:00:00.000,t1), [t1,t2), [t2,t3), and [t3,23:59:59.999)."
|
|
69950
69559
|
]
|
|
69951
69560
|
}
|
|
69952
69561
|
]
|
|
@@ -69958,7 +69567,9 @@
|
|
|
69958
69567
|
{
|
|
69959
69568
|
"type": "text",
|
|
69960
69569
|
"value": [
|
|
69961
|
-
"
|
|
69570
|
+
"Generates a tuple of data sources from a DFS table (queried by a SQL statement) based on its time columns. It can be further divided by the parameters *timeColumn* and *timeRepartitionSchema*.",
|
|
69571
|
+
"",
|
|
69572
|
+
"It is used as the inputs of function `replay`. To replay a DFS table, the `replay`` function must be conjuncted with the `replayDS`` function."
|
|
69962
69573
|
]
|
|
69963
69574
|
}
|
|
69964
69575
|
]
|
|
@@ -80399,333 +80010,6 @@
|
|
|
80399
80010
|
}
|
|
80400
80011
|
]
|
|
80401
80012
|
},
|
|
80402
|
-
"slice": {
|
|
80403
|
-
"title": "slice",
|
|
80404
|
-
"type": "function",
|
|
80405
|
-
"children": [
|
|
80406
|
-
{
|
|
80407
|
-
"title": "Syntax",
|
|
80408
|
-
"type": "grammer",
|
|
80409
|
-
"children": [
|
|
80410
|
-
{
|
|
80411
|
-
"type": "text",
|
|
80412
|
-
"value": [
|
|
80413
|
-
"slice(obj, index)",
|
|
80414
|
-
"",
|
|
80415
|
-
"or",
|
|
80416
|
-
"",
|
|
80417
|
-
"slice(obj, rowIndex, [colIndex])"
|
|
80418
|
-
]
|
|
80419
|
-
}
|
|
80420
|
-
]
|
|
80421
|
-
},
|
|
80422
|
-
{
|
|
80423
|
-
"title": "Arguments",
|
|
80424
|
-
"type": "parameters",
|
|
80425
|
-
"children": [
|
|
80426
|
-
{
|
|
80427
|
-
"type": "text",
|
|
80428
|
-
"value": [
|
|
80429
|
-
"`obj` is a matrix or a table."
|
|
80430
|
-
]
|
|
80431
|
-
}
|
|
80432
|
-
]
|
|
80433
|
-
},
|
|
80434
|
-
{
|
|
80435
|
-
"title": "Details",
|
|
80436
|
-
"type": "detail",
|
|
80437
|
-
"children": [
|
|
80438
|
-
{
|
|
80439
|
-
"type": "text",
|
|
80440
|
-
"value": [
|
|
80441
|
-
"For slice(obj, index):",
|
|
80442
|
-
"",
|
|
80443
|
-
"",
|
|
80444
|
-
" * If obj is a matrix:",
|
|
80445
|
-
"",
|
|
80446
|
-
" * If index is a scalar, return a vector indicating a column.",
|
|
80447
|
-
"",
|
|
80448
|
-
" * If index is a vector or a pair, return a matrix of selected columns.",
|
|
80449
|
-
"",
|
|
80450
|
-
"",
|
|
80451
|
-
" * If obj is a table:",
|
|
80452
|
-
"",
|
|
80453
|
-
" * If index is a scalar, return a dictionary indicating a row. ",
|
|
80454
|
-
"",
|
|
80455
|
-
" * If index is a vector or a pair, return a table of selected rows.",
|
|
80456
|
-
"",
|
|
80457
|
-
"",
|
|
80458
|
-
"For slice(obj, rowIndex, [colIndex]):",
|
|
80459
|
-
"",
|
|
80460
|
-
"",
|
|
80461
|
-
" * If obj is a matrix:",
|
|
80462
|
-
"",
|
|
80463
|
-
" * If rowIndex and colIndex are both scalars, return a scalar indicating the value of specified element of the matrix.",
|
|
80464
|
-
"",
|
|
80465
|
-
" * If rowIndex and colIndex are both vectors or pairs, return a matrix of selected rows and columns.",
|
|
80466
|
-
"",
|
|
80467
|
-
"",
|
|
80468
|
-
" * If obj is a table:",
|
|
80469
|
-
"",
|
|
80470
|
-
" * If rowIndex and colIndex are both scalars, return a scalar indicating the value of specified element of the table.",
|
|
80471
|
-
"",
|
|
80472
|
-
" * If rowIndex and colIndex are both vectors or pairs, return a table of selected rows and columns.",
|
|
80473
|
-
"",
|
|
80474
|
-
"To get a particular row or column from a table, consider using function :doc:`../c/col` or :doc:`../r/row`."
|
|
80475
|
-
]
|
|
80476
|
-
}
|
|
80477
|
-
]
|
|
80478
|
-
},
|
|
80479
|
-
{
|
|
80480
|
-
"title": "Examples",
|
|
80481
|
-
"type": "example",
|
|
80482
|
-
"children": [
|
|
80483
|
-
{
|
|
80484
|
-
"type": "text",
|
|
80485
|
-
"value": [
|
|
80486
|
-
"If obj is a matrix:",
|
|
80487
|
-
""
|
|
80488
|
-
]
|
|
80489
|
-
},
|
|
80490
|
-
{
|
|
80491
|
-
"type": "code",
|
|
80492
|
-
"language": "console",
|
|
80493
|
-
"value": [
|
|
80494
|
-
"",
|
|
80495
|
-
" $ m=1..9$3:3",
|
|
80496
|
-
" m.slice(0);",
|
|
80497
|
-
" [1,2,3]",
|
|
80498
|
-
" ",
|
|
80499
|
-
" $ m.slice([0]);",
|
|
80500
|
-
""
|
|
80501
|
-
]
|
|
80502
|
-
},
|
|
80503
|
-
{
|
|
80504
|
-
"type": "text",
|
|
80505
|
-
"value": [
|
|
80506
|
-
"+---+",
|
|
80507
|
-
"|#0 |",
|
|
80508
|
-
"+===+",
|
|
80509
|
-
"|1 |",
|
|
80510
|
-
"+---+",
|
|
80511
|
-
"|2 |",
|
|
80512
|
-
"+---+",
|
|
80513
|
-
"|3 | ",
|
|
80514
|
-
"+---+",
|
|
80515
|
-
""
|
|
80516
|
-
]
|
|
80517
|
-
},
|
|
80518
|
-
{
|
|
80519
|
-
"type": "code",
|
|
80520
|
-
"language": "console",
|
|
80521
|
-
"value": [
|
|
80522
|
-
"",
|
|
80523
|
-
" $ m.slice(0:2);",
|
|
80524
|
-
""
|
|
80525
|
-
]
|
|
80526
|
-
},
|
|
80527
|
-
{
|
|
80528
|
-
"type": "text",
|
|
80529
|
-
"value": [
|
|
80530
|
-
"=== ===",
|
|
80531
|
-
"#0 #1",
|
|
80532
|
-
"=== ===",
|
|
80533
|
-
"1 4",
|
|
80534
|
-
"2 5",
|
|
80535
|
-
"3 6 ",
|
|
80536
|
-
"=== ===",
|
|
80537
|
-
""
|
|
80538
|
-
]
|
|
80539
|
-
},
|
|
80540
|
-
{
|
|
80541
|
-
"type": "code",
|
|
80542
|
-
"language": "console",
|
|
80543
|
-
"value": [
|
|
80544
|
-
"",
|
|
80545
|
-
" $ m.slice(0 2);",
|
|
80546
|
-
""
|
|
80547
|
-
]
|
|
80548
|
-
},
|
|
80549
|
-
{
|
|
80550
|
-
"type": "text",
|
|
80551
|
-
"value": [
|
|
80552
|
-
"=== ===",
|
|
80553
|
-
"#0 #1",
|
|
80554
|
-
"=== ===",
|
|
80555
|
-
"1 7",
|
|
80556
|
-
"2 8",
|
|
80557
|
-
"3 9 ",
|
|
80558
|
-
"=== ===",
|
|
80559
|
-
""
|
|
80560
|
-
]
|
|
80561
|
-
},
|
|
80562
|
-
{
|
|
80563
|
-
"type": "code",
|
|
80564
|
-
"language": "console",
|
|
80565
|
-
"value": [
|
|
80566
|
-
"",
|
|
80567
|
-
" $ m.slice(0,1);",
|
|
80568
|
-
" 4",
|
|
80569
|
-
"",
|
|
80570
|
-
" $ m.slice(0 1,0 1);",
|
|
80571
|
-
""
|
|
80572
|
-
]
|
|
80573
|
-
},
|
|
80574
|
-
{
|
|
80575
|
-
"type": "text",
|
|
80576
|
-
"value": [
|
|
80577
|
-
"=== ===",
|
|
80578
|
-
"#0 #1",
|
|
80579
|
-
"=== ===",
|
|
80580
|
-
"1 4",
|
|
80581
|
-
"2 5",
|
|
80582
|
-
"=== ===",
|
|
80583
|
-
"",
|
|
80584
|
-
""
|
|
80585
|
-
]
|
|
80586
|
-
},
|
|
80587
|
-
{
|
|
80588
|
-
"type": "code",
|
|
80589
|
-
"language": "console",
|
|
80590
|
-
"value": [
|
|
80591
|
-
"",
|
|
80592
|
-
" $ m.slice(1:2,1:2);",
|
|
80593
|
-
""
|
|
80594
|
-
]
|
|
80595
|
-
},
|
|
80596
|
-
{
|
|
80597
|
-
"type": "text",
|
|
80598
|
-
"value": [
|
|
80599
|
-
"+---+",
|
|
80600
|
-
"|#0 | ",
|
|
80601
|
-
"+===+",
|
|
80602
|
-
"|5 | ",
|
|
80603
|
-
"+---+",
|
|
80604
|
-
"",
|
|
80605
|
-
"",
|
|
80606
|
-
"If obj is a table:",
|
|
80607
|
-
""
|
|
80608
|
-
]
|
|
80609
|
-
},
|
|
80610
|
-
{
|
|
80611
|
-
"type": "code",
|
|
80612
|
-
"language": "console",
|
|
80613
|
-
"value": [
|
|
80614
|
-
"",
|
|
80615
|
-
" $ t=table(`A`B`C as sym,2018.01.01..2018.01.03 as date,10 48 5 as val)",
|
|
80616
|
-
" t.slice(0);",
|
|
80617
|
-
" val->10",
|
|
80618
|
-
" date->2018.01.01",
|
|
80619
|
-
" sym->A",
|
|
80620
|
-
" t.slice([0]);",
|
|
80621
|
-
""
|
|
80622
|
-
]
|
|
80623
|
-
},
|
|
80624
|
-
{
|
|
80625
|
-
"type": "text",
|
|
80626
|
-
"value": [
|
|
80627
|
-
"=== ========== === ",
|
|
80628
|
-
"sym date val",
|
|
80629
|
-
"=== ========== === ",
|
|
80630
|
-
"A 2018.01.01 10",
|
|
80631
|
-
"=== ========== === ",
|
|
80632
|
-
""
|
|
80633
|
-
]
|
|
80634
|
-
},
|
|
80635
|
-
{
|
|
80636
|
-
"type": "code",
|
|
80637
|
-
"language": "console",
|
|
80638
|
-
"value": [
|
|
80639
|
-
"",
|
|
80640
|
-
" $ t.slice(0 1);",
|
|
80641
|
-
""
|
|
80642
|
-
]
|
|
80643
|
-
},
|
|
80644
|
-
{
|
|
80645
|
-
"type": "text",
|
|
80646
|
-
"value": [
|
|
80647
|
-
"=== ========== === ",
|
|
80648
|
-
"sym date val",
|
|
80649
|
-
"=== ========== === ",
|
|
80650
|
-
"A 2018.01.01 10",
|
|
80651
|
-
"B 2018.01.02 48 ",
|
|
80652
|
-
"=== ========== === ",
|
|
80653
|
-
""
|
|
80654
|
-
]
|
|
80655
|
-
},
|
|
80656
|
-
{
|
|
80657
|
-
"type": "code",
|
|
80658
|
-
"language": "console",
|
|
80659
|
-
"value": [
|
|
80660
|
-
"",
|
|
80661
|
-
" $ t.slice(0:1);",
|
|
80662
|
-
""
|
|
80663
|
-
]
|
|
80664
|
-
},
|
|
80665
|
-
{
|
|
80666
|
-
"type": "text",
|
|
80667
|
-
"value": [
|
|
80668
|
-
"=== ========== === ",
|
|
80669
|
-
"sym date val",
|
|
80670
|
-
"=== ========== === ",
|
|
80671
|
-
"A 2018.01.01 10 ",
|
|
80672
|
-
"=== ========== === ",
|
|
80673
|
-
""
|
|
80674
|
-
]
|
|
80675
|
-
},
|
|
80676
|
-
{
|
|
80677
|
-
"type": "code",
|
|
80678
|
-
"language": "console",
|
|
80679
|
-
"value": [
|
|
80680
|
-
"",
|
|
80681
|
-
" $ t.slice(0,1);",
|
|
80682
|
-
" 2018.01.01",
|
|
80683
|
-
"",
|
|
80684
|
-
" $ t.slice(0 1,0 1);",
|
|
80685
|
-
""
|
|
80686
|
-
]
|
|
80687
|
-
},
|
|
80688
|
-
{
|
|
80689
|
-
"type": "text",
|
|
80690
|
-
"value": [
|
|
80691
|
-
"=== ========== ",
|
|
80692
|
-
"sym date ",
|
|
80693
|
-
"=== ========== ",
|
|
80694
|
-
"A 2018.01.01",
|
|
80695
|
-
"B 2018.01.02",
|
|
80696
|
-
"=== ==========",
|
|
80697
|
-
"",
|
|
80698
|
-
"",
|
|
80699
|
-
""
|
|
80700
|
-
]
|
|
80701
|
-
},
|
|
80702
|
-
{
|
|
80703
|
-
"type": "code",
|
|
80704
|
-
"language": "console",
|
|
80705
|
-
"value": [
|
|
80706
|
-
"",
|
|
80707
|
-
" $ t.slice(1:2,1:2);",
|
|
80708
|
-
""
|
|
80709
|
-
]
|
|
80710
|
-
},
|
|
80711
|
-
{
|
|
80712
|
-
"type": "text",
|
|
80713
|
-
"value": [
|
|
80714
|
-
"+----------+",
|
|
80715
|
-
"|date | ",
|
|
80716
|
-
"+==========+",
|
|
80717
|
-
"|2018.01.02|",
|
|
80718
|
-
"+----------+",
|
|
80719
|
-
"",
|
|
80720
|
-
"",
|
|
80721
|
-
"",
|
|
80722
|
-
""
|
|
80723
|
-
]
|
|
80724
|
-
}
|
|
80725
|
-
]
|
|
80726
|
-
}
|
|
80727
|
-
]
|
|
80728
|
-
},
|
|
80729
80013
|
"sliceByKey": {
|
|
80730
80014
|
"title": "sliceByKey",
|
|
80731
80015
|
"type": "function",
|
|
@@ -82273,7 +81557,7 @@
|
|
|
82273
81557
|
"",
|
|
82274
81558
|
"`table` can be an in-memory table or a distributed table.",
|
|
82275
81559
|
"",
|
|
82276
|
-
"`update` is a metacode indicating the updating operation.",
|
|
81560
|
+
"`update` is a metacode or a tuple of metacode, indicating the updating operation.",
|
|
82277
81561
|
"",
|
|
82278
81562
|
"`from` is a metacode indicating the table join operation.",
|
|
82279
81563
|
"",
|
|
@@ -82323,14 +81607,17 @@
|
|
|
82323
81607
|
{
|
|
82324
81608
|
"type": "text",
|
|
82325
81609
|
"value": [
|
|
82326
|
-
"
|
|
82327
|
-
"symbol
|
|
82328
|
-
"
|
|
82329
|
-
"A
|
|
82330
|
-
"
|
|
82331
|
-
"
|
|
82332
|
-
"
|
|
82333
|
-
"
|
|
81610
|
+
"====== ========== ===== =============",
|
|
81611
|
+
"symbol date price updatedPrice",
|
|
81612
|
+
"====== ========== ===== =============",
|
|
81613
|
+
"A 2021.04.15 12 24",
|
|
81614
|
+
"",
|
|
81615
|
+
"A 2021.04.16 13 26",
|
|
81616
|
+
"",
|
|
81617
|
+
"B 2021.04.15 21 42",
|
|
81618
|
+
"",
|
|
81619
|
+
"B 2021.04.16 22 44",
|
|
81620
|
+
"====== ========== ===== =============",
|
|
82334
81621
|
""
|
|
82335
81622
|
]
|
|
82336
81623
|
},
|
|
@@ -82339,7 +81626,7 @@
|
|
|
82339
81626
|
"language": "console",
|
|
82340
81627
|
"value": [
|
|
82341
81628
|
"",
|
|
82342
|
-
" $ sqlUpdate(table=t1, updates
|
|
81629
|
+
" $ sqlUpdate(table=t1, updates=[<price*10 as updatedPrice>,<price*20 as updatedPrice2>]).eval()",
|
|
82343
81630
|
" $ t1;",
|
|
82344
81631
|
""
|
|
82345
81632
|
]
|
|
@@ -82347,14 +81634,14 @@
|
|
|
82347
81634
|
{
|
|
82348
81635
|
"type": "text",
|
|
82349
81636
|
"value": [
|
|
82350
|
-
"
|
|
82351
|
-
"symbol
|
|
82352
|
-
"
|
|
82353
|
-
"A
|
|
82354
|
-
"A
|
|
82355
|
-
"B
|
|
82356
|
-
"B
|
|
82357
|
-
"
|
|
81637
|
+
"====== ========== ===== ============= =============",
|
|
81638
|
+
"symbol date price updatedPrice updatedPrice2",
|
|
81639
|
+
"====== ========== ===== ============= =============",
|
|
81640
|
+
"A 2021.04.15 12 120 240",
|
|
81641
|
+
"A 2021.04.16 13 130 260",
|
|
81642
|
+
"B 2021.04.15 21 210 420",
|
|
81643
|
+
"B 2021.04.16 22 220 440",
|
|
81644
|
+
"====== ========== ===== ============= =============",
|
|
82358
81645
|
""
|
|
82359
81646
|
]
|
|
82360
81647
|
},
|
|
@@ -82372,14 +81659,17 @@
|
|
|
82372
81659
|
{
|
|
82373
81660
|
"type": "text",
|
|
82374
81661
|
"value": [
|
|
82375
|
-
"
|
|
82376
|
-
"symbol
|
|
82377
|
-
"
|
|
82378
|
-
"A
|
|
82379
|
-
"
|
|
82380
|
-
"
|
|
82381
|
-
"
|
|
82382
|
-
"
|
|
81662
|
+
"====== ========== ====== =============",
|
|
81663
|
+
"symbol date volume cumVolume",
|
|
81664
|
+
"====== ========== ====== =============",
|
|
81665
|
+
"A 2021.04.15 10 10",
|
|
81666
|
+
"",
|
|
81667
|
+
"A 2021.04.16 20 30",
|
|
81668
|
+
"",
|
|
81669
|
+
"B 2021.04.15 30 30",
|
|
81670
|
+
"",
|
|
81671
|
+
"B 2021.04.16 40 70",
|
|
81672
|
+
"====== ========== ====== =============",
|
|
82383
81673
|
""
|
|
82384
81674
|
]
|
|
82385
81675
|
},
|
|
@@ -82397,14 +81687,17 @@
|
|
|
82397
81687
|
{
|
|
82398
81688
|
"type": "text",
|
|
82399
81689
|
"value": [
|
|
82400
|
-
"
|
|
82401
|
-
"symbol
|
|
82402
|
-
"
|
|
82403
|
-
"A
|
|
82404
|
-
"
|
|
82405
|
-
"
|
|
82406
|
-
"
|
|
82407
|
-
"
|
|
81690
|
+
"====== ========== ===== ============ ============",
|
|
81691
|
+
"symbol date price updatedPrice dollarVolume",
|
|
81692
|
+
"====== ========== ===== ============ ============",
|
|
81693
|
+
"A 2021.04.15 12 120 1200",
|
|
81694
|
+
"",
|
|
81695
|
+
"A 2021.04.16 13 130 2600",
|
|
81696
|
+
"",
|
|
81697
|
+
"B 2021.04.15 21 42 1260",
|
|
81698
|
+
"",
|
|
81699
|
+
"B 2021.04.16 22 44 1760",
|
|
81700
|
+
"====== ========== ===== ============ ============",
|
|
82408
81701
|
"",
|
|
82409
81702
|
"Example 2. Update a distributed table",
|
|
82410
81703
|
""
|
|
@@ -83294,58 +82587,6 @@
|
|
|
83294
82587
|
}
|
|
83295
82588
|
]
|
|
83296
82589
|
},
|
|
83297
|
-
"stopPublishTable": {
|
|
83298
|
-
"title": "stopPublishTable",
|
|
83299
|
-
"type": "command",
|
|
83300
|
-
"children": [
|
|
83301
|
-
{
|
|
83302
|
-
"title": "Syntax",
|
|
83303
|
-
"type": "grammer",
|
|
83304
|
-
"children": [
|
|
83305
|
-
{
|
|
83306
|
-
"type": "text",
|
|
83307
|
-
"value": [
|
|
83308
|
-
"stopPublishTable(host, port, tableName, [actionName])"
|
|
83309
|
-
]
|
|
83310
|
-
}
|
|
83311
|
-
]
|
|
83312
|
-
},
|
|
83313
|
-
{
|
|
83314
|
-
"title": "Arguments",
|
|
83315
|
-
"type": "parameters",
|
|
83316
|
-
"children": [
|
|
83317
|
-
{
|
|
83318
|
-
"type": "text",
|
|
83319
|
-
"value": [
|
|
83320
|
-
"`host` the host name of the client node.",
|
|
83321
|
-
"",
|
|
83322
|
-
"`port` the subscription port number of the client node specified by the parameter `subPort`.",
|
|
83323
|
-
"",
|
|
83324
|
-
"`tableName` a string indicating the name of the shared stream table on the local server.",
|
|
83325
|
-
"",
|
|
83326
|
-
"`actionName` a string indicating the name assigned to the subscription task. It can have letters, digits and underscores. "
|
|
83327
|
-
]
|
|
83328
|
-
}
|
|
83329
|
-
]
|
|
83330
|
-
},
|
|
83331
|
-
{
|
|
83332
|
-
"title": "Details",
|
|
83333
|
-
"type": "detail",
|
|
83334
|
-
"children": [
|
|
83335
|
-
{
|
|
83336
|
-
"type": "text",
|
|
83337
|
-
"value": [
|
|
83338
|
-
"This command is executed on the server where the stream table is located. It instructs the server to stop publishing data from a stream table to a client.",
|
|
83339
|
-
"",
|
|
83340
|
-
"If the specified table doesn't exist or it is not a stream table, the function throws an exception. If the client has already stopped the subscription, it will throw an exception too.",
|
|
83341
|
-
"",
|
|
83342
|
-
"Related function :doc:`../../FunctionReferences/p/publishTable`"
|
|
83343
|
-
]
|
|
83344
|
-
}
|
|
83345
|
-
]
|
|
83346
|
-
}
|
|
83347
|
-
]
|
|
83348
|
-
},
|
|
83349
82590
|
"strReplace": {
|
|
83350
82591
|
"title": "strReplace",
|
|
83351
82592
|
"type": "function",
|
|
@@ -94660,8 +93901,6 @@
|
|
|
94660
93901
|
"value": [
|
|
94661
93902
|
"Stop subscribing to data from the publisher. All messages of the topic in the message queue of the execution thread will be deleted.",
|
|
94662
93903
|
"",
|
|
94663
|
-
"This command is called on client node. It first calls command :doc:`../s/stopPublishTable` on the given server to cancel publishing data and then removes all data structure regarding this subscription on the client node.",
|
|
94664
|
-
"",
|
|
94665
93904
|
"When ``unsubscribeTable`` is called, unprocessed messages in the queue of the stream execution thread will be deleted."
|
|
94666
93905
|
]
|
|
94667
93906
|
}
|