如何在cassand中声明映射定义类型的列表

2024-05-23 16:43:15 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在cassandra中声明一个对象列表,我已经创建了类型对象

CREATE TYPE profiles.educations (
    major text,
    end text,
    name text,
    degree text,
    start text,
    desce text
);

如何声明映射教育类型的列表 因为我有一个json文件,格式如下:

{
...
"educations": [
    {
      "start": "2009",
      "major": "Business Administration and Management, General",
      "end": "2010",
      "name": "Gordon Institute of Business Science - University of Pretoria",
      "degree": "PDBA"
    },
    {
      "start": "2002",
      "major": "Marketing Management",
      "end": "2006",
      "name": "University of Pretoria/Universiteit van Pretoria",
      "degree": "B. com with specialization in Marketing Management"
    },
    {
      "major": "Finanzas",
      "end": "2013",
      "name": "Universidad de Los Andes",
      "degree": "Maestr\u00eda en Finanzas",
      "start": "2011",
      "desce": ""
    }]
...
}

Tags: of对象textname声明类型列表start