From 35ad0817843286c88f2808cc1fd013553bc52dec Mon Sep 17 00:00:00 2001 From: caoliang-web <71004656+caoliang-web@users.noreply.github.com> Date: Thu, 18 May 2023 08:36:39 +0800 Subject: [PATCH] [typo](doc)Example of adding stream load import to current time (#19760) --- .../Load/STREAM-LOAD.md | 22 +++++++++++++++++++ .../Load/STREAM-LOAD.md | 17 ++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Load/STREAM-LOAD.md b/docs/en/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Load/STREAM-LOAD.md index a3ae25ee67..9170c9eae3 100644 --- a/docs/en/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Load/STREAM-LOAD.md +++ b/docs/en/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Load/STREAM-LOAD.md @@ -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 diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Load/STREAM-LOAD.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Load/STREAM-LOAD.md index ca9976d9d5..639393b4eb 100644 --- a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Load/STREAM-LOAD.md +++ b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Load/STREAM-LOAD.md @@ -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