From ee985f2ceab85e291328102062732f041c91e205 Mon Sep 17 00:00:00 2001 From: houfaxin Date: Tue, 24 Dec 2024 10:33:10 +0800 Subject: [PATCH 1/3] Update sql-statement-import-into.md --- sql-statements/sql-statement-import-into.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sql-statements/sql-statement-import-into.md b/sql-statements/sql-statement-import-into.md index af96bf76ddf96..76f5f19b25b0b 100644 --- a/sql-statements/sql-statement-import-into.md +++ b/sql-statements/sql-statement-import-into.md @@ -49,6 +49,7 @@ The `IMPORT INTO` statement lets you import data to TiDB via the [Physical Impor - `IMPORT INTO ... FROM SELECT` does not support the task management statements such as `SHOW IMPORT JOB(s)` and `CANCEL IMPORT JOB `. - The [temporary directory](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#temp-dir-new-in-v630) of TiDB requires sufficient space to store the entire query result of the `SELECT` statement (configuring the `DISK_QUOTA` option is not supported currently). - Importing historical data using [`tidb_snapshot`](/read-historical-data.md) is not supported. +- Due to the complexity of the `SELECT` clause syntax, the `WITH` parameter in `IMPORT INTO` might conflict with it, causing parsing errors, such as `GROUP BY ... [WITH ROLLUP]`. It is recommended to create a view for complex `SELECT` statements and then use `IMPORT INTO ... FROM SELECT * FROM view_name` for importing. Alternatively, you can clarify the scope of the `SELECT` clause with parentheses, such as `IMPORT INTO ... FROM (SELECT ...) WITH ...`. ## Prerequisites for import From 99bea445ad04b426ab8c3fbc68a956faf9147671 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Tue, 24 Dec 2024 11:32:54 +0800 Subject: [PATCH 2/3] Update wording --- sql-statements/sql-statement-import-into.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-import-into.md b/sql-statements/sql-statement-import-into.md index 76f5f19b25b0b..c908ee9463274 100644 --- a/sql-statements/sql-statement-import-into.md +++ b/sql-statements/sql-statement-import-into.md @@ -49,7 +49,7 @@ The `IMPORT INTO` statement lets you import data to TiDB via the [Physical Impor - `IMPORT INTO ... FROM SELECT` does not support the task management statements such as `SHOW IMPORT JOB(s)` and `CANCEL IMPORT JOB `. - The [temporary directory](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#temp-dir-new-in-v630) of TiDB requires sufficient space to store the entire query result of the `SELECT` statement (configuring the `DISK_QUOTA` option is not supported currently). - Importing historical data using [`tidb_snapshot`](/read-historical-data.md) is not supported. -- Due to the complexity of the `SELECT` clause syntax, the `WITH` parameter in `IMPORT INTO` might conflict with it, causing parsing errors, such as `GROUP BY ... [WITH ROLLUP]`. It is recommended to create a view for complex `SELECT` statements and then use `IMPORT INTO ... FROM SELECT * FROM view_name` for importing. Alternatively, you can clarify the scope of the `SELECT` clause with parentheses, such as `IMPORT INTO ... FROM (SELECT ...) WITH ...`. +- Because of the syntax of the `SELECT` clause is complex, the `WITH` parameter in `IMPORT INTO` might conflict with it and cause parsing errors, such as `GROUP BY ... [WITH ROLLUP]`. It is recommended to create a view for complex `SELECT` statements and then use `IMPORT INTO ... FROM SELECT * FROM view_name` for importing. Alternatively, you can clarify the scope of the `SELECT` clause with parentheses, such as `IMPORT INTO ... FROM (SELECT ...) WITH ...`. ## Prerequisites for import From cf85ecc48f033c618706e5a53ba4109608de7319 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Tue, 24 Dec 2024 11:37:08 +0800 Subject: [PATCH 3/3] Update sql-statements/sql-statement-import-into.md --- sql-statements/sql-statement-import-into.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-import-into.md b/sql-statements/sql-statement-import-into.md index c908ee9463274..dee353d8fba2b 100644 --- a/sql-statements/sql-statement-import-into.md +++ b/sql-statements/sql-statement-import-into.md @@ -49,7 +49,7 @@ The `IMPORT INTO` statement lets you import data to TiDB via the [Physical Impor - `IMPORT INTO ... FROM SELECT` does not support the task management statements such as `SHOW IMPORT JOB(s)` and `CANCEL IMPORT JOB `. - The [temporary directory](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#temp-dir-new-in-v630) of TiDB requires sufficient space to store the entire query result of the `SELECT` statement (configuring the `DISK_QUOTA` option is not supported currently). - Importing historical data using [`tidb_snapshot`](/read-historical-data.md) is not supported. -- Because of the syntax of the `SELECT` clause is complex, the `WITH` parameter in `IMPORT INTO` might conflict with it and cause parsing errors, such as `GROUP BY ... [WITH ROLLUP]`. It is recommended to create a view for complex `SELECT` statements and then use `IMPORT INTO ... FROM SELECT * FROM view_name` for importing. Alternatively, you can clarify the scope of the `SELECT` clause with parentheses, such as `IMPORT INTO ... FROM (SELECT ...) WITH ...`. +- Because the syntax of the `SELECT` clause is complex, the `WITH` parameter in `IMPORT INTO` might conflict with it and cause parsing errors, such as `GROUP BY ... [WITH ROLLUP]`. It is recommended to create a view for complex `SELECT` statements and then use `IMPORT INTO ... FROM SELECT * FROM view_name` for importing. Alternatively, you can clarify the scope of the `SELECT` clause with parentheses, such as `IMPORT INTO ... FROM (SELECT ...) WITH ...`. ## Prerequisites for import