[typo](doc)Example of adding stream load import to current time (#19760)

This commit is contained in:
caoliang-web
2023-05-18 08:36:39 +08:00
committed by GitHub
parent 5fa956b0d6
commit 35ad081784
2 changed files with 39 additions and 0 deletions

View File

@ -338,6 +338,28 @@ ERRORS:
curl --location-trusted -u root -T test.csv -H "label:1" -H "format:csv_with_names" -H "column_separator:," http://host:port/api/testDb/testTbl/_stream_load
```
17. Import data into a table whose table field contains DEFAULT CURRENT_TIMESTAMP
Table Structure:
```sql
`id` bigint(30) NOT NULL,
`order_code` varchar(30) DEFAULT NULL COMMENT '',
`create_time` datetimev2(3) DEFAULT CURRENT_TIMESTAMP
```
JSON data format:
```
{"id":1,"order_Code":"avc"}
```
Import command:
```
curl --location-trusted -u root -T test.json -H "label:1" -H "format:json" -H 'columns: id, order_code, create_time=CURRENT_TIMESTAMP()' http://host:port/api/testDb/testTbl/_stream_load
```
### Keywords
STREAM, LOAD

View File

@ -327,7 +327,24 @@ ERRORS:
```
curl --location-trusted -u root -T test.csv -H "label:1" -H "format:csv_with_names" -H "column_separator:," http://host:port/api/testDb/testTbl/_stream_load
```
17. 导入数据到表字段含有DEFAULT CURRENT_TIMESTAMP的表中
表结构:
```sql
`id` bigint(30) NOT NULL,
`order_code` varchar(30) DEFAULT NULL COMMENT '',
`create_time` datetimev2(3) DEFAULT CURRENT_TIMESTAMP
```
json数据格式:
```
{"id":1,"order_Code":"avc"}
```
导入命令:
```
curl --location-trusted -u root -T test.json -H "label:1" -H "format:json" -H 'columns: id, order_code, create_time=CURRENT_TIMESTAMP()' http://host:port/api/testDb/testTbl/_stream_load
```
### Keywords
STREAM, LOAD