...
...
...
...
...
...
...
...
...
...
...
...
...
...
그래서, 별도로 본인들의 lake를 구성할 수 있는 여지를 줘야합니다.
변경된 url과 sample반영해야 함.
note
Info |
---|
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 caution. |
...
...
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Info |
---|
이 API는 새 Datalake를 생성한다. Lake를 생성할 때 기본 데이터인 tag_name, time, value외의 추가 칼럼을 지정할 수 있다. 한번 생성한 lake의 추가 칼럼값들을 변경할 수 없으므로 lake를 생성할때 주의를 기울여야 한다. 데이터레이크를 생성하면 추가 비용이 발생한다. 자세한 내용은 링크에 기술되어 있다. |
HTTP Request
|
...
Prerequisites | ||||
---|---|---|---|---|
Key | Type | Description | ||
lake_name | stringlake name | 생성할 lake의 식별자 | ||
lake_plan | string | tiny / basic / business/ enterprise | ||
owner | stringLake | 's OwnerLake의 소유주 (When omitted, the user who calls the API생략한 경우, API를 호출한 사용자) | ||
region | string | AWS region name | ||
timezone | string | |||
storage_size | int | Storage size | ||
tag_schema | JSON | Columns for this lake's Tag meta. Each column have the three sub component: Lake의 tag meta에 저장될 칼럼 스키마. 스키마 정보에는 다음의 3가지 칼럼을 갖는다. col_name, col_type, col_length. col_name : column name메타 칼럼 이름 col_type : column type메타 칼럼 타입
col_length : if varchar type, assign the max length of column문자열의 경우 길이를 지정해야 한다. (예제)
The data type of the first column , 첫 번째 메타 칼럼의 데이터 타입, 즉 “col_type” must be “varchar”.But, additional meta column can have any data type”은 “varchar”를 지정해야 한다. 추가로 지정한 메타 칼럼의 데이터 타입은 다른 형으로 지정이 가능하다. | ||
value_schema | JSON | Columns for this lake’s values. In this field, you have to assign two essential columns for time and default value. The first column datatype must be “datetime”. The second column datatype must be “double” keeping numeric data as defaultLake에 저장될 데이터들의 칼럼 메타정보를 지정한다. 이 메타정보에서 두개의 필수 칼럼정보를 지정해야 한다. 이는 시간과 기본 센서값이다. 첫번째 필수 칼럼은 “datetime”으로 데이터 입력시간을 지정해야 하며, 두번째 칼럼의 데이터 타입은 반드시 “double” 타입으로 지정해야 한다.
However, beginning with the third column information, you can have the option of specifying additional column information세번째 칼럼 이후에는 원하는 타입으로 메타 정보를 추가하면 된다. |
Request Example
...
Code Block |
---|
POST https://aws1.us.machlake.com/lakes
Content-Type: application/json; charset=utf8
x-api-key: {API Key}
{
"lake_info" : {
"lake_name" : "My Lake",
"lake_plan" : "basic",
"owner" : "user01",
"region" : "us-east-1",
"timezone" : "America/Los_Angeles",
"storage_size" : 60
},
"tag_schema" : [
{
"col_name" : "name",
"col_type" : "varchar",
"col_length" : 40
}
],
"value_schema" : [
{
"col_name" : "time",
"col_type" : "datetime"
},
{
"col_name" : "value",
"col_type" : "double"
}
]
}
|
Response Example
...
Code Block |
---|
Status 200
{
"status": true,
"data" : {lake id}
}
|
Sample Code
...
Code Block |
---|
POST https://aws1.us.machlake.com/lakes
Content-Type: application/json; charset=utf8
x-api-key: {API Key}
{
"lake_info" : {
"lake_name" : "My Lake",
"lake_plan" : "basic",
"owner" : "user01",
"region" : "us-east-1",
"timezone" : "America/Los_Angeles",
"storage_size" : 60
},
"tag_schema" : [
{
"col_name" : "name",
"col_type" : "varchar",
"col_length" : 40
}
],
"value_schema" : [
{
"col_name" : "time",
"col_type" : "datetime"
},
{
"col_name" : "value",
"col_type" : "double"
}
]
} |
Response Example
Code Block |
---|
Status 200
{
"status": true,
"data" : {lake id}
} |
Sample Code
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
...