如何在 azure cosmosdb arm 模板中定义 PRIMARY KEY
How to define PRIMARY KEY in azure cosmosdb arm template
是否可以在 azure cosmosdb cassandra arm 模板中定义主键?
假设我有下一个 table:
CREATE TABLE foo
(
id text
name test
PRIMARY KEY (id)
)
还有我的 ARM 模板:
"schema":{
"columns":[
{
"name":"id",
"type":"text"
}
],
"partitionKeys":[
{"name":"id"} // how to define primary key ?
}
Cassandra 中的主键由一个或多个分区列以及零个或多个聚类列组成。在 ARM 模板中,它们被定义为 partitionKeys
和 clusterKeys
对象数组。这是来自 documentation 的示例:
"partitionKeys": [
{ "name": "machine" },
{ "name": "cpu" },
{ "name": "mtime" }
],
"clusterKeys": [
{
"name": "loadid",
"orderBy": "asc"
}
]
是否可以在 azure cosmosdb cassandra arm 模板中定义主键?
假设我有下一个 table:
CREATE TABLE foo
(
id text
name test
PRIMARY KEY (id)
)
还有我的 ARM 模板:
"schema":{
"columns":[
{
"name":"id",
"type":"text"
}
],
"partitionKeys":[
{"name":"id"} // how to define primary key ?
}
Cassandra 中的主键由一个或多个分区列以及零个或多个聚类列组成。在 ARM 模板中,它们被定义为 partitionKeys
和 clusterKeys
对象数组。这是来自 documentation 的示例:
"partitionKeys": [
{ "name": "machine" },
{ "name": "cpu" },
{ "name": "mtime" }
],
"clusterKeys": [
{
"name": "loadid",
"orderBy": "asc"
}
]