我在 MongoDB 中有以下文档:
{
"_id" : ObjectId("529632350083bc14d145bb56"),
"CaseId" : "8f68cf65-80ad-4950-88d5-e322d0296461",
"CaseAddressString" : "527 Irving Avenue, Rivereno",
"CaseOpenDatetime" : ISODate("2013-11-22T17:54:50.198Z"),
"CaseBeginDatetime" : ISODate("2013-11-19T17:54:50.198Z"),
"CaseDescription" : "Veniam deserunt nisi pariatur non commodo pariatur in.",
"RequestorFirstName" : "Morgan",
"RequestorLastName" : "Nunez",
"age" : 41,
"gender" : "female",
"CasePhoneNumbers" : [
{
"type" : "home",
"number" : "+1 (976) 478-2278"
},
{
"type" : "fax",
"number" : "+1 (801) 463-3144"
}
],
"location" : [
-122.394372,
37.765385
],
"CaseLat" : 37.727456,
"CaseLong" : -122.416738,
"ServiceName" : "Missing Sign",
"CaseCurrentStatusDatetime" : ISODate("0NaN-NaN-NaNTNaN:NaN:NaNZ")
}
数组让CasePhoneNumbers
我有些头疼。我正在尝试构建一个可以与 Teiid 一起使用的模式文件。我已经构建了以下内容,它在我的项目中运行良好。现在要插入最后一部分,我很茫然。
CREATE FOREIGN TABLE cases(
id varchar(50) PRIMARY KEY,
CaseId varchar(50),
CaseAddressString varchar(50),
CaseOpenDatetime date,
CaseBeginDatetime date,
CaseDescription varchar(200),
RequestorFirstName varchar(50),
RequestorLastName varchar(50),
CaseCurrentStatus varchar(25),
age integer,
gender varchar(20),
CaseLat float,
CaseLong float,
ServiceName varchar(50)
)
OPTIONS(UPDATABLE 'TRUE');