简体   繁体   English

创建表时的 azure Cosmos db 问题

[英]azure cosmos db issue in creating table

I am trying create table in azure cosmos db (cassandra).我正在尝试在 azure cosmos db (cassandra) 中创建表。 my create command is我的创建命令是

(
    notifierid text,
    notification_date timeuuid,
    actorid text,
    bucketid text,
    categories set<int>,
    entityactiontype int,
    entityid text,
    entityownerid text,
    entitytype text,
    status int,
    viewedstatus boolean,
    PRIMARY KEY
 (notifierid, notification_date))
 WITH CLUSTERING ORDER BY (notification_date DESC)

when i run this command through dashboard i get this error当我通过仪表板运行此命令时,我收到此错误

"WITH CLUSTERING ORDER BY (notification_date DESC) WITH cosmosdb_provisioned_throughput=400;: {"readyState":4,"responseText":"\\"{\\\\"message\\\\":\\\\"line 15:382 no viable alternative at input 'WITH (...nt>,\\\\n entityactiontype int,\\\\n entityid text,\\\\n entityownerid text,\\\\n "WITH CLUSTERING ORDER BY (notification_date DESC) WITH cosmosdb_provisioned_throughput=400;: {"readyState":4,"responseText":"\\"{\\\\"message\\\\":\\\\"line 15:382 在输入时没有可行的替代方案'WITH (...nt>,\\\\n entityactiontype int,\\\\n entityid text,\\\\n entityownerid text,\\\\n
entitytype text,\\\\n status int,\\\\n viewedstatus boolean,\\\\n PRIMARY KEY\\\\n (notifierid, notification_date))\\\\n WITH CLUSTERING ORDER BY (notification_date DESC) WITH...)" entitytype text,\\\\n status int,\\\\nviewedstatus boolean,\\\\n PRIMARY KEY\\\\n (notifierid, notification_date))\\\\n WITH CLUSTERING ORDER BY (notification_date DESC) WITH...)"

The cassandra api for Cosmos DB isn't 100% compatible. Cosmos DB 的 cassandra api 不是 100% 兼容的。 My guess is that the WITH clause is not supported in cosmos db.我的猜测是 Cosmos db 不支持 WITH 子句。 We found some other anomalies that caused us to switch from the Cassandra API to the more robust documents.我们发现了一些其他异常情况,导致我们从 Cassandra API 切换到更强大的文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM