Reputation: 397
When I run my Python scripts that use Cassandra, I get the following warning:
/home/ubuntu/.local/lib/python2.7/site-packages/cassandra/cqlengine/management.py:545: UserWarning: CQLENG_ALLOW_SCHEMA_MANAGEMENT environment variable is not set. Future versions of this package will require this variable to enable management functions.
Sounds reasonable enough, but I searched and I searched and couldn't figure out what CQLENG_ALLOW_SCHEMA_MANAGEMENT
is or how to set it.
What is it and what should I set it to?
Upvotes: 2
Views: 2751
Reputation: 2283
Looking at the code of the driver, it seems that it is a boolean flag that will indicate if the application will be allowed or not to modify the schema with the application.
There are several examples like this fix for a django project or this eventsourcing code that solves the issue with a quick and dirty approach, setting explicitly the value with something like:
if os.getenv('CQLENG_ALLOW_SCHEMA_MANAGEMENT') is None:
os.environ['CQLENG_ALLOW_SCHEMA_MANAGEMENT'] = '1'
Doing some additional research, Srikanth Bemineni's post in the driver forum, mentioned that he was able to solve the issue using the new integrated cqlengine in the cassandra python driver instead of using the cqlengine from the module, but I couldn't figure out what was he referring to.
Upvotes: 3