SHOW STAGES

Description

Display the data stage of the current database creation as a list.

MatrixOne users use SHOW STAGES to view all the data stages of the current database and can choose a valid path to export the data to.

Syntax

1. > SHOW STAGES [LIKE 'pattern']

Examples

1. CREATE TABLE `user` (`id` int(11) ,`user_name` varchar(255) ,`sex` varchar(255));
2. INSERT INTO user(id,user_name,sex) values('1', 'weder', 'man'), ('2', 'tom', 'man'), ('3', 'wederTom', 'man');

4. -- Create internal data stage
5. mysql> CREATE STAGE stage1 URL='/tmp' ENABLE = TRUE;

7. -- Export data from table to the data stage
8. mysql> SELECT * FROM user INTO OUTFILE 'stage1:/user.csv';
9. -- You can see your exported table in your local directory

11. -- Display the data stage of the current database creation as a list.
12. mysql> SHOW STAGES;
13. +------------+-----------------------------+---------+---------+
14. | STAGE_NAME | URL                         | STATUS  | COMMENT |
15. +------------+-----------------------------+---------+---------+
16. | stage1     | /tmp                        | ENABLED |         |
17. +------------+-----------------------------+---------+---------+
18. 1 row in set (0.00 sec)