Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support copy command #44

Open
lucasRogerioOliveira opened this issue Aug 19, 2017 · 0 comments
Open

support copy command #44

lucasRogerioOliveira opened this issue Aug 19, 2017 · 0 comments

Comments

@lucasRogerioOliveira
Copy link

lucasRogerioOliveira commented Aug 19, 2017

Support 'copy' command.

Actually, cassandra doesn't support rename table name, and to rename a table we need:

  • migrate the data to a file or something like this with the command: 'copy';
  • drop the table;
  • recreate with the new name;
  • use copy again to migrate the data from file to the renamed table;

Example:
-- description: recreate foobar table
-- authoredAt: lucasoliveiracampos
-- up:

-- stage: 1
copy foobar to 'foobar_2017_08_19_11_17_00_data.csv';

-- stage: 2
drop table foobar;

-- stage: 3
create table foobar (
foo text,
bar bigint,
primary key ((foo))
);

-- stage: 4
copy foobar from 'foobar_2017_08_19_11_17_00_data.csv';

-- down:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant