Table of Contents | ||||||
---|---|---|---|---|---|---|
|
This API creates a data lake for the user to use. Define the Tag of the data lake to be created, its extended columns and Values, and its definite columns. And, don't forget to design well in advance because the data structure determined in this way cannot be changed. The last created Data Lake incurs an immediate cost, so call it with cautionfunction is an improved method supported by Machlake. The tag name, time, and each value are sent in plain JSON format. However, since this JSON consists of an array of values, inserting data is faster and less expensive.
HTTP Request
Paste code macro | ||||
---|---|---|---|---|
| ||||
POST https://api.machlakemachbasecloud.com/v3/lakes/{lake_id}/values/bulk Content-Type: application/json; charset=utf8 x-api-key: {API Key} { "lakedate_infoformat" : { "lake_name" : "{lake_name{date_format}", "lake_tiervalues" : "{lake_tier}", "lake_type" : "{lake_type}", "owner" : "{owner}" }, "tag_schema" : [ { "col_name" : "{column name}", "col_type" : "{column type}", "col_length" : "{column length}" }, ...... ], "value_schema" : [ { "col_name" : "{column name}", "col_type" : "{column type}", "col_length" : "{column length}" }, ...... ] } |
Parameters
...
Prerequisites
...
Key
...
Type
...
Description
...
lake_name
...
string
...
lake name
...
lake_type
...
string
...
Type of Lake
N or M, Can be omitted
(N when omitted)
...
lake_tier
...
string
...
free / basic / small / enterprise
...
owner
...
string
...
Lake's Owner
(When omitted, the user who calls the API)
...
Optional
...
Key
...
Type
...
Description
...
tag_schema
...
JSON
...
additional columns for this lake's Tag meta col_name : column name col_type : column type (long or string) col_length : if string type, assign length
...
value_schema
...
JSON
...
[["{tag_name1}", "{time1}", {value1}], ["(tag_name2}", "{time2}", {value2}], ... ]
} |
Parameters
no parameters
Request Example
Paste code macro | ||||
---|---|---|---|---|
| ||||
POST https://api.machlakemachbasecloud.com/v3/lakes/lake01/values/bulk Content-Type: application/json; charset=utf8 x-api-key: {API Key} { "lakedate_infoformat" : { "lake_name" : "My Lake"YYYY-MM-DD HH24:MI:SS", "values" "lake_tier" : "free",[ ["lake_type" : "Ntag_01", "owner" : "user01" "2021-07-06 12:12:25", 1625.0], }, ["tag_schema02", : ["2021-07-06 12:12:26", 1627.0], { "col_name" : "corr-X", "col_type" : "long" ["tag_02", "2021-07-06 12:12:27", 1629.0] ] } } |
Response Example
Paste code macro | ||||
---|---|---|---|---|
| ||||
Status 200 ],{ "value_schemastatus" : ["success", { "col_name" : "testcol","data": { "col_type" fail": "string"0, "col_lengthsuccess" : 1283 } ] } |
Response Example
Paste code macro | ||||
---|---|---|---|---|
| ||||
Status 200 |