singlestore

Cannot rename table because it is referenced by pipeline `fdext`


I am getting below error when i am trying to rename my table in singlestore .how to fix it?

ERROR 1945 ER_CANNOT_DROP_REFERENCED_BY_PIPELINE: Cannot rename table because it is referenced by pipeline fdext


Solution

  • One of your pipeline in SingleStore is ingesting data into this table so you can not rename the table because the pipeline will try to insert data into the previous one. Unfortunately you can't alter pipeline to target a different table. So here is the sequence to do it :

    1. SHOW CREATE PIPELINE <your_pipeline> EXTENDED; - save the pipeline settings, including the ALTER PIPELINE lines
    2. STOP PIPELINE <your_pipeline>; - stop the pipeline
    3. DROP PIPELINE <your_pipeline>; - delete the pipeline
    4. ALTER TABLE <new_table> RENAME TO <old_name>; - rename your table
    5. Recreate the pipeline with the settings collected at step 1 and change table name to the new one
    6. START PIPELINE <your_pipeline>; - start the pipeline