From ffdd904c9a9cd7c312eb0596e0cca0b77f244c1b Mon Sep 17 00:00:00 2001 From: Yiran Date: Tue, 12 Nov 2024 17:12:27 +0800 Subject: [PATCH] add example link --- docs/user-guide/ingest-data/for-iot/grpc-sdks/go.md | 6 ++++-- docs/user-guide/ingest-data/for-iot/grpc-sdks/java.md | 4 ++-- .../current/user-guide/ingest-data/for-iot/grpc-sdks/go.md | 6 ++++-- .../user-guide/ingest-data/for-iot/grpc-sdks/java.md | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/user-guide/ingest-data/for-iot/grpc-sdks/go.md b/docs/user-guide/ingest-data/for-iot/grpc-sdks/go.md index c81014106..9fca96472 100644 --- a/docs/user-guide/ingest-data/for-iot/grpc-sdks/go.md +++ b/docs/user-guide/ingest-data/for-iot/grpc-sdks/go.md @@ -239,7 +239,7 @@ attributes := Attributes{ Location: "factory-1" } jsonData, err := json.Marshal(attributes) sensorReadings.AddRow(... , string(jsonData)) -// Write data +// The following code for writing data is omitted // ... ``` @@ -266,10 +266,12 @@ sensor := SensorReadings{ Attributes: string(jsonData), } -// Write data +// The following code for writing data is omitted // ... ``` +For the executable code for inserting JSON data, please refer to the [example](https://github.com/GreptimeTeam/greptimedb-ingester-go/tree/main/examples/jsondata) in the SDK repository. +
diff --git a/docs/user-guide/ingest-data/for-iot/grpc-sdks/java.md b/docs/user-guide/ingest-data/for-iot/grpc-sdks/java.md index 8098145c2..d8617a433 100644 --- a/docs/user-guide/ingest-data/for-iot/grpc-sdks/java.md +++ b/docs/user-guide/ingest-data/for-iot/grpc-sdks/java.md @@ -323,7 +323,7 @@ TableSchema sensorReadings = TableSchema.newBuilder("sensor_readings") // Add JSON data as a string value sensorReadings.addRow(... , "{\"location\":\"factory-1\"}"); -// Insert data +// The following code for writing data is omitted // ... ``` @@ -346,7 +346,7 @@ Sensor sensor = new Sensor(); sensor.setAttributes("{\"action\":\"running\"}"); -// Insert data +// The following code for writing data is omitted // ... ``` diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/go.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/go.md index 7f5a36a68..19b5df4f5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/go.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/go.md @@ -216,7 +216,7 @@ attributes := Attributes{ Location: "factory-1" } jsonData, err := json.Marshal(attributes) sensorReadings.AddRow(... , string(jsonData)) -// 写入数据 +// 以下省略了写入数据的代码 // ... ``` @@ -243,10 +243,12 @@ sensor := SensorReadings{ Attributes: string(jsonData), } -// 写入数据 +// 以下省略了写入数据的代码 // ... ``` +请参考 SDK 仓库中的[示例](https://github.com/GreptimeTeam/greptimedb-ingester-go/tree/main/examples/jsondata) 获取插入 JSON 数据的可执行代码。 +
diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/java.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/java.md index 3ff62ccf7..9f7d594a2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/java.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/java.md @@ -314,7 +314,7 @@ TableSchema sensorReadings = TableSchema.newBuilder("sensor_readings") // 使用字符串值添加 JSON 数据 sensorReadings.addRow(... , "{\"location\":\"factory-1\"}"); -// 插入数据 +// 以下省略了写入数据的代码 // ... ``` @@ -336,7 +336,7 @@ Sensor sensor = new Sensor(); // 使用字符串值添加 JSON 数据 sensor.setAttributes("{\"action\":\"running\"}"); -// 插入数据 +// 以下省略了写入数据的代码 // ... ```