3
votes

Is it possible to have an alias for a table in Cassandra? DataStax Enterprise version we are using is 3.2.1

Your help will greatly be appreciated.

For ex:

 select s from example s where s.id='1234';
2

2 Answers

4
votes

Unfortunately there is no way to alias tables in Apache Cassandra. You can alias returned column names using as (reference), i.e.:

SELECT event_id, dateOf(created_at) as creation_date, blobAsText(content) as content FROM timeline;

Howver, you cannot alias tables.

0
votes

You cannot alias a table in Cassandra. And it is important to understand there is no reason to alias a table in Cassandra. A table alias in a RDBMS query is helpful when a query involves more than one table such as a join. That simply does not happen in Cassandra.