diff --git a/docs-2.0-en/20.appendix/release-notes/studio-release-note.md b/docs-2.0-en/20.appendix/release-notes/studio-release-note.md index dfaf2bb6e47..732fc57be83 100644 --- a/docs-2.0-en/20.appendix/release-notes/studio-release-note.md +++ b/docs-2.0-en/20.appendix/release-notes/studio-release-note.md @@ -1,39 +1,11 @@ # NebulaGraph Studio release notes -## v3.8.0 +## v3.9.0 (2024.1) - Features - - Supported the use of MySQL databases as backend storage. + - Supported importing data using [AI](../../nebula-studio/quick-start/st-ug-import-data.md). + - Supported the generation of nGQL statements using the [AI Assistant](../../nebula-studio/quick-start/st-ug-console.md). - Enhancements - - Supported customizing the read and write parameters of the WebSocket. - - Usability - - Supported filtering tasks in the import task list based on the map space name. - - Compatibility - - Since the database table structure has changed, you need to set `DB.AutoMigrate` to `true` in the configuration file, and the system will automatically upgrade and adapt the existing historical data. - - If the tables were created manually after you consulted our after-sales staff, please modify these tables manually: `task_infos`, `task_effects`, `sketches`, `schema_snapshots`, `favorites`, `files`, and `datasources`. - - For example: - - ```mysql - ALTER TABLE `task_infos` ADD COLUMN `b_id` CHAR(32) NOT NULL DEFAULT ''; - UPDATE TABLE `task_infos` SET `b_id` = `id`; - CREATE UNIQUE INDEX `idx_task_infos_id` ON `task_infos`(`b_id`); - - ALTER TABLE `task_effects` ADD COLUMN `b_id` CHAR(32) NOT NULL DEFAULT ''; - UPDATE TABLE `task_effects` SET `b_id` = `id`; - CREATE UNIQUE INDEX `idx_task_effects_id` ON `task_effects`(`b_id`); - ... - ``` - - -## v3.7.0 - -- Enhancements - - - Supported importing SFTP, Amazon S3 data files. - - The import page is supported to configure more import parameters, such as concurrency, retries, etc. - - Supported re-running tasks. - - Supported saving tasks as drafts. - - Supported running Studio in a docker container on the ARM architecture. + - Optimized the [console feature](../../nebula-studio/quick-start/st-ug-console.md), including automatic completion of a tag or edge type, quick selection of the historical statements, quick viewing of the schema, etc. + - Optimized the presentation style of the [execution plan](../../nebula-studio/quick-start/st-ug-console.md). \ No newline at end of file diff --git a/docs-2.0-en/nebula-studio/quick-start/st-ug-console.md b/docs-2.0-en/nebula-studio/quick-start/st-ug-console.md index 4521f9b216c..9f9d38add64 100644 --- a/docs-2.0-en/nebula-studio/quick-start/st-ug-console.md +++ b/docs-2.0-en/nebula-studio/quick-start/st-ug-console.md @@ -2,24 +2,48 @@ Studio console interface is shown as follows. -![console](https://docs-cdn.nebula-graph.com.cn/figures/st-ug-015-en.png) +## Entry -The following table lists various functions on the console interface. +In the top navigation bar, click **Console**. + +## Overview + +A screenshot that shows the overview of the console + +The following table lists the functions on the console page. | number | function | descriptions | | :-- | :--| :-- | -| 1 | toolbar | Click the **Console** tab to enter the console page. | -| 2 | select a space | Select a space in the Current Graph Space list.
**descriptions**: Studio does not support running the `USE ` statements directly in the input box. | -| 3 | favorites | Click the ![save](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-save.png) button to expand the favorites, click one of the statements, and the input box will automatically enter the statement. | -| 4 | history list | Click ![history](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-history.png) button representing the statement record. In the statement running record list, click one of the statements, and the statement will be automatically entered in the input box. The list provides the record of the last 15 statements. | -| 5 | clean input box | Click ![clean](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-clear.png) button to clear the content entered in the input box. | -| 6 | run | After inputting the nGQL statement in the input box, click ![run](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-play.png) button to indicate the operation to start running the statement. | -| 7 | custom parameters display | Click the ![Query](https://docs-cdn.nebula-graph.com.cn/figures/down.png) button to expand the custom parameters for parameterized query. For details, see [Manage parameters](../../nebula-console.md).| -| 8 | input box | After inputting the nGQL statements, click the ![run](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-play.png) button to run the statement. You can input multiple statements and run them at the same time by using the separator `;`, and also use the symbol `//` to add comments. | -| 9 | statement running status | After running the nGQL statement, the statement running status is displayed. If the statement runs successfully, the statement is displayed in green. If the statement fails, the statement is displayed in red. | -| 10 | add to favorites | Click the ![save](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-save.png) button to save the statement as a favorite, the button for the favorite statement is colored in yellow exhibit.| -| 11 | export CSV file or PNG file | After running the nGQL statement to return the result, when the result is in **Table** window, click the ![download](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-download.png) button to export as a CSV file. Switch to the **Graph** window and click the ![download](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-download.png) button to save the results as a CSV file or PNG image export. | -| 12 | expand/hide execution results | Click the ![up](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-up.png) button to hide the result or click ![down](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-down.png) button to expand the result. | -| 13 | close execution results | Click the ![close](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-close.png) button to close the result returned by this nGQL statement. | -| 14 | **Table** window | Display the result from running nGQL statement. If the statement returns results, the window displays the results in a table. | -| 15 | **Graph** window | Display the result from running nGQL statement. If the statement returns the complete vertex-edge result, the window displays the result as a graph . Click the ![expand](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-back.png) button on the right to view the overview panel. | +| 1 | View the schema | Display the schemas of the graph spaces. | +| 2 | Select a space | Select a space in the graph space drop down list. The console does not support using the `USE ` statement to switch graph spaces. | +| 3 | Favorites | Click the ![save](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-save.png) button to expand the favorites. Select a statement, and it automatically populates the input box. | +| 4 | History list | Click the ![history](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-history.png) button to view the execution history. In the execution history list, click one of the statements, and the statement is automatically populates the input box. The list provides the record of the last 15 statements.
Type `/` in the input box to quickly select a historical query statement. | +| 5 | Clean input box | Click the ![clean](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-clear.png) button to clear the content populated in the input box. | +| 6 | Run | After entering the nGQL statement in the input box, click the ![run](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-play.png) button to start running the statement. | +| 7 | Input box | The area where the nGQL statement is entered. The statement displays different colors depending on the schemas or character strings.
Code auto-completion is supported. You can quickly enter a tag or edge type based on the schema.
You can input multiple statements and run them at the same time by using the separator `;`. Use the symbol `//` to add comments.
Support right-clicking on a selected statement and then performing operations such as cut, copy, or run. | +| 8 | Custom parameters display | Click the ![Query](https://docs-cdn.nebula-graph.com.cn/figures/down.png) button to expand the custom parameters for the parameterized query. For details, see [Manage parameters](../../nebula-console.md).| +| 9 | Statement running status | After running the nGQL statement, the statement running status is displayed. If the statement runs successfully, the statement is displayed in green. If the statement fails, the statement is displayed in red. | +| 10 | Add to favorites | Click the ![save](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-save.png) button to save the statement as a favorite. The button for the favorite statement is colored in yellow.| +| 11 | Export CSV file or PNG file | After running the nGQL statement to return the result, when the result is in the **Table** window, click the ![download](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-download.png) button to export as a CSV file.
Switch to the **Graph** window and click the ![download](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-download.png) button to export the results as a CSV file or a PNG image. | +| 12 | Expand/hide execution results | Click the ![up](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-up.png) button to hide the result or click ![down](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-down.png) to expand the result. | +| 13 | Close execution results | Click the ![close](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-close.png) button to close the result returned by this nGQL statement. | +| 14 | **Table** window | Display the results returned by the nGQL statement in a table. | +| 15 | **Plan** window | Display the execution plan. If an `EXPLAIN` or `PROFILE` statement is executed, the window presents the execution plan in visual form. See the description of the execution plan below. | +| 16 | **Graph** window | Display the results returned by the nGQL statement in a graph if the results contain complete vertex and edge information. Click the ![expand](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-back.png) button on the right to view the overview panel. | +| 17 | AI Assistant | You can chat with an AI assistant to convert natural language instructions into nGQL query statements and then copy the nGQL statements into the input box with one click. This feature needs to be set up and enabled in the [system settings](../system-settings.md) before use.
Note:
The schema information of the current graph space is sent to the large language model when you chat with the assistant. Please pay attention to information security.
You can click the **text2match** toggle to switch between general Q&A and query Q&A. The query Q&A can convert the natural language instructions to nGQL query statements.| + +## Execution plan descriptions + +The Studio can display the execution plan of the statement. The execution plan descriptions are as follows. + +A screenshot that shows the execute plan of studio + +|No.|Description| +|:---|:---| +|1 |An `EXPLAIN` or `PROFILE` statement.| +|2 |The operators used by the execution plan, which are sorted according to the execution duration. The top three operators are labeled as red, orange, and yellow, respectively. Clicking on an operator directly selects the corresponding operator in the operator execution flow and displays the operator information.
Note: The `PROFILE` statement actually executes the statement, and the actual execution durations can be obtained and sorted. The `EXPLAIN` statement does not execute the statement, and all operators are considered to have the same execution duration and are all labeled as red.| +|3 |The operator execution flow. For each operator, the following information is displayed: in-parameters, out-parameters, and total execution duration.
The `Select`, `Loop`, `PassThrough`, and `Start` operators have independent color schemes.
The arrows show the direction of data flow and the number of rows. The thicker the arrows, the more rows of data.
You can click on the operator to check the details of the operator on the right side.| +|4 |The details of the operator, divided into `Profiling data` and `Operator info`.
`Profiling data` shows the performance data of the operator, including the rows of data received, the execution time, the total time, etc.
`Operator info` shows the detailed operation information of the operator.| +|5 |Zoom out, zoom in, or reverse the execution flow.| +|6 |The duration of the statement.| +|7 |Full screen or cancel full screen.| diff --git a/docs-2.0-en/nebula-studio/quick-start/st-ug-import-data.md b/docs-2.0-en/nebula-studio/quick-start/st-ug-import-data.md index 002ff8ed5b3..fdb0024d4cb 100644 --- a/docs-2.0-en/nebula-studio/quick-start/st-ug-import-data.md +++ b/docs-2.0-en/nebula-studio/quick-start/st-ug-import-data.md @@ -14,11 +14,17 @@ To batch import data, do a check of these: ## Entry -In the top navigation bar, click ![download](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-download.png). +In the top navigation bar, click **Import**. + +## Steps Importing data is divided into 2 parts, creating a new data source and creating an import task, which will be described in detail next. -## Create a new data source +!!! note + + You can also import tasks via the AI Import feature, which is a beta feature that needs to be enabled and configured in the [system settings](../system-settings.md) before use. + +### Create a new data source Click **New Data Source** in the upper right corner of the page to set the data source and its related settings. Currently, 3 types of data sources are supported. @@ -33,7 +39,7 @@ Click **New Data Source** in the upper right corner of the page to set the data - When uploading a local CSV file, you can select more than one CSV file at one time. - After adding a data source, you can click **Data Source Management** at the top of the page and switch tabs to view the details of different types of data sources, and you can also edit or delete data sources. -## Create an import task +### Create an import task 1. Click **New Import** at the top left corner of the page to complete the following settings: @@ -62,6 +68,25 @@ Click **New Data Source** in the upper right corner of the page to set the data After the import task is created, you can view the progress of the import task in the **Import Data** tab, which supports operations such as filtering tasks based on graph space, editing the task, viewing logs, downloading logs, reimporting, downloading configuration files, and deleting tasks. +### Import data using AI Import + +!!! note + + After the import task is completed, check whether the data is imported successfully. If not, it is recommended that you check the task logs on the import page to see whether issues such as timeouts, privacy policy violations, service interruption, or encoding errors occurred. + +1. Click **AI Import** in the upper left corner of the page to complete the following settings: + + - **File**: Select the files for import via AI import. Only local single file or local directory is currently supported. You can select only one local file or directory each time. The file needs to be a plain text file. + - **Import Graph Space**: The graph space where the data is to be imported. The schema of the graph space needs to be created in advance. + - **Export NGQL File Path**: The path to the exported nGQL file, which usually does not need to be modified. + - **Attach Prompt**: You can attach additional prompts to guide the data import process. The precision of the prompts directly influences the accuracy of the import results. + + You can view the `LLM` parameters related to AI import in the configuration file. + +2. After completing the settings, click **Next** to confirm the file for import and the AI URL to be used, and then click **Start**. + +After the import task is created, you can view the progress of the import task on the **Import Data** tab, which supports operations such as viewing logs, downloading logs, reimporting, and deleting tasks. + ## Next After completing the data import, users can access the [Console](st-ug-console.md) page. diff --git a/docs-2.0-en/nebula-studio/system-settings.md b/docs-2.0-en/nebula-studio/system-settings.md new file mode 100644 index 00000000000..7351970ccee --- /dev/null +++ b/docs-2.0-en/nebula-studio/system-settings.md @@ -0,0 +1,21 @@ +# Global settings + +This topic introduces the global settings of NebulaGraph Studio, including language switching and beta functions. + +- Language: Switch between Chinese and English. + +- Beta functions: Switch on/off beta features, which include [view schema](manage-schema/st-ug-view-schema.md), [text to query](quick-start/st-ug-console.md) and [AI import](quick-start/st-ug-import-data.md). + + The text to query and AI import features need to be configured with AI-related configurations. See below for detailed configurations. + +## Text to query and AI import + +The text to query and AI import are artificial intelligence features developed based on the large language model (LLM) and require the following parameters to be configured. + +|Parameter|Description| +|:---------|:--| +|**API type** | The API type for AI. Valid values are `OpenAI` and `Aliyun`. | +|**URL** | The API URL. Fill in the correct URL format according to the corresponding API type. For example, `https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/chat/completions?api-version={api-version}`。 | +|**Key** | The key used to validate the API. The key is required when using an online large language model, and is optional depending on the actual settings when using an offline large language model. | +|**Model** | The version of the large language model. The model is required when using an online large language model, and is optional depending on the actual settings when using an offline large language model. | +|**Max text length**| The maximum length for receiving or generating a single piece of text. Unit: byte. | \ No newline at end of file diff --git a/docs-2.0-zh/20.appendix/release-notes/studio-release-note.md b/docs-2.0-zh/20.appendix/release-notes/studio-release-note.md index 4b0109294f4..13424314736 100644 --- a/docs-2.0-zh/20.appendix/release-notes/studio-release-note.md +++ b/docs-2.0-zh/20.appendix/release-notes/studio-release-note.md @@ -1,39 +1,11 @@ # NebulaGraph Studio 更新说明 - -## v3.8.0 +## v3.9.0(2024.1) - 功能 - - 支持使用 MySQL 数据库作为后端存储。 + - 支持[使用 AI 导入数据](../../nebula-studio/quick-start/st-ug-import-data.md)。 + - 支持[使用 AI 查询语句助手](../../nebula-studio/quick-start/st-ug-console.md)生成 nGQL 语句。 - 增强 - - 支持自定义 WebSocket 的读写参数。 - - 易用性 - - 支持在导入任务列表根据图空间名称筛选任务。 - - 兼容性 - - 由于数据库表结构变更,需要在配置文件内将`DB.AutoMigrate`设置为`true`,系统会自动对已有历史数据进行升级适配。 - - 如果是自己手动创建的库表,请手动修改这些表:`task_infos`、`task_effects`、`sketches`、`schema_snapshots`、`favorites`、`files`、`datasources`。 - - 示例如下: - - ```mysql - ALTER TABLE `task_infos` ADD COLUMN `b_id` CHAR(32) NOT NULL DEFAULT ''; - UPDATE TABLE `task_infos` SET `b_id` = `id`; - CREATE UNIQUE INDEX `idx_task_infos_id` ON `task_infos`(`b_id`); - - ALTER TABLE `task_effects` ADD COLUMN `b_id` CHAR(32) NOT NULL DEFAULT ''; - UPDATE TABLE `task_effects` SET `b_id` = `id`; - CREATE UNIQUE INDEX `idx_task_effects_id` ON `task_effects`(`b_id`); - ... - ``` - -## v3.7.0 - -- 增强 - - - 支持导入 SFTP、Amazon S3 的数据文件。 - - 导入页面支持配置更多导入参数,如并发数、重试次数等。 - - 支持重跑任务。 - - 支持任务保存为草稿。 - - 支持在 ARM 架构的 Docker 容器内运行 Studio。 + - 优化[控制台功能](../../nebula-studio/quick-start/st-ug-console.md),包括自动补全 Tag/Edge type、快速选择历史语句、快速查看 Schema 等。 + - 优化[执行计划](../../nebula-studio/quick-start/st-ug-console.md)展示样式。 \ No newline at end of file diff --git a/docs-2.0-zh/nebula-studio/quick-start/st-ug-console.md b/docs-2.0-zh/nebula-studio/quick-start/st-ug-console.md index 6cec54a54b8..8b95c63d29d 100644 --- a/docs-2.0-zh/nebula-studio/quick-start/st-ug-console.md +++ b/docs-2.0-zh/nebula-studio/quick-start/st-ug-console.md @@ -2,24 +2,50 @@ 本文介绍 Studio 的控制台界面。 -![控制台界面截图](https://docs-cdn.nebula-graph.com.cn/figures/st-ug-015-cn.png) +## 入口 + +在顶部导航栏里,单击**控制台**。 + +## 页面介绍 + +控制台界面截屏 下表列出了控制台界面上的各种功能。 | 编号 | 功能 | 说明 | | :-- | :--| :-- | -| 1 | 工具栏 | 点击 **控制台** 页签进入控制台页面。 | -| 2 | 选择图空间 | 在 **当前图空间** 列表中选择一个图空间。
**说明**:Studio 不支持直接在输入框中运行 `USE ` 语句。 | -| 3 | 收藏夹 | 点击![save](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-save.png) 按钮,展开收藏夹,点击其中一个语句,输入框中即自动输入该语句。 | -| 4 | 历史清单 | 点击 ![history](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-history.png) 按钮,在语句运行记录列表里,点击其中一个语句,输入框中即自动输入该语句。列表里提供最近 15 次语句运行记录。 | +| 1 | 查看 Schema | 展示图空间的 Schema。 | +| 2 | 选择图空间 | 选择执行 nGQL 的图空间。不支持在控制台执行`USE `语句切换图空间。 | +| 3 | 收藏夹 | 点击![save](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-save.png) 按钮,展开收藏夹,点击其中一个语句,该语句会自动输入到输入框中。 | +| 4 | 历史清单 | 点击 ![history](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-history.png) 按钮,在语句运行记录列表里,点击其中一个语句,输入框中即自动输入该语句。列表里提供最近 15 次语句运行记录。
在输入框中输入`/`可以快速选择历史查询语句。 | | 5 | 清空输入框 | 点击 ![clear](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-clear.png) 按钮,清空输入框中已经输入的内容。 | | 6 | 运行 | 在输入框中输入 nGQL 语句后,点击 ![play](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-play.png) 按钮即开始运行语句。 | -| 7 | 自定义参数展示 | 点击 ![查询](https://docs-cdn.nebula-graph.com.cn/figures/down.png)按钮可展开自定义参数,用于参数化查询,详情信息可见[管理参数](../../nebula-console.md)。| -| 8 | 输入框 | 在输入框中输入 nGQL 语句后,点击 ![play](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-play.png) 按钮运行语句。用户可以同时输入多个语句同时运行,语句之间以 `;` 分隔。支持用`//`添加注释。 | +| 7 | 输入框 | 输入 nGQL 语句的区域。语句会根据 Schema 或字符串展示不同颜色。
支持代码补全,可以根据 Schema 快速输入 Tag 或者 Edge type。
可以同时输入多个语句按顺序执行,语句之间以`;`分隔。可以用`//`添加注释。
支持对选中的语句单击右键,然后执行剪切、复制、运行等操作。 | +| 8 | 自定义参数展示 | 点击 ![查询](https://docs-cdn.nebula-graph.com.cn/figures/down.png)按钮可展开查看自定义参数,用于参数化查询。详情信息可见[管理参数](../../nebula-console.md)。| | 9 | 语句运行状态 | 运行 nGQL 语句后,这里显示语句运行状态。如果语句运行成功,语句以绿色显示。如果语句运行失败,语句以红色显示。 | | 10 | 添加到收藏夹 | 点击![save](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-save.png) 按钮,将语句存入收藏夹中,已收藏的语句该按钮以黄色展示。| -| 11 | 导出 CSV 文件或 PNG 格式图片 | 运行 nGQL 语句返回结果后,返回结果为表格形式时,点击 ![download](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-download.png) 按钮即能将结果以 CSV 文件的形式导出。切换到可视化窗口,点击 ![download](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-download.png) 按钮即能将结果以 CSV 文件或 PNG 图片的形式导出。 | -| 12 | 展开/隐藏执行结果 | 点击 ![up](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-up.png) 按钮,隐藏此条 nGQL 语句返回的结果或点击 ![down](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-down.png)按钮,展开此条 nGQL 语句返回的结果. | +| 11 | 导出 CSV 文件或 PNG 格式图片 | 运行 nGQL 语句返回结果后,返回结果为表格形式时,点击 ![download](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-download.png) 按钮即能将结果以 CSV 文件的形式导出。
切换到可视化窗口,点击 ![download](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-download.png) 按钮即能将结果以 CSV 文件或 PNG 图片的形式导出。 | +| 12 | 展开/隐藏执行结果 | 点击 ![up](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-up.png) 按钮,隐藏此条 nGQL 语句返回的结果。 | | 13 | 关闭执行结果 | 点击 ![close](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-close.png)按钮,关闭此条 nGQL 语句返回的结果。 | -| 14 | 表格窗口 | 显示语句运行结果。如果语句会返回结果,窗口会以表格形式呈现返回的结果。 | -| 15 | 可视化窗口 | 显示语句运行结果。如果语句会返回完整的点边结果,窗口会以可视化形式呈现返回的结果。点击右方 ![expand](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-back.png)按钮,展开数据概览面板。 | +| 14 | 表格窗口 | 在表格中显示语句的运行结果。 | +| 15 | 执行计划窗口 | 显示执行计划。如果执行的是`EXPLAIN`或`PROFILE`语句,窗口会以可视化形式呈现执行计划。如何理解执行计划请参见下文说明。 | +| 16 | 可视化窗口 | 显示语句运行结果。如果结果包含完整的点边信息,窗口会以可视化形式呈现返回的结果。点击右方 ![expand](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-back.png)按钮,展开数据概览面板。 | +| 17 | AI 查询语句助手 | 用户可以和助手聊天,将自然语言转换为 nGQL 查询语句,并支持一键复制 nGQL 语句到输入框中。使用前需要在[系统设置](../system-settings.md)里设置和启用该功能。
注意:
和助手交互时,会将当前图空间的 Schema 信息发送给大规模语言模型,请注意信息安全。
开关**text2match**用于切换普通问答和查询问答。查询问答可以输入自然语言转换为 nGQL 查询语句。| + +## 执行计划说明 + +Studio 可以展示语句的执行计划,界面说明如下。 + +执行计划截屏 + +|序号|说明| +|:---|:---| +|1 |`EXPLAIN`或`PROFILE`语句。| +|2 |执行计划涉及的算子并根据执行耗时排序。耗时前三的算子分别标记为为红色、橘红色和黄色。单击算子可以直接选中执行流程中的对应算子并展示算子信息。
注意:`PROFILE`语句会实际执行语句,所以能得到实际的耗时并排序。`EXPLAIN`不会执行语句,所有算子耗时视为相同并标记为红色。| +|3 |算子执行流程。每个算子都会显示该算子的入参、出参和耗时。
`Select`、`Loop`、`PassThrough`和`Start`算子有独立配色。
箭头展示数据流向和行数,行数越多,箭头越粗。
单击算子会在右侧展示算子的详细信息。| +|4 |算子详细信息。分为`Profiling data`和`Operator info`两部分。
`Profiling data`展示算子的性能数据,包括接收到的数据行数、执行耗时、总耗时等。
`Operator info`展示算子的具体操作信息。| +|5 |放大或缩小界面,还可以倒序显式算子执行流程。| +|6 |语句耗时。| +|7 |全屏展示或取消全屏。| + +关于算子和优化规则的介绍以及如何调优,可以参考论坛[执行计划详解与调优](https://discuss.nebula-graph.com.cn/t/topic/12010)。 \ No newline at end of file diff --git a/docs-2.0-zh/nebula-studio/quick-start/st-ug-import-data.md b/docs-2.0-zh/nebula-studio/quick-start/st-ug-import-data.md index 11c00ce0335..961237497fd 100644 --- a/docs-2.0-zh/nebula-studio/quick-start/st-ug-import-data.md +++ b/docs-2.0-zh/nebula-studio/quick-start/st-ug-import-data.md @@ -6,7 +6,7 @@ Studio 支持界面化地将 CSV 格式数据导入至 {{nebula.name}} 中。 导入数据之前,需要确认以下信息: -- {{nebula.name}} 里已经创建 Schema。 +- {{nebula.name}} 里已经创建 Schema。 - CSV 文件符合 Schema 要求。 @@ -14,10 +14,16 @@ Studio 支持界面化地将 CSV 格式数据导入至 {{nebula.name}} 中。 ## 入口 -在顶部导航栏里,单击 ![download](https://docs-cdn.nebula-graph.com.cn/figures/studio-btn-download.png) 图标。 +在顶部导航栏里,单击**导入**。 + +## 操作步骤 导入数据主要分为 2 个部分,新建数据源和创建导入任务,接下来将详细介绍。 +!!! note + + 导入任务还支持 AI 导入,该功能为 Beta 功能,使用前需要在[系统设置](../system-settings.md)里设置和启用该功能。 + ### 新建数据源 在页面右上角单击**新建数据源**,设置数据来源及其相关设置。当前支持 3 种类型的数据源。 @@ -62,6 +68,25 @@ Studio 支持界面化地将 CSV 格式数据导入至 {{nebula.name}} 中。 导入任务创建后,可以在**导入数据**页签内查看导入任务的进度,支持根据图空间筛选任务、编辑任务、查看日志、下载日志、重新导入、下载配置文件、删除任务等操作。 +### AI 导入 + +!!! note + + 导入任务执行完成后,请手动检查数据是否正常导入,推荐结合导入页面的任务日志进行查看,排查超时、触发隐私政策、服务中断、编码等问题。 + +1. 在页面左上角单击**AI 导入**,完成如下设置: + + - **文件**:选择需要进行 AI 导入的文件。当前仅支持本地单个文件或本地目录。每次只能选择一个本地文件或目录。文件需要为纯文本文件。 + - **导入图空间**:待导入数据的图空间。图空间的 Schema 需要提前创建好。 + - **导出 NGQL 文件路径**:导出 ngql 文件的路径,通常无需修改。 + - **附加提示**:可以附加其他提示来指导数据导入。提示的精度直接影响导入结果的准确性。 + + 你可以在配置文件中查看和 AI 导入相关的`LLM`参数。 + +2. 完成设置后,单击**下一步**,确认待导入的文件和使用的 AI URL,然后单击**开始**。 + +导入任务创建后,可以在**导入数据**页签内查看导入任务的进度,支持查看日志、下载日志、重新导入、删除任务等操作。 + ## 后续操作 完成数据导入后,用户可以进入[控制台](st-ug-console.md)页面。 diff --git a/docs-2.0-zh/nebula-studio/system-settings.md b/docs-2.0-zh/nebula-studio/system-settings.md new file mode 100644 index 00000000000..e49ddfd939a --- /dev/null +++ b/docs-2.0-zh/nebula-studio/system-settings.md @@ -0,0 +1,21 @@ +# 全局设置 + +本文介绍 Studio 的全局设置,包含语言切换和 Beta 功能。 + +- 语言:支持切换中文和英文。 + +- Beta 功能:Beta 功能开关。Beta 功能目前包括[查看 Schema](manage-schema/st-ug-view-schema.md)、[文本转查询](quick-start/st-ug-console.md)和 [AI 导入](quick-start/st-ug-import-data.md)。 + + 文本转查询和 AI 导入需要设置人工智能相关的配置。详细设置参见下文。 + +## 文本转查询和 AI 导入 + +文本转查询和 AI 导入是基于大规模语言模型(LLM)实现的人工智能,需要配置以下参数才能正常使用。 + +|参数|说明| +|:---------|:--| +|**API type** | API 接口类型。支持`OpenAI`和`Aliyun`。 | +|**URL** | API URL。请按照对应接口类型填写正确的 URL 格式。例如`https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/chat/completions?api-version={api-version}`。 | +|**key** | 用于验证 API 的 key。使用在线大语言模型时必填,使用离线大语言模型时根据实际设置选填。 | +|**model** | 大语言模型版本。使用在线大语言模型时必填,使用离线大语言模型时根据实际设置选填。 | +|**文本最大长度**| 接收或生成一段文本的最大长度限制。单位:字节。 | \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index ab7c15b8ece..ec4464e6ede 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -203,7 +203,7 @@ extra: base111b: 1.1.1-beta base220: 2.2.1 base300: 3.0.0 - release: 3.8.0 + release: 3.9.0 tag: v3.9.0 exchange: release: 3.7.0 @@ -583,6 +583,7 @@ nav: - Manage indexes: nebula-studio/manage-schema/st-ug-crud-index.md - View schema: nebula-studio/manage-schema/st-ug-view-schema.md - Schema drafting: nebula-studio/quick-start/draft.md + - Global settings: nebula-studio/system-settings.md - Troubleshooting: - Database connection error: nebula-studio/troubleshooting/st-ug-config-server-errors.md - Unable to access Studio: nebula-studio/troubleshooting/st-ug-connection-errors.md @@ -940,6 +941,7 @@ nav: - 操作索引: nebula-studio/manage-schema/st-ug-crud-index.md - 查看 Schema: nebula-studio/manage-schema/st-ug-view-schema.md - Schema 草图: nebula-studio/quick-start/draft.md + - 全局设置: nebula-studio/system-settings.md - 故障排查: - 连接数据库错误: nebula-studio/troubleshooting/st-ug-config-server-errors.md - 无法访问 Studio: nebula-studio/troubleshooting/st-ug-connection-errors.md