c# - 创建表中的 azure cosmos db 问题
问题描述
我正在尝试在 azure cosmos db (cassandra) 中创建表。我的创建命令是
(
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)
当我通过仪表板运行此命令时,我收到此错误
“通过(notification_date DESC)进行聚类排序,使用 cosmosdb_provisioned_throughput=400;:{“readyState”:4,“responseText”:“\”{\\“message\\”:\\“第 15:382 行输入时没有可行的替代方案'WITH (...nt>,\\n entityactiontype int,\\n entityid 文本,\\n entityownerid 文本,\\n
entitytype 文本,\\n 状态 int,\\n 查看状态布尔值,\\n 主键\\n (notifierid, notification_date))\\n WITH CLUSTERING ORDER BY (notification_date DESC) WITH...)"
解决方案
Cosmos DB 的 cassandra api 不是 100% 兼容的。我的猜测是 cosmos db 不支持 WITH 子句。我们发现了一些其他异常情况,导致我们从 Cassandra API 切换到更强大的文档。
推荐阅读
- java - MongoDB 文档使用 Java 中的 findOneAndUpdate 方法更新数组元素
- node.js - Npm 客户端看起来像更新但没有更新
- amazon-web-services - 使用 aws cli 创建 Kinesis Analytics 应用程序
- php - 在php中获取两个日期之间的差异给出错误
- wordpress - 扩展 WP Page Builder 编辑器宽度
- asp.net - React Native:为什么将查询参数附加到我的 .Net API 调用会自动返回 404 错误?
- flutter - Flutter 中一个简单的应用程序的问题
- php - WooCommerce 自定义结帐字段仅适用于 1 个国家/地区
- autodesk-forge - 模型衍生 API - 从 dwg 到 obj 的转换
- javascript - Vuex 状态不更新数据