From 2450531f0a15d275188622bd18901a058aa489e0 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:53:24 +0900 Subject: [PATCH 1/8] fix option name --- src/cli/record/import.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli/record/import.ts b/src/cli/record/import.ts index 7932bff29b..0abb1712ef 100644 --- a/src/cli/record/import.ts +++ b/src/cli/record/import.ts @@ -46,7 +46,7 @@ const builder = (args: yargs.Argv) => type: "string", requiresArg: true, }) - .option("use-server-side-upsert", { + .option("experimental-use-server-side-upsert", { describe: "Use server-side upsert. This option is under early development.", type: "boolean", @@ -71,7 +71,7 @@ const handler = (args: Args) => { filePath: args["file-path"], updateKey: args["update-key"], fields: args.fields?.split(","), - useServerSideUpsert: args["use-server-side-upsert"], + useServerSideUpsert: args["experimental-use-server-side-upsert"], encoding: args.encoding, pfxFilePath: args["pfx-file-path"], pfxFilePassword: args["pfx-file-password"], From 4b3c502de079ec24846014235a5d92240e508083 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:05:35 +0900 Subject: [PATCH 2/8] add use-server-side-upsert doc --- .../blog/2025-01-16-cli-kintone-v1-13-0.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 website/blog/2025-01-16-cli-kintone-v1-13-0.md diff --git a/website/blog/2025-01-16-cli-kintone-v1-13-0.md b/website/blog/2025-01-16-cli-kintone-v1-13-0.md new file mode 100644 index 0000000000..e4f5caeacd --- /dev/null +++ b/website/blog/2025-01-16-cli-kintone-v1-13-0.md @@ -0,0 +1,30 @@ +--- +slug: cli-kintone-v1-12-3 +title: cli-kintone v1.12.3 +authors: [tasshi, extensions-platform-team] +tags: [release] +--- + +We are happy to announce the release of **cli-kintone v1.13.0** πŸŽ‰ + +## What's new? + +### The `--experimental-use-server-side-upsert` option is now available with the record import command (Experimental) + +We have implemented the `--experimental-use-server-side-upsert` option, which executes the record import command using [the upsert option of the bulk record update API](https://cybozu.dev/ja/kintone/docs/rest-api/records/update-records/) + +Previously, cli-kintone implemented its own upsert mode, but by using `--experimental-use-server-side-upsert`, there is a possibility that the performance of the record import command will improve. + +Specify as follows. + +``` +$ cli-kintone record import --base-url http://localhost --app xxx \ + --api-token xxx \ + --file-path import.csv \ + --update-key レコードη•ͺ号 \ + --experimental-use-server-side-upsert +``` + +## Miscellaneous + +See the [changelog](https://github.com/kintone/cli-kintone/blob/main/CHANGELOG.md#1130-2025-01-16) for an exhaustive list of changes. From b99c233e7f89e42e399e8f9cc3d3f4dc822fe8a7 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:10:32 +0900 Subject: [PATCH 3/8] fix metadata --- website/blog/2025-01-16-cli-kintone-v1-13-0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/blog/2025-01-16-cli-kintone-v1-13-0.md b/website/blog/2025-01-16-cli-kintone-v1-13-0.md index e4f5caeacd..e7ea947400 100644 --- a/website/blog/2025-01-16-cli-kintone-v1-13-0.md +++ b/website/blog/2025-01-16-cli-kintone-v1-13-0.md @@ -1,7 +1,7 @@ --- -slug: cli-kintone-v1-12-3 -title: cli-kintone v1.12.3 -authors: [tasshi, extensions-platform-team] +slug: cli-kintone-v1-13-0 +title: cli-kintone v1.13.0 +authors: [extensions-platform-team] tags: [release] --- From 30bbcef0b161fd52484cc8b0435a141127b900f2 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:15:49 +0900 Subject: [PATCH 4/8] prettier --write --- website/blog/2025-01-16-cli-kintone-v1-13-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2025-01-16-cli-kintone-v1-13-0.md b/website/blog/2025-01-16-cli-kintone-v1-13-0.md index e7ea947400..b5a4f1a893 100644 --- a/website/blog/2025-01-16-cli-kintone-v1-13-0.md +++ b/website/blog/2025-01-16-cli-kintone-v1-13-0.md @@ -20,7 +20,7 @@ Specify as follows. ``` $ cli-kintone record import --base-url http://localhost --app xxx \ --api-token xxx \ - --file-path import.csv \ + --file-path import.csv \ --update-key レコードη•ͺ号 \ --experimental-use-server-side-upsert ``` From 1f17d68387a703773388bd6f3cfa86eccab74642 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:25:08 +0900 Subject: [PATCH 5/8] The wording has been corrected. --- website/blog/2025-01-16-cli-kintone-v1-13-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2025-01-16-cli-kintone-v1-13-0.md b/website/blog/2025-01-16-cli-kintone-v1-13-0.md index b5a4f1a893..39092a83e6 100644 --- a/website/blog/2025-01-16-cli-kintone-v1-13-0.md +++ b/website/blog/2025-01-16-cli-kintone-v1-13-0.md @@ -13,7 +13,7 @@ We are happy to announce the release of **cli-kintone v1.13.0** πŸŽ‰ We have implemented the `--experimental-use-server-side-upsert` option, which executes the record import command using [the upsert option of the bulk record update API](https://cybozu.dev/ja/kintone/docs/rest-api/records/update-records/) -Previously, cli-kintone implemented its own upsert mode, but by using `--experimental-use-server-side-upsert`, there is a possibility that the performance of the record import command will improve. +Previously, cli-kintone has been running with its own upsert mode but by using `--experimental-use-server-side-upsert`, there is a possibility that the performance of the record import command will improve. Specify as follows. From 55afaffbc0140c89e13f97dbb91b6207f40b91f7 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:41:17 +0900 Subject: [PATCH 6/8] update record import guide --- website/docs/guide/commands/record-import.md | 29 ++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/website/docs/guide/commands/record-import.md b/website/docs/guide/commands/record-import.md index b11dfb2f1e..803f8ca459 100644 --- a/website/docs/guide/commands/record-import.md +++ b/website/docs/guide/commands/record-import.md @@ -20,14 +20,15 @@ cli-kintone record import \ See [Options](/guide/options) page for common options. -| Option | Required | Description | -| ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--app` | Yes | The ID of the app | -| `--attachments-dir` | | Attachment file directory | -| `--file-path` | Yes | The path to the source file.
The file extension should be ".csv" | -| `--encoding ` | | Character encoding
Default to `utf8`
Encodings: `utf8` and `sjis` | -| `--update-key` | | The key to Bulk Update
When this option is set, cli-kintone will be in the UPSERT mode.
See [Upsert records](#upsert-records) section for more details. | -| `--fields ` | | The fields to be imported in comma-separated | +| Option | Required | Description | +| ----------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--app` | Yes | The ID of the app | +| `--attachments-dir` | | Attachment file directory | +| `--file-path` | Yes | The path to the source file.
The file extension should be ".csv" | +| `--encoding ` | | Character encoding
Default to `utf8`
Encodings: `utf8` and `sjis` | +| `--update-key` | | The key to Bulk Update
When this option is set, cli-kintone will be in the UPSERT mode.
See [Upsert records](#upsert-records) section for more details. | +| `--fields ` | | The fields to be imported in comma-separated | +| `--experimental-use-server-side-upsert ` | | Execute upsert using the upsert option of the bulk record update API.
See [Using server side upsert](#using-server-side-upsert) section for more details. | :::note A field within a Table cannot be specified to the `fields` option. @@ -67,3 +68,15 @@ The field specified as "Key to Bulk Update" must meet one of the following requi - Created datetime - Updated by - Updated datetime + +### Using server side upsert + +:::experimental + +This feature is under early development. + +::: + +If you specify the `--experimental-use-server-side-upsert` option, upsert will be executed using [the upsert option of the bulk record update API](https://cybozu.dev/ja/kintone/docs/rest-api/records/update-records/). + +Using this option may improve import performance. From 441c97f116229ee4b1d3590e83a5817dedf5c3d7 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Thu, 16 Jan 2025 07:59:33 +0900 Subject: [PATCH 7/8] Update website/blog/2025-01-16-cli-kintone-v1-13-0.md Co-authored-by: tasshi / Masaharu Tashiro <33759872+tasshi-me@users.noreply.github.com> --- website/blog/2025-01-16-cli-kintone-v1-13-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2025-01-16-cli-kintone-v1-13-0.md b/website/blog/2025-01-16-cli-kintone-v1-13-0.md index 39092a83e6..b1468eb8b9 100644 --- a/website/blog/2025-01-16-cli-kintone-v1-13-0.md +++ b/website/blog/2025-01-16-cli-kintone-v1-13-0.md @@ -1,7 +1,7 @@ --- slug: cli-kintone-v1-13-0 title: cli-kintone v1.13.0 -authors: [extensions-platform-team] +authors: [chihiro-adachi, extensions-platform-team] tags: [release] --- From 855f9435f7fe1b9f60d69ff64520ffc441d946f2 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Thu, 16 Jan 2025 08:11:13 +0900 Subject: [PATCH 8/8] add a default on schedule --- website/blog/2025-01-16-cli-kintone-v1-13-0.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/blog/2025-01-16-cli-kintone-v1-13-0.md b/website/blog/2025-01-16-cli-kintone-v1-13-0.md index b1468eb8b9..0a190943fa 100644 --- a/website/blog/2025-01-16-cli-kintone-v1-13-0.md +++ b/website/blog/2025-01-16-cli-kintone-v1-13-0.md @@ -13,7 +13,7 @@ We are happy to announce the release of **cli-kintone v1.13.0** πŸŽ‰ We have implemented the `--experimental-use-server-side-upsert` option, which executes the record import command using [the upsert option of the bulk record update API](https://cybozu.dev/ja/kintone/docs/rest-api/records/update-records/) -Previously, cli-kintone has been running with its own upsert mode but by using `--experimental-use-server-side-upsert`, there is a possibility that the performance of the record import command will improve. +Previously, cli-kintone has been running with its own upsert mode, but by using `--experimental-use-server-side-upsert`, there is a possibility that the performance of the record import command will improve. Specify as follows. @@ -25,6 +25,8 @@ $ cli-kintone record import --base-url http://localhost --app xxx \ --experimental-use-server-side-upsert ``` +We plan to enable this option by default once we have confirmed its stability. + ## Miscellaneous See the [changelog](https://github.com/kintone/cli-kintone/blob/main/CHANGELOG.md#1130-2025-01-16) for an exhaustive list of changes.