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"], 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..0a190943fa --- /dev/null +++ b/website/blog/2025-01-16-cli-kintone-v1-13-0.md @@ -0,0 +1,32 @@ +--- +slug: cli-kintone-v1-13-0 +title: cli-kintone v1.13.0 +authors: [chihiro-adachi, 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 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. + +``` +$ cli-kintone record import --base-url http://localhost --app xxx \ + --api-token xxx \ + --file-path import.csv \ + --update-key レコードη•ͺ号 \ + --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. 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.