将JSON模式转换为CQL(Cassandra)模式

时间:2017-07-21 14:50:22

标签: node.js cassandra datastax cql jsonschema

我想将JSON对象(如下所示)转换为Cassandra架构/表。

例如,像这样:

{
    "type": "object",
    "properties": {
        "name": {
            "type": "string"
        },
        "age": {
            "type": "integer"
        }
    }
}

对于这样的事情:

CREATE TABLE IF NOT EXISTS people (
    name text PRIMARY KEY,
    age int);

在Node.js中,使用Datastax Cassandra driver

所以本质上:使用Node.js我想基于JSON模式创建Cassandra表(无需手动创建表,但让Node解析JSON对象并构建用于创建Cassandra表的脚本)。 p>

0 个答案:

没有答案