Delete columns in your table
Alter the schema of your database tables by removing columns using the DataStax Astra DB REST API.
If you find an attribute is no longer required in a table, you
can remove a column by sending a
DELETE request to delete the column. All column data will be deleted along with the column schema.
Use the Delete a column endpoint to remove a column from a table you created previously.
Drop the column
users that was added in
Add columns to a table.
DELETE request to
to delete a column. All column data will be deleted along with the column schema.
curl -s --location \ --request DELETE http://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace/tables/users/columns/email \ --header "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \ --header "Content-Type: application/json"
Note that the URL includes the keyword
columns followed by the column
name, in this case,
Run the cURL call.
If the call is successful, a
204 message is returned.