pipelinedb icon indicating copy to clipboard operation
pipelinedb copied to clipboard

Add support for renaming continuous views/transforms

Open qcli opened this issue 8 years ago • 2 comments

Hi, If I want to change the name of continuous view, how to do it? Thanks!

qcli avatar Nov 02 '17 01:11 qcli

Hi @qcli,

Currently there isn't a great way to rename a continuous view. Here's how you could do it though:

  1. CREATE the new CV (identically to the existing one, of course)
  2. Copy all data from the old CV's materialization table (<cv name>_mrel) into the new one:
-- Enable user-level writes on materialization tables for this transaction
SET continuous_query_materialization_table_updatable TO on;

-- Now just copy the old materialization table's rows into the new one
INSERT INTO <new cv name>_mrel SELECT * FROM <old cv name>_mrel;
  1. Once you've verified that the new CV looks good, DROP the old CV

I realize this isn't ideal but I just wanted to offer a workaround approach until we support renaming, which we eventually will.

derekjn avatar Nov 02 '17 19:11 derekjn

Hi @derekjn , Thank your reply. Looking forward to the day you support this feature.

qcli avatar Nov 03 '17 01:11 qcli