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');
  3. -- Create internal data stage
  4. mysql> CREATE STAGE stage1 URL='/tmp' ENABLE = TRUE;
  5. -- Export data from table to the data stage
  6. mysql> SELECT * FROM user INTO OUTFILE 'stage1:/user.csv';
  7. -- You can see your exported table in your local directory
  8. -- Display the data stage of the current database creation as a list.
  9. mysql> SHOW STAGES;
  10. +------------+-----------------------------+---------+---------+
  11. | STAGE_NAME | URL | STATUS | COMMENT |
  12. +------------+-----------------------------+---------+---------+
  13. | stage1 | /tmp | ENABLED | |
  14. +------------+-----------------------------+---------+---------+
  15. 1 row in set (0.00 sec)