question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: missing keyspace in migration statement

See original GitHub issue

I have a migration file, referencing its table without a keyspace. The migration fails, with the following error message:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/cassandra_migrate/migrator.py", line 380, in _apply_migration
InvalidRequest: Error from server: code=2200 [Invalid query] message="No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename"

cassandra-migrate could issue a USE statement before the first migration, considering the keyspace configured in its configuration file. If we hardcode the schema in every migration we loose the ability to switch between dev and prod keyspaces.

I really appreciate cassandra-migrate, and am trying to establish it at my company. Unfortunately I am not experienced in Python, to submit a pull request, instead of opening the issues.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
holgerwcommented, Jul 12, 2017

This issue was blocking our adoption at NIC.br . Started using cassandra-migrate with version 0.2.2. Thank’s for your efforts.

0reactions
danielkzacommented, Jul 11, 2017

Should be fixed in 0.2.1. Haven’t had the chance to test it that much, so please do if you can!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kong new install failing with "Error during migration 2016-02 ...
Kong data store is a new Cassandra 2.2.8 DB with no Kong keyspace initially. Cassandra cluster is 2 nodes -- 1 node in...
Read more >
Missing data in Cassandra database - Stack Overflow
CREATE KEYSPACE migration WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 3}; CREATE TABLE migration.mock_data ( id ...
Read more >
Migrating to Amazon Keyspaces
You can migrate your data to Amazon Keyspaces from Cassandra databases running on premises or on Amazon Elastic Compute Cloud (Amazon EC2) by...
Read more >
ALTER TABLE | CQL for Cassandra 3.0
Note: Cassandra no longer requires the use of frozen for tuples: ... For example, to specify the teams table in the cycling keyspace:...
Read more >
Apache Cassandra to Scylla Migration Process | ScyllaDB Docs
Create manually / Migrate your schema (keyspaces, tables, ... (cluster 1 and cluster 2) into a list writes = [] #insert 1st statement...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found