Tworzę api, które będą działać na mongo lub cassandra, z tego powodu używam "_id" jako nazwy kolumny.Cassandra poprawne nazwy kolumn
To powinno być poprawną nazwą zgodnie z docs:
Keyspace, column, and table names created using CQL can only contain alphanumeric and underscore characters. User-defined data type names and field names, user-defined function names, and user-defined aggregate names created using CQL can only contain alphanumeric and underscore characters. If you enter names for these objects using anything other than alphanumeric characters or underscores, Cassandra will issue an invalid syntax message and fail to create the object.
Jednak gdy uruchamiam to stwierdzenie:
CREATE TABLE users(_id: bigint, entires: map<timestamp, text>, PRIMARY KEY(_id));
wrócę następujący błąd:
Invalid syntax at line 1, char 20
Czy w nazwach kolumn można używać podkreśleń?
chociaż powinno być nielegalne według docs, to faktycznie działa. zobacz moją odpowiedź – kostja